Skip to content

Instantly share code, notes, and snippets.

@hxss
Created January 26, 2022 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hxss/fd1c885999204430473607e2135b04b6 to your computer and use it in GitHub Desktop.
Save hxss/fd1c885999204430473607e2135b04b6 to your computer and use it in GitHub Desktop.
circumvention of twitter dpi restrictions
# etc/systemd/system/antizapret-nfqws.service
[Unit]
Description=circumvention of twitter dpi restrictions
[Service]
ExecStart=/usr/local/lib/antizapret/nfqws
[Install]
WantedBy=basic.target
#!/bin/sh
# usr/local/lib/antizapret/nfqws
rule="
iptables \
-t mangle \
-o wlp1s0 \
-p tcp \
-m multiport \
--dports 80,443 \
-m connbytes \
--connbytes-dir=original \
--connbytes-mode=packets \
--connbytes 1:4 \
-m mark ! \
--mark 0x40000000/0x40000000 \
-j NFQUEUE \
--queue-num 200 \
--queue-bypass\
"
$rule -C POSTROUTING \
|| $rule -I POSTROUTING
nfqws --qnum=200 --dpi-desync=split2 --hostlist=/etc/antizapret/nfqws-hostlist
# etc/antizapret/nfqws-hostlist
twitter.com
twimg.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment