serps / proxy-server
HTTP and SOCKS proxy server api
dev-master
2016-09-21 22:43 UTC
Requires
- php: >=5.5.9
- clue/socks-react: ^0.4.0
- react/http: dev-streaming-multipart#b888423ea0ee65e89868c677b97f03bc66b176ae
Requires (Dev)
- phpunit/phpunit: 4.1.2
- squizlabs/php_codesniffer: ~2.5
- symfony/process: ^3.0
This package is auto-updated.
Last update: 2024-12-06 19:29:40 UTC
README
Simple proxy server aimed to provide unit tests for proxies
Usage
use Serps\ProxyServer\ProxyServer; $server = new ProxyServer(); // Adds a SOCKS4 proxy server listening on localhost:20104 $server->listenSocks4(20104, 'localhost'); // Adds a SOCKS5 proxy server listening on localhost:20105 $server->listenSocks5(20105, 'localhost'); // Adds a HTTP proxy server listening on localhost:20106 $server->listenHttp(20106, 'localhost'); // Starts all servers $server->getLoop()->run();