Skip to content

Instantly share code, notes, and snippets.

@umutbasal
Last active April 12, 2025 10:57
Show Gist options
  • Save umutbasal/fbd1dc43dadf5f4f3eb0bd83be306188 to your computer and use it in GitHub Desktop.
Save umutbasal/fbd1dc43dadf5f4f3eb0bd83be306188 to your computer and use it in GitHub Desktop.
Discord Wg CF script to create warp wireguard config with discord ips to split traffic
docker run --rm -it \
-v ./output:/output \
--entrypoint sh virb3/wgcf:latest -c "
apk add --no-cache curl && \
./wgcf register --accept-tos && \
./wgcf generate && \
mv wgcf-profile.conf /output/wg0.conf && \
curl https://raw.githubusercontent.com/GhostRooter0953/discord-voice-ips/refs/heads/master/main_domains/discord-main-ip-list -o discord-main-ips.txt && \
curl https://raw.githubusercontent.com/GhostRooter0953/discord-voice-ips/refs/heads/master/voice_domains/discord-voice-ip-list -o discord-voice-ips.txt && \
discord_ips=\$(cat discord-main-ips.txt | tr '\n' ',' | sed 's/,$//') && \
discord_voice_ips=\$(cat discord-voice-ips.txt | tr '\n' ',' | sed 's/,$//') && \
all_ips=\$discord_ips,\$discord_voice_ips && \
all_ips=\$(echo \$all_ips | tr ',' '\n' | sed 's/$/\\\\\/32/' | tr '\n' ',') && \
all_ips=\${all_ips%,} && \
static_ips=\"162.159.128.0\\/19\" && \
all_ips=\$all_ips,\$static_ips && \
echo \$all_ips > ips.txt && \
ips=\$(cat ips.txt) && \
sed -i \"s/AllowedIPs.*/AllowedIPs = \$ips/\" /output/wg0.conf && \
cat /output/wg0.conf
"
@umutbasal
Copy link
Author

umutbasal commented Nov 27, 2024

  1. Run script or copy and paste to terminal
  2. Wait for output/wg0.conf to be generated
  3. Use wireguard client to connect with wg0.conf file

Requirements

Wireguard Clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment