|
20 | 20 | [](https://github.com/abhinavsingh/proxy.py/issues)
|
21 | 21 | [](https://gitter.im/proxy-py/community)
|
22 | 22 |
|
23 |
| -[](https://www.python.org/) |
| 23 | +[](https://www.python.org/) |
24 | 24 | [](http://mypy-lang.org/)
|
25 | 25 |
|
26 | 26 | [](https://opencollective.com/proxypy)
|
@@ -1670,129 +1670,72 @@ few obvious ones include:
|
1670 | 1670 |
|
1671 | 1671 | ```bash
|
1672 | 1672 | ❯ proxy -h
|
1673 |
| -usage: proxy [-h] [--threadless] [--backlog BACKLOG] [--enable-events] |
1674 |
| - [--hostname HOSTNAME] [--port PORT] [--num-workers NUM_WORKERS] |
1675 |
| - [--client-recvbuf-size CLIENT_RECVBUF_SIZE] [--key-file KEY_FILE] |
1676 |
| - [--timeout TIMEOUT] [--pid-file PID_FILE] [--version] |
1677 |
| - [--disable-http-proxy] [--enable-dashboard] [--enable-devtools] |
1678 |
| - [--enable-static-server] [--enable-web-server] |
1679 |
| - [--log-level LOG_LEVEL] [--log-file LOG_FILE] |
1680 |
| - [--log-format LOG_FORMAT] [--open-file-limit OPEN_FILE_LIMIT] |
1681 |
| - [--plugins PLUGINS] [--ca-key-file CA_KEY_FILE] |
1682 |
| - [--ca-cert-dir CA_CERT_DIR] [--ca-cert-file CA_CERT_FILE] |
1683 |
| - [--ca-file CA_FILE] [--ca-signing-key-file CA_SIGNING_KEY_FILE] |
1684 |
| - [--cert-file CERT_FILE] [--disable-headers DISABLE_HEADERS] |
1685 |
| - [--server-recvbuf-size SERVER_RECVBUF_SIZE] |
1686 |
| - [--basic-auth BASIC_AUTH] [--cache-dir CACHE_DIR] |
1687 |
| - [--static-server-dir STATIC_SERVER_DIR] [--pac-file PAC_FILE] |
1688 |
| - [--pac-file-url-path PAC_FILE_URL_PATH] |
1689 |
| - [--filtered-client-ips FILTERED_CLIENT_IPS] |
| 1673 | +usage: proxy [-h] [--threadless] [--backlog BACKLOG] [--enable-events] [--hostname HOSTNAME] [--port PORT] [--num-workers NUM_WORKERS] [--client-recvbuf-size CLIENT_RECVBUF_SIZE] [--key-file KEY_FILE] |
| 1674 | + [--timeout TIMEOUT] [--pid-file PID_FILE] [--version] [--disable-http-proxy] [--enable-dashboard] [--enable-devtools] [--enable-static-server] [--enable-web-server] [--log-level LOG_LEVEL] |
| 1675 | + [--log-file LOG_FILE] [--log-format LOG_FORMAT] [--open-file-limit OPEN_FILE_LIMIT] [--plugins PLUGINS] [--ca-key-file CA_KEY_FILE] [--ca-cert-dir CA_CERT_DIR] [--ca-cert-file CA_CERT_FILE] |
| 1676 | + [--ca-file CA_FILE] [--ca-signing-key-file CA_SIGNING_KEY_FILE] [--cert-file CERT_FILE] [--disable-headers DISABLE_HEADERS] [--server-recvbuf-size SERVER_RECVBUF_SIZE] [--basic-auth BASIC_AUTH] |
| 1677 | + [--cache-dir CACHE_DIR] [--static-server-dir STATIC_SERVER_DIR] [--pac-file PAC_FILE] [--pac-file-url-path PAC_FILE_URL_PATH] [--filtered-client-ips FILTERED_CLIENT_IPS] |
1690 | 1678 |
|
1691 | 1679 | proxy.py v2.3.1
|
1692 | 1680 |
|
1693 |
| -optional arguments: |
| 1681 | +options: |
1694 | 1682 | -h, --help show this help message and exit
|
1695 |
| - --threadless Default: False. When disabled a new thread is spawned |
1696 |
| - to handle each client connection. |
1697 |
| - --backlog BACKLOG Default: 100. Maximum number of pending connections to |
1698 |
| - proxy server |
1699 |
| - --enable-events Default: False. Enables core to dispatch lifecycle |
1700 |
| - events. Plugins can be used to subscribe for core |
1701 |
| - events. |
| 1683 | + --threadless Default: False. When disabled a new thread is spawned to handle each client connection. |
| 1684 | + --backlog BACKLOG Default: 100. Maximum number of pending connections to proxy server |
| 1685 | + --enable-events Default: False. Enables core to dispatch lifecycle events. Plugins can be used to subscribe for core events. |
1702 | 1686 | --hostname HOSTNAME Default: ::1. Server IP address.
|
1703 | 1687 | --port PORT Default: 8899. Server port.
|
1704 | 1688 | --num-workers NUM_WORKERS
|
1705 | 1689 | Defaults to number of CPU cores.
|
1706 | 1690 | --client-recvbuf-size CLIENT_RECVBUF_SIZE
|
1707 |
| - Default: 1 MB. Maximum amount of data received from |
1708 |
| - the client in a single recv() operation. Bump this |
1709 |
| - value for faster uploads at the expense of increased |
1710 |
| - RAM. |
1711 |
| - --key-file KEY_FILE Default: None. Server key file to enable end-to-end |
1712 |
| - TLS encryption with clients. If used, must also pass |
1713 |
| - --cert-file. |
1714 |
| - --timeout TIMEOUT Default: 10. Number of seconds after which an inactive |
1715 |
| - connection must be dropped. Inactivity is defined by |
1716 |
| - no data sent or received by the client. |
| 1691 | + Default: 1 MB. Maximum amount of data received from the client in a single recv() operation. Bump this value for faster uploads at the expense of increased RAM. |
| 1692 | + --key-file KEY_FILE Default: None. Server key file to enable end-to-end TLS encryption with clients. If used, must also pass --cert-file. |
| 1693 | + --timeout TIMEOUT Default: 10. Number of seconds after which an inactive connection must be dropped. Inactivity is defined by no data sent or received by the client. |
1717 | 1694 | --pid-file PID_FILE Default: None. Save parent process ID to a file.
|
1718 | 1695 | --version, -v Prints proxy.py version.
|
1719 |
| - --disable-http-proxy Default: False. Whether to disable |
1720 |
| - proxy.HttpProxyPlugin. |
| 1696 | + --disable-http-proxy Default: False. Whether to disable proxy.HttpProxyPlugin. |
1721 | 1697 | --enable-dashboard Default: False. Enables proxy.py dashboard.
|
1722 |
| - --enable-devtools Default: False. Enables integration with Chrome |
1723 |
| - Devtool Frontend. Also see --devtools-ws-path. |
| 1698 | + --enable-devtools Default: False. Enables integration with Chrome Devtool Frontend. Also see --devtools-ws-path. |
1724 | 1699 | --enable-static-server
|
1725 |
| - Default: False. Enable inbuilt static file server. |
1726 |
| - Optionally, also use --static-server-dir to serve |
1727 |
| - static content from custom directory. By default, |
1728 |
| - static file server serves out of installed proxy.py |
1729 |
| - python module folder. |
1730 |
| - --enable-web-server Default: False. Whether to enable |
1731 |
| - proxy.HttpWebServerPlugin. |
| 1700 | + Default: False. Enable inbuilt static file server. Optionally, also use --static-server-dir to serve static content from custom directory. By default, static file server serves out of |
| 1701 | + installed proxy.py python module folder. |
| 1702 | + --enable-web-server Default: False. Whether to enable proxy.HttpWebServerPlugin. |
1732 | 1703 | --log-level LOG_LEVEL
|
1733 |
| - Valid options: DEBUG, INFO (default), WARNING, ERROR, |
1734 |
| - CRITICAL. Both upper and lowercase values are allowed. |
1735 |
| - You may also simply use the leading character e.g. |
1736 |
| - --log-level d |
| 1704 | + Valid options: DEBUG, INFO (default), WARNING, ERROR, CRITICAL. Both upper and lowercase values are allowed. You may also simply use the leading character e.g. --log-level d |
1737 | 1705 | --log-file LOG_FILE Default: sys.stdout. Log file destination.
|
1738 | 1706 | --log-format LOG_FORMAT
|
1739 | 1707 | Log format for Python logger.
|
1740 | 1708 | --open-file-limit OPEN_FILE_LIMIT
|
1741 |
| - Default: 1024. Maximum number of files (TCP |
1742 |
| - connections) that proxy.py can open concurrently. |
| 1709 | + Default: 1024. Maximum number of files (TCP connections) that proxy.py can open concurrently. |
1743 | 1710 | --plugins PLUGINS Comma separated plugins
|
1744 | 1711 | --ca-key-file CA_KEY_FILE
|
1745 |
| - Default: None. CA key to use for signing dynamically |
1746 |
| - generated HTTPS certificates. If used, must also pass |
1747 |
| - --ca-cert-file and --ca-signing-key-file |
| 1712 | + Default: None. CA key to use for signing dynamically generated HTTPS certificates. If used, must also pass --ca-cert-file and --ca-signing-key-file |
1748 | 1713 | --ca-cert-dir CA_CERT_DIR
|
1749 |
| - Default: ~/.proxy.py. Directory to store dynamically |
1750 |
| - generated certificates. Also see --ca-key-file, --ca- |
1751 |
| - cert-file and --ca-signing-key-file |
| 1714 | + Default: ~/.proxy.py. Directory to store dynamically generated certificates. Also see --ca-key-file, --ca-cert-file and --ca-signing-key-file |
1752 | 1715 | --ca-cert-file CA_CERT_FILE
|
1753 |
| - Default: None. Signing certificate to use for signing |
1754 |
| - dynamically generated HTTPS certificates. If used, |
1755 |
| - must also pass --ca-key-file and --ca-signing-key-file |
1756 |
| - --ca-file CA_FILE Default: None. Provide path to custom CA file for peer |
1757 |
| - certificate validation. Specially useful on MacOS. |
| 1716 | + Default: None. Signing certificate to use for signing dynamically generated HTTPS certificates. If used, must also pass --ca-key-file and --ca-signing-key-file |
| 1717 | + --ca-file CA_FILE Default: None. Provide path to custom CA file for peer certificate validation. Specially useful on MacOS. |
1758 | 1718 | --ca-signing-key-file CA_SIGNING_KEY_FILE
|
1759 |
| - Default: None. CA signing key to use for dynamic |
1760 |
| - generation of HTTPS certificates. If used, must also |
1761 |
| - pass --ca-key-file and --ca-cert-file |
| 1719 | + Default: None. CA signing key to use for dynamic generation of HTTPS certificates. If used, must also pass --ca-key-file and --ca-cert-file |
1762 | 1720 | --cert-file CERT_FILE
|
1763 |
| - Default: None. Server certificate to enable end-to-end |
1764 |
| - TLS encryption with clients. If used, must also pass |
1765 |
| - --key-file. |
| 1721 | + Default: None. Server certificate to enable end-to-end TLS encryption with clients. If used, must also pass --key-file. |
1766 | 1722 | --disable-headers DISABLE_HEADERS
|
1767 |
| - Default: None. Comma separated list of headers to |
1768 |
| - remove before dispatching client request to upstream |
1769 |
| - server. |
| 1723 | + Default: None. Comma separated list of headers to remove before dispatching client request to upstream server. |
1770 | 1724 | --server-recvbuf-size SERVER_RECVBUF_SIZE
|
1771 |
| - Default: 1 MB. Maximum amount of data received from |
1772 |
| - the server in a single recv() operation. Bump this |
1773 |
| - value for faster downloads at the expense of increased |
1774 |
| - RAM. |
| 1725 | + Default: 1 MB. Maximum amount of data received from the server in a single recv() operation. Bump this value for faster downloads at the expense of increased RAM. |
1775 | 1726 | --basic-auth BASIC_AUTH
|
1776 |
| - Default: No authentication. Specify colon separated |
1777 |
| - user:password to enable basic authentication. |
| 1727 | + Default: No authentication. Specify colon separated user:password to enable basic authentication. |
1778 | 1728 | --cache-dir CACHE_DIR
|
1779 |
| - Default: A temporary directory. Flag only applicable |
1780 |
| - when cache plugin is used with on-disk storage. |
| 1729 | + Default: A temporary directory. Flag only applicable when cache plugin is used with on-disk storage. |
1781 | 1730 | --static-server-dir STATIC_SERVER_DIR
|
1782 |
| - Default: "public" folder in directory where proxy.py |
1783 |
| - is placed. This option is only applicable when static |
1784 |
| - server is also enabled. See --enable-static-server. |
1785 |
| - --pac-file PAC_FILE A file (Proxy Auto Configuration) or string to serve |
1786 |
| - when the server receives a direct file request. Using |
1787 |
| - this option enables proxy.HttpWebServerPlugin. |
| 1731 | + Default: "public" folder in directory where proxy.py is placed. This option is only applicable when static server is also enabled. See --enable-static-server. |
| 1732 | + --pac-file PAC_FILE A file (Proxy Auto Configuration) or string to serve when the server receives a direct file request. Using this option enables proxy.HttpWebServerPlugin. |
1788 | 1733 | --pac-file-url-path PAC_FILE_URL_PATH
|
1789 | 1734 | Default: /. Web server path to serve the PAC file.
|
1790 | 1735 | --filtered-client-ips FILTERED_CLIENT_IPS
|
1791 |
| - Default: 127.0.0.1,::1. Comma separated list of IPv4 |
1792 |
| - and IPv6 addresses. |
| 1736 | + Default: 127.0.0.1,::1. Comma separated list of IPv4 and IPv6 addresses. |
1793 | 1737 |
|
1794 |
| -Proxy.py not working? Report at: |
1795 |
| -https://github.com/abhinavsingh/proxy.py/issues/new |
| 1738 | +Proxy.py not working? Report at: https://github.com/abhinavsingh/proxy.py/issues/new |
1796 | 1739 | ```
|
1797 | 1740 |
|
1798 | 1741 | # Changelog
|
|
0 commit comments