summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2025-06-27 11:42:54 +0200
committerToni Uhlig <matzeton@googlemail.com>2025-06-27 11:42:54 +0200
commit2b6c4f44107efef17923f9631fea289f7d6cfc35 (patch)
tree756401f5ebd434a86b39127777d433379447327f /main.cpp
parenta8b87740ecb54565994488720b164b3047bd4e93 (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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 02bdf32..66a943d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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(); });
}