@@ -2206,23 +2206,26 @@ To run standalone benchmark for `proxy.py`, use the following command from repo
22062206
22072207``` console
22082208❯ proxy -h
2209- usage: -m [-h] [--enable-events] [--enable-conn-pool] [--threadless]
2210- [--threaded] [--num-workers NUM_WORKERS]
2211- [--local-executor LOCAL_EXECUTOR] [--backlog BACKLOG]
2212- [--hostname HOSTNAME] [--port PORT] [--port-file PORT_FILE]
2213- [--unix-socket-path UNIX_SOCKET_PATH]
2214- [--num-acceptors NUM_ACCEPTORS] [--version] [--log-level LOG_LEVEL]
2215- [--log-file LOG_FILE] [--log-format LOG_FORMAT]
2216- [--open-file-limit OPEN_FILE_LIMIT]
2209+ usage: -m [-h] [--tunnel-hostname TUNNEL_HOSTNAME] [--tunnel-port TUNNEL_PORT]
2210+ [--tunnel-username TUNNEL_USERNAME]
2211+ [--tunnel-ssh-key TUNNEL_SSH_KEY]
2212+ [--tunnel-ssh-key-passphrase TUNNEL_SSH_KEY_PASSPHRASE]
2213+ [--tunnel-remote-port TUNNEL_REMOTE_PORT] [--enable-events]
2214+ [--threadless] [--threaded] [--num-workers NUM_WORKERS]
2215+ [--backlog BACKLOG] [--hostname HOSTNAME] [--port PORT]
2216+ [--port-file PORT_FILE] [--unix-socket-path UNIX_SOCKET_PATH]
2217+ [--local-executor LOCAL_EXECUTOR] [--num-acceptors NUM_ACCEPTORS]
2218+ [--version] [--log-level LOG_LEVEL] [--log-file LOG_FILE]
2219+ [--log-format LOG_FORMAT] [--open-file-limit OPEN_FILE_LIMIT]
22172220 [--plugins PLUGINS [PLUGINS ...]] [--enable-dashboard]
2218- [--work-klass WORK_KLASS ] [--pid-file PID_FILE ]
2219- [--enable-proxy-protocol ]
2220- [--client-recvbuf-size CLIENT_RECVBUF_SIZE ] [--key-file KEY_FILE ]
2221- [--timeout TIMEOUT] [-- server-recvbuf-size SERVER_RECVBUF_SIZE]
2222- [--disable-http- proxy] [--disable-headers DISABLE_HEADERS ]
2223- [--ca-key-file CA_KEY_FILE ] [--ca-cert-dir CA_CERT_DIR ]
2224- [--ca-cert-file CA_CERT_FILE ] [--ca-file CA_FILE ]
2225- [--ca-signing-key- file CA_SIGNING_KEY_FILE ] [--cert- file CERT_FILE ]
2221+ [--enable-ssh-tunnel ] [--work-klass WORK_KLASS ]
2222+ [--pid-file PID_FILE] [-- enable-conn-pool] [--key-file KEY_FILE ]
2223+ [--cert-file CERT_FILE ] [--client-recvbuf-size CLIENT_RECVBUF_SIZE ]
2224+ [--server-recvbuf-size SERVER_RECVBUF_SIZE] [--timeout TIMEOUT ]
2225+ [--enable- proxy-protocol ] [--disable-http-proxy ]
2226+ [--disable-headers DISABLE_HEADERS ] [--ca-key-file CA_KEY_FILE ]
2227+ [--ca-cert-dir CA_CERT_DIR ] [--ca-cert- file CA_CERT_FILE ]
2228+ [--ca-file CA_FILE ] [--ca-signing-key- file CA_SIGNING_KEY_FILE ]
22262229 [--auth-plugin AUTH_PLUGIN] [--basic-auth BASIC_AUTH]
22272230 [--cache-dir CACHE_DIR]
22282231 [--filtered-upstream-hosts FILTERED_UPSTREAM_HOSTS]
@@ -2235,15 +2238,28 @@ usage: -m [-h] [--enable-events] [--enable-conn-pool] [--threadless]
22352238 [--filtered-url-regex-config FILTERED_URL_REGEX_CONFIG]
22362239 [--cloudflare-dns-mode CLOUDFLARE_DNS_MODE]
22372240
2238- proxy.py v2.4.0rc6.dev13+ga9b8034.d20220104
2241+ proxy.py v2.4.0rc7.dev12+gd234339.d20220116
22392242
22402243options:
22412244 -h, --help show this help message and exit
2245+ --tunnel-hostname TUNNEL_HOSTNAME
2246+ Default: None. Remote hostname or IP address to which
2247+ SSH tunnel will be established.
2248+ --tunnel-port TUNNEL_PORT
2249+ Default: 22. SSH port of the remote host.
2250+ --tunnel-username TUNNEL_USERNAME
2251+ Default: None. Username to use for establishing SSH
2252+ tunnel.
2253+ --tunnel-ssh-key TUNNEL_SSH_KEY
2254+ Default: None. Private key path in pem format
2255+ --tunnel-ssh-key-passphrase TUNNEL_SSH_KEY_PASSPHRASE
2256+ Default: None. Private key passphrase
2257+ --tunnel-remote-port TUNNEL_REMOTE_PORT
2258+ Default: 8899. Remote port which will be forwarded
2259+ locally for proxy.
22422260 --enable-events Default: False. Enables core to dispatch lifecycle
22432261 events. Plugins can be used to subscribe for core
22442262 events.
2245- --enable-conn-pool Default: False. (WIP) Enable upstream connection
2246- pooling.
22472263 --threadless Default: True. Enabled by default on Python 3.8+ (mac,
22482264 linux). When disabled a new thread is spawned to
22492265 handle each client connection.
@@ -2252,14 +2268,6 @@ options:
22522268 handle each client connection.
22532269 --num-workers NUM_WORKERS
22542270 Defaults to number of CPU cores.
2255- --local-executor LOCAL_EXECUTOR
2256- Default: 1. Enabled by default. Use 0 to disable. When
2257- enabled acceptors will make use of local (same
2258- process) executor instead of distributing load across
2259- remote (other process) executors. Enable this option
2260- to achieve CPU affinity between acceptors and
2261- executors, instead of using underlying OS kernel
2262- scheduling algorithm.
22632271 --backlog BACKLOG Default: 100. Maximum number of pending connections to
22642272 proxy server
22652273 --hostname HOSTNAME Default: 127.0.0.1. Server IP address.
@@ -2270,6 +2278,14 @@ options:
22702278 --unix-socket-path UNIX_SOCKET_PATH
22712279 Default: None. Unix socket path to use. When provided
22722280 --host and --port flags are ignored
2281+ --local-executor LOCAL_EXECUTOR
2282+ Default: 1. Enabled by default. Use 0 to disable. When
2283+ enabled acceptors will make use of local (same
2284+ process) executor instead of distributing load across
2285+ remote (other process) executors. Enable this option
2286+ to achieve CPU affinity between acceptors and
2287+ executors, instead of using underlying OS kernel
2288+ scheduling algorithm.
22732289 --num-acceptors NUM_ACCEPTORS
22742290 Defaults to number of CPU cores.
22752291 --version, -v Prints proxy.py version.
@@ -2288,25 +2304,32 @@ options:
22882304 Comma separated plugins. You may use --plugins flag
22892305 multiple times.
22902306 --enable-dashboard Default: False. Enables proxy.py dashboard.
2307+ --enable-ssh-tunnel Default: False. Enable SSH tunnel.
22912308 --work-klass WORK_KLASS
22922309 Default: proxy.http.HttpProtocolHandler. Work klass to
22932310 use for work execution.
22942311 --pid-file PID_FILE Default: None. Save "parent" process ID to a file.
2295- --enable-proxy-protocol
2296- Default: False. If used, will enable proxy protocol.
2297- Only version 1 is currently supported.
2298- --client-recvbuf-size CLIENT_RECVBUF_SIZE
2299- Default: 128 KB. Maximum amount of data received from
2300- the client in a single recv() operation.
2312+ --enable-conn-pool Default: False. (WIP) Enable upstream connection
2313+ pooling.
23012314 --key-file KEY_FILE Default: None. Server key file to enable end-to-end
23022315 TLS encryption with clients. If used, must also pass
23032316 --cert-file.
2304- --timeout TIMEOUT Default: 10.0. Number of seconds after which an
2305- inactive connection must be dropped. Inactivity is
2306- defined by no data sent or received by the client.
2317+ --cert-file CERT_FILE
2318+ Default: None. Server certificate to enable end-to-end
2319+ TLS encryption with clients. If used, must also pass
2320+ --key-file.
2321+ --client-recvbuf-size CLIENT_RECVBUF_SIZE
2322+ Default: 128 KB. Maximum amount of data received from
2323+ the client in a single recv() operation.
23072324 --server-recvbuf-size SERVER_RECVBUF_SIZE
23082325 Default: 128 KB. Maximum amount of data received from
23092326 the server in a single recv() operation.
2327+ --timeout TIMEOUT Default: 10.0. Number of seconds after which an
2328+ inactive connection must be dropped. Inactivity is
2329+ defined by no data sent or received by the client.
2330+ --enable-proxy-protocol
2331+ Default: False. If used, will enable proxy protocol.
2332+ Only version 1 is currently supported.
23102333 --disable-http-proxy Default: False. Whether to disable
23112334 proxy.HttpProxyPlugin.
23122335 --disable-headers DISABLE_HEADERS
@@ -2333,10 +2356,6 @@ options:
23332356 Default: None. CA signing key to use for dynamic
23342357 generation of HTTPS certificates. If used, must also
23352358 pass --ca-key-file and --ca-cert-file
2336- --cert-file CERT_FILE
2337- Default: None. Server certificate to enable end-to-end
2338- TLS encryption with clients. If used, must also pass
2339- --key-file.
23402359 --auth-plugin AUTH_PLUGIN
23412360 Default: proxy.http.proxy.AuthPlugin. Auth plugin to
23422361 use instead of default basic auth plugin.
0 commit comments