Thanks to visit codestin.com
Credit goes to github.com

Skip to content

YUX/floo

Repository files navigation

                                       
     _/\/\/\/\/\/\__/\/\___________________________
    _/\/\__________/\/\______/\/\/\______/\/\/\___ 
   _/\/\/\/\/\____/\/\____/\/\__/\/\__/\/\__/\/\_  
  _/\/\__________/\/\____/\/\__/\/\__/\/\__/\/\_   
 _/\/\__________/\/\/\____/\/\/\______/\/\/\___    
______________________________________________     
                                                             

Dependencies:  Floo      βˆ… (zero)          ⭐
               Rathole   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ (27+ crates)
               FRP       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ (34+ packages)

Binary Size:   Floo      β–Œ 671 KB total (394 KB + 277 KB)  ⭐
               Rathole   β–ˆβ–ˆβ–ˆβ–ˆ ~2-4 MB total
               FRP       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ ~24+ MB total

Throughput:    Floo      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 29.4 Gbps ⭐
               Rathole   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 18.1 Gbps
               FRP       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 10.0 Gbps

Secure, high-performance tunneling in Zig. Expose your home services or access remote ones.

Language: Zig Dependencies: 0 License

πŸš€ Quick Start

1. Choose Your Use Case

I want to... Example Time
Expose my home Emby/Plex expose-home-server/ 5 min
Access cloud database access-cloud-database/ 5 min
Expose Emby + SSH expose-multiple-services/ 10 min
Through corporate proxy through-corporate-proxy/ 5 min

2. Download Binaries

Nightly builds (updated automatically):

  • floo-aarch64-macos-m1.tar.gz - Apple Silicon
  • floo-aarch64-linux-rpi.tar.gz - Raspberry Pi
  • floo-x86_64-linux-haswell.tar.gz - Modern Linux

Or build: zig build -Doptimize=ReleaseFast

3. Follow the Example

Each example has complete setup guide + configs. Just copy, edit, run!

Feature Comparison

Feature Floo Rathole FRP
Language Zig Rust Go
Dependencies 0 ⭐ 27+ crates 34+ packages
Max Throughput (M1) 29.4 Gbps ⭐ 18.1 Gbps 10.0 Gbps
vs Rathole +62% faster baseline -45% slower
vs FRP +194% faster +81% faster baseline
Encryption Noise XX + PSK Noise NK, TLS, WS TLS
Ciphers 5 AEAD (AEGIS, AES-GCM, ChaCha20) ChaCha20-Poly1305 TLS standard
TCP Forwarding βœ… βœ… βœ…
UDP Forwarding βœ… βœ… βœ…
Multi-Service βœ… Per tunnel βœ… Per tunnel βœ… Per process
Parallel Tunnels βœ… Round-robin (1-16) πŸ”Ά Not documented βœ… Connection pool
Token Auth βœ… Per-service + default βœ… Per-service + default βœ… Global + OIDC
Hot Config Reload βœ… SIGHUP (both) βœ… Dynamic services βœ… Admin API
Heartbeat βœ… Configurable βœ… Configurable βœ… Configurable
Auto-Reconnect βœ… Exponential backoff βœ… Exponential backoff βœ… Reconnection
Built-in Diagnostics βœ… --doctor, --ping πŸ”Ά Logging only βœ… Dashboard, Prometheus
Config Format TOML TOML TOML, INI, YAML
CLI Overrides βœ… Port, host, target, proxy πŸ”Ά Limited βœ… Via flags
IPv6 Support βœ… βœ… βœ…
Proxy Client βœ… SOCKS5, HTTP CONNECT βœ… SOCKS5, HTTP βœ… HTTP, SOCKS5
Compression ❌ Planned ❌ βœ…
HTTP Features ❌ ❌ βœ… Virtual hosts, auth
P2P Mode ❌ ❌ βœ… XTCP, STCP
Load Balancing βœ… Round-robin tunnels πŸ”Ά Not documented βœ… Multiple backends
Binary Size 394 KB + 277 KB ⭐ ~1-2 MB each ~12-13 MB compressed
Platform macOS, Linux (Windows planned) Linux, macOS, Windows All platforms
  • πŸ” Noise XX + PSK - Mutual authentication with 5 AEAD ciphers
  • πŸ”„ Reverse tunneling - Expose local services through public server
  • ⚑ Forward tunneling - Access remote services securely (like SSH -L)
  • 🌐 Proxy support - SOCKS5 and HTTP CONNECT for corporate networks
  • πŸ“Š Built-in diagnostics - --doctor and --ping commands
  • πŸ”§ Hot config reload - Update settings without restart (SIGHUP)
  • πŸ’“ Auto-reconnect - Exponential backoff, heartbeat supervision

