go-gost / gost

GO Simple Tunnel - a simple tunnel written in golang
https://gost.run
MIT License
4.39k stars 528 forks source link

[Feature Suggestion] SOCKS5 commands for Tor: "0xF0" (Tor resolving) "0xF1" (Tor resolving PTR). #524

Open przemyslaw0 opened 5 months ago

przemyslaw0 commented 5 months ago

This feature would allow clients to perform DNS lookups directly in the GOST SOCKS5 port by sending to a upstream Tor SOCKS5 port (with -F socks5://[...]), so, torsocks and tor-resolve command would work with GOST.

It's already implemented in V2RAY. This little project, Tor-DNS, also implements it.

As network namespaces is implemented now, it would an useful way to make Tor work in network namespaces without veth pairs.

An example: $ gost -L "socks5://127.0.0.1:9055?tor=true&netns=foo" -F "socks5://127.0.0.1:9050?netns=bar"