mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
@@ -123,10 +123,6 @@ func general(k *Key) error {
|
||||
log.Infof("[DIALER] set fwmark: %#x", k.Mark)
|
||||
}
|
||||
|
||||
if k.TCPWaitTimeout > 0 {
|
||||
tunnel.SetTCPWaitTimeout(k.TCPWaitTimeout)
|
||||
}
|
||||
|
||||
if k.UDPTimeout > 0 {
|
||||
if k.UDPTimeout < time.Second {
|
||||
return errors.New("invalid udp timeout value")
|
||||
|
||||
+1
-2
@@ -13,8 +13,7 @@ type Key struct {
|
||||
TCPModerateReceiveBuffer bool `yaml:"tcp-moderate-receive-buffer"`
|
||||
TCPSendBufferSize string `yaml:"tcp-send-buffer-size"`
|
||||
TCPReceiveBufferSize string `yaml:"tcp-receive-buffer-size"`
|
||||
TCPWaitTimeout time.Duration `yaml:"tcp-wait-timeout"`
|
||||
UDPTimeout time.Duration `yaml:"udp-timeout"`
|
||||
TUNPreUp string `yaml:"tun-pre-up"`
|
||||
TUNPostUp string `yaml:"tun-post-up"`
|
||||
UDPTimeout time.Duration `yaml:"udp-timeout"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user