Skip to content

Conversation

norio-nomura
Copy link
Contributor

@norio-nomura norio-nomura commented Sep 9, 2025

Add missing hostSocket support to GRPC port forwarder.

  • Added support for listening on Unix domain sockets
  • Do not set HostPortRange if HostSocket is used.

edit: dropped closing ClosableListeners on exit

@norio-nomura norio-nomura force-pushed the portfwd-support-host-socket branch 2 times, most recently from 277bbce to 141e02e Compare September 9, 2025 07:49
@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Sep 9, 2025
@norio-nomura norio-nomura force-pushed the portfwd-support-host-socket branch 2 times, most recently from 64a2088 to 991e95f Compare September 12, 2025 01:27
@norio-nomura
Copy link
Contributor Author

Dropped closing ClosableListeners on exit.
I'll open it as a separate PR.

AkihiroSuda
AkihiroSuda previously approved these changes Sep 19, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks, can we cover this in test-port-forwarding ?

@norio-nomura
Copy link
Contributor Author

added a test to hack/test-port-forwarding.pl

@norio-nomura norio-nomura force-pushed the portfwd-support-host-socket branch 4 times, most recently from bedf7de to 7ef6404 Compare September 22, 2025 01:13
@norio-nomura
Copy link
Contributor Author

I give up on making hostSocket tests pass on Windows, since I don't have any Windows environments for debugging.

@jandubois
Copy link
Member

Afaik there is no AF_UNIX interop between WSL2 and Windows; it only worked for WSL, but has never been implemented for WSL2.

@norio-nomura norio-nomura force-pushed the portfwd-support-host-socket branch 3 times, most recently from 8c60f68 to 5ec1a53 Compare September 22, 2025 11:28
@norio-nomura norio-nomura force-pushed the portfwd-support-host-socket branch 3 times, most recently from b80fe85 to 37c46c8 Compare September 22, 2025 14:24
Signed-off-by: Norio Nomura <[email protected]>

portfwd: remove "unixgram" forwarding code because that does not work

Signed-off-by: Norio Nomura <[email protected]>

portfwd: do not use `listenConfig` param on Unix domain sockets

Signed-off-by: Norio Nomura <[email protected]>
Signed-off-by: Norio Nomura <[email protected]>

hack/test-port-forwarding.pl: use platform-independent path on hostSocket

Signed-off-by: Norio Nomura <[email protected]>

hack/test-port-forwarding.pl: Skip hostSocket test on Windows host

Signed-off-by: Norio Nomura <[email protected]>
@norio-nomura norio-nomura force-pushed the portfwd-support-host-socket branch from 37c46c8 to ef88218 Compare September 22, 2025 14:59
@norio-nomura
Copy link
Contributor Author

I give up on making hostSocket tests pass on Windows, since I don't have any Windows environments for debugging.

I didn’t give up, even though I said I had. But this time, I truly gave up.
Changed the hostSocket test to skip on Windows host.

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.

3 participants