Skip to content

Commit 6b00976

Browse files
authored
Add files via upload
1 parent 02fd0d9 commit 6b00976

2 files changed

Lines changed: 30 additions & 5 deletions

File tree

README.rst

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
python-proxy
22
===========
33

4-
HTTP/Socks/Shadowsocks asynchronous tunnel proxy implemented in Python 3.6 asyncio.
4+
HTTP/Socks/Shadowsocks asynchronous tunnel proxy implemented in Python3 asyncio.
55

66
Features
77
-----------
@@ -19,25 +19,41 @@ Features
1919
- Shadowsocks OTA (One-Time-Auth_) experimental feature support.
2020
- Basic statistics for bandwidth and total traffic by client/hostname.
2121
- PAC support for automatically javascript configuration.
22+
- PyPy3.3 v5.5 support to enable JIT speedup.
2223

2324
.. _One-Time-Auth: https://shadowsocks.org/en/spec/one-time-auth.html
2425

25-
Python 3.6
26+
Python3
2627
-----------
2728

28-
*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.
29+
*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 was to demonstrate these new syntax, so the minimal Python requirement was **3.6**.
2930

30-
**pproxy** is still possible to run below *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+
From **pproxy** 1.1.0, the minimal Python requirement is **3.3**, since old python versions are still widely used and PyPy3 only has 3.3 support currently. *Python 2* will not be supported in the future.
3132

3233
Installation
3334
-----------
3435

3536
$ pip3 install pproxy
3637

38+
PyPy3
39+
-----------
40+
41+
$ pypy3 -m ensurepip
42+
$ pypy3 -m pip install asyncio pproxy
43+
3744
Requirement
3845
-----------
3946

40-
pycryptodome_ is an optional library to enable faster (C version) cipher encryption. **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.
47+
pycryptodome_ is an optional library to enable faster (C version) cipher encryption. **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 cipher performance and don't run in PyPy_, just install pycryptodome_ to enable faster ciphers.
48+
49+
These are some performance comparisons between Python ciphers and C ciphers (process 8MB data totally):
50+
51+
$ python3 speed.py chacha20
52+
chacha20 0.6451280117034912
53+
$ pypy3 speed.py chacha20-py
54+
chacha20-py 1.3277630805969238
55+
$ python3 speed.py chacha20-py
56+
chacha20-py 48.85661292076111
4157

4258
.. _pycryptodome: https://pycryptodome.readthedocs.io/en/latest/src/introduction.html
4359
.. _PyPy: http://pypy.org
@@ -147,6 +163,12 @@ URI Syntax
147163
+-----------------+------------+-----------+-------------+
148164
| des-cfb | 8 | 8 | 1.5 |
149165
+-----------------+------------+-----------+-------------+
166+
| rc2-cfb-py | 16 | 8 | 2 |
167+
+-----------------+------------+-----------+-------------+
168+
| idea-cfb-py | 16 | 8 | 2.5 |
169+
+-----------------+------------+-----------+-------------+
170+
| seed-cfb-py | 16 | 16 | 2 |
171+
+-----------------+------------+-----------+-------------+
150172

151173
- 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.
152174
- To enable OTA encryption with shadowsocks, add '!' immediately after cipher name.

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def find_version(*file_paths):
3333
'Topic :: Software Development :: Build Tools',
3434
'License :: OSI Approved :: MIT License',
3535
'Programming Language :: Python :: 3',
36+
'Programming Language :: Python :: 3.3',
37+
'Programming Language :: Python :: 3.4',
38+
'Programming Language :: Python :: 3.5',
3639
'Programming Language :: Python :: 3.6',
3740
],
3841
keywords='proxy socks http shadowsocks cipher ssl',

0 commit comments

Comments
 (0)