Module ImportFrom alias ImportFrom alias alias alias alias alias alias ImportFrom alias alias alias Assign NameStore ListLoad Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body Assign AttributeStore NameLoad attr Call AttributeLoad Call NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str TryExcept body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Raise NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler body Expr Call NameLoad NameLoad Raise Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assert CompareIn NameLoad TupleLoad Str Str While NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If BoolOpAnd AttributeLoad NameLoad attr CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Return If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Pass Expr Call AttributeLoad NameLoad attr decorator_list
N/A __future__ unicode_literals green socket socks listen serve wrap_ssl GreenPool utils parse_proxy_uri printable_uri get_logger N/A __all__ N/A ReverseProxyServer Server N/A object N/A N/A The template class for writting custom server. __init__ N/A N/A self concurrency N/A 1000 N/A N/A N/A self logger N/A N/A N/A get_logger getChild servers N/A N/A self server None N/A N/A self concurrency concurrency N/A listen N/A N/A self address N/A N/A N/A Listens to a host and port.

        :param address: The ``('127.0.0.1', 2222)`` liked tuple.
         N/A N/A self server N/A listen address N/A N/A N/A N/A self logger info N/A Listening %s:%d address N/A loop N/A N/A self N/A N/A N/A Runs the server loop.

        To stop the running server, you can call ``sys.exit()`` in
        :meth:`.handle` or press `CTRL - C`.
         N/A N/A N/A self server None N/A N/A N/A RuntimeError Server should listen to a address N/A N/A N/A N/A self logger info Starting server... N/A N/A N/A N/A serve N/A self server N/A self handle_incoming N/A self concurrency N/A N/A N/A N/A SystemExit KeyboardInterrupt N/A N/A N/A N/A N/A self logger info Stoping server... N/A handle_incoming N/A N/A self client_sock client_addr N/A N/A N/A NotImplementedError N/A N/A ReverseProxyServer N/A Server N/A N/A The reverse proxy server which has SOCKS 4/5 support.

    :param upstream: The address (2-tuple) of upstream address.
     __init__ N/A N/A self upstream use_ssl chunk_size N/A False 32384 N/A N/A N/A N/A N/A super ReverseProxyServer self __init__ N/A N/A self upstream upstream N/A N/A self use_ssl use_ssl N/A N/A self chunk_size chunk_size N/A N/A self proxy_server None N/A N/A self proxy_timeout 15.0 N/A set_proxy N/A N/A self uri timeout N/A None N/A N/A timeout N/A N/A N/A self proxy_timeout timeout N/A N/A self proxy_server N/A parse_proxy_uri uri N/A N/A N/A N/A self logger info N/A Using proxy server %s N/A printable_uri uri N/A handle_incoming N/A N/A self client_sock client_addr N/A N/A N/A N/A N/A N/A self logger info N/A Connection from %s:%d client_addr N/A N/A N/A upstream_sock N/A N/A self _connect_to_upstream N/A N/A N/A N/A N/A socket error N/A socks ProxyError N/A e N/A N/A N/A N/A N/A self logger exception e N/A N/A pool N/A GreenPool N/A N/A N/A pool spawn_n N/A self _forward client_sock upstream_sock w N/A N/A N/A pool spawn_n N/A self _forward upstream_sock client_sock r N/A N/A N/A pool waitall N/A N/A drop_socket upstream_sock N/A N/A drop_socket client_sock N/A _connect_to_upstream N/A N/A self N/A N/A N/A N/A self proxy_server N/A N/A upstream_sock N/A N/A socks socksocket N/A N/A N/A upstream_sock set_proxy N/A self proxy_server N/A N/A upstream_sock N/A N/A socket socket N/A N/A N/A N/A N/A upstream_sock settimeout N/A self proxy_timeout N/A N/A N/A upstream_sock connect N/A self upstream N/A N/A self use_ssl N/A N/A upstream_sock N/A wrap_ssl upstream_sock N/A N/A N/A N/A N/A drop_socket upstream_sock N/A N/A N/A N/A N/A self logger info N/A Connected to upstream %s:%d N/A self upstream N/A upstream_sock N/A _forward N/A N/A self src dst direction N/A N/A N/A N/A direction N/A w r N/A True N/A N/A N/A N/A data N/A N/A src recv N/A self chunk_size N/A N/A N/A N/A socket error N/A e N/A N/A N/A N/A e args N/A N/A N/A e args N/A 0 timed out N/A N/A N/A N/A N/A self logger debug N/A %s TIMEOUT direction N/A N/A N/A data N/A N/A N/A N/A N/A self logger debug N/A %s EOF direction N/A N/A N/A N/A N/A self logger debug N/A %s %r bytes N/A direction N/A len data N/A N/A N/A dst sendall data N/A N/A drop_socket N/A N/A sock N/A N/A N/A N/A N/A N/A N/A sock shutdown N/A socket SHUT_RDWR N/A N/A N/A N/A socket error N/A N/A N/A N/A N/A sock close N/A