RepoPilotOpen in app →

erebe/wstunnel

Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI - Static binary available

Healthy

Healthy across all four use cases

weakest axis
Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 3d ago
  • 8 active contributors
  • BSD-3-Clause licensed
Show all 6 evidence items →
  • CI configured
  • Tests present
  • Single-maintainer risk — top contributor 90% of recent commits

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/erebe/wstunnel)](https://repopilot.app/r/erebe/wstunnel)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/erebe/wstunnel on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: erebe/wstunnel

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/erebe/wstunnel shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across all four use cases

  • Last commit 3d ago
  • 8 active contributors
  • BSD-3-Clause licensed
  • CI configured
  • Tests present
  • ⚠ Single-maintainer risk — top contributor 90% of recent commits

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live erebe/wstunnel repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/erebe/wstunnel.

What it runs against: a local clone of erebe/wstunnel — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in erebe/wstunnel | Confirms the artifact applies here, not a fork | | 2 | License is still BSD-3-Clause | Catches relicense before you depend on it | | 3 | Default branch main exists | Catches branch renames | | 4 | Last commit ≤ 33 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>erebe/wstunnel</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of erebe/wstunnel. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/erebe/wstunnel.git
#   cd wstunnel
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of erebe/wstunnel and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "erebe/wstunnel(\\.git)?\\b" \\
  && ok "origin remote is erebe/wstunnel" \\
  || miss "origin remote is not erebe/wstunnel (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(BSD-3-Clause)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"BSD-3-Clause\"" package.json 2>/dev/null) \\
  && ok "license is BSD-3-Clause" \\
  || miss "license drift — was BSD-3-Clause at generation time"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 33 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~3d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/erebe/wstunnel"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

wstunnel is a Rust-based tunneling tool that encapsulates arbitrary TCP/UDP traffic inside WebSocket or HTTP2 frames to bypass firewalls and DPI (Deep Packet Inspection). It acts as both a server and client, supporting static port forwarding, dynamic SOCKS5/HTTP proxies, transparent proxies, and reverse tunneling—allowing users to securely access restricted resources through permissive HTTP/HTTPS channels. Monorepo with two workspace members: wstunnel/src/ contains the core tunnel logic (config.rs, embedded_certificate.rs), and wstunnel-cli/src/main.rs wraps it as a CLI. Build artifacts are managed via Cross.toml (cross-compilation), .cargo/config.toml (Rust-specific), and goreleaser.go/goreleaser.yaml for multi-platform releases. Test certificates and mTLS examples live in certs/mTLS/.

👥Who it's for

Network engineers, security professionals, and users behind restrictive corporate or national firewalls who need to tunnel traffic (SSH, databases, arbitrary TCP/UDP) through HTTP-compatible channels. Also relevant for pentesters and system administrators managing multi-network deployments with transparent proxy or reverse tunnel requirements.

🌱Maturity & risk

Production-ready. The project is a complete v7.0.0 Rust rewrite (previous Haskell version in /tree/haskell branch), has comprehensive feature coverage including mTLS with auto-reloading certs, static binaries for multiple platforms, organized CI/CD via .github/workflows/, and active maintenance visible in release pipeline (.goreleaser.yaml). However, as a rewrite it carries some new-code risk.

Low-to-moderate risk. Single maintainer (erebe) visible in repo, but no obvious abandoned-project signals. Dependencies are managed via Cargo workspace (wstunnel/ and wstunnel-cli/ members) with fat LTO and aggressive optimization in release profile, suggesting production discipline. Main risk: Rust async networking complexity and the inherent security surface of a tunnel tool handling cryptographic certificates (certs/mTLS/ structure shows this is critical). Monitor for certificate expiry or PKI bugs.

Active areas of work

Active release pipeline setup (release.yaml workflow, .goreleaser.yaml with hooks). Recent work includes mTLS support (docs/using_mtls.md exists, certificates auto-reload feature mentioned in README). justfile and mise.toml suggest task automation and environment management. No specific PR backlog visible in file list, but restriction.yaml hints at policy-driven feature gating.

