-
Notifications
You must be signed in to change notification settings - Fork 133
feat: enhance about ip revise logic #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,17 +42,17 @@ goc server --port=localhost:8080 | |
| if err != nil { | ||
| log.Fatalf("New file based server failed, err: %v", err) | ||
| } | ||
| server.IPRevise = iprevise | ||
| server.IPRevise = IPRevise | ||
| server.Run(port) | ||
| }, | ||
| } | ||
|
|
||
| var port, localPersistence string | ||
| var iprevise bool | ||
| var IPRevise bool | ||
|
|
||
| func init() { | ||
| serverCmd.Flags().StringVarP(&port, "port", "", ":7777", "listen port to start a coverage host center") | ||
| serverCmd.Flags().StringVarP(&localPersistence, "local-persistence", "", "_svrs_address.txt", "the file to save services address information") | ||
| serverCmd.Flags().BoolVarP(&iprevise, "ip_revise", "", true, "setting the network type(default:regist server use proxy or under nat、same network ect,direct:use register request parm)") | ||
| serverCmd.Flags().BoolVarP(&IPRevise, "ip_revise", "", true, "whether to do ip revise during registering. Recommend to set this as false if under NAT or Proxy environment") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 客户端和服务端的 ip_revise 参数类型未统一,命令行使用上会给用户造成困惑。
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 目前是设计上的妥协,客户端期望是个默认值。
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 服务端 ip_revise 设置默认值,客户端的 ip_revise 可以覆盖服务端默认值。 |
||
| rootCmd.AddCommand(serverCmd) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BoolVarP better?