Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientCmd = cli.Command{ Name: "client", Aliases: []string{"cli"}, Usage: "start a client", Action: StartClient, Flags: []cli.Flag{ &cli.StringFlag{ Name: "protocol, p", Value: "udp", Usage: "server protocol, support udp & quic", }, &cli.StringFlag{ Name: "address, addr", Value: "127.0.0.1:8888", Usage: "server protocol, support udp & quic", }, }, }
View Source
var CodecCmd = cli.Command{ Name: "codec", Aliases: []string{"codec"}, Usage: "parse packet for pointed protocol", Action: StartCodec, Flags: []cli.Flag{ &cli.StringFlag{ Name: "protocol, p", Value: "quic", Usage: "server protocol, support:" + server.DisplayProtocols(), }, &cli.StringFlag{ Name: "file, f", Value: "./data.txt", Usage: "data file path", }, }, }
View Source
var ProxyCmd = cli.Command{ Name: "proxy", Aliases: []string{"proxy"}, Usage: "start a proxy in ip protocol", Action: StartProxy, Flags: []cli.Flag{ cli.StringFlag{ Name: "host", Value: "0.0.0.0", Usage: "proxy host, default: 0.0.0.0", }, cli.StringFlag{ Name: "port, p", Value: "8887", Usage: "proxy port, default: 8887", }, cli.StringFlag{ Name: "file_port, fp", Value: "8886", Usage: "file server port, default:8886", }, cli.IntFlag{ Name: "type, t", Value: 0, Usage: "proxy type, default: 0(socks5)", }, }, }
View Source
var ServerCmd = cli.Command{ Name: "server", Aliases: []string{"ser"}, Usage: "start a server", Action: StartServer, Flags: []cli.Flag{ &cli.StringFlag{ Name: "protocol, p", Value: "udp", Usage: "server protocol, support:" + server.DisplayProtocols(), }, &cli.StringFlag{ Name: "address, addr", Value: "0.0.0.0:8888", Usage: "server address", }, &cli.StringFlag{ Name: "handler, hd", Value: string(server.HEcho), Usage: "server handler, support:" + server.DisplayHandlers(), }, &cli.StringFlag{ Name: "server_type, st", Value: "default", Usage: "server type, support:", }, }, }
Functions ¶
func StartClient ¶
func StartCodec ¶
func StartProxy ¶
func StartServer ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.