diff --git a/src/frp/cmd/frpc/main.go b/src/frp/cmd/frpc/main.go index 9fbab56d..5cb67434 100644 --- a/src/frp/cmd/frpc/main.go +++ b/src/frp/cmd/frpc/main.go @@ -36,7 +36,8 @@ var usage string = `frpc is the client of frp Usage: frpc [-c config_file] [-L log_file] [--log-level=] [--server-addr=] - frpc -h | --help | --version + frpc -h | --help + frpc -v | --version Options: -c config_file set config file @@ -88,6 +89,13 @@ func main() { client.ServerPort = serverPort } + if args["-v"] != nil { + if args["-v"].(bool) { + fmt.Println(version.Full()) + os.Exit(0) + } + } + log.InitLog(client.LogWay, client.LogFile, client.LogLevel, client.LogMaxDays) // wait until all control goroutine exit diff --git a/src/frp/cmd/frps/main.go b/src/frp/cmd/frps/main.go index b3cfc774..910827f0 100644 --- a/src/frp/cmd/frps/main.go +++ b/src/frp/cmd/frps/main.go @@ -36,19 +36,19 @@ import ( var usage string = `frps is the server of frp Usage: - frps [-c config_file] [-L log_file] [--log-level=] [--addr=] - frps --reload - frps -h | --help - frps -v | --version + frps [-c config_file] [-L log_file] [--log-level=] [--addr=] + frps --reload + frps -h | --help + frps -v | --version Options: - -c config_file set config file - -L log_file set output log file, including console - --log-level= set log level: debug, info, warn, error - --addr= listen addr for client, example: 0.0.0.0:7000 - --reload reload ini file and configures in common section won't be changed - -h --help show this screen - -v --version show version + -c config_file set config file + -L log_file set output log file, including console + --log-level= set log level: debug, info, warn, error + --addr= listen addr for client, example: 0.0.0.0:7000 + --reload reload ini file and configures in common section won't be changed + -h --help show this screen + -v --version show version ` func main() {