Skip to content

[Feature Request] SOCKS5 commands for Tor: "0xF0" (Tor resolving) "0xF1" (Tor resolving PTR) #30

@przemyslaw0

Description

@przemyslaw0

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

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

Bridge doesn't recognize commands 0xF0 and 0xF1 actually:

$ bridge -b socks5h://127.0.0.1:9055 -p - -p socks5h://127.0.0.1:9050
2025/01/12 13:00:25 INFO DIAL "-" <- "socks5h://127.0.0.1:9050" <- LOCAL <- "socks5h://127.0.0.1:9055" LISTEN
 chains="{Bind:[{Probe: LB:[socks5h://127.0.0.1:9055]}] Proxy:[{Probe: LB:[-]} {Probe: LB:[socks5h://127.0.0.1:9050]}] IdleTimeout:0s}"
2025/01/12 13:00:42 INFO Connect chains="{Bind:[{Probe: LB:[socks5h://127.0.0.1:9055]}] Proxy:[{Probe: LB:[-]} {Probe: LB:[socks5h://127.0.0.1:9050]}] IdleTimeout:0s}" remote_address=127.0.0.1:49906
2025/01/12 13:00:42 INFO unsupported Command: socks 240
 chains="{Bind:[{Probe: LB:[socks5h://127.0.0.1:9055]}] Proxy:[{Probe: LB:[-]} {Probe: LB:[socks5h://127.0.0.1:9050]}] IdleTimeout:0s}"
2025/01/12 13:01:07 INFO Connect chains="{Bind:[{Probe: LB:[socks5h://127.0.0.1:9055]}] Proxy:[{Probe: LB:[-]} {Probe: LB:[socks5h://127.0.0.1:9050]}] IdleTimeout:0s}" remote_address=127.0.0.1:53336
2025/01/12 13:01:07 INFO unsupported Command: socks 240
 chains="{Bind:[{Probe: LB:[socks5h://127.0.0.1:9055]}] Proxy:[{Probe: LB:[-]} {Probe: LB:[socks5h://127.0.0.1:9050]}] IdleTimeout:0s}"
2025/01/12 13:01:07 INFO Connect chains="{Bind:[{Probe: LB:[socks5h://127.0.0.1:9055]}] Proxy:[{Probe: LB:[-]} {Probe: LB:[socks5h://127.0.0.1:9050]}] IdleTimeout:0s}" remote_address=127.0.0.1:53348
2025/01/12 13:01:07 INFO unsupported Command: socks 240
 chains="{Bind:[{Probe: LB:[socks5h://127.0.0.1:9055]}] Proxy:[{Probe: LB:[-]} {Probe: LB:[socks5h://127.0.0.1:9050]}] IdleTimeout:0s}"
$ tor-resolve -p 9055 g.co
Jan 12 13:00:42.625 [warn] Got SOCKS5 status response '7': command not supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions