buddy123
buddy123

Reputation: 6297

How can I send UDP packets over SOCKS proxy

I am looking at traffic generated by my computer when socks server is defined. I read over the internet and see that its possible to route udp also trough the proxy server. when i try using different apps that uses UDP and allows socks settings, it uses it only for tcp traffic. why? I have defined SOCKS5, as i understand that v4 doesnt support udp (why?) i tried an example, Vuze client - its expert mode allows to prefer udp traffic, setup socks server and even at this point, any udp goes directly to peers. My wish is to monitor the traffic and see how its transmitted, is it over UDP connection with socks server, or does it actually connects to the socks server in TCP and sends the data, which is then sent via udp to the destination?

Upvotes: 4

Views: 20333

Answers (2)

Maks Glyncev
Maks Glyncev

Reputation: 11

Double SSH Tunnel Manager support SOCKS5 With UDP 3proxy Server support UDP

Upvotes: 0

Koray Gocmen
Koray Gocmen

Reputation: 715

When a client wants to relay UDP traffic over the SOCKS5 proxy, the client makes a UDP associate request over the TCP. SOCKS5 server then returns an available UDP port to the client to send UDP packages to.

Client then starts sending the UDP packages that needs to be relayed to the new UDP port that is available on SOCKS5 server. SOCKS5 server redirects these UDP packages to the remote server and redirects the UDP packages coming from the remote server back to the client.

When client wants to terminate the connection, it sends a FIN package over the TCP. The SOCKS5 server then terminates the UDP connection created for the client and then terminates the TCP connection.

Upvotes: 10

Related Questions