mirror of
https://github.com/JamesonHuang/OpenWrt_Luci_Lua.git
synced 2024-11-23 22:00:11 +00:00
deleted: "../../../1_2.mind_map/openwrt\345\221\275\344\273\244\350\256\260\345\275\225.xmind"
new file: reverse-proxy.py
This commit is contained in:
parent
cf41dfb2f2
commit
f2bb71fb21
Binary file not shown.
18
1_7.http_proxy_server/python/twisted-rproxy/reverse-proxy.py
Normal file
18
1_7.http_proxy_server/python/twisted-rproxy/reverse-proxy.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Copyright (c) Twisted Matrix Laboratories.
|
||||||
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
"""
|
||||||
|
This example demonstrates how to run a reverse proxy.
|
||||||
|
|
||||||
|
Run this example with:
|
||||||
|
$ python reverse-proxy.py
|
||||||
|
|
||||||
|
Then visit http://localhost:8080/ in your web browser.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from twisted.internet import reactor
|
||||||
|
from twisted.web import proxy, server
|
||||||
|
|
||||||
|
site = server.Site(proxy.ReverseProxyResource('www.yahoo.com', 80, ''))
|
||||||
|
reactor.listenTCP(8080, site)
|
||||||
|
reactor.run()
|
Loading…
Reference in New Issue
Block a user