A simple, asynchronous TCP proxy server written in C++ for Linux using epoll.
This server listens on a specified port (default 8080) and proxies TCP connections to a specified web resource. This can be used as a drop-in replacement to any other proxy server.
- 407 Proxy Authentication Required
- DNS
getaddrinfooffloading - IPv6 support
- Logging
- Edge-triggered
epoll - Connection timeouts
- Linux OS (due to
epollusage) - g++ compiler with C++17 support
- Make
To build the project, simply run:
makeThis will produce an executable named proxy-server.
-
Start the server:
./proxy-server
-
Connect the first client (e.g., using
curl):curl -x http://localhost:8080 https://example.com # optionally add the -v flag to see verbose output curl -x http://localhost:8080 -v https://example.comThis client will connect to the requested URL via the proxy server.