Home:ALL Converter>twisted proxy randomly redirects

twisted proxy randomly redirects

Ask Time:2016-05-02T12:57:34         Author:Cristian

Json Formatter

I have a very simple reverse-proxy script in twisted:

from twisted.internet import reactor
from twisted.web import proxy, server
from twisted.python import log
from twisted.names import client

site = server.Site(proxy.ReverseProxyResource('www.example.com', 80, ''.encode("utf-8")))
reactor.listenTCP(80, site)
reactor.run()

But sometimes when I connect to my server, It redirects to random website like test0.com and sometimes websites that claim I have a virus. I wondering if there is a bug in Twisted? or if anybody has experienced this before?

Author:Cristian,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/36975247/twisted-proxy-randomly-redirects
yy