Skip to content

Commit a8c2c61

Browse files
authored
v1.7.2
1 parent e4631aa commit a8c2c61

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

README.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ QuickStart
2222
$ pproxy
2323
Serving on :8080 by http,socks4,socks5
2424
^C
25-
$ pproxy -i ss://chacha20:abc@:8080
25+
$ pproxy -l ss://chacha20:abc@:8080
2626
Serving on :8080 by ss (chacha20-py)
2727
2828
Optional: (better performance with C ciphers)
@@ -116,7 +116,7 @@ Usage
116116
.. code:: rst
117117
118118
$ pproxy -h
119-
usage: pproxy [-h] [-i LISTEN] [-r RSERVER] [-ui ULISTEN] [-ur URSERVER]
119+
usage: pproxy [-h] [-l LISTEN] [-r RSERVER] [-ul ULISTEN] [-ur URSERVER]
120120
[-b BLOCK] [-a ALIVED] [-v] [--ssl SSLFILE] [--pac PAC]
121121
[--get GETS] [--sys] [--test TESTURL] [--version]
122122
@@ -125,9 +125,9 @@ Usage
125125
126126
optional arguments:
127127
-h, --help show this help message and exit
128-
-i LISTEN tcp server uri (default: http+socks4+socks5://:8080/)
128+
-l LISTEN tcp server uri (default: http+socks4+socks5://:8080/)
129129
-r RSERVER tcp remote server uri (default: direct)
130-
-ui ULISTEN udp server setting uri (default: none)
130+
-ul ULISTEN udp server setting uri (default: none)
131131
-ur URSERVER udp remote server uri (default: direct)
132132
-b BLOCK block regex rules
133133
-a ALIVED interval to check remote alive (default: no check)
@@ -167,7 +167,7 @@ Protocols
167167
+-------------------+------------+------------+------------+------------+--------------+
168168
| pfctl nat (macos) || | | | pf:// |
169169
+-------------------+------------+------------+------------+------------+--------------+
170-
| echo || | | | echo:// |
170+
| echo || | | | echo:// |
171171
+-------------------+------------+------------+------------+------------+--------------+
172172
| tunnel ||||| tunnel:// |
173173
| (raw socket) | | | | | tunnel{ip}://|
@@ -368,19 +368,19 @@ Examples
368368

369369
.. code:: rst
370370
371-
$ pproxy -i ss://:8888 -r ss://chacha20:cipher_key@aa.bb.cc.dd:12345 -v
371+
$ pproxy -l ss://:8888 -r ss://chacha20:cipher_key@aa.bb.cc.dd:12345 -v
372372
373373
Next, run pproxy.py remotely on server "aa.bb.cc.dd". The base64 encoded string of "chacha20:cipher_key" is also supported:
374374

375375
.. code:: rst
376376
377-
$ pproxy -i ss://chacha20:cipher_key@:12345
377+
$ pproxy -l ss://chacha20:cipher_key@:12345
378378
379379
The same as:
380380

381381
.. code:: rst
382382
383-
$ pproxy -i ss://Y2hhY2hhMjA6Y2lwaGVyX2tleQ==@:12345
383+
$ pproxy -l ss://Y2hhY2hhMjA6Y2lwaGVyX2tleQ==@:12345
384384
385385
The traffic between local and aa.bb.cc.dd is encrypted by stream cipher Chacha20 with secret key "cipher_key".
386386

@@ -390,7 +390,7 @@ Examples
390390

391391
.. code:: rst
392392
393-
$ pproxy -i ss://salsa20!:complex_cipher_key@/tmp/pproxy_socket -r http+ssl://domain1.com:443#username:password
393+
$ pproxy -l ss://salsa20!:complex_cipher_key@/tmp/pproxy_socket -r http+ssl://domain1.com:443#username:password
394394
395395
*pproxy* listen on the unix domain socket "/tmp/pproxy_socket" with cipher "salsa20" and key "complex_cipher_key". OTA packet protocol is enabled by adding ! after cipher name. The traffic is tunneled to remote https proxy with simple http authentication.
396396

@@ -400,7 +400,7 @@ Examples
400400

401401
.. code:: rst
402402
403-
$ pproxy -i http+ssl://0.0.0.0:443 -i http://0.0.0.0:80 --ssl server.crt,server.key --pac /autopac
403+
$ pproxy -l http+ssl://0.0.0.0:443 -l http://0.0.0.0:80 --ssl server.crt,server.key --pac /autopac
404404
405405
*pproxy* listen on both 80 HTTP and 443 HTTPS ports, use the specified SSL/TLS certificate and private key files. The "--pac" enable PAC feature, so you can put "https://yourdomain.com/autopac" path in your device's auto-configure url.
406406

@@ -420,15 +420,15 @@ Examples
420420

421421
.. code:: rst
422422
423-
$ pproxy -i ssr://chacha20:mypass@0.0.0.0:443/,tls1.2_ticket_auth,verify_simple
423+
$ pproxy -l ssr://chacha20:mypass@0.0.0.0:443/,tls1.2_ticket_auth,verify_simple
424424
425425
- Local bind ip
426426

427427
If you want to route the traffic by different local bind, use the @localbind URI syntax. For example, server has three ip interfaces: 192.168.1.15, 111.0.0.1, 112.0.0.1. You want to route traffic matched by "rule1" to 111.0.0.2 and traffic matched by "rule2" to 222.0.0.2, and the remaining traffic directly:
428428

429429
.. code:: rst
430430
431-
$ pproxy -i ss://:8000/@in -r ss://111.0.0.2:8000/@111.0.0.1?rule1 -r ss://222.0.0.2:8000/@222.0.0.1?rule2
431+
$ pproxy -l ss://:8000/@in -r ss://111.0.0.2:8000/@111.0.0.1?rule1 -r ss://222.0.0.2:8000/@222.0.0.1?rule2
432432
433433
- Redirect/Pf protocol
434434

@@ -437,7 +437,7 @@ Examples
437437
.. code:: rst
438438
439439
$ sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 5555
440-
$ pproxy -i redir://:5555 -r http://remote_http_server:3128 -v
440+
$ pproxy -l redir://:5555 -r http://remote_http_server:3128 -v
441441
442442
The above example illustrates how to redirect all local output tcp traffic with destination port 80 to localhost port 5555 listened by **pproxy**, and then tunnel the traffic to remote http proxy.
443443

@@ -449,7 +449,7 @@ Examples
449449
rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
450450
pass out on en0 route-to lo0 inet proto tcp from any to any port 80 keep state
451451
^D
452-
$ sudo pproxy -i pf://:8080 -r socks5://remote_socks5_server:1324 -v
452+
$ sudo pproxy -l pf://:8080 -r socks5://remote_socks5_server:1324 -v
453453
454454
Make sure **pproxy** runs in root mode (sudo), otherwise it cannot redirect pf packet.
455455

@@ -469,14 +469,14 @@ Examples
469469

470470
.. code:: rst
471471
472-
$ pproxy -i tunnel{google.com}://:80
472+
$ pproxy -l tunnel{google.com}://:80
473473
$ curl -H "Host: google.com" http://localhost
474474
475475
UDP dns tunnel example:
476476

477477
.. code:: rst
478478
479-
$ pproxy -ui tunnel{8.8.8.8}://:53
479+
$ pproxy -ul tunnel{8.8.8.8}://:53
480480
$ nslookup google.com localhost
481481
482482
- UDP more complicated example
@@ -485,13 +485,13 @@ Examples
485485

486486
.. code:: rst
487487
488-
$ pproxy -ui ss://remote_server:13245
488+
$ pproxy -ul ss://remote_server:13245
489489
490490
Run the commands on local machine:
491491

492492
.. code:: rst
493493
494-
$ pproxy -ui tunnel{8.8.8.8}://:53 -ur ss://remote_server:13245
494+
$ pproxy -ul tunnel{8.8.8.8}://:53 -ur ss://remote_server:13245
495495
UDP tunnel 127.0.0.1:60573 -> ss remote_server:13245 -> 8.8.8.8:53
496496
UDP tunnel 127.0.0.1:60574 -> ss remote_server:13245 -> 8.8.8.8:53
497497
...

0 commit comments

Comments
 (0)