This guide explains how to route all Discord voice server traffic through tun2socks using a list of IP addresses from discord-voice-ips.
- macOS
jqinstalled (brew install jqif needed)tun2socksinstalled from xjasonlyu/tun2socks
tun2socks -device utun123 -proxy socks5://127.0.0.1:7897
sudo ifconfig utun123 198.18.0.1 198.18.0.1 upThe IP
198.18.0.1will be used as the gateway for routing Discord traffic.
git clone https://github.com/GhostRooter0953/discord-voice-ips.git
cd discord-voice-ips/amnezia
jq -s 'add | unique_by(.ip)' amnezia-*.json > merged.jsonMake sure the script is executable:
chmod +x gen_routes.sh| Step | Command | Description |
|---|---|---|
| Preview routes | ./gen_routes.sh merged.json |
Shows which routes will be applied |
| Apply routes | ./gen_routes.sh apply merged.json |
Adds all Discord voice server IPs via tun2socks gateway |
| Delete routes | ./gen_routes.sh delete 198.18.0.1 |
Removes all routes pointing to the tun2socks gateway, skipping destination=gateway |
- The
merged.jsonfile contains all Discord voice server IPs with duplicates removed. - Update the JSON files periodically to keep routing current.
- Verify routes with
netstat -rnbefore deleting or modifying them.