Feature: add fwmark support

This commit is contained in:
xjasonlyu
2021-02-10 15:46:55 +08:00
parent ea62deb0b6
commit 7f7f2913a8
11 changed files with 136 additions and 40 deletions

View File

@@ -15,12 +15,13 @@ var key = new(engine.Key)
func init() {
flag.StringVarP(&key.Device, "device", "d", "", "use this device [driver://]name")
flag.IntVar(&key.Mark, "fwmark", 0, "set firewall MARK (Linux only)")
flag.StringVarP(&key.Interface, "interface", "i", "", "use network INTERFACE (Linux/MacOS only)")
flag.StringVarP(&key.Proxy, "proxy", "p", "", "use this proxy [protocol://]host[:port]")
flag.StringVarP(&key.LogLevel, "loglevel", "l", "info", "log level [debug|info|warn|error|silent]")
flag.Uint32VarP(&key.MTU, "mtu", "m", 0, "set device maximum transmission unit (MTU)")
flag.StringVarP(&key.Proxy, "proxy", "p", "", "use this proxy [protocol://]host[:port]")
flag.StringVar(&key.Stats, "stats", "", "HTTP statistic server listen address")
flag.StringVar(&key.Token, "token", "", "HTTP statistic server auth token")
flag.Uint32VarP(&key.MTU, "mtu", "m", 0, "set device maximum transmission unit (MTU)")
flag.BoolVarP(&key.Version, "version", "v", false, "show version information and quit")
flag.Parse()
}