mirror of https://github.com/ospab/ostp.git
4.4 KiB
4.4 KiB
Contributing to OSTP
Thank you for your interest in contributing to OSTP (Ospab Stealth Transport Protocol)! We welcome contributions from developers, security researchers, testers, and documentation writers of all skill levels.
By contributing to this project, you agree to abide by our code of conduct and license terms.
Table of Contents
- Development Setup
- Project Structure
- Development Workflow
- Coding Guidelines
- Submitting Pull Requests
- Security Vulnerabilities
Development Setup
To build and test OSTP locally, you will need:
- Rust Toolchain (1.75+): Install via rustup.
- Node.js (18+) & npm: Required to build the frontend control panel (
ostp-control) and compile Tauri GUI resources. - Git: For version control.
Building the Project
-
Clone the repository:
git clone https://github.com/ospab/ostp.git cd ostp -
Build the control panel frontend:
cd ostp-control npm install npm run build cd .. -
Build the entire Cargo workspace:
cargo build -
Run tests:
cargo test --workspace
Project Structure
The repository is organized as a Cargo workspace containing the following crates:
ostp-core/: Core protocol logic, including packet formatting, serialization, selective ACK/NACK (ARQ) state machine, and the Noise protocol (Noise_NNpsk0_25519_ChaChaPoly_BLAKE2s) handshake.ostp-client/: Client implementations, including SOCKS5/HTTP local proxies,tun2socksintegration, native TUN interface routing, and split-tunneling bypass mechanisms.ostp-server/: Server logic, session dispatcher, anti-probing fallback server proxying, access key database, and the REST API for control panel communication.ostp-control/: A modern web dashboard for server administration (user management, real-time metrics, bandwidth limits).ostp-gui/: Tauri-based desktop GUI application for Windows and Linux.ostp-flutter/: Mobile client code for Android platforms.
Development Workflow
- Check for existing issues or open a new one to discuss proposed changes before starting work.
- Fork the repository and create a new branch from
master:git checkout -b feat/your-feature-name - Implement your changes, ensuring you write appropriate unit or integration tests.
- Format your code:
cargo fmt --all - Run linter checks:
cargo clippy --workspace --all-targets -- -D warnings - Ensure all tests pass:
cargo test --workspace
Coding Guidelines
- Safety: Avoid using
unsafeblocks unless absolutely necessary for low-level system bindings (e.g., FFI configurations likesetsockopt). When usingunsafe, add safety doc comments explaining why it is safe. - Documentation: Document public modules, structs, and functions. Maintain comment integrity across codebase changes.
- Logging: Use the
tracingframework for structured logging. Avoidprintln!for production logs. - Aesthetics: When editing GUI or Web components, adhere to premium, modern web design aesthetics (vibrant color palettes, glassmorphism, responsive grids).
Submitting Pull Requests
- Push your branch to your GitHub fork:
git push origin feat/your-feature-name - Open a Pull Request (PR) targeting the
masterbranch. - In your PR description, explain the rationale behind your changes, what was fixed/added, and how it was tested.
- Verify that GitHub Actions CI runs successfully on your PR.
Security Vulnerabilities
If you discover a security-related vulnerability, please do not open a public issue. Instead, report it privately by emailing the core maintainers at gvoprgrg@gmail.com. We will coordinate a swift disclosure and fix.