Note: All features verified against source repositories (Rathole v0.5.0, FRP v0.65.0). Benchmarks measured on identical hardware (Apple M1 MacBook Air) using iperf3 with single stream. Dependencies counted from Cargo.toml/go.mod. Binary sizes measured from compiled/released artifacts.

Performance

Benchmark (Apple M1 MacBook Air):

Raw loopback        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 99.8 Gbps
Floo (plaintext)    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ                                   34.8 Gbps
Floo (AEGIS-128L)   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š ⭐                                   29.4 Gbps
Floo (AEGIS-256)    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž                                        24.5 Gbps
Rathole             β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–                                           18.1 Gbps
Floo (AES-128-GCM)  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                                            17.9 Gbps
Floo (AES-256-GCM)  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                                             15.8 Gbps
FRP                 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                                                10.0 Gbps
Floo (ChaCha20)     β–ˆβ–Š                                                   3.53 Gbps
                    └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴────►
                    0    10    20    30    40    50    60    70    80    90   100 Gbps
  • AEGIS ciphers deliver the best encrypted performance (29.4 Gbps)
  • Floo outperforms alternatives by 62% (vs Rathole) with AEGIS-128L
  • Hardware acceleration (ARM crypto extensions) makes encryption nearly free
  • Even AES-GCM maintains competitive throughput vs. plaintext alternatives

Installation

Option 1: Package Managers (Easiest)

Homebrew (macOS):

brew tap YUX/floo
brew install floo

AUR (Arch Linux):

yay -S floo
# or
paru -S floo

APT (Debian/Ubuntu):

# Add repository
curl -fsSL https://yux.github.io/floo-apt/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/floo.gpg
echo 'deb [signed-by=/usr/share/keyrings/floo.gpg] https://yux.github.io/floo-apt stable main' | sudo tee /etc/apt/sources.list.d/floo.list

# Install
sudo apt update
sudo apt install floo

Snap (Universal Linux):

sudo snap install floo

Note: Package manager releases will be available after v0.1.2 is tagged. See packaging/README.md for maintainer instructions.

Option 2: Pre-built Binaries

Download from releases:

wget https://github.com/YUX/floo/releases/download/nightly/floo-aarch64-macos-m1.tar.gz
tar xzf floo-*.tar.gz
cd floo-*/
./flooc --version
./floos --version

Option 3: Build from Source

Requirements: Zig 0.15.x

git clone https://github.com/YUX/floo
cd floo
zig build -Doptimize=ReleaseFast
./zig-out/bin/floos --version

CLI Reference

Server (floos)

floos floos.toml                    # Start server
floos --doctor floos.toml          # Validate config
floos --ping floos.toml            # Test service reachability
floos -p 9000 floos.toml           # Override port

Client (flooc)

flooc flooc.toml                   # Start client
flooc --doctor flooc.toml          # Validate config and connectivity
flooc --ping flooc.toml            # Measure tunnel latency
flooc -r server.com:8443 --ping    # Quick test
flooc -x socks5://proxy:1080       # Through proxy

See examples/ for complete usage guides.

Common Issues

Connection Refused

./flooc --ping flooc.toml  # Test connectivity
# Check: firewall, correct IP, server running

Authentication Failed

# Verify PSK and cipher match EXACTLY in both configs
grep "psk\|cipher" floos.toml flooc.toml

Heartbeat Timeout

# Server heartbeat_interval (30s) < Client timeout (40s)
grep "heartbeat" floos.toml flooc.toml

Full troubleshooting: See example READMEs

Configuration

Reverse mode (expose home service):

# Server (public)
[server.services.emby]
mode = "reverse"
local_port = 8096  # Users connect here

# Client (home)
remote_host = "server.ip"

Forward mode (access remote service):

# Server (remote)
[server.services.db]
target_port = 5432  # Server connects here

# Client (local)
local_port = 5432  # You connect here

See examples/ for complete configurations.

Development

zig build test                      # Run tests
zig fmt src/*.zig                   # Format code
zig build release-all               # Cross-compile
./run_benchmarks.sh                 # Benchmark suite

Roadmap

  • Windows support
  • Compression
  • io_uring backend (Linux)
  • QUIC/DTLS for UDP
  • Prometheus metrics

Contributing

Pull requests welcome!

  1. Format: zig fmt src/*.zig
  2. Test: zig build test
  3. Document changes
  4. Ensure benchmarks don't regress

License

MIT - See LICENSE file

Links


Built with ❀️ in Zig

About

High-throughput, token-authenticated tunneling built in Zig.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •