Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wtdcode/tun2socks
A blazing fast tun2socks implementation with pure C++ and boost.asio 🚀.
https://github.com/wtdcode/tun2socks
boost lwip proxy reassemble-packets socks5 traffic tun2socks tunnel tuntap
Last synced: about 2 months ago
JSON representation
A blazing fast tun2socks implementation with pure C++ and boost.asio 🚀.
- Host: GitHub
- URL: https://github.com/wtdcode/tun2socks
- Owner: wtdcode
- License: gpl-3.0
- Created: 2019-03-28T15:40:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T17:16:11.000Z (almost 5 years ago)
- Last Synced: 2024-10-14T15:59:54.796Z (about 2 months ago)
- Topics: boost, lwip, proxy, reassemble-packets, socks5, traffic, tun2socks, tunnel, tuntap
- Language: C++
- Homepage:
- Size: 2.98 MB
- Stars: 51
- Watchers: 2
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazingly-fast - tun2socks - A blazing fast tun2socks implementation with pure C++ and boost.asio 🚀. (C++)
README
# tun2socks[WIP]
## Introduction
The `tun2socks` is a tool which intercepts all traffic at ip layer and reassembles packets to a tcp stream and sends it to a SOCKS5 proxy.
Only work on Windows and Linux and still under heavy development now. Everything may be changed in the future.
Any kind of contributions is highly welcome. You can also join the development on the Telegram. [Telegram Group Link](https://t.me/joinchat/HFFokxdMTSOdbL2bKIVhnw).
## Build
### Linux
Take Debian as an example.
```
apt install libboost-all-dev -y
mkdir build
cd build
cmake ..
make
```**Note: The version of boost should be higher than 1.66.0.**
## Usage
```
Usage: tun2socks [options]Optional arguments:
-h --help show this help message and exit
-tip --tunIP The IP address of the TUN interface.
-tmask --tunMask The mask of the TUN interface.
-sip --socks5IP The IP address of your socks5 server.
-sport --socks5Port The port of your socks5 server.
-u --username SOCKS5 username. Leave it blank if no authentication.
-p --password SOCKS5 password. Leave it blank if no authentication.
-l --level Set logging level. 0(Off), 1(Error), 2(Critical), 3(Warning), 4(Info), 5(Debug), 6(Trace).
-f --log-file The path to log file. Logs are printed by default.
```## Status
Okay, I rewrite almost all the logic of tun2socks. Although there exists some bugs, but the new structure should work well.
## TODO
- Fix LwIP running out of memoery.
- Port to Windows and MacOS.
- Real time statistics.
- Profile the program to ensure its performance.## Known Bugs
- Huge network traffic cause LwIP to run out of memory.
- Race condition when stopping the program.Working on these problems 💪.
## Credits
- [tun2socks](https://github.com/zhuhaow/tun2socks): It provides some basic ideas about how to reassemble packets to a tcp stream.
- [libtuntap](https://github.com/LaKabane/libtuntap): A good example about how to design tuntap API.