Last active
April 12, 2025 10:57
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Requirements
Wireguard Clients