new feature: assign a random port if remote_port is 0 in type tcp and

udp
This commit is contained in:
fatedier committed 2018-01-17 22:18:34 +08:00
1 parent 3f6799c06a
commit b2c846664d
21 files changed
+379 -238

No files matched your search

+2 -2
View File
@@ -99,7 +99,7 @@ func main() {
if args["status"] != nil {
if args["status"].(bool) {
if err = CmdStatus(); err != nil {
fmt.Println("frps get status error: %v\n", err)
fmt.Printf("frps get status error: %v\n", err)
os.Exit(1)
} else {
os.Exit(0)
@@ -132,7 +132,7 @@ func main() {
os.Exit(1)
}
config.ClientCommonCfg.ServerAddr = addr[0]
config.ClientCommonCfg.ServerPort = serverPort
config.ClientCommonCfg.ServerPort = int(serverPort)
}
if args["-v"] != nil {
+1 -1
View File
@@ -91,7 +91,7 @@ func main() {
os.Exit(1)
}
config.ServerCommonCfg.BindAddr = addr[0]
config.ServerCommonCfg.BindPort = bindPort
config.ServerCommonCfg.BindPort = int(bindPort)
}
if args["-v"] != nil {