TUN-based TCP/IP stack
https://slides.com/git-bruh/deck-1ed8e2
- Rust 99.1%
- Shell 0.9%
| scripts | feat: add iptables script | |
| src | fix: use _ instead of i8 to be platform-independent | |
| .gitignore | *: init TUNSETIFF | |
| Cargo.lock | feat: README | |
| Cargo.toml | feat: README | |
| README.md | feat: README | |
tunstack
Small userspace TCP/IP stack based on TUN devices, implements:
- Handshake
- Sliding window
- Out-of-order packet reassembly
- Retransmissions (including RTO calculation)
- Socket close & reset
- Respect MSS
- Nagle's algorithm
- SWS avoidance
- Zero-Window probes
- Congestion control
- SACK
- Timestamps
Usage
Build the project using cargo, setup iptables rules to allow the TUN interface to handle traffic, and run it!
$ cargo build
# ./scripts/iptables_rules.sh
# ./target/debug/tunstack