예제 #1
0
파일: main.go 프로젝트: koolshare/demux
func init() {
	flag.BoolVar(&flagListProtocols, "list-protocols", false,
		"list all registered protocols and then exit")
	flag.BoolVar(&flagUseTransparent, "transparent", false,
		"use transparent proxying (only available on Linux)")
	flag.Uint16VarP(&flagListenPort, "port", "p", 0,
		"port to listen on")
	flag.StringVarP(&flagListenHost, "host", "h", "0.0.0.0",
		"host to listen on")
}
예제 #2
0
파일: main.go 프로젝트: bmbernie/socks
func init() {
	flag.BoolVarP(&flagVerbose, "verbose", "v", false, "be more verbose")
	flag.BoolVarP(&flagQuiet, "quiet", "q", false, "be quiet")
	flag.BoolVarP(&flagTrace, "trace", "t", false, "trace bytes copied")

	flag.StringVarP(&flagHost, "host", "h", "", "host to listen on")
	flag.Uint16VarP(&flagPort, "port", "p", 8000, "port to listen on")
	flag.VarP(&flagAllowedSourceIPs, "source-ips", "s",
		"valid source IP addresses (if none given, all allowed)")
	flag.VarP(&flagAllowedDestinationIPs, "dest-ips", "d",
		"valid destination IP addresses (if none given, all allowed)")

	flag.StringVar(&flagRemoteListener, "remote-listener", "",
		"open the SOCKS port on the remote address (e.g. ssh://user:pass@host:port)")
}