commands for xtcp, stcp add 'bind_port', fix #767

This commit is contained in:
fatedier
2018-05-16 23:45:44 +08:00
parent c7a457a045
commit 3e349455a0
5 changed files with 23 additions and 3 deletions

View File

@@ -39,7 +39,8 @@ func init() {
stcpCmd.PersistentFlags().StringVarP(&serverName, "server_name", "", "", "server name")
stcpCmd.PersistentFlags().StringVarP(&localIp, "local_ip", "i", "127.0.0.1", "local ip")
stcpCmd.PersistentFlags().IntVarP(&localPort, "local_port", "l", 0, "local port")
stcpCmd.PersistentFlags().StringVarP(&bindAddr, "bind_addr", "", "", "bind addr such as 127.0.0.1:9000")
stcpCmd.PersistentFlags().StringVarP(&bindAddr, "bind_addr", "", "", "bind addr")
stcpCmd.PersistentFlags().IntVarP(&bindPort, "bind_port", "", 0, "bind port")
stcpCmd.PersistentFlags().BoolVarP(&useEncryption, "ue", "", false, "use encryption")
stcpCmd.PersistentFlags().BoolVarP(&useCompression, "uc", "", false, "use compression")
@@ -69,6 +70,7 @@ var stcpCmd = &cobra.Command{
cfg.LocalIp = localIp
cfg.LocalPort = localPort
cfg.BindAddr = bindAddr
cfg.BindPort = bindPort
cfg.UseEncryption = useEncryption
cfg.UseCompression = useCompression