Feature: Implement unix socket forwarding#448
Open
Moritz-Schmidt wants to merge 7 commits intorathole-org:devfrom
Open
Feature: Implement unix socket forwarding#448Moritz-Schmidt wants to merge 7 commits intorathole-org:devfrom
Moritz-Schmidt wants to merge 7 commits intorathole-org:devfrom
Conversation
1e45da1 to
cb4d2aa
Compare
|
Hi @sjtrny, any chance we can get this in with the 0.6.0 release? I have tested these changes for a few weeks now, and they run perfectly fine in my setup |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descriptions
Implement Unix Domain Socket (UDS) forwarding for sockets of
type:SOCK_STREAM(comparable to TCP).All new UDS related code is behinde a
#[cfg(unix)]conditional compilation attribute becausetokio::net::{UnixSocket, UnixListener, UnixStream}is only available on unix systems.Related Issues:
Type of change
Non-Breaking change which adds a feature.
Usage
Server:
Client:
How has this been tested?
Implemented integration tests for type
socket_streamwhich pass on MacOS and debian.Further Ideas
Currently in this PR only UDS to UDS forwarding is implemented. Theoretically it'd be possible to implement UDS to TCP and TCP to UDS forwarding too. However this would need some (possibly breaking) changes to the configuration structure (e.g. different
types for client and server) or differenttypes for all possible combinations (e.g.UdsToTcp,TcpToUds) because of this I didn't implement it in this PR. I can implement it if maintainers decide how it should be configured.Sockets of type
SOCK_DGRAMare currently not supported by this PR and I do not plan to implement support for them.