mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 02:14:02 +03:00
Introduce pools to obfuscated2
This commit is contained in:
+1
-6
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user