@@ -1941,24 +1941,24 @@ for list of tests.
1941
1941
1942
1942
``` console
1943
1943
❯ proxy -h
1944
- usage: -m [-h] [--enable-events] [--enable-conn-pool] [--threadless] [--threaded]
1945
- [--num-workers NUM_WORKERS] [--pid-file PID_FILE] [--backlog BACKLOG]
1946
- [--hostname HOSTNAME] [--port PORT] [--num-acceptors NUM_ACCEPTORS]
1947
- [--unix-socket-path UNIX_SOCKET_PATH]
1948
- [--client-recvbuf-size CLIENT_RECVBUF_SIZE] [--key-file KEY_FILE]
1949
- [--timeout TIMEOUT] [--version] [--log-level LOG_LEVEL]
1944
+ usage: proxy [-h] [--enable-events] [--enable-conn-pool] [--threadless] [--threaded]
1945
+ [--num-workers NUM_WORKERS] [--backlog BACKLOG] [--hostname HOSTNAME]
1946
+ [--port PORT] [--unix-socket-path UNIX_SOCKET_PATH]
1947
+ [--num-acceptors NUM_ACCEPTORS] [--version] [--log-level LOG_LEVEL]
1950
1948
[--log-file LOG_FILE] [--log-format LOG_FORMAT]
1951
- [--open-file-limit OPEN_FILE_LIMIT] [--plugins PLUGINS]
1952
- [--enable-dashboard] [--work-klass WORK_KLASS] [--disable-http-proxy]
1953
- [--ca-key-file CA_KEY_FILE] [--ca-cert-dir CA_CERT_DIR]
1954
- [--ca-cert-file CA_CERT_FILE] [--ca-file CA_FILE]
1955
- [--ca-signing-key-file CA_SIGNING_KEY_FILE] [--cert-file CERT_FILE]
1956
- [--disable-headers DISABLE_HEADERS]
1949
+ [--open-file-limit OPEN_FILE_LIMIT] [--plugins PLUGINS [PLUGINS ...]]
1950
+ [--enable-dashboard] [--work-klass WORK_KLASS] [--pid-file PID_FILE]
1951
+ [--client-recvbuf-size CLIENT_RECVBUF_SIZE] [--key-file KEY_FILE]
1952
+ [--timeout TIMEOUT] [--disable-http-proxy] [--ca-key-file CA_KEY_FILE]
1953
+ [--ca-cert-dir CA_CERT_DIR] [--ca-cert-file CA_CERT_FILE]
1954
+ [--ca-file CA_FILE] [--ca-signing-key-file CA_SIGNING_KEY_FILE]
1955
+ [--cert-file CERT_FILE] [--disable-headers DISABLE_HEADERS]
1957
1956
[--server-recvbuf-size SERVER_RECVBUF_SIZE] [--basic-auth BASIC_AUTH]
1958
1957
[--cache-dir CACHE_DIR]
1959
1958
[--filtered-upstream-hosts FILTERED_UPSTREAM_HOSTS] [--enable-web-server]
1960
1959
[--enable-static-server] [--static-server-dir STATIC_SERVER_DIR]
1961
- [--pac-file PAC_FILE] [--pac-file-url-path PAC_FILE_URL_PATH]
1960
+ [--min-compression-length MIN_COMPRESSION_LENGTH] [--pac-file PAC_FILE]
1961
+ [--pac-file-url-path PAC_FILE_URL_PATH]
1962
1962
[--filtered-client-ips FILTERED_CLIENT_IPS]
1963
1963
[--filtered-url-regex-config FILTERED_URL_REGEX_CONFIG]
1964
1964
[--cloudflare-dns-mode CLOUDFLARE_DNS_MODE]
@@ -1971,50 +1971,51 @@ options:
1971
1971
Plugins can be used to subscribe for core events.
1972
1972
--enable-conn-pool Default: False. (WIP) Enable upstream connection pooling.
1973
1973
--threadless Default: True. Enabled by default on Python 3.8+ (mac,
1974
- linux). When disabled a new thread is spawned to handle
1975
- each client connection.
1974
+ linux). When disabled a new thread is spawned to handle each
1975
+ client connection.
1976
1976
--threaded Default: False. Disabled by default on Python < 3.8 and
1977
- windows. When enabled a new thread is spawned to handle
1978
- each client connection.
1977
+ windows. When enabled a new thread is spawned to handle each
1978
+ client connection.
1979
1979
--num-workers NUM_WORKERS
1980
1980
Defaults to number of CPU cores.
1981
- --pid-file PID_FILE Default: None. Save parent process ID to a file.
1982
- --backlog BACKLOG Default: 100. Maximum number of pending connections to
1983
- proxy server
1981
+ --backlog BACKLOG Default: 100. Maximum number of pending connections to proxy
1982
+ server
1984
1983
--hostname HOSTNAME Default: ::1. Server IP address.
1985
1984
--port PORT Default: 8899. Server port.
1985
+ --unix-socket-path UNIX_SOCKET_PATH
1986
+ Default: None. Unix socket path to use. When provided --host
1987
+ and --port flags are ignored
1986
1988
--num-acceptors NUM_ACCEPTORS
1987
1989
Defaults to number of CPU cores.
1988
- --unix-socket-path UNIX_SOCKET_PATH
1989
- Default: None. Unix socket path to use. When provided
1990
- --host and --port flags are ignored
1991
- --client-recvbuf-size CLIENT_RECVBUF_SIZE
1992
- Default: 1 MB. Maximum amount of data received from the
1993
- client in a single recv() operation. Bump this value for
1994
- faster uploads at the expense of increased RAM.
1995
- --key-file KEY_FILE Default: None. Server key file to enable end-to-end TLS
1996
- encryption with clients. If used, must also pass --cert-
1997
- file.
1998
- --timeout TIMEOUT Default: 10.0. Number of seconds after which an inactive
1999
- connection must be dropped. Inactivity is defined by no
2000
- data sent or received by the client.
2001
1990
--version, -v Prints proxy.py version.
2002
1991
--log-level LOG_LEVEL
2003
1992
Valid options: DEBUG, INFO (default), WARNING, ERROR,
2004
1993
CRITICAL. Both upper and lowercase values are allowed. You
2005
- may also simply use the leading character e.g. --log-level
2006
- d
1994
+ may also simply use the leading character e.g. --log-level d
2007
1995
--log-file LOG_FILE Default: sys.stdout. Log file destination.
2008
1996
--log-format LOG_FORMAT
2009
1997
Log format for Python logger.
2010
1998
--open-file-limit OPEN_FILE_LIMIT
2011
1999
Default: 1024. Maximum number of files (TCP connections)
2012
2000
that proxy.py can open concurrently.
2013
- --plugins PLUGINS Comma separated plugins
2001
+ --plugins PLUGINS [PLUGINS ...]
2002
+ Comma separated plugins. You may use --plugins flag multiple
2003
+ times.
2014
2004
--enable-dashboard Default: False. Enables proxy.py dashboard.
2015
2005
--work-klass WORK_KLASS
2016
- Default: proxy.http.handler.HttpProtocolHandler. Work klass
2017
- to use for work execution.
2006
+ Default: proxy.http.HttpProtocolHandler. Work klass to use
2007
+ for work execution.
2008
+ --pid-file PID_FILE Default: None. Save "parent" process ID to a file.
2009
+ --client-recvbuf-size CLIENT_RECVBUF_SIZE
2010
+ Default: 1 MB. Maximum amount of data received from the
2011
+ client in a single recv() operation. Bump this value for
2012
+ faster uploads at the expense of increased RAM.
2013
+ --key-file KEY_FILE Default: None. Server key file to enable end-to-end TLS
2014
+ encryption with clients. If used, must also pass --cert-
2015
+ file.
2016
+ --timeout TIMEOUT Default: 10.0. Number of seconds after which an inactive
2017
+ connection must be dropped. Inactivity is defined by no data
2018
+ sent or received by the client.
2018
2019
--disable-http-proxy Default: False. Whether to disable proxy.HttpProxyPlugin.
2019
2020
--ca-key-file CA_KEY_FILE
2020
2021
Default: None. CA key to use for signing dynamically
@@ -2026,19 +2027,18 @@ options:
2026
2027
file and --ca-signing-key-file
2027
2028
--ca-cert-file CA_CERT_FILE
2028
2029
Default: None. Signing certificate to use for signing
2029
- dynamically generated HTTPS certificates. If used, must
2030
- also pass --ca-key-file and --ca-signing-key-file
2031
- --ca-file CA_FILE Default: /Users/abhinavsingh/Dev/proxy.py/venv310/lib/pytho
2032
- n3 .10/site-packages/certifi/cacert.pem. Provide path to
2030
+ dynamically generated HTTPS certificates. If used, must also
2031
+ pass --ca-key-file and --ca-signing-key-file
2032
+ --ca-file CA_FILE Default: /Users/abhinavsingh/Dev/proxy.py/venv310/lib/python
2033
+ 3 .10/site-packages/certifi/cacert.pem. Provide path to
2033
2034
custom CA bundle for peer certificate verification
2034
2035
--ca-signing-key-file CA_SIGNING_KEY_FILE
2035
2036
Default: None. CA signing key to use for dynamic generation
2036
- of HTTPS certificates. If used, must also pass --ca-key-
2037
- file and --ca-cert-file
2037
+ of HTTPS certificates. If used, must also pass --ca-key-file
2038
+ and --ca-cert-file
2038
2039
--cert-file CERT_FILE
2039
2040
Default: None. Server certificate to enable end-to-end TLS
2040
- encryption with clients. If used, must also pass --key-
2041
- file.
2041
+ encryption with clients. If used, must also pass --key-file.
2042
2042
--disable-headers DISABLE_HEADERS
2043
2043
Default: None. Comma separated list of headers to remove
2044
2044
before dispatching client request to upstream server.
@@ -2055,8 +2055,7 @@ options:
2055
2055
--filtered-upstream-hosts FILTERED_UPSTREAM_HOSTS
2056
2056
Default: Blocks Facebook. Comma separated list of IPv4 and
2057
2057
IPv6 addresses.
2058
- --enable-web-server Default: False. Whether to enable
2059
- proxy.HttpWebServerPlugin.
2058
+ --enable-web-server Default: False. Whether to enable proxy.HttpWebServerPlugin.
2060
2059
--enable-static-server
2061
2060
Default: False. Enable inbuilt static file server.
2062
2061
Optionally, also use --static-server-dir to serve static
@@ -2065,11 +2064,14 @@ options:
2065
2064
folder.
2066
2065
--static-server-dir STATIC_SERVER_DIR
2067
2066
Default: "public" folder in directory where proxy.py is
2068
- placed. This option is only applicable when static server
2069
- is also enabled. See --enable-static-server.
2067
+ placed. This option is only applicable when static server is
2068
+ also enabled. See --enable-static-server.
2069
+ --min-compression-length MIN_COMPRESSION_LENGTH
2070
+ Default: 20 bytes. Sets the minimum length of a response
2071
+ that will be compressed (gzipped).
2070
2072
--pac-file PAC_FILE A file (Proxy Auto Configuration) or string to serve when
2071
- the server receives a direct file request. Using this
2072
- option enables proxy.HttpWebServerPlugin.
2073
+ the server receives a direct file request. Using this option
2074
+ enables proxy.HttpWebServerPlugin.
2073
2075
--pac-file-url-path PAC_FILE_URL_PATH
2074
2076
Default: /. Web server path to serve the PAC file.
2075
2077
--filtered-client-ips FILTERED_CLIENT_IPS
@@ -2083,8 +2085,7 @@ options:
2083
2085
protection) or "family" (for malware and adult content
2084
2086
protection)
2085
2087
2086
- Proxy.py not working? Report at:
2087
- https://github.com/abhinavsingh/proxy.py/issues/new
2088
+ Proxy.py not working? Report at: https://github.com/abhinavsingh/proxy.py/issues/new
2088
2089
```
2089
2090
2090
2091
# Changelog
0 commit comments