Skip to content

Add support for UNIX domain sockets on the local side #11

@cipriancraciun

Description

@cipriancraciun

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions