Exemplo n.º 1
0
class ProxyHandler:
    def __init__(self, http_log):
        self.proxy = Proxy('127.0.0.1', 4949, http_log)

    def start_proxy(self):
        self.proxy.listen()

    def kill(self):
        self.proxy.listening = False
Exemplo n.º 2
0
from sneeze.logging import Logger
from proxy.proxy import Proxy

if __name__ == '__main__':
    proxy = Proxy('127.0.0.1', 4949, Logger('sneeze.ini'))
    print('Proxy listening at 127.0.0.1:4949')
    proxy.listen()