diff --git a/src/shrpx.cc b/src/shrpx.cc index 16bb2501..76a268de 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -385,6 +385,8 @@ void print_help(std::ostream& out) << " unless either -p or --client is specified.\n" << "\n" << "OPTIONS:\n" + << "\n" + << " Connections:\n" << " -b, --backend=\n" << " Set backend host and port.\n" << " Default: '" @@ -394,33 +396,17 @@ void print_help(std::ostream& out) << " Set frontend host and port.\n" << " Default: '" << get_config()->host << "," << get_config()->port << "'\n" + << " --backlog= Set listen backlog size.\n" + << " Default: " + << get_config()->backlog << "\n" + << "\n" + << " Performance:\n" << " -n, --workers=\n" << " Set the number of worker threads.\n" << " Default: " << get_config()->num_worker << "\n" - << " -c, --spdy-max-concurrent-streams=\n" - << " Set the maximum number of the concurrent\n" - << " streams in one SPDY session.\n" - << " Default: " - << get_config()->spdy_max_concurrent_streams << "\n" - << " -L, --log-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" + << "\n" + << " Timeout:\n" << " --frontend-spdy-read-timeout=\n" << " Specify read timeout for SPDY frontend\n" << " connection. Default: " @@ -446,31 +432,8 @@ void print_help(std::ostream& out) << " Specify keep-alive timeout for backend\n" << " connection. Default: " << get_config()->downstream_idle_read_timeout.tv_sec << "\n" - << " --accesslog Print simple accesslog to stderr.\n" - << " --frontend-spdy-window-bits=\n" - << " Sets the initial window size of SPDY\n" - << " frontend connection to 2**.\n" - << " Default: " - << get_config()->spdy_upstream_window_bits << "\n" - << " --backend-spdy-window-bits=\n" - << " Sets the initial window size of SPDY\n" - << " backend connection to 2**.\n" - << " Default: " - << get_config()->spdy_downstream_window_bits << "\n" - << " --pid-file= Set path to save PID of this program.\n" - << " --user= Run this program as USER. This option is\n" - << " intended to be used to drop root privileges.\n" - << " --conf= Load configuration from PATH.\n" - << " Default: " - << get_config()->conf_path << "\n" - << " --syslog Send log messages to syslog.\n" - << " --syslog-facility=\n" - << " Set syslog facility.\n" - << " Default: " - << str_syslog_facility(get_config()->syslog_facility) << "\n" - << " --backlog= Set listen backlog size.\n" - << " Default: " - << get_config()->backlog << "\n" + << "\n" + << " SSL/TLS:\n" << " --ciphers= Set allowed cipher list. The format of the\n" << " string is described in OpenSSL ciphers(1).\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" << " wide certificates, they are loaded\n" << " at startup regardless of this option.\n" + << "\n" + << " SPDY:\n" + << " -c, --spdy-max-concurrent-streams=\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" + << " Sets the initial window size of SPDY\n" + << " frontend connection to 2**.\n" + << " Default: " + << get_config()->spdy_upstream_window_bits << "\n" + << " --backend-spdy-window-bits=\n" + << " Sets the initial window size of SPDY\n" + << " backend connection to 2**.\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=\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=\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= Set path to save PID of this program.\n" + << " --user= Run this program as USER. This option is\n" + << " intended to be used to drop root privileges.\n" + << " --conf= Load configuration from PATH.\n" + << " Default: " + << get_config()->conf_path << "\n" << " -h, --help Print this help.\n" << std::endl; }