Feature: add an option to set udp timeout

This commit is contained in:
xjasonlyu
2021-02-26 14:22:16 +08:00
parent ec4d98c4bf
commit 9502706ed9
3 changed files with 30 additions and 15 deletions

View File

@@ -15,6 +15,7 @@ var key = new(engine.Key)
func init() {
flag.IntVar(&key.Mark, "fwmark", 0, "Set firewall MARK (Linux only)")
flag.IntVar(&key.MTU, "mtu", 0, "Set device maximum transmission unit (MTU)")
flag.IntVar(&key.UDPTimeout, "udp-timeout", 0, "Set timeout for each UDP session")
flag.BoolVar(&key.Version, "version", false, "Show version information and quit")
flag.StringVar(&key.Device, "device", "", "Use this device [driver://]name")
flag.StringVar(&key.Interface, "interface", "", "Use network INTERFACE (Linux/MacOS only)")