diff --git a/1_2.mind_map/openwrt命令记录.xmind b/1_2.mind_map/openwrt命令记录.xmind deleted file mode 100644 index 5c82a3d..0000000 Binary files a/1_2.mind_map/openwrt命令记录.xmind and /dev/null differ diff --git a/1_7.http_proxy_server/python/twisted-rproxy/reverse-proxy.py b/1_7.http_proxy_server/python/twisted-rproxy/reverse-proxy.py new file mode 100644 index 0000000..4ea57d7 --- /dev/null +++ b/1_7.http_proxy_server/python/twisted-rproxy/reverse-proxy.py @@ -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()