Skip to content

Commit 3d8bf05

Browse files
authored
Add support for 3.10 (#637)
* Add support for 3.10 * Upgrade to v2 actions
1 parent daa30d4 commit 3d8bf05

File tree

5 files changed

+46
-103
lines changed

5 files changed

+46
-103
lines changed

.github/workflows/test-brew.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [macOS]
12-
python: [3.8]
12+
python: ['3.10']
1313
max-parallel: 1
1414
fail-fast: false
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
1717
- name: Setup Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v2
1919
with:
2020
python-version: ${{ matrix.python }}
2121
- name: Brew

.github/workflows/test-dashboard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [macOS, ubuntu, windows]
12-
node: [10.x, 11.x, 12.x]
12+
node: ['10.x', '11.x', '12.x']
1313
max-parallel: 4
1414
fail-fast: false
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
1717
- name: Setup Node
18-
uses: actions/setup-node@v1
18+
uses: actions/setup-node@v2
1919
with:
2020
node-version: ${{ matrix.node }}
2121
- name: Install Dependencies

.github/workflows/test-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu]
12-
python: [3.8]
12+
python: ['3.10']
1313
max-parallel: 1
1414
fail-fast: false
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
1717
- name: Setup Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v2
1919
with:
2020
python-version: ${{ matrix.python }}
2121
- name: Install dependencies

.github/workflows/test-library.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [macOS, ubuntu, windows]
12-
python: [3.6, 3.7, 3.8]
12+
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
1313
max-parallel: 4
1414
fail-fast: false
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
1717
- name: Setup Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v2
1919
with:
2020
python-version: ${{ matrix.python }}
2121
- name: Install dependencies

README.md

Lines changed: 34 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[![Contributions Welcome](https://img.shields.io/static/v1?label=contributions&message=welcome%20%F0%9F%91%8D&color=green)](https://github.com/abhinavsingh/proxy.py/issues)
2121
[![Gitter](https://badges.gitter.im/proxy-py/community.svg)](https://gitter.im/proxy-py/community)
2222

23-
[![Python 3.x](https://img.shields.io/static/v1?label=Python&message=3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9&color=blue)](https://www.python.org/)
23+
[![Python 3.x](https://img.shields.io/static/v1?label=Python&message=3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10&color=blue)](https://www.python.org/)
2424
[![Checked with mypy](https://img.shields.io/static/v1?label=MyPy&message=checked&color=blue)](http://mypy-lang.org/)
2525

2626
[![Become a Backer](https://opencollective.com/proxypy/tiers/backer.svg?avatarHeight=72)](https://opencollective.com/proxypy)
@@ -1670,129 +1670,72 @@ few obvious ones include:
16701670
16711671
```bash
16721672
❯ 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]
16901678
16911679
proxy.py v2.3.1
16921680
1693-
optional arguments:
1681+
options:
16941682
-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.
17021686
--hostname HOSTNAME Default: ::1. Server IP address.
17031687
--port PORT Default: 8899. Server port.
17041688
--num-workers NUM_WORKERS
17051689
Defaults to number of CPU cores.
17061690
--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.
17171694
--pid-file PID_FILE Default: None. Save parent process ID to a file.
17181695
--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.
17211697
--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.
17241699
--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.
17321703
--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
17371705
--log-file LOG_FILE Default: sys.stdout. Log file destination.
17381706
--log-format LOG_FORMAT
17391707
Log format for Python logger.
17401708
--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.
17431710
--plugins PLUGINS Comma separated plugins
17441711
--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
17481713
--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
17521715
--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.
17581718
--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
17621720
--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.
17661722
--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.
17701724
--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.
17751726
--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.
17781728
--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.
17811730
--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.
17881733
--pac-file-url-path PAC_FILE_URL_PATH
17891734
Default: /. Web server path to serve the PAC file.
17901735
--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.
17931737
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
17961739
```
17971740
17981741
# Changelog

0 commit comments

Comments
 (0)