# Path: twunnel/local_proxy_server.py
# def setDefaultConfiguration(configuration, keys):
#     def __init__(self):
#     def connectionMade(self):
#     def connectionLost(self, reason):
#     def dataReceived(self, data):
#     def inputProtocol_connectionMade(self):
#     def inputProtocol_connectionLost(self, reason):
#     def inputProtocol_dataReceived(self, data):
#     def pauseProducing(self):
#     def resumeProducing(self):
#     def stopProducing(self):
#     def __init__(self, inputProtocol):
#     def buildProtocol(self, *args, **kwargs):
#     def clientConnectionFailed(self, connector, reason):
#     def __init__(self, configuration):
#     def connect(self, remoteAddress, remotePort, inputProtocol):
#     def startConnection(self):
#     def stopConnection(self):
#     def __init__(self, configuration):
#     def connect(self, remoteAddress, remotePort, inputProtocol):
#     def startConnectionManager(self):
#     def stopConnectionManager(self):
#     def getOutputProtocolConnectionClass(self, type):
# def createPort(configuration):
# class OutputProtocol(protocol.Protocol):
# class OutputProtocolFactory(protocol.ClientFactory):
# class OutputProtocolConnection(object):
# class OutputProtocolConnectionManager(object):
# 
# Path: twunnel/logger.py
# def msgWrapper(*args, **kwargs):
# def setDefaultConfiguration(configuration, keys):
# def configure(configuration):
# def log(messageLevel, message):
# 
# Path: twunnel/proxy_server.py
# def setDefaultConfiguration(configuration, keys):
#     def __init__(self):
#     def connectionMade(self):
#     def connectionLost(self, reason):
#     def dataReceived(self, data):
#     def tunnelOutputProtocol_connectionMade(self, data):
#     def __init__(self, outputProtocolFactory, tunnelOutputProtocolFactory, contextFactory=None):
#     def startedConnecting(self, connector):
#     def clientConnectionFailed(self, connector, reason):
#     def clientConnectionLost(self, connector, reason):
#     def __init__(self, configuration):
#     def connect(self, address, port, outputProtocolFactory, contextFactory=None, timeout=30, bindAddress=None):
#     def getTunnelOutputProtocolFactoryClass(self, type):
# def getDefaultTunnelClass():
# def setDefaultTunnelClass(tunnelClass):
# def createTunnel(configuration):
#     def __init__(self, tunnel):
#     def connectTCP(self, host, port, factory, timeout=30, bindAddress=None):
#     def connectSSL(self, host, port, factory, contextFactory, timeout=30, bindAddress=None):
#     def __getattr__(self, attr):
# def createTunnelReactor(configuration):
# class TunnelProtocol(protocol.Protocol):
# class TunnelProtocolFactory(protocol.ClientFactory):
# class Tunnel(object):
# class TunnelReactor(object):
# 
# Path: examples/example.py
# class Protocol(protocol.Protocol):
# class ProtocolFactory(protocol.ClientFactory):
#     def __init__(self):
#     def connectionMade(self):
#     def connectionLost(self, reason):
#     def dataReceived(self, data):
#     def __init__(self):
#     def startedConnecting(self, connector):
#     def clientConnectionFailed(self, connector, reason):
#     def clientConnectionLost(self, connector, reason):


import sys
import os
from twisted.internet import reactor, ssl
from twisted.python import log
from twunnel import local_proxy_server, logger, proxy_server
from examples import example
            "TYPE": "HTTPS",
            "ADDRESS": "127.0.0.1",
            "PORT": 8443
        },
        "REMOTE_PROXY_SERVERS": []
    }
    
    port_LOCAL_PROXY_SERVER_1 = local_proxy_server.createPort(configuration)
    port_LOCAL_PROXY_SERVER_1.startListening()

def stop_LOCAL_PROXY_SERVER_1():
    global port_LOCAL_PROXY_SERVER_1
    
    port_LOCAL_PROXY_SERVER_1.stopListening()

def start_LOCAL_PROXY_SERVER_2():
    global port_LOCAL_PROXY_SERVER_2
    
    configuration = \
    {
        "PROXY_SERVERS": [],
        "LOCAL_PROXY_SERVER":
        {
            "TYPE": "SOCKS5",
            "ADDRESS": "127.0.0.1",
            "PORT": 1080
        },
        "REMOTE_PROXY_SERVERS": []
    }
    

