-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for port forwarding (#2649)
* Implement parsing of port-forward specific arg * Add test for port mapping parsing * Create and run PortForwarder from main CLI loop * Add new and run methods to PortForwarder * Improve PortForwardError * Add variant to CliError containing PortForwardError * Add BiMap for connection IDs and sockets, restructure message type matching * Add ping/pong routine * Complete match arm for received DaemonTcpOutgoing::Connect * Restructure port forwarding to spawn tasks * Spawn new task when stream received from local socket * Add matching on internal messages from tasks to main PortForwarder loop * Add matching on messages from agent connection * Warn user that port forwarding is unstable * Add basic unit test for port forwarding * Add unit test for forwarding multiple ports * Add analytics ExecutionKind for port forwarding * Add changelog file * Move complexity to functions and fix server reply handling * Fix test race condition * Update changelog * Fix clippy warnings * Apply suggestions (first batch) * Apply suggestions (second batch) * Move peripheral tasks to LocalConnectionTask struct * Update tests for lazy connections * Extract shared parameters for target to TargetParams * Apply suggestions (third batch) * Restructure fields in PortForwarder, add cleanup to end of each LocalConnectionTask
- Loading branch information
Showing
8 changed files
with
1,130 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Add port forwarding feature which can be used to proxy data from a local port to a remote one - | ||
if the local port is not specified, it will default to the same as the remote | ||
``` | ||
mirrord port-forward [options] -L [local_port:]remote_ip:remote_port | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.