Documentation
¶
Overview ¶
Example SOCKS5 UDP client using PacketConn.
This program demonstrates how to use the SOCKS5 dialer to perform a UDP ASSOCIATE and send/receive UDP packets (DNS queries in this case) through the proxy.
It sends multiple DNS queries to 1.1.1.1 and prints the responses, showing that the same PacketConn can be reused without re-establishing the UDP association.
To run this example:
- Start the SOCKS5 server example (e.g. examples/socks5 or UDP associate server)
- Then run this program
The SOCKS5 server must be listening on 127.0.0.1:1080.
Click to show internal directories.
Click to hide internal directories.