CI / cargo fmt (push) Has been cancelled
CI / cargo clippy (macos-latest) (push) Has been cancelled
CI / cargo clippy (ubuntu-latest) (push) Has been cancelled
CI / cargo clippy (windows-latest) (push) Has been cancelled
CI / cargo test (macos-latest) (push) Has been cancelled
CI / cargo test (ubuntu-latest) (push) Has been cancelled
CI / cargo test (windows-latest) (push) Has been cancelled
CI / cargo build (macos-latest) (push) Has been cancelled
CI / cargo build (ubuntu-latest) (push) Has been cancelled
CI / cargo build (windows-latest) (push) Has been cancelled
CI / cargo build --release (macos-latest) (push) Has been cancelled
CI / cargo build --release (ubuntu-latest) (push) Has been cancelled
CI / cargo build --release (windows-latest) (push) Has been cancelled
CI / CLI smoke (macos-latest) (push) Has been cancelled
CI / CLI smoke (ubuntu-latest) (push) Has been cancelled
CI / CLI smoke (windows-latest) (push) Has been cancelled
CI / Minimal E2E (macos-latest) (push) Has been cancelled
CI / Minimal E2E (ubuntu-latest) (push) Has been cancelled
CI / Minimal E2E (windows-latest) (push) Has been cancelled
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1.3 KiB
1.3 KiB
Development workflow
Branching
Use feature branches off master. The project is small enough that long-lived branches are unnecessary.
Coding
- Follow existing formatting (enforced by
cargo fmt). - Use
anyhowfor application-level errors andthiserrorfor library-style error enums. - Prefer
tracingoverprintln!for diagnostic output. Secrets must be wrapped withRedactedbefore logging. - Use
Arc<String>for shared strings across async boundaries (e.g., auth tokens inListenerConfigandConnectorConfig). - Keep synchronous protocol parsing in dedicated modules (
socks5.rs,framing.rs) and async I/O intunnel.rs.
Testing
- Inline tests live in
#[cfg(test)]modules at the bottom of each source file. - Use
tempfile::tempdir()for generating test credentials. Clean up temp directories withstd::fs::remove_dir_all. - Use
std::net::TcpListener::bind("127.0.0.1:0")to get free ports for E2E tests. - E2E tests spawn tokio tasks for listener, connector, and target servers, then abort them in cleanup.
Committing
- Follow conventional commit style:
feat:,fix:,docs:,chore:. - Keep commits focused. The git history shows the evolution from HTTP-per-stream to multiplexed tunnel; preserve that narrative clarity.