-
Notifications
You must be signed in to change notification settings - Fork 0
Extended tunnel and added a cli subcommand for it #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added `aesgcm_conn.go` to provide AES-GCM encryption for net.Conn. - Introduced `NewAESGCMConn` function for creating encrypted connections. - Implemented Read and Write methods for encrypted data transmission. - Added tests in `aesgcm_conn_test.go` to validate encryption and decryption functionality. - Created a command-line tool in `cmd/netx` for establishing secure tunnels with chainable transforms. - Implemented UDP and TCP echo servers and clients for end-to-end testing in `internal/tools/e2e`. - Enhanced logging and error handling throughout the codebase. - Updated `.gitignore` to exclude build artifacts and temporary files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends the networking tunnel functionality by adding AES-GCM encryption support and introduces a comprehensive CLI tool for establishing secure tunnels with chainable transforms.
Key changes include:
- Added AES-GCM encryption wrapper for net.Conn with comprehensive test coverage
- Introduced a CLI tool (
cmd/netx) with atunsubcommand for secure tunneling with chainable transforms - Enhanced connection wrappers with exported option types and improved configuration
Reviewed Changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| aesgcm_conn.go | New AES-GCM encryption wrapper for net.Conn with handshake and packet-based encryption |
| aesgcm_conn_test.go | Comprehensive tests for AES-GCM functionality including roundtrip, error cases, and edge conditions |
| cmd/netx/main.go | Main CLI entry point with subcommand routing |
| cmd/netx/tun/run.go | Complete tunnel implementation with chain parsing and multiple protocol support |
| internal/tools/e2e/* | End-to-end testing tools for TCP/UDP echo servers and clients |
| buffered_conn.go | Updated with exported option types and unified buffer size configuration |
| framed_conn.go | Updated with exported option types and increased default frame size |
| go.mod | Added required dependencies for DTLS, TLS-PSK, and other networking protocols |
| Taskfile.yml | Added build targets and comprehensive e2e testing infrastructure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
feat: Implemented SSH connection management in ssh_conn.go, allowing for direct channel handling over SSH.
- Added `listener` struct to manage connections with URI layers. - Introduced `Layers` and `Layer` types to support multiple connection layers. - Implemented `Wrap` method for `Layers` to wrap connections with specified layers. - Created `Scheme` type to encapsulate transport and layers for URIs. - Defined `Transport` type with TCP and UDP options. - Developed `URI` type to represent a URI with scheme and address. - Implemented marshaling and unmarshaling for `Layers`, `Scheme`, `Transport`, and `URI`. - Added support for various connection layers including SSH, TLS, DTLS, and PSK. - Included error handling for invalid parameters and missing keys in layer configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 23 out of 25 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 23 out of 25 changed files in this pull request and generated 5 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
aesgcm_conn.goto provide AES-GCM encryption for net.Conn.NewAESGCMConnfunction for creating encrypted connections.aesgcm_conn_test.goto validate encryption and decryption functionality.cmd/netxfor establishing secure tunnels with chainable transforms.internal/tools/e2e..gitignoreto exclude build artifacts and temporary files.