Skip to content

Commit dfed055

Browse files
authored
Add files via upload
1 parent be73d42 commit dfed055

1 file changed

Lines changed: 38 additions & 38 deletions

File tree

README.rst

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Examples
273273

274274
Define regex file "rules" as follow:
275275

276-
.. code:: rst
276+
.. code:: rst
277277
278278
#google domains
279279
(?:.+\.)?google.*\.com
@@ -293,86 +293,86 @@ Examples
293293
294294
Then start *pproxy*
295295

296-
.. code:: rst
296+
.. code:: rst
297297
298-
$ pproxy -i http+socks://:8080 -r http://aa.bb.cc.dd:8080?rules -v
299-
http www.googleapis.com:443 -> http aa.bb.cc.dd:8080
300-
socks www.youtube.com:443 -> http aa.bb.cc.dd:8080
301-
http www.yahoo.com:80
302-
DIRECT: 1 (0.5K/s,1.2M/s) PROXY: 2 (24.3K/s,1.9M/s)
298+
$ pproxy -i http+socks://:8080 -r http://aa.bb.cc.dd:8080?rules -v
299+
http www.googleapis.com:443 -> http aa.bb.cc.dd:8080
300+
socks www.youtube.com:443 -> http aa.bb.cc.dd:8080
301+
http www.yahoo.com:80
302+
DIRECT: 1 (0.5K/s,1.2M/s) PROXY: 2 (24.3K/s,1.9M/s)
303303
304304
*pproxy* will serve incoming traffic by auto-detect http/socks5 protocol, redirect all google traffic to http proxy aa.bb.cc.dd:8080, and visit all other traffic directly from local server.
305305

306306
- Use cipher
307307

308-
Add cipher encryption to make sure data can't be intercepted. Run *pproxy* locally as:
308+
Add cipher encryption to make sure data can't be intercepted. Run *pproxy* locally as:
309309

310-
.. code:: rst
310+
.. code:: rst
311311
312-
$ pproxy -i ss://:8888 -r ss://chacha20:cipher_key@aa.bb.cc.dd:12345 -v
312+
$ pproxy -i ss://:8888 -r ss://chacha20:cipher_key@aa.bb.cc.dd:12345 -v
313313
314-
Next, run pproxy.py remotely on server "aa.bb.cc.dd"
314+
Next, run pproxy.py remotely on server "aa.bb.cc.dd"
315315

316-
.. code:: rst
316+
.. code:: rst
317317
318-
$ pproxy -i ss://chacha20:cipher_key@:12345
318+
$ pproxy -i ss://chacha20:cipher_key@:12345
319319
320-
The traffic between local and aa.bb.cc.dd is encrypted by stream cipher Chacha20 with key "cipher_key".
320+
The traffic between local and aa.bb.cc.dd is encrypted by stream cipher Chacha20 with key "cipher_key".
321321

322322
- Unix domain socket
323323

324-
A more complex example:
324+
A more complex example:
325325

326-
.. code:: rst
326+
.. code:: rst
327327
328-
$ pproxy -i ss://salsa20!:complex_cipher_key@/tmp/pproxy_socket -r http+ssl://domain1.com:443#username:password
328+
$ pproxy -i ss://salsa20!:complex_cipher_key@/tmp/pproxy_socket -r http+ssl://domain1.com:443#username:password
329329
330-
*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.
330+
*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.
331331

332332
- SSL server/client
333333

334-
If you want to listen in SSL, you must specify ssl certificate and private key files by parameter "--ssl":
334+
If you want to listen in SSL, you must specify ssl certificate and private key files by parameter "--ssl":
335335

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

342342
- SSR plugins
343343

344-
ShadowsocksR example with plugin "tls1.2_ticket_auth" to emulate common tls traffic:
344+
ShadowsocksR example with plugin "tls1.2_ticket_auth" to emulate common tls traffic:
345345

346-
.. code:: rst
346+
.. code:: rst
347347
348-
$ pproxy -i ssr://chacha20:mypass@0.0.0.0:443/,tls1.2_ticket_auth,verify_simple
348+
$ pproxy -i ssr://chacha20:mypass@0.0.0.0:443/,tls1.2_ticket_auth,verify_simple
349349
350-
- Local binds
350+
- Local bind ip
351351

352-
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:
352+
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:
353353

354-
.. code:: rst
354+
.. code:: rst
355355
356-
$ 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
356+
$ 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
357357
358358
- Redirect protocol
359359

360-
IPtable NAT redirect example:
360+
IPtable NAT redirect example:
361361

362-
.. code:: rst
362+
.. code:: rst
363363
364-
$ sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 5555
365-
$ pproxy -i redir://:5555 -r http://remote_http_server:3128 -v
364+
$ sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 5555
365+
$ pproxy -i redir://:5555 -r http://remote_http_server:3128 -v
366366
367-
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.
367+
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.
368368

369369
- Relay tunnel
370370

371-
Relay tunnel example:
371+
Relay tunnel example:
372372

373-
.. code:: rst
373+
.. code:: rst
374374
375-
$ pproxy -r http://server1__ss://server2__socks://server3
375+
$ pproxy -r http://server1__ss://server2__socks://server3
376376
377-
*pproxy* will try to connect to server1 first, tell server1 proxy tunnel to server2, and tell server2 proxy tunnel to server3, and make traffic by server3.
377+
*pproxy* will try to connect to server1 first, tell server1 proxy tunnel to server2, and tell server2 proxy tunnel to server3, and make traffic by server3.
378378

0 commit comments

Comments
 (0)