mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 01:33:15 +08:00
Feature: add udp-rlybuf option
* Default UDP relay buffer size: 16KiB
This commit is contained in:
@@ -129,6 +129,14 @@ func general(k *Key) error {
|
||||
}
|
||||
tunnel.SetUDPTimeout(k.UDPTimeout)
|
||||
}
|
||||
|
||||
if k.UDPRelayBufferSize != "" {
|
||||
size, err := units.RAMInBytes(k.UDPRelayBufferSize)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tunnel.SetUDPRelayBufferSize(int(size))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user