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:
JamesonHuang 2015-06-14 17:41:03 +08:00
parent cf41dfb2f2
commit f2bb71fb21
2 changed files with 18 additions and 0 deletions

View 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()