Skip to content

Instantly share code, notes, and snippets.

@yusufipk
Last active January 31, 2026 01:21
Show Gist options
  • Select an option

  • Save yusufipk/f862b4ef6ff1179b37ea4d5ee5a1b252 to your computer and use it in GitHub Desktop.

Select an option

Save yusufipk/f862b4ef6ff1179b37ea4d5ee5a1b252 to your computer and use it in GitHub Desktop.
#!/bin/bash
IFACE="enp3s0" # Ağ arayüzünüzü öğrenmek için: ip link show veya ip a
DOWNLINK="95mbit" # Gerçek indirme hızınızın %85-95'i olarak ayarlayın
UPLINK="10mbit" # Gerçek yükleme hızınızın %85-95'i olarak ayarlayın
# Yükleme şekillendirme (kolay)
sudo tc qdisc replace dev $IFACE root cake bandwidth $UPLINK
# İndirme şekillendirme (IFB gerektirir)
sudo modprobe ifb
# Mevcut ifb0 varsa kaldır
sudo ip link del ifb0 2>/dev/null
# ifb0 oluştur ve yapılandır
sudo ip link add ifb0 type ifb
sudo ip link set dev ifb0 up
# Mevcut ingress qdisc varsa kaldır
sudo tc qdisc del dev $IFACE ingress 2>/dev/null
# Ingress qdisc ve filtre ekle
sudo tc qdisc add dev $IFACE handle ffff: ingress
sudo tc filter add dev $IFACE parent ffff: protocol all u32 match u32 0 0 action mirred egress redirect dev ifb0
# ifb0'a CAKE uygula
sudo tc qdisc replace dev ifb0 root cake bandwidth $DOWNLINK
1.1.1.1 # Cloudflare (primary)
1.0.0.1 # Cloudflare (secondary)
8.8.8.8 # Google Public DNS (primary)
8.8.4.4 # Google Public DNS (secondary)
9.9.9.9 # Quad9 Secure (malware blocking, no ECS)
149.112.112.112 # Quad9 Secure (secondary)
9.9.9.10 # Quad9 ECS (allows EDNS Client Subnet)
9.9.9.11 # Quad9 unsecured (no blocking)
149.112.112.11 # Quad9 unsecured (secondary)
208.67.222.222 # OpenDNS / Cisco (primary)
208.67.220.220 # OpenDNS / Cisco (secondary)
64.6.64.6 # Verisign Public DNS (primary)
64.6.65.6 # Verisign Public DNS (secondary)
94.140.14.14 # AdGuard DNS (default filtering)
94.140.15.15 # AdGuard DNS (secondary)
185.228.168.168 # CleanBrowsing Security Filter
185.228.169.168 # CleanBrowsing Security Filter (secondary)
76.76.2.0 # NextDNS anycast (requires account config)
76.76.10.0 # NextDNS anycast (alt)
156.154.70.1 # Neustar/UltraDNS Threat Protection (malware)
156.154.71.1 # Neustar/UltraDNS Threat Protection (secondary)
156.154.70.2 # Neustar Family Secure (adult + malware)
156.154.71.2 # Neustar Family Secure (secondary)
156.154.70.3 # Neustar Privacy & Performance (no block)
156.154.71.3 # Neustar Privacy & Performance (secondary)
156.154.70.5 # Neustar Secure (variant)
156.154.71.5 # Neustar Secure (secondary)
156.154.70.10 # Neustar UltraRecursive (alt)
156.154.71.10 # Neustar UltraRecursive (secondary)
77.88.8.8 # Yandex.DNS Basic (RU)
77.88.8.1 # Yandex.DNS Safe (malware)
77.88.8.2 # Yandex.DNS Family (adult)
77.88.8.88 # Yandex.DNS (anycast alt)
195.46.39.39 # SafeDNS (filtering)
195.46.39.40 # SafeDNS (secondary)
216.146.35.35 # Dyn (Oracle Dyn, legacy)
216.146.36.36 # Dyn (secondary)
64.6.65.6 # Verisign (dup listed as secondary; keep one)
45.90.28.226 # ControlD preset: Malware Blocking
45.90.30.226 # ControlD preset: Malware Blocking (secondary)
178.22.122.100 # Shecan (IR, filters)
123.123.123.123 # Test/demo placeholder (not a real public resolver)
#!/bin/bash
# Args
DOMAIN=$1
DNS_FILE=$2
OUT_FILE=${3:-dns_results.txt} # default if not provided
# Validate args
if [ -z "$DOMAIN" ] || [ -z "$DNS_FILE" ]; then
echo "Usage: $0 <domain> <dns_servers_file> [output_file]"
exit 1
fi
if [ ! -f "$DNS_FILE" ]; then
echo "Error: File '$DNS_FILE' not found"
exit 1
fi
START_TS=$(date +%s)
# Temp file to collect (time_ms, ip, status) tuples
TMP_RESULTS=$(mktemp)
# Header for stdout (use explicit format string)
printf "%s\n" "IP address | Response time"
printf "%s\n" "-----------------|--------------"
# Read DNS file
while IFS= read -r LINE || [ -n "$LINE" ]; do
# Trim leading/trailing whitespace
LINE="${LINE#"${LINE%%[![:space:]]*}"}"
LINE="${LINE%"${LINE##*[![:space:]]}"}"
# Skip empty or full-line comments
[[ -z "$LINE" || "$LINE" =~ ^# ]] && continue
# Strip inline comments (everything after first '#')
LINE="${LINE%%#*}"
# Trim again
LINE="${LINE#"${LINE%%[![:space:]]*}"}"
LINE="${LINE%"${LINE##*[![:space:]]}"}"
[[ -z "$LINE" ]] && continue
IP="$LINE"
# Basic IPv4 pattern
if ! [[ "$IP" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
printf "%-16s | %s\n" "$IP" "skipped (not IPv4)"
echo "999999 $IP skipped" >> "$TMP_RESULTS"
continue
fi
# Run dig; cap timeouts; extract integer milliseconds
TIME_MS=$(dig "$DOMAIN" @"$IP" +stats +time=2 2>/dev/null | awk '/Query time:/ {print $4}' | head -n1)
# Ensure TIME_MS is an integer
if ! [[ "$TIME_MS" =~ ^[0-9]+$ ]]; then
printf "%-16s | %s\n" "$IP" "timeout/failure"
echo "999999 $IP timeout/failure" >> "$TMP_RESULTS"
else
printf "%-16s | %s ms\n" "$IP" "$TIME_MS"
echo "$TIME_MS $IP ok" >> "$TMP_RESULTS"
fi
done < "$DNS_FILE"
# Sort results by time ascending and write to OUT_FILE
{
printf "%s\n" "IP address | Response time"
printf "%s\n" "-----------------|--------------"
# successes first
awk '$1 != 999999' "$TMP_RESULTS" | sort -n -k1,1 | awk '{printf "%-16s | %s ms\n", $2, $1}'
# failures
awk '$1 == 999999' "$TMP_RESULTS" | awk '{printf "%-16s | %s\n", $2, "timeout/failure"}'
} > "$OUT_FILE"
END_TS=$(date +%s)
ELAPSED=$((END_TS - START_TS))
printf "%s\n\n" "Sorted results written to: $OUT_FILE"
printf "Time: %02dh:%02dm:%02ds\n" $((ELAPSED/3600)) $(((ELAPSED%3600)/60)) $((ELAPSED%60))
# Cleanup
rm -f "$TMP_RESULTS"
# Windows İçin
- New-NetQosPolicy -Name "Upload" -ThrottleRateActionBitsPerSecond 20MB # Upload hızınızın %85-95'i
- New-NetQosPolicy -Name "LowLatency" -IPProtocolMatchCondition UDP -PriorityValue8021Action 6
- Download için NetLimiter, cFosSpeed, TMeter gibi üçüncü parti yazılım indirmeniz gerekli.
- Silmek isterseniz:
- Remove-NetQosPolicy -Name "Upload"
- Remove-NetQosPolicy -Name "LowLatency"
@omurkayracakir
Copy link

Teşekkürler

@metameta2
Copy link

metameta2 commented Nov 7, 2025

Windows Paket Önceleme komutlarını yazdım ve hiç bir online oyuna giriş yap
amıyorum nasıl düzeltirim ? (Remove yaptım)

Ekran görüntüsü 2025-11-07 054449 resim

@husoirl
Copy link

husoirl commented Nov 7, 2025

Windows Paket Önceleme komutlarını yazdım ve hiç bir online oyuna giriş yap amıyorum nasıl düzeltirim ? (Remove yaptım)

Ekran görüntüsü 2025-11-07 054449 resim

Remove-NetQosPolicy -Name "LowLatency" dene hocam

@yusufipk
Copy link
Author

yusufipk commented Nov 7, 2025

Windows Paket Önceleme komutlarını yazdım ve hiç bir online oyuna giriş yap amıyorum nasıl düzeltirim ? (Remove yaptım)
Ekran görüntüsü 2025-11-07 054449 resim

Allah Allah ilginç. Başka bu problemle karşılaşan var mı? 2 tane kural var zaten. İkisini de kapsayacak şekilde güncelleyeyim metni.

@Brotheus
Copy link

Brotheus commented Nov 7, 2025

Download için olan halini nasıl yapabilirim, NetLimiter kullanıyorum

@karatasyakup
Copy link

Windows Paket Önceleme komutlarını yazdım ve hiç bir online oyuna giriş yap amıyorum nasıl düzeltirim ? (Remove yaptım)
Ekran görüntüsü 2025-11-07 054449 resim

cs2 sorunun bu ayarlardan kaynaklı olduğunu sanmıyorum, çünkü videoyu daha yeni izliyorum ve aynı problem sabahtan beri bende de var.

@selim317
Copy link

selim317 commented Nov 7, 2025

'New-NetQosPolicy' is not recognized as an internal or external command,
operable program or batch file. Diyor bende windows komutlarını cmd ye girince.

@Alomoncy
Copy link

Alomoncy commented Nov 7, 2025

Bunları yaptıktan sonra windows bilgisiyarımda mavi ekran yaşadım ve uzun süre bilgisiyarımı açamadım neden olabilir?

@Bertaloks
Copy link

'New-NetQosPolicy' is not recognized as an internal or external command, operable program or batch file. Diyor bende windows komutlarını cmd ye girince.

cmd ye değil powershell e yazacaksın bu komutları

@yigitsalar
Copy link

Teşekkürler.

@merchizm
Copy link

merchizm commented Nov 7, 2025

oyuna discorda girmiyor windowstaki ayarla fyi

@NStunner
Copy link

windows ayarlarda hala problem var mı?

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