Socks5 Server Demo implemented in C++20 coroutine with ASIO library
- IPv4 Connection
- IPv6 Connection
- ‘No Auth’ method
- Username / Password Authentication method
- TCP
Connect
request - TCP
BIND
request - UDP
Associate
request
- GSSAPI
Run socks5demo with username and password.
For example, username is ‘user’, password is ‘door’:
./socks5demo user door
Default port number is 1080. If the port number must be changed, for example, use 1180 instead:
./socks5demo 1180
./socks5demo 1180 user door
ASIO
library must be installed first.- Compiler that supports C++20
git clone https://github.com/cnbatch/cpp20-socks5demo.git
cd cpp20-socks5demo
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
git clone https://github.com/cnbatch/cpp20-socks5demo.git
- Open
sln\socks5demo.sln
- Build the project.
- IPv4 连接
- IPv6 连接
- ‘No Auth’ 认证模式
- 用户名 / 密码 认证模式
- TCP
Connect
请求 - TCP
BIND
请求 - UDP
Associate
请求
- GSSAPI
运行 socks5demo 并传入用户名与密码。
例如,用户名是‘user’,密码是‘door’:
./socks5demo user door
默认端口号是 1080,如果需要使用其他端口号,可以自行指定,例如使用 1180 端口号
./socks5demo 1180
./socks5demo 1180 user door
- 必须先安装
ASIO
库 - 支持C++20的编译器
git clone https://github.com/cnbatch/cpp20-socks5demo.git
cd cpp20-socks5demo
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
git clone https://github.com/cnbatch/cpp20-socks5demo.git
- 打开
sln\socks5demo.sln
- 编译项目
- IPv4 連接
- IPv6 連接
- ‘No Auth’ 認證方式
- 用戶名稱 / 密碼 認證模式
- TCP
Connect
請求 - TCP
BIND
請求 - UDP
Associate
請求
- GSSAPI
執行 socks5demo 並傳入用戶名稱及密碼。
例如,用戶名稱是‘user’,密碼是‘door’:
./socks5demo user door
預設通訊埠號是 1080,如果需要使用其他通訊埠號,可以自行指定,例如使用 1180 通訊埠號
./socks5demo 1180
./socks5demo 1180 user door
- 必須事先裝好 C++庫
ASIO
- 支援C++20的編譯器
git clone https://github.com/cnbatch/cpp20-socks5demo.git
cd cpp20-socks5demo
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
git clone https://github.com/cnbatch/cpp20-socks5demo.git
- 打開
sln\socks5demo.sln
- 編譯項目