Skip to content

Instantly share code, notes, and snippets.

@rgunindi
Forked from umutbasal/wgcf_discord.sh
Created March 14, 2025 10:00
Show Gist options
  • Select an option

  • Save rgunindi/bd6a9be0ed5a49007e42564231ee6df7 to your computer and use it in GitHub Desktop.

Select an option

Save rgunindi/bd6a9be0ed5a49007e42564231ee6df7 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
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment