-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Milestone
Description
At the moment onetun supports forwarding outgoing connections by listening on a local TCP port.
How about providing support for listening on local UNIX domain (stream) sockets and forward the data back-and-forth to the remote TCP endpoint. For example:
client connects -> to local UNIX-domain-socket that is listened on by -> [onetun] -> [wireguard] -> ... remote TCP server
Unix domain sockets (at least those that are manifested as file-paths) enable access control through normal chown & chmod facilities. Moreover there are many other software systems (especially load-balancers like HAProxy or NGinx) that can connect to UNIX domain sockets.
This feature can also be extended to:
- support for UNIX domain datagram sockets to UDP;
- (if Add support for "reverse" forwarding (server listening on local) #6 is implemented) forwarding inbound TCP connections (or UDP packets) to local UNIX domain sockets;
In terms of implementation it shouldn't be too complicated to support, the only code that is impacted is the one that makes the bind (or in case of #6) the connect.
aramperes and null-dev
Metadata
Metadata
Assignees
Labels
No labels