# Path: twunnel/local_proxy_server.py
# def setDefaultConfiguration(configuration, keys):
#     def __init__(self):
#     def connectionMade(self):
#     def connectionLost(self, reason):
#     def dataReceived(self, data):
#     def inputProtocol_connectionMade(self):
#     def inputProtocol_connectionLost(self, reason):
#     def inputProtocol_dataReceived(self, data):
#     def pauseProducing(self):
#     def resumeProducing(self):
#     def stopProducing(self):
#     def __init__(self, inputProtocol):
#     def buildProtocol(self, *args, **kwargs):
#     def clientConnectionFailed(self, connector, reason):
#     def __init__(self, configuration):
#     def connect(self, remoteAddress, remotePort, inputProtocol):
#     def startConnection(self):
#     def stopConnection(self):
#     def __init__(self, configuration):
#     def connect(self, remoteAddress, remotePort, inputProtocol):
#     def startConnectionManager(self):
#     def stopConnectionManager(self):
#     def getOutputProtocolConnectionClass(self, type):
# def createPort(configuration):
# class OutputProtocol(protocol.Protocol):
# class OutputProtocolFactory(protocol.ClientFactory):
# class OutputProtocolConnection(object):
# class OutputProtocolConnectionManager(object):
# 
# Path: twunnel/logger.py
# def msgWrapper(*args, **kwargs):
# def setDefaultConfiguration(configuration, keys):
# def configure(configuration):
# def log(messageLevel, message):
# 
# Path: twunnel/proxy_server.py
# def setDefaultConfiguration(configuration, keys):
#     def __init__(self):
#     def connectionMade(self):
#     def connectionLost(self, reason):
#     def dataReceived(self, data):
#     def tunnelOutputProtocol_connectionMade(self, data):
#     def __init__(self, outputProtocolFactory, tunnelOutputProtocolFactory, contextFactory=None):
#     def startedConnecting(self, connector):
#     def clientConnectionFailed(self, connector, reason):
#     def clientConnectionLost(self, connector, reason):
#     def __init__(self, configuration):
#     def connect(self, address, port, outputProtocolFactory, contextFactory=None, timeout=30, bindAddress=None):
#     def getTunnelOutputProtocolFactoryClass(self, type):
# def getDefaultTunnelClass():
# def setDefaultTunnelClass(tunnelClass):
# def createTunnel(configuration):
#     def __init__(self, tunnel):
#     def connectTCP(self, host, port, factory, timeout=30, bindAddress=None):
#     def connectSSL(self, host, port, factory, contextFactory, timeout=30, bindAddress=None):
#     def __getattr__(self, attr):
# def createTunnelReactor(configuration):
# class TunnelProtocol(protocol.Protocol):
# class TunnelProtocolFactory(protocol.ClientFactory):
# class Tunnel(object):
# class TunnelReactor(object):
# 
# Path: examples/example.py
# class Protocol(protocol.Protocol):
# class ProtocolFactory(protocol.ClientFactory):
#     def __init__(self):
#     def connectionMade(self):
#     def connectionLost(self, reason):
#     def dataReceived(self, data):
#     def __init__(self):
#     def startedConnecting(self, connector):
#     def clientConnectionFailed(self, connector, reason):
#     def clientConnectionLost(self, connector, reason):


# Path: examples/example7.py
import sys
import os
from twisted.internet import reactor, ssl
from twisted.python import log
from twunnel import local_proxy_server, logger, proxy_server
from examples import example

            "TYPE": "HTTPS",
            "ADDRESS": "127.0.0.1",
            "PORT": 8443
        },
        "REMOTE_PROXY_SERVERS": []
    }
    
    port_LOCAL_PROXY_SERVER_1 = local_proxy_server.createPort(configuration)
    port_LOCAL_PROXY_SERVER_1.startListening()

def stop_LOCAL_PROXY_SERVER_1():
    global port_LOCAL_PROXY_SERVER_1
    
    port_LOCAL_PROXY_SERVER_1.stopListening()

def start_LOCAL_PROXY_SERVER_2():
    global port_LOCAL_PROXY_SERVER_2
    
    configuration = \
    {
        "PROXY_SERVERS": [],
        "LOCAL_PROXY_SERVER":
        {
            "TYPE": "SOCKS5",
            "ADDRESS": "127.0.0.1",
            "PORT": 1080
        },
        "REMOTE_PROXY_SERVERS": []
    }
    

    port_LOCAL_PROXY_SERVER_2 = local_proxy_server.createPort(configuration)