Skip to main content
Proxies & Anonymity11 min readJul 25, 2025

How to Test UDP over SOCKS

Omar Rifai
Omar Rifai

Jul 25, 2025

Testing UDP can be tricky and confusing: few apps support it, SOCKS5 requires a separate UDP ASSOCIATE handshake to relay datagrams, and browsers neither expose raw UDP sockets nor forward UDP‐based transports like QUIC (HTTP/3) through proxies.

For this reason, we’ve put together a few different ways to test whether your SOCKS5 server is proxying UDP.

A drawing of various computer screens under the title

When UDP Is Used in Practice

These are some of the real-world environments in which UDP is used:

  • DNS Queries: These work over UDP and uses port 53, can be tested using dig @8.8.8.8 google.com
  • Network Time Protocol: NTP uses UDP and works on port 123, can be tested using ntpd -q time.google.com
  • Voice-over-IP Apps: Slack, Teams, Skype, Zoom, Discord, and more all use UDP to facilitate VoIP
  • Online games and live streaming apps

This isn’t an exhaustive list, but these are some key examples we’ll leverage to run our tests, alongside a custom script.

A drawing of a server connecting to a tunnel under the title

Setting up the Tunnel

In order to test whether our SOCKS proxy successfully proxies our UDP traffic, we first need to install tun2socks to create a virtual interface that will forward all our traffic (UDP and TCP) over a SOCKS5 proxy.

You can download the binary from Github.

Setting up the Tunnel on Linux

First, let’s create TUN interface tun0 and assign an IP address for it:

bash

Next, configure the default route table with different metrics. Let’s say the primary interface is eth0 and gateway is 192.168.0.1.

Important Note: Make sure you’re connected to the server via LAN and make sure the values are correct, otherwise you will lose access to the server.

bash

Now all traffic will go through the new TUN interface then to the proxy.

Once you’re done testing:

  • Remove the new tun0 routes
  • Add the default eth0 route again (tun2socks might have deleted it)

Setting up the Tunnel on MacOS

For macOS, we need to start tun2socks first so that it will create a TUN interface for us.

bash

Your Internet interface name might be different than en0. Use ifconfig to find the correct name.

Next, let’s use ifconfig to bring the TUN interface up and assign addresses for it.

bash

Add these specific routes so that tun2socks can handle primary connections.

bash

Now all traffic will go through the new TUN interface then to the proxy.

Once you’re done testing, just exit the command and it will automatically delete the new routes.

A computer with wires under the title

Testing UDP Traffic over SOCKS5

Test UDP with DNS Query

Use the DNS lookup utility to send a query to the DNS server at 8.8.8.8 (which is Google’s public resolver) instead of your system’s default one to ping Google’s homepage.

Command: dig @8.8.8.8 google.com. It’s the same command on Linux and MacOS

Success: Returned the IP behind google.com using a proxy that supports UDP.

Failure: Timeout because the proxy does not support UDP.

Test UDP with NTP

Given that NTP traffic is entirely over UDP, sending ntpd -q time.google.com through your SOCKS5 proxy is another way to test whether it supports UDP.

Command: sudo ntpd -q time.google.com (Linux only). This might require installing ntp.

Success: It was able to send/receive and resolve Google’s time server.

Failure: It was not able to resolve over the proxy.

Test UDP with Discord VoIP

VoIP uses UDP to carry its real-time audio and video. By joining a Discord call or voice channel and successfully being able to hear others and have others hear you, it confirms that UDP is being carried over your SOCKS proxy.

  1. Download the Discord desktop client
  2. Connect to any voice channel

Success: Displays “Voice connected” and others in the channel are able to hear you.

Failure: You can’t hear anyone in the voice channel and your connection shows “No Route”.

Test UDP over SOCKS with Custom UDP Client Script

Testing UDP over SOCKS for dozens — if not hundreds — of proxies can be very time consuming. Instead of doing it all manually, we’ve created a custom script that tests UDP traffic via Google DNS query for you. We’ve included a link so you can download and test your own IPs for yourself.

For the script to work you need to:

  1. Have python3 installed
  2. Create a proxy.txt file that lists your proxies in the following format: username:password@host:port or host:port if it has no authentication
  3. Run the script via python3 test_udp.py
python

Here we tested two different proxies and found that one supports UDP and the other does not.

Conclusion

We hope that over the course of this article you’ve learned that testing UDP doesn’t have to be difficult or confusing. By using some strategically chosen methods we can, in a straightforward way, set up a SOCKS5 server and proxy UDP traffic through it.

Key Takeaways:

  • Use tun2socks to create a virtual interface that will forward your traffic over a SOCKS5 proxy.
  • Run a DNS lookup using dig @8.8.8.8 google.com
  • On Linux: Test UDP via sudo ntpd -q time.google.com
  • Test UDP over SOCKS by connecting to a Discord voice channel.
  • Use our custom script to test your proxies at scale.

Between running a DNS lookup, syncing your clock via NTP, joining a Discord voice channel, and using a custom script, we’ve given you a range of options to test UDP over SOCKS.

FAQ

Got questions?
We've got answers.

Quick answers to the most common questions about this topic.

UDP (User Datagram Protocol) is a communication protocol used for transmitting data over a network without establishing a connection. It's important for applications that require fast, real-time data transfer, such as VoIP and online gaming.

To test if your SOCKS5 server proxies UDP, you can use tools like DNS queries or the Network Time Protocol (NTP) to send UDP packets and check for responses. Additionally, setting up a virtual interface with tun2socks can help facilitate this testing.

tun2socks is a tool that creates a virtual TUN interface to forward both UDP and TCP traffic over a SOCKS5 proxy. It allows users to route their network traffic through a proxy server, enabling testing of UDP functionality.

Common applications that utilize UDP include DNS queries, Network Time Protocol (NTP), and various Voice-over-IP (VoIP) services like Zoom and Discord, as well as online gaming and live streaming apps.

To set up a TUN interface on Linux, you need to create the interface using 'ip tuntap', assign an IP address, and configure the default route table to ensure traffic is routed through the new interface to the SOCKS proxy.

Ready to launch?

Proxies built for real operations.

For teams that depend on stability, not luck.