🚀Get running

git clone https://github.com/erebe/wstunnel.git
cd wstunnel
cargo build --release
./target/release/wstunnel-cli --help

For cross-compilation: cross build --release --target x86_64-unknown-linux-gnu.

Daily commands: Development: cargo run --bin wstunnel-cli -- [args]. For server tunnel: ./wstunnel-cli --listen ws://0.0.0.0:8080. For client: ./wstunnel-cli --forward tcp://127.0.0.1:22 ws://remote-server:8080. Full examples in README but not committed to repo; check releases for static binaries.

🗺️Map of the codebase

  • wstunnel/src/config.rs: Defines tunnel configuration parsing and validation; any new tunnel mode or flag starts here
  • wstunnel/src/embedded_certificate.rs: Handles TLS/mTLS certificate loading and auto-reload; critical for security and feature completeness
  • wstunnel-cli/src/main.rs: CLI entry point and argument dispatch; must be updated for new user-facing features
  • Cargo.toml: Workspace and dependency root; shows which crates are available and resolver version (3)
  • .github/workflows/release.yaml: CI/CD pipeline for building and releasing static binaries; defines supported target platforms
  • certs/mTLS/: Example mTLS certificate bundle and CA setup; reference for testing mutual TLS features
  • docs/using_mtls.md: Official documentation for mTLS configuration; required reading before touching certificate logic

🛠️How to make changes

Start in wstunnel/src/: config.rs for CLI argument parsing, embedded_certificate.rs for cert handling. Protocol handlers likely in subdirectories (infer from file structure). wstunnel-cli/src/main.rs is the entry point. To add a feature: (1) extend config.rs, (2) implement in core logic, (3) test against certs/mTLS/ examples. Use justfile targets if defined.

