Skip to content

Commit ae9676e

Browse files
authored
Add files via upload
1 parent 3d74eb7 commit ae9676e

File tree

2 files changed

+53
-32
lines changed

2 files changed

+53
-32
lines changed

README.rst

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Features
88

99
- Single-thread asynchronous IO with high availability and scalability.
1010
- Lightweight (~500 lines) and powerful by leveraging python builtin *asyncio* library.
11+
- No additional library is required. All codes are in Pure Python.
1112
- Automatically detect incoming traffic: HTTP/Socks/Shadowsocks.
1213
- Specify multiple remote servers for outcoming traffic: HTTP/Socks/Shadowsocks.
1314
- Unix domain socket support for communicating locally.
@@ -26,6 +27,8 @@ Python 3.6
2627

2728
*Python 3.5* added new syntax **async def** and **await** to make asyncio programming easier. *Python 3.6* added new syntax **formatted string literals**. This tool is to demonstrate these new syntax, so the minimal Python requirement is **3.6**. With new syntax, it is easy to implement so many features in a short number of lines, and is also fully ready for production usage.
2829

30+
**pproxy** is still possible to run under *Python 3.6*. Remove the **formatted string literals** syntax if you want to run in *Python 3.5*. Remove the **async def** and **await** syntax if you want to run in *Python 3.4*. You can also use **tulip** instead of **asyncio** to make **pproxy** run in all *Python 2/3* environment.
31+
2932
Installation
3033
-----------
3134

@@ -34,15 +37,16 @@ Installation
3437
Requirement
3538
-----------
3639

37-
pycryptodome_ is the optional required library to enable cipher encryption support. Without installing this, you can still use pproxy with no encryption.
40+
pycryptodome_ is an optional library to enable faster (C version) cipher encryption support. **pproxy** has many built-in pure python ciphers without need to install pycryptodome_. They are lightweight and stable, but a little slow. After speed up with PyPy_, the pure python ciphers can achieve similar performance as pycryptodome_ (C version). If you care about server performance and don't run in PyPy_, just install pycryptodome_ to enable faster ciphers.
3841

3942
.. _pycryptodome: https://pycryptodome.readthedocs.io/en/latest/src/introduction.html
43+
.. _PyPy: http://pypy.org
4044

4145
Usage
4246
-----------
4347

4448
$ pproxy -h
45-
usage: pproxy [-h] [-i LISTEN] [-r RSERVER] [-b BLOCK] [-v] [--ssl SSLFILE] [--pac PAC] [--version]
49+
usage: pproxy [-h] [-i LISTEN] [-r RSERVER] [-b BLOCK] [-v] [--ssl SSLFILE] [--pac PAC] [--get GETS] [--version]
4650

4751
Proxy server that can tunnel among remote servers by regex rules. Supported
4852
protocols: http,socks,shadowsocks
@@ -54,7 +58,8 @@ Usage
5458
-b BLOCK block regex rules
5559
-v print verbose output
5660
--ssl SSLFILE certfile[,keyfile] if server listen in ssl mode
57-
--pac PAC http pac file path
61+
--pac PAC http PAC path
62+
--get GETS http custom path/file
5863
--version show program's version number and exit
5964

6065
Online help: <https://github.com/qwj/python-proxy>
@@ -77,34 +82,50 @@ URI Syntax
7782
- Invalid schemes: ssl://, secure://
7883
- cipher
7984
- Cipher is consisted by cipher name, colon ':' and cipher key.
80-
- Full supported cipher list:
81-
82-
+------------+------------+-----------+-------------+
83-
| Cipher | Key Length | IV Length | Security |
84-
+============+============+===========+=============+
85-
| table | any | 0 | 0 (lowest) |
86-
+------------+------------+-----------+-------------+
87-
| rc4 | 16 | 0 | 0 (lowest) |
88-
+------------+------------+-----------+-------------+
89-
| rc4-md5 | 16 | 16 | 0.5 |
90-
+------------+------------+-----------+-------------+
91-
| chacha20 | 32 | 8 | 5 (highest) |
92-
+------------+------------+-----------+-------------+
93-
| salsa20 | 32 | 8 | 5 (highest) |
94-
+------------+------------+-----------+-------------+
95-
| aes-128-cfb| 16 | 16 | 3 |
96-
+------------+------------+-----------+-------------+
97-
| aes-192-cfb| 24 | 16 | 3.5 |
98-
+------------+------------+-----------+-------------+
99-
| aes-256-cfb| 32 | 16 | 4.5 |
100-
+------------+------------+-----------+-------------+
101-
| bf-cfb | 16 | 8 | 1 |
102-
+------------+------------+-----------+-------------+
103-
| cast5-cfb | 16 | 8 | 2.5 |
104-
+------------+------------+-----------+-------------+
105-
| des-cfb | 8 | 8 | 1.5 |
106-
+------------+------------+-----------+-------------+
107-
85+
- Full supported cipher list: (Pure python ciphers has ciphername suffix -py)
86+
87+
+----------------+------------+-----------+-------------+
88+
| Cipher | Key Length | IV Length | Score (0-5) |
89+
+================+============+===========+=============+
90+
| table-py | any | 0 | 0 (lowest) |
91+
+----------------+------------+-----------+-------------+
92+
| rc4, rc4-py | 16 | 0 | 0 (lowest) |
93+
+----------------+------------+-----------+-------------+
94+
| rc4-md5 | 16 | 16 | 0.5 |
95+
| rc4-md5-py | | | |
96+
+----------------+------------+-----------+-------------+
97+
| chacha20 | 32 | 8 | 5 (highest) |
98+
| chacha20-py | | | |
99+
+----------------+------------+-----------+-------------+
100+
| salsa20 | 32 | 8 | 4.5 |
101+
| salsa20-py | | | |
102+
+----------------+------------+-----------+-------------+
103+
| aes-128-cfb | 16 | 16 | 3 |
104+
| aes-128-cfb-py | | | |
105+
| aes-128-cfb8-py| | | |
106+
| aes-128-cfb1-py| | | |
107+
+----------------+------------+-----------+-------------+
108+
| aes-192-cfb | 24 | 16 | 3.5 |
109+
| aes-192-cfb-py | | | |
110+
| aes-192-cfb8-py| | | |
111+
| aes-192-cfb1-py| | | |
112+
+----------------+------------+-----------+-------------+
113+
| aes-256-cfb | 32 | 16 | 4.5 |
114+
| aes-256-cfb-py | | | |
115+
| aes-256-ctr-py | | | |
116+
| aes-256-ofb-py | | | |
117+
| aes-256-cfb8-py| | | |
118+
| aes-256-cfb1-py| | | |
119+
+----------------+------------+-----------+-------------+
120+
| bf-cfb | 16 | 8 | 1 |
121+
| bf-cfb-py | | | |
122+
+----------------+------------+-----------+-------------+
123+
| cast5-cfb | 16 | 8 | 2.5 |
124+
+----------------+------------+-----------+-------------+
125+
| des-cfb | 8 | 8 | 1.5 |
126+
+----------------+------------+-----------+-------------+
127+
128+
- Some pure python ciphers (aes-256-cfb1-py) is quite slow, and is not recommended to use without PyPy speedup. Try install pycryptodome_ and use C version cipher instead.
108129
- To enable OTA encryption with shadowsocks, add '!' immediately after cipher name.
109130
- netloc
110131
- It can be "hostname:port" or "/unix_domaon_path". If the hostname is empty, server will listen on all interfaces.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def find_version(*file_paths):
3737
],
3838
keywords='proxy socks http shadowsocks cipher ssl',
3939
packages=['pproxy'],
40-
install_requires=['pycryptodome'],
40+
install_requires=[],
4141
entry_points={
4242
'console_scripts': [
4343
'pproxy=pproxy:main',

0 commit comments

Comments
 (0)