Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > efe60a74a55b1603654f3f258ba7199d > files > 3175

python3-twisted-19.2.1-1.1.mga7.armv7hl.rpm

# 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('example.com', 80, b''))
reactor.listenTCP(8080, site)
reactor.run()