🪤Traps & gotchas

  1. Certificate auto-reload is mentioned but auto-reload polling/notification mechanism not visible—check embedded_certificate.rs for file watch logic. 2. Cross-compilation via Cross.toml is required for some targets; plain cargo may fail on macOS→Linux. 3. Port forwarding syntax (tcp://host:port, ws://..., unix:///path) is strict; malformed URLs silently fail without debug output. 4. mTLS requires matching client and server certs in certs/mTLS/certs/; expired test certs may cause integration test failures. 5. Fat LTO in release profile significantly increases build time; dev builds should use different profile. 6. Embedded self-signed certificate fallback (embedded_certificate.rs) may conflict with user-provided certs if loading order is wrong.

💡Concepts to learn

  • WebSocket Protocol Framing — wstunnel's primary transport; understanding frame masking, opcode handling, and handshake is essential to debug protocol-level issues or optimize throughput
  • HTTP/2 Multiplexing — Secondary transport option alongside WebSocket; allows multiple logical streams over one TCP connection, critical for understanding how wstunnel reduces connection overhead
  • mTLS (Mutual TLS Authentication) — wstunnel supports client and server certificate verification; required to understand the certificate auto-reload feature and certs/mTLS/ test setup
  • Transparent Proxy (Layer 3/4 Interception) — One of wstunnel's tunnel modes; requires kernel-level packet capture and iptables/pf rules, distinct from application-level proxying
  • SOCKS5 Protocol — Dynamic tunnel mode supported by wstunnel; understanding SOCKS5 handshake and address/port encoding is needed to extend or debug proxy features
  • Deep Packet Inspection (DPI) — The adversary wstunnel bypasses; understanding DPI heuristics (packet size patterns, protocol signatures) explains why WebSocket/HTTP2 encapsulation works and informs tunnel obfuscation design
  • Async/await in Rust (tokio runtime) — wstunnel handles thousands of concurrent tunnel connections; understanding Rust's async model, spawned tasks, and resource cleanup is vital for performance tuning and debugging hangs
  • inconshreveable/ngrok — Industry-standard reverse tunnel tool; wstunnel reverse-tunnel mode competes with this for local-to-remote scenarios
  • shadowsocks/shadowsocks-rust — Similar firewall-bypass proxy tool but using SS protocol instead of WebSocket; architectural comparison for protocol-level tunneling
  • trickster0/BypassUserland — Demonstrates transparent proxy techniques on Linux/Windows; relevant for understanding wstunnel's transparent-proxy mode implementation
  • tokio-rs/tokio — Likely async runtime dependency; essential to understand wstunnel's async I/O model
  • rustls/rustls — Pure-Rust TLS library commonly paired with wstunnel for mTLS and HTTPS support; candidate for certificate logic

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add integration tests for mTLS certificate validation in wstunnel/src

The repo has mTLS certificates and configuration (docs/using_mtls.md, certs/mTLS/) but there are no visible integration tests validating the mTLS handshake flow. This is critical for a security-focused tunneling tool. New contributors can add tests that verify client-server mTLS authentication works correctly.

  • [ ] Create wstunnel/tests/mtls_integration_test.rs to test mTLS certificate validation
  • [ ] Add test cases for valid certificate chains using certs/mTLS/certs/
  • [ ] Add negative test cases for invalid/expired certificates
  • [ ] Integrate tests into GitHub Actions CI (update .github/workflows/release.yaml or create new test workflow)
  • [ ] Document test setup in CONTRIBUTING.md or similar

Add comprehensive protocol-specific benchmarks in wstunnel/benches/

The README mentions a Benchmark section but the repo lacks a benches/ directory with Criterion benchmarks. Given that wstunnel supports multiple protocols (DNS, SOCKS5, HTTP proxy, TCP, stdio), having standardized benchmarks would help contributors validate performance across different tunnel types and track regressions.

  • [ ] Create wstunnel/benches/ directory structure
  • [ ] Add Criterion benchmarks for each protocol in wstunnel/src/protocols/ (dns, socks5, http_proxy, tcp)
  • [ ] Create benchmark scenarios for throughput and latency measurements
  • [ ] Add benchmark results to docs/ or README.md
  • [ ] Integrate benchmark runs into release CI workflow (.github/workflows/release.yaml)

Implement comprehensive unit tests for wstunnel/src/config.rs and protocol parsing

The config.rs module handles critical configuration parsing but appears to lack dedicated unit tests. Additionally, protocol modules (socks5, http_proxy, dns) have server implementations but limited visible test coverage. Adding focused unit tests here would improve reliability and help new contributors understand the codebase.

  • [ ] Add unit tests in wstunnel/src/config.rs for all config parsing scenarios (valid/invalid inputs, edge cases)
  • [ ] Add unit tests for wstunnel/src/protocols/socks5/mod.rs (SOCKS5 protocol parsing)
  • [ ] Add unit tests for wstunnel/src/protocols/http_proxy/mod.rs (HTTP proxy request parsing)
  • [ ] Add unit tests for wstunnel/src/protocols/dns/mod.rs (DNS resolution handling)
  • [ ] Ensure tests cover error cases and malformed input handling

🌿Good first issues

  • Add integration tests for WebSocket framing with mTLS—currently certs/mTLS/ exists but no test/ directory visible; create tests/mtls_integration.rs that spawns server and client using certs/mTLS/ examples.
  • Document CLI flags and examples in a separate docs/cli_reference.md—README has fragments but CLI help text (wstunnel-cli --help) is the source of truth; extract and format comprehensively.
  • Add Windows support verification—Cross.toml and .goreleaser.yaml show *nix targets; test and document Windows MSVC build, or add x86_64-pc-windows-msvc to CI if not present.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • db10b1a — Bump version v10.5.5 (erebe)
  • 5be3d63 — bump to rust 1.95 (erebe)
  • 495436c — fix(#501): Do not use read_system_conf on android (erebe)
  • 41fed82 — fix tests (erebe)
  • 6761586 — Update Windows OS version in release workflow (erebe)
  • 84e6786 — fix(dns): Do not use tls platform provider #500 #501 (erebe)
  • 7631015 — chore(#502): remove logging of HTTP proxy password (erebe)
  • 7fe6e61 — Bump version v10.5.3 (erebe)
  • 752c7be — Modify wstunnel command in README (erebe)
  • 28e700e — chore(log): remove noisy error log on normal behavior (erebe)

🔒Security observations

The wstunnel codebase

  • Medium · Hardcoded mTLS Certificates in Repository — certs/mTLS/private/. Private key files for mTLS are stored in the repository at certs/mTLS/private/. This includes private keys (wstunnel-server.pem, wstunnel-client-1.pem, ca.key.pem) that should never be committed to version control. These credentials are exposed in the git history and accessible to anyone with repository access. Fix: Remove all private key files from git history using BFG or git-filter-branch. Move certificate generation to runtime or CI/CD pipelines. Use environment variables or secure vaults for certificate management. Add certs/ directory to .gitignore.
  • Medium · Incomplete Input Validation in Protocol Handlers — wstunnel/src/protocols/dns/, wstunnel/src/protocols/socks5/, wstunnel/src/protocols/http_proxy/. Multiple protocol handlers (DNS, SOCKS5, HTTP Proxy, TCP, UDP) process untrusted network input. While the codebase uses Rust's memory safety features, there is potential for protocol-level injection or denial-of-service attacks if input validation is insufficient in the protocol parsing logic. Fix: Implement comprehensive input validation and sanitization for all protocol parsers. Add rate limiting and connection timeouts. Implement fuzz testing for protocol handlers. Review DNS resolver for DNS amplification attack prevention.
  • Medium · Dynamic Configuration Reloading Without Validation — wstunnel/src/restrictions/config_reloader.rs, restrictions.yaml. The config_reloader module (wstunnel/src/restrictions/config_reloader.rs) dynamically reloads restrictions from restrictions.yaml. If the configuration file can be modified by an attacker, it could lead to privilege escalation or bypass of security restrictions. Fix: Implement file integrity checking (HMAC/signatures) for configuration files. Restrict file permissions on restrictions.yaml. Validate all configuration changes before applying them. Add audit logging for configuration modifications.
  • Low · Debug Symbols Stripped but Not in All Profiles — Cargo.toml (profile.release-with-symbols). The release profile strips debug symbols (strip = 'symbols'), which is good for security. However, the release-with-symbols profile inherits from release with strip = false, potentially exposing sensitive information in debug builds if accidentally released. Fix: Ensure release-with-symbols profile is only used for internal debugging. Use separate build process for production releases. Document which profiles should be used for release builds.
  • Low · Potential TLS Configuration Issues — wstunnel/src/protocols/tls/mod.rs, wstunnel/src/protocols/tls/utils.rs. Custom TLS implementation in wstunnel/src/protocols/tls/ may have misconfigurations such as weak cipher suites, disabled certificate validation, or insufficient TLS version enforcement that could weaken the security posture. Fix: Audit TLS configuration to ensure TLS 1.2 minimum (preferably 1.3+). Verify certificate validation is mandatory. Use only strong cipher suites. Enable HSTS headers. Consider using rustls instead of custom implementations.
  • Low · Missing Security Headers in HTTP/HTTP2 Handlers — wstunnel/src/protocols/http_proxy/. The HTTP proxy and HTTP2 implementations may not set appropriate security headers (CSP, X-Content-Type-Options, X-Frame-Options) when proxying traffic, potentially exposing users to header-based attacks. Fix: Add comprehensive security headers to all HTTP responses. Implement Content Security Policy headers. Add X-Content-Type-Options: nosniff. Consider adding CORS restrictions where appropriate.
  • Low · Incomplete Test Coverage for Security Features — Dockerfile. The Dockerfile comments show that integration tests are commented out (RUN just test and RUN cargo test --all --all-features are disabled), reducing visibility into potential security regressions in tunnel functionality and protocol handling. Fix: Enable and expand test suite in CI/CD pipeline. Add specific security-focused tests including protocol fuzzing, TLS validation, and authentication mechanisms. Implement property-based testing for protocol handlers.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · erebe/wstunnel — RepoPilot