mirror of
https://github.com/moparisthebest/spdylay
synced 2024-11-15 22:15:14 -05:00
shrpx: Group up options in -h output
This commit is contained in:
parent
9c70c1b867
commit
774e64d2b4
112
src/shrpx.cc
112
src/shrpx.cc
@ -385,6 +385,8 @@ void print_help(std::ostream& out)
|
|||||||
<< " unless either -p or --client is specified.\n"
|
<< " unless either -p or --client is specified.\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "OPTIONS:\n"
|
<< "OPTIONS:\n"
|
||||||
|
<< "\n"
|
||||||
|
<< " Connections:\n"
|
||||||
<< " -b, --backend=<HOST,PORT>\n"
|
<< " -b, --backend=<HOST,PORT>\n"
|
||||||
<< " Set backend host and port.\n"
|
<< " Set backend host and port.\n"
|
||||||
<< " Default: '"
|
<< " Default: '"
|
||||||
@ -394,33 +396,17 @@ void print_help(std::ostream& out)
|
|||||||
<< " Set frontend host and port.\n"
|
<< " Set frontend host and port.\n"
|
||||||
<< " Default: '"
|
<< " Default: '"
|
||||||
<< get_config()->host << "," << get_config()->port << "'\n"
|
<< get_config()->host << "," << get_config()->port << "'\n"
|
||||||
|
<< " --backlog=<NUM> Set listen backlog size.\n"
|
||||||
|
<< " Default: "
|
||||||
|
<< get_config()->backlog << "\n"
|
||||||
|
<< "\n"
|
||||||
|
<< " Performance:\n"
|
||||||
<< " -n, --workers=<CORES>\n"
|
<< " -n, --workers=<CORES>\n"
|
||||||
<< " Set the number of worker threads.\n"
|
<< " Set the number of worker threads.\n"
|
||||||
<< " Default: "
|
<< " Default: "
|
||||||
<< get_config()->num_worker << "\n"
|
<< get_config()->num_worker << "\n"
|
||||||
<< " -c, --spdy-max-concurrent-streams=<NUM>\n"
|
<< "\n"
|
||||||
<< " Set the maximum number of the concurrent\n"
|
<< " Timeout:\n"
|
||||||
<< " streams in one SPDY session.\n"
|
|
||||||
<< " Default: "
|
|
||||||
<< get_config()->spdy_max_concurrent_streams << "\n"
|
|
||||||
<< " -L, --log-level=<LEVEL>\n"
|
|
||||||
<< " Set the severity level of log output.\n"
|
|
||||||
<< " INFO, WARNING, ERROR and FATAL.\n"
|
|
||||||
<< " Default: WARNING\n"
|
|
||||||
<< " -D, --daemon Run in a background. If -D is used, the\n"
|
|
||||||
<< " current working directory is changed to '/'.\n"
|
|
||||||
<< " -s, --spdy-proxy SSL/SPDY proxy mode.\n"
|
|
||||||
<< " --client Instead of accepting SPDY/HTTPS connection,\n"
|
|
||||||
<< " accept HTTP connection and communicate with\n"
|
|
||||||
<< " backend server in SPDY. To use shrpx as\n"
|
|
||||||
<< " a forward proxy, use -p option instead.\n"
|
|
||||||
<< " -p, --client-proxy Like --client option, but it also requires\n"
|
|
||||||
<< " the request path from frontend must be\n"
|
|
||||||
<< " an absolute URI, suitable for use as a\n"
|
|
||||||
<< " forward proxy."
|
|
||||||
<< " --add-x-forwarded-for\n"
|
|
||||||
<< " Append X-Forwarded-For header field to the\n"
|
|
||||||
<< " downstream request.\n"
|
|
||||||
<< " --frontend-spdy-read-timeout=<SEC>\n"
|
<< " --frontend-spdy-read-timeout=<SEC>\n"
|
||||||
<< " Specify read timeout for SPDY frontend\n"
|
<< " Specify read timeout for SPDY frontend\n"
|
||||||
<< " connection. Default: "
|
<< " connection. Default: "
|
||||||
@ -446,31 +432,8 @@ void print_help(std::ostream& out)
|
|||||||
<< " Specify keep-alive timeout for backend\n"
|
<< " Specify keep-alive timeout for backend\n"
|
||||||
<< " connection. Default: "
|
<< " connection. Default: "
|
||||||
<< get_config()->downstream_idle_read_timeout.tv_sec << "\n"
|
<< get_config()->downstream_idle_read_timeout.tv_sec << "\n"
|
||||||
<< " --accesslog Print simple accesslog to stderr.\n"
|
<< "\n"
|
||||||
<< " --frontend-spdy-window-bits=<N>\n"
|
<< " SSL/TLS:\n"
|
||||||
<< " Sets the initial window size of SPDY\n"
|
|
||||||
<< " frontend connection to 2**<N>.\n"
|
|
||||||
<< " Default: "
|
|
||||||
<< get_config()->spdy_upstream_window_bits << "\n"
|
|
||||||
<< " --backend-spdy-window-bits=<N>\n"
|
|
||||||
<< " Sets the initial window size of SPDY\n"
|
|
||||||
<< " backend connection to 2**<N>.\n"
|
|
||||||
<< " Default: "
|
|
||||||
<< get_config()->spdy_downstream_window_bits << "\n"
|
|
||||||
<< " --pid-file=<PATH> Set path to save PID of this program.\n"
|
|
||||||
<< " --user=<USER> Run this program as USER. This option is\n"
|
|
||||||
<< " intended to be used to drop root privileges.\n"
|
|
||||||
<< " --conf=<PATH> Load configuration from PATH.\n"
|
|
||||||
<< " Default: "
|
|
||||||
<< get_config()->conf_path << "\n"
|
|
||||||
<< " --syslog Send log messages to syslog.\n"
|
|
||||||
<< " --syslog-facility=<FACILITY>\n"
|
|
||||||
<< " Set syslog facility.\n"
|
|
||||||
<< " Default: "
|
|
||||||
<< str_syslog_facility(get_config()->syslog_facility) << "\n"
|
|
||||||
<< " --backlog=<NUM> Set listen backlog size.\n"
|
|
||||||
<< " Default: "
|
|
||||||
<< get_config()->backlog << "\n"
|
|
||||||
<< " --ciphers=<SUITE> Set allowed cipher list. The format of the\n"
|
<< " --ciphers=<SUITE> Set allowed cipher list. The format of the\n"
|
||||||
<< " string is described in OpenSSL ciphers(1).\n"
|
<< " string is described in OpenSSL ciphers(1).\n"
|
||||||
<< " -k, --insecure When used with -p or --client, don't verify\n"
|
<< " -k, --insecure When used with -p or --client, don't verify\n"
|
||||||
@ -482,6 +445,59 @@ void print_help(std::ostream& out)
|
|||||||
<< " linked OpenSSL is configured to load system\n"
|
<< " linked OpenSSL is configured to load system\n"
|
||||||
<< " wide certificates, they are loaded\n"
|
<< " wide certificates, they are loaded\n"
|
||||||
<< " at startup regardless of this option.\n"
|
<< " at startup regardless of this option.\n"
|
||||||
|
<< "\n"
|
||||||
|
<< " SPDY:\n"
|
||||||
|
<< " -c, --spdy-max-concurrent-streams=<NUM>\n"
|
||||||
|
<< " Set the maximum number of the concurrent\n"
|
||||||
|
<< " streams in one SPDY session.\n"
|
||||||
|
<< " Default: "
|
||||||
|
<< get_config()->spdy_max_concurrent_streams << "\n"
|
||||||
|
<< " --frontend-spdy-window-bits=<N>\n"
|
||||||
|
<< " Sets the initial window size of SPDY\n"
|
||||||
|
<< " frontend connection to 2**<N>.\n"
|
||||||
|
<< " Default: "
|
||||||
|
<< get_config()->spdy_upstream_window_bits << "\n"
|
||||||
|
<< " --backend-spdy-window-bits=<N>\n"
|
||||||
|
<< " Sets the initial window size of SPDY\n"
|
||||||
|
<< " backend connection to 2**<N>.\n"
|
||||||
|
<< " Default: "
|
||||||
|
<< get_config()->spdy_downstream_window_bits << "\n"
|
||||||
|
<< "\n"
|
||||||
|
<< " Mode:\n"
|
||||||
|
<< " -s, --spdy-proxy Enable secure SPDY proxy mode.\n"
|
||||||
|
<< " --client Instead of accepting SPDY/HTTPS connection,\n"
|
||||||
|
<< " accept HTTP connection and communicate with\n"
|
||||||
|
<< " backend server in SPDY. To use shrpx as\n"
|
||||||
|
<< " a forward proxy, use -p option instead.\n"
|
||||||
|
<< " -p, --client-proxy Like --client option, but it also requires\n"
|
||||||
|
<< " the request path from frontend must be\n"
|
||||||
|
<< " an absolute URI, suitable for use as a\n"
|
||||||
|
<< " forward proxy."
|
||||||
|
<< "\n"
|
||||||
|
<< " Logging:\n"
|
||||||
|
<< " -L, --log-level=<LEVEL>\n"
|
||||||
|
<< " Set the severity level of log output.\n"
|
||||||
|
<< " INFO, WARNING, ERROR and FATAL.\n"
|
||||||
|
<< " Default: WARNING\n"
|
||||||
|
<< " --accesslog Print simple accesslog to stderr.\n"
|
||||||
|
<< " --syslog Send log messages to syslog.\n"
|
||||||
|
<< " --syslog-facility=<FACILITY>\n"
|
||||||
|
<< " Set syslog facility.\n"
|
||||||
|
<< " Default: "
|
||||||
|
<< str_syslog_facility(get_config()->syslog_facility) << "\n"
|
||||||
|
<< "\n"
|
||||||
|
<< " Misc:\n"
|
||||||
|
<< " --add-x-forwarded-for\n"
|
||||||
|
<< " Append X-Forwarded-For header field to the\n"
|
||||||
|
<< " downstream request.\n"
|
||||||
|
<< " -D, --daemon Run in a background. If -D is used, the\n"
|
||||||
|
<< " current working directory is changed to '/'.\n"
|
||||||
|
<< " --pid-file=<PATH> Set path to save PID of this program.\n"
|
||||||
|
<< " --user=<USER> Run this program as USER. This option is\n"
|
||||||
|
<< " intended to be used to drop root privileges.\n"
|
||||||
|
<< " --conf=<PATH> Load configuration from PATH.\n"
|
||||||
|
<< " Default: "
|
||||||
|
<< get_config()->conf_path << "\n"
|
||||||
<< " -h, --help Print this help.\n"
|
<< " -h, --help Print this help.\n"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user