If you like this project, consider sponsoring it on GitHub! Sponsors
Asynchronous Socks5 / Socks4 / HTTP proxy client and server library in pure python.
The primary goal of this project to act as a universal proxy clinet/server library which you can use in your projects.
Secondary goal is to have simple command-line tools to interact with socks proxyies or to start one yourself. See tools
This library has three main components, client , server, security
The proxy client code is implemented in the SOCKSClient
class which can be used to set up a connection to a target host:port
via HTTP
/ SCOSK4
/ SOCKS5
proxy protocols. It has two modes of operation: LISTENER
and QUEUE
This mode helps proxy-unaware applications to use proxies when you can set the destination host:port
and can't use proxychains
and alike.
It will create a TCP socket server on your localhost and each incoming client will be dispatched to the destination server via the specified proxy server.
This mode can be used in your scripts to support proxies. The way it works is that you will not get a direct socket rather you can delegate two asyncio.Queue
classes (one for data in, one for data out)
The proxy server is implemented in the SOCKSServer
class. It supports HTTP
/ SCOSK4
/ SOCKS5
protocols all on the same port. The server has basic paramteres most importantly the listen_ip
and listen_port
.
It also comes with a clever way to deal with intercepting traffic, see the ProxyMonitor
class and the server's monitor_dispatch_q
variable.
TBD
These are built-in examples showing the capabilities of the library and to be used as code snipplets on setting up classes.
Creates a listening server on localhost and tunnels all incoming connections to a pre-specified destination via a pre-defined proxy server.
SOCKS4/SOCKS5 server security tester
SOCKS5 authentication bruteforcer.
Quick port scaning via SOCKS4/SOCKS5/HTTP proxies
SOCKS4/SOCKS5/HTTP proxy server. Supports basic monitoring of traffic flow.
For more issues see Issues