mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-14 05:11:47 +00:00
feat: reduce obfs gc overhead by reusing buffers
This commit is contained in:
@@ -53,10 +53,7 @@ func NewServer(addr string, protocol string, tlsConfig *tls.Config, quicConfig *
|
||||
return nil, err
|
||||
}
|
||||
if obfuscator != nil {
|
||||
pktConn = &obfsUDPConn{
|
||||
Orig: udpConn,
|
||||
Obfuscator: obfuscator,
|
||||
}
|
||||
pktConn = newObfsUDPConn(udpConn, obfuscator)
|
||||
} else {
|
||||
pktConn = udpConn
|
||||
}
|
||||
@@ -66,10 +63,7 @@ func NewServer(addr string, protocol string, tlsConfig *tls.Config, quicConfig *
|
||||
return nil, err
|
||||
}
|
||||
if obfuscator != nil {
|
||||
pktConn = &obfsPacketConn{
|
||||
Orig: ftcpConn,
|
||||
Obfuscator: obfuscator,
|
||||
}
|
||||
pktConn = newObfsPacketConn(ftcpConn, obfuscator)
|
||||
} else {
|
||||
pktConn = ftcpConn
|
||||
}
|
||||
|
Reference in New Issue
Block a user