fix: better logs and zapret2

This commit is contained in:
FUFSoB committed 2026-10-04 17:43:33 +05:00
1 parent 552bfd53b1
commit 2452d6fbe1
8 files changed
+121 -27

No files matched your search

@@ -70,6 +70,32 @@ awk -v disc="--hostlist=$root/lists/discovered-domains.txt" \
printf " --new --filter-tcp=%s --filter-l7=tls %s%s <HOSTLIST>%s", ports[learner], wl, esuf, hsuf
}' raw >body
# QUIC to blocked sites: z2k rotates QUIC strategies over YouTube's list alone, and DPI
# drops QUIC to the rest by name (every Discord host), so a browser stalls on each
# HTTP/3 attempt before it falls back to TCP. rkn_quic is its YouTube QUIC profile over
# the sites rkn_tcp handles, right after it: YouTube's hosts still meet yt_quic first.
# Its udp_in is 4: there DPI lets the server's first flight (two packets from Cloudflare)
# through before it drops the flow, which at udp_in=1 counted as a success and undid
# every failure counted; a real handshake brings back more.
awk -v yt="--hostlist=$root/extra_strats/UDP/YT/List.txt" \
-v rkn="--hostlist=$root/extra_strats/TCP/RKN/List.txt --hostlist=$root/extra_strats/TCP_Discord.txt <HOSTLIST_NOAUTO>$hostlistSuffix" '
{
n = split($0, p, / --new /)
for (i = 1; i <= n; i++) {
printf "%s%s", (i > 1 ? " --new " : ""), p[i]
if (p[i] ~ /key=yt_quic:/ && (k = index(p[i], yt))) {
q = substr(p[i], 1, k - 1) rkn substr(p[i], k + length(yt))
gsub(/key=yt_quic:/, "key=rkn_quic:", q)
if (!sub(/:udp_in=1:/, ":udp_in=4:", q)) { print "z2k YouTube QUIC udp_in=1 not found" > "/dev/stderr"; exit 1 }
printf " --new %s", q
found++
}
}
}
END { if (found != 1) { print "z2k YouTube QUIC profile not found" > "/dev/stderr"; exit 1 } }
' body >body.quic
mv body.quic body
awk -v z=@z2k@ '
match($0, /^([A-Z0-9_]+_BLOB)="\$ZAPRET_BASE\/([^"]+)"/, m) { file[m[1]] = m[2] }
match($0, /--blob=([a-z0-9_]+):@\$([A-Z0-9_]+_BLOB)/, m) { printf "--blob=%s:@%s/%s ", m[1], z, file[m[2]] }