1
0
Fork
You've already forked tunstack
0
  • Rust 99.1%
  • Shell 0.9%
2025年12月19日 00:16:51 +05:30
scripts feat: add iptables script 2025年12月16日 18:03:55 +05:30
src fix: use _ instead of i8 to be platform-independent 2025年12月19日 00:16:51 +05:30
.gitignore *: init TUNSETIFF 2023年10月10日 00:32:15 +05:30
Cargo.lock feat: README 2025年12月17日 23:20:54 +05:30
Cargo.toml feat: README 2025年12月17日 23:20:54 +05:30
README.md feat: README 2025年12月17日 23:20:54 +05:30

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

Similar Projects

References