update documents about multiple ports

This commit is contained in:
Shizun Ge 2024-01-16 21:53:00 -08:00
parent fee1f1a67d
commit 7da8e5e9ab
2 changed files with 8 additions and 4 deletions

View file

@ -61,14 +61,18 @@ Usage of ./endlessh-go
when logging hits line file:N, emit a stack trace
-log_dir string
If non-empty, write log files in this directory
-log_link string
If non-empty, add symbolic links in this directory to the log files
-logbuflevel int
Buffer log messages logged at this level or lower (-1 means don't buffer; 0 means buffer INFO only; ...). Has limited applicability on non-prod platforms.
-logtostderr
log to standard error instead of files
-max_clients int
Maximum number of clients (default 4096)
-max_mind_db string
Path to the MaxMind DB file.
-port string
SSH listening port (default "2222")
-port value
SSH listening port. You may provide multiple -port flags to listen to multiple ports. (default "2222")
-prometheus_entry string
Entry point for prometheus (default "metrics")
-prometheus_host string
@ -76,7 +80,7 @@ Usage of ./endlessh-go
-prometheus_port string
The port for prometheus (default "2112")
-stderrthreshold value
logs at or above this threshold go to stderr
logs at or above this threshold go to stderr (default 2)
-v value
log level for V logs
-vmodule value

View file

@ -116,7 +116,7 @@ func main() {
maxClients := flag.Int64("max_clients", 4096, "Maximum number of clients")
connType := flag.String("conn_type", "tcp", "Connection type. Possible values are tcp, tcp4, tcp6")
connHost := flag.String("host", "0.0.0.0", "SSH listening address")
flag.Var(&connPorts, "port", "SSH listening port")
flag.Var(&connPorts, "port", fmt.Sprintf("SSH listening port. You may provide multiple -port flags to listen to multiple ports. (default %q)", defaultPort))
prometheusEnabled := flag.Bool("enable_prometheus", false, "Enable prometheus")
prometheusHost := flag.String("prometheus_host", "0.0.0.0", "The address for prometheus")
prometheusPort := flag.String("prometheus_port", "2112", "The port for prometheus")