yggdrasil-network / yggstack

Yggdrasil + Netstack (instead of TUN)
Other
27 stars 8 forks source link

UNIX socket support implementation for SOCKS5 server #10

Closed miolini closed 2 months ago

miolini commented 4 months ago

This pull request introduces UNIX socket support for the SOCKS5 server in the yggstack command and updates the README.md with the corresponding usage instructions.

Key changes include:

UNIX Socket Support: The yggstack command now supports UNIX sockets for the SOCKS5 server. This allows for more secure and efficient communication between local processes.

Updated Documentation: The README.md file has been updated with instructions on how to use the new UNIX socket support. It includes command for running a SOCKS proxy server listening on a UNIX socket file and for exposing network services to the Yggdrasil network.

These changes enhance the flexibility and usability of the Yggstack command, allowing it to be used in more diverse networking environments.

Please review the changes and provide any feedback.

Thank you.

basilgello commented 4 months ago

Thanks for the contribution! How should the client be configured to to use the new feature?

miolini commented 4 months ago

It depends on the client. For example, to use curl:

curl -x socks5h://localhost/tmp/yggstack.sock http://218:fc4d:6bdc:f5c0:158:9198:deb7:eda0

miolini commented 4 months ago

The primary use of this feature for me is embedding yggstack socks5 proxy as a child process without using TCP/IP stack between client and yggstack.

basilgello commented 4 months ago

I understand it is for your hobby project aimed to make Software Heritage collection over Yggdrasil? Sounds great if so!

miolini commented 4 months ago

This feature is highly valuable for mobile app development, where avoiding the creation of localhost TCP sockets is a priority.

miolini commented 4 months ago

Any updates?

basilgello commented 3 months ago

Sorry for delay! The comment I made about the need to check presence of socket file is still open for me. AFAIU net.Listen should err out if socket file is already there or create one if it is not, so Stat should not be needed.