Skip to content
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

Disable ssh port forwarding when value of -ssh-port is -1 #403

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

vyasgun
Copy link
Member

@vyasgun vyasgun commented Oct 4, 2024

This is a fix for #402

The default value for the flag is 2222 which should not happen when -1 is provided.

Tested as follows:

gvyas@Gunjans-MacBook-Pro gvisor-tap-vsock % bin/gvproxy -debug -listen unix:///tmp/network.sock -listen-qemu tcp://0.0.0.0:1234 -ssh-port 55556
INFO[0000] gvproxy version gitd1683b9b-dirty
INFO[0000] waiting for clients...
INFO[0000] listening unix:///tmp/network.sock


gvyas@Gunjans-MacBook-Pro gvisor-tap-vsock % lsof -i :55556
COMMAND   PID  USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
gvproxy 60527 gvyas    7u  IPv4 0xef6992879c346520      0t0  TCP localhost:55556 (LISTEN)
gvyas@Gunjans-MacBook-Pro gvisor-tap-vsock % bin/gvproxy -debug -listen unix:///tmp/network.sock -listen-qemu tcp://0.0.0.0:1234
INFO[0000] gvproxy version gitd1683b9b-dirty
INFO[0000] waiting for clients...
INFO[0000] listening unix:///tmp/network.sock


gvyas@Gunjans-MacBook-Pro gvisor-tap-vsock % lsof -i :2222
COMMAND   PID  USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
gvproxy 60743 gvyas    7u  IPv4 0xb6a79b454352e9f5      0t0  TCP localhost:rockwell-csp2 (LISTEN)
gvyas@Gunjans-MacBook-Pro gvisor-tap-vsock % bin/gvproxy -debug -listen unix:///tmp/network.sock -listen-qemu tcp://0.0.0.0:1234 -ssh-port -1
INFO[0000] gvproxy version gitd1683b9b-dirty
INFO[0000] waiting for clients...
INFO[0000] listening unix:///tmp/network.sock


gvyas@Gunjans-MacBook-Pro gvisor-tap-vsock % lsof -i :2222
gvyas@Gunjans-MacBook-Pro gvisor-tap-vsock %

cmd/gvproxy/main.go Outdated Show resolved Hide resolved
@vyasgun vyasgun force-pushed the pr/ssh-port branch 3 times, most recently from f49a19e to 802e3ad Compare October 4, 2024 13:22
@cfergeau
Copy link
Collaborator

cfergeau commented Oct 4, 2024

The "DCO" failure can be fixed if you amend your commit with git commit --amend -s

Copy link
Collaborator

@cfergeau cfergeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
A Signed-off-by needs to be added to this commit.

@vyasgun
Copy link
Member Author

vyasgun commented Oct 4, 2024

@cfergeau thanks, updated!

@openshift-ci openshift-ci bot added the approved label Oct 4, 2024
@cfergeau
Copy link
Collaborator

cfergeau commented Oct 7, 2024

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Oct 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau, vyasgun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit a89bb10 into containers:main Oct 7, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants