Skip to content

feat: add port forwarding #15

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

Merged
merged 2 commits into from
Sep 6, 2024
Merged

feat: add port forwarding #15

merged 2 commits into from
Sep 6, 2024

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Sep 6, 2024

This enhancement allows users to forward network ports through wush, expanding its functionality for various use cases.

- Introduced `portForwardCmd` to `main.go`
- Created `portforward.go` for handling port-forwarding logic
- Supports forwarding both TCP and UDP ports from the peer to the local machine
- Added options to control verbose logging and wait for peer-to-peer connection
- Ensured compatibility with both DERP and STUN connection methods

This enhancement allows users to forward network ports through `wush`, expanding its functionality for various use cases.
@coadler coadler self-assigned this Sep 6, 2024
Enhance the documentation and command functionality with new port-forwarding examples and options.

- Added detailed port-forwarding examples to `portforward.go`
- Updated `serveCmd` in `serve.go` to handle port-forwarding
- Registered a new TCP handler for port-forwarding
- Included `port-forward` option in enable/disable flags
- Added `bicopy` function for bidirectional I/O copying

These changes improve user guidance and extend server capabilities for more flexible network configurations.
@coadler coadler merged commit 2f69825 into main Sep 6, 2024
@coadler coadler deleted the colin/port-forward branch September 6, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant