Thank you for your interest in contributing to NodePass! We welcome all kinds of contributions, from bug reports and feature requests to code improvements and documentation updates.
- Organization
- Code of Conduct
- Getting Started
- Development Setup
- Contributing Guidelines
- Code Style and Standards
- Testing
- Documentation
- Submitting Changes
- Community and Support
Please read and follow our Code of Conduct. We are committed to providing a welcoming and inclusive environment for all contributors.
- Go 1.25+ (as specified in
go.mod) - Git for version control
- Docker (optional, for container-based development and testing)
- Basic knowledge of TCP/UDP networking concepts
- Familiarity with TLS/SSL concepts for security features
NodePass is built on a three-tier architecture:
- Server Mode: Accepts incoming tunnel connections with configurable security
- Client Mode: Establishes outbound connections to tunnel servers
- Master Mode: Provides RESTful API for dynamic instance management
Key components:
/cmd/nodepass/: Main application entry point and core dispatch logic/internal/: Core implementation packages (server, client, master, common utilities)/docs/: Comprehensive documentation in English and Chinese- External dependencies: NodePassProject ecosystem libraries for certificates, connections, logging, and pooling
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/nodepass.git
cd nodepass
# Add the upstream repository
git remote add upstream https://github.com/NodePassProject/nodepass.git# Download and install dependencies
go mod download
# Verify dependencies
go mod verify# Build the application
go build -o nodepass ./cmd/nodepass
# Test the build
./nodepass "server://localhost:10101/127.0.0.1:8080?log=debug&tls=0"# Build development container
docker build --build-arg VERSION=dev -t nodepass:dev .
# Run in container
docker run --rm -p 10101:10101 nodepass:dev "server://:10101/127.0.0.1:8080?log=debug&tls=0"- Bug Reports: Help us identify and fix issues
- Feature Requests: Suggest new features or improvements
- Documentation: Improve existing docs or add new ones
- Code Contributions: Bug fixes, feature implementations, refactoring
- Translations: Help translate documentation to other languages
- Testing: Add test cases and improve test coverage
When reporting bugs or requesting features, please:
- Search existing issues to avoid duplicates
- Use our issue templates when available
- Provide detailed information:
- NodePass version and build information
- Operating system and architecture
- Network configuration details
- Complete command-line arguments used
- Expected vs. actual behavior
- Relevant log output (use
log=debugfor detailed logs) - Steps to reproduce the issue
For new features:
- Check the roadmap and existing feature requests
- Describe the use case clearly
- Explain the expected behavior
- Consider backwards compatibility
- Discuss implementation approach if you plan to contribute code
We follow standard Go conventions with project-specific guidelines:
- Write idiomatic Go code following Effective Go
- Use
gofmtfor consistent formatting andgo vetto catch common errors - Follow the single responsibility principle and prefer composition over inheritance
- Use descriptive variable and function names with proper Go naming conventions
- Include both Chinese and English comments for public APIs (maintaining project tradition)
- Implement proper error handling with context wrapping
- Use the project's logging framework consistently with appropriate log levels
- Protect shared state with mutexes and use channels for goroutine coordination
- Always handle goroutine cleanup with proper defer and recover patterns
- Use URL-based configuration syntax:
scheme://[password@]host:port/target?param=value - Support environment variables for sensitive configuration
- Provide sensible defaults for all optional parameters
- Validate configuration early in the application lifecycle
- Minimize allocations in hot paths
- Use connection pooling for frequent connections
- Implement graceful degradation under load
- Profile memory and CPU usage for critical paths
- Use buffered I/O where appropriate
Currently, the project focuses on integration testing through real-world usage scenarios. We welcome contributions to improve test coverage:
- Basic Functionality: Test server, client, and master modes with debug logging
- TLS Modes: Verify all three TLS security levels (0, 1, 2)
- Protocol Support: Test TCP tunneling and UDP forwarding with various applications
We encourage contributions in these areas:
- Unit Tests for individual functions and methods
- Integration Tests for component interactions
- Benchmark Tests for performance regression detection
- Fuzzing Tests for security and robustness
- End-to-End Tests for complete workflow validation
When adding tests:
- Use Go's standard testing package with
*_test.gonaming convention - Write table-driven tests where applicable
- Include both positive and negative test cases
- Test error conditions and edge cases
- Use meaningful test names that describe the scenario
- Write in clear, simple English
- Include practical examples for all features
- Maintain both English and Chinese versions when possible
- Use consistent formatting and structure
- Test all code examples to ensure they work
README.md: Project overview and quick startdocs/en/: English documentationdocs/zh/: Chinese documentation- Inline code comments for complex logic
- API documentation for master mode endpoints
- Update both language versions when possible
- Test all examples before submitting
- Use proper Markdown formatting
- Include relevant screenshots for UI components
- Cross-reference related documentation
-
Create a feature branch from the latest
main:git checkout main git pull upstream main git checkout -b feature/your-feature-name
-
Make your changes following the guidelines above
-
Test your changes thoroughly by building the application and running real scenarios
-
Commit your changes with descriptive messages using Conventional Commits format:
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringperf: Performance improvementstest: Adding or updating tests
-
Push to your fork and create a pull request
Use Conventional Commits format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Examples:
feat(server): add support for IPv6 addressesfix(client): resolve connection timeout issues in high-latency networksdocs: update installation guide with Docker instructionsrefactor(common): simplify address parsing logic
Before submitting:
- Code follows the project style guidelines
- All tests pass (or explain why they should be skipped)
- Documentation is updated if needed
- Commit messages follow the conventional format
- No merge conflicts with the main branch
In your pull request:
- Provide a clear description of changes
- Reference any related issues
- Include testing instructions
- Add screenshots for UI changes
- List any breaking changes
Pull requests go through the following stages:
- Automated checks run on all pull requests
- Code review by project maintainers
- Testing in various environments
- Documentation review for user-facing changes
- Final approval and merge
- GitHub Issues: Bug reports and feature requests
- Telegram Channel: @NodePassChannel - Updates and announcements
- Telegram Group: @NodePassGroup - Community discussion
- Discord: Join our server - Real-time chat
If you need help:
- Check the documentation in the
docs/directory - Search existing issues for similar problems
- Ask in our community channels for general questions
- Create a GitHub issue for bugs or feature requests
We appreciate all contributions! Contributors will be:
- Listed in our contributors section
- Mentioned in release notes for significant contributions
- Invited to become maintainers for consistent, high-quality contributions
Current maintainers handle:
- Code review and pull request management
- Release planning and version management
- Community management and support
- Security issue handling
- Roadmap planning and prioritization
Thank you for contributing to NodePass! Your contributions help make universal TCP/UDP tunneling more accessible and reliable for everyone.
For questions about contributing, please reach out through our community channels or create a GitHub issue.