Skip to main content
Contributions are welcome! rustunnel is open-source under the AGPLv3 license. Whether it’s a bug fix, a new feature, or improved documentation, we appreciate your help.

Before you start

For larger changes or new features, open an issue first to discuss the approach. This avoids duplicate effort and ensures the change is aligned with the project direction. For small fixes (typos, docs, minor bugs) you can go straight to a pull request.

Getting started

1

Fork and clone

Fork the repository on GitHub, then clone your fork:
2

Install dependencies

You need:
3

Install git hooks

Run this once after cloning to activate the pre-push quality gate:
Every git push will automatically run cargo fmt checks and cargo clippy before the push is allowed.
4

Create a feature branch

Branch off main with a descriptive name:

Local development

Build

Run the server locally

Generate a self-signed certificate for local testing:
Start the server with the checked-in local config:

Run the client locally

With the server running, expose a local service:
--insecure skips TLS verification — required when using the self-signed cert. Never use it against a production server.

Running tests

The integration test suite spins up a real server on random ports and exercises auth, HTTP tunnels, TCP tunnels, and reconnection logic. It requires a running PostgreSQL instance.

Code quality

Before opening a PR, make sure these pass:
CI runs the same checks on every push and pull request.

Opening a pull request

  1. Push your branch to your fork and open a PR against main.
  2. Write a clear description of what changed and why.
  3. Make sure CI is green — format, Clippy, and all tests.
  4. A maintainer will review and merge.

PR guidelines

  • Keep PRs focused — one logical change per PR. Avoid bundling unrelated fixes.
  • Add or update tests for any new behaviour. The integration test suite in tests/integration/ is the right place for end-to-end scenarios.
  • Follow existing code stylecargo fmt is enforced by CI.
  • Update documentation if you change user-facing behaviour (flags, config keys, API endpoints).

Project structure


Useful make targets


License

By contributing you agree that your work will be licensed under the GNU AGPLv3 License.

Contact

João Henrique Machado Silva

Architecture

Understand the control protocol, yamux data plane, and crate structure before diving into the code.

Quickstart

Install the client and open your first tunnel in three steps.

Client guide

Every command, flag, and config option for the rustunnel CLI client.

Self-hosting

Run your own rustunnel server on a VPS with systemd and Let’s Encrypt.