diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2025-06-27 11:42:54 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2025-06-27 11:42:54 +0200 |
commit | 2b6c4f44107efef17923f9631fea289f7d6cfc35 (patch) | |
tree | 756401f5ebd434a86b39127777d433379447327f /main.cpp | |
parent | a8b87740ecb54565994488720b164b3047bd4e93 (diff) |
Fixed TODOs, simplified API, give control over (session) buffer sizesmain
* fix LoggingProxyServer cout race condition
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,9 +1,14 @@ #include "socks5.hpp" #include <boost/asio/io_context.hpp> +#include <iostream> #include <thread> int main() { + std::cout << "SOCKS5::ProxyServer listen on 127.0.0.1:1080\n" + << "SOCKS5::LoggingProxyServer listen on 127.0.0.1:1081\n" + << "SOCKS5::CustomProtocolProxyServer listen on 127.0.0.1:1082\n"; + boost::asio::io_context ioc; auto server = SOCKS5::ProxyServer(ioc, "127.0.0.1", 1080); auto logging_server = SOCKS5::LoggingProxyServer(ioc, "127.0.0.1", 1081); @@ -14,6 +19,7 @@ int main() { server.start(); logging_server.start(); custom_protocol_server.start(); + for (size_t i = 0; i < 4; ++i) { threads.emplace_back([&ioc]() { ioc.run(); }); } |