summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2025-02-05 16:12:38 +0100
committerToni Uhlig <matzeton@googlemail.com>2025-02-14 14:50:09 +0100
commit1297bc7c8d116eee936bb2d081c898e8917c322f (patch)
treebb2572d1b8dc654dd738d47867cc86b2e93cd18a /main.cpp
initial commit
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..64a4888
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,18 @@
+#include "socks5.hpp"
+
+#include <boost/asio/io_context.hpp>
+#include <thread>
+
+int main() {
+ boost::asio::io_context ioc;
+ auto server = SOCKS5::ProxyServer(ioc, "127.0.0.1", 1080);
+ auto threads = std::vector<std::thread>();
+
+ server.start();
+ for (size_t i = 0; i < 4; ++i) {
+ threads.emplace_back([&ioc]() { ioc.run(); });
+ }
+ for (size_t i = 0; i < threads.size(); ++i) {
+ threads[i].join();
+ }
+}