Introduce pools to obfuscated2

This commit is contained in:
9seconds
2021-03-18 15:01:22 +03:00
parent 58335b3e59
commit 3a44bcb854
4 changed files with 51 additions and 56 deletions
+1 -6
View File
@@ -95,12 +95,7 @@ func (p *Proxy) Shutdown() {
}
func (p *Proxy) doObfuscated2Handshake(ctx *streamContext) error {
handshakeFrame, err := obfuscated2.ReadHandshakeFrame(ctx.clientConn)
if err != nil {
return fmt.Errorf("cannot read handshake frame: %w", err)
}
dc, encryptor, decryptor, err := obfuscated2.ClientHandshake(p.secret.Key[:], handshakeFrame)
dc, encryptor, decryptor, err := obfuscated2.ClientHandshake(p.secret.Key[:], ctx.clientConn)
if err != nil {
return fmt.Errorf("cannot process client handshake: %w", err)
}