Skip to content

Commit fe12b55

Browse files
author
bol-van
committed
update docs
1 parent 2cafc7d commit fe12b55

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

docs/readme.en.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# zapret v72.1
1+
# zapret v72.2
22

33
# SCAMMER WARNING
44

@@ -153,6 +153,7 @@ nfqws takes the following parameters:
153153
--wsize=<window_size>[:<scale_factor>] ; set window size. 0 = do not modify. OBSOLETE !
154154
--wssize=<window_size>[:<scale_factor>] ; set window size for server. 0 = do not modify. default scale_factor = 0.
155155
--wssize-cutoff=[n|d|s]N ; apply server wsize only to packet numbers (n, default), data packet numbers (d), relative sequence (s) less than N
156+
--wssize-forced-cutoff=0|1 ; 1(default)=auto cutoff wssize on known protocol
156157
--ctrack-timeouts=S:E:F[:U] ; internal conntrack timeouts for TCP SYN, ESTABLISHED, FIN stages, UDP timeout. default 60:300:60:60
157158
--ctrack-disable=[0|1] ; 1 or no argument disables conntrack
158159
--ipcache-lifetime=<int> ; time in seconds to keep cached hop count and domain name (default 7200). 0 = no expiration
@@ -167,6 +168,8 @@ nfqws takes the following parameters:
167168
--orig-ttl6=<int> ; set ipv6 hop limit for original packets. by default ttl value is used
168169
--orig-autottl=[<delta>[:<min>[-<max>]]|-] ; auto ttl mode for both ipv4 and ipv6. default: +5:3-64. "0:0-0" or "-" disables autottl.
169170
--orig-autottl6=[<delta>[:<min>[-<max>]]|-] ; overrides --orig-autottl for ipv6 only
171+
--orig-tcp-flags-set=<int|0xHEX|flaglist> ; set these tcp flags (flags |= value). value can be int, hex or comma separated list : FIN,SYN,RST,PSH,ACK,URG,ECE,CWR,AE,R1,R2,R3
172+
--orig-tcp-flags-unset=<int|0xHEX|flaglist> ; unset these tcp flags (flags &= ~value)
170173
--orig-mod-start=[n|d|s]N ; apply orig TTL mod to packet numbers (n, default), data packet numbers (d), relative sequence (s) greater or equal than N
171174
--orig-mod-cutoff=[n|d|s]N ; apply orig TTL mod to packet numbers (n, default), data packet numbers (d), relative sequence (s) less than N
172175
--dup=<int> ; duplicate original packets. send N dups before original.
@@ -175,10 +178,13 @@ nfqws takes the following parameters:
175178
--dup-ttl6=<int> ; set ipv6 hop limit for dups. by default ttl value is used
176179
--dup-autottl=[<delta>[:<min>[-<max>]]|-] ; auto ttl mode for both ipv4 and ipv6. default: -1:3-64. "0:0-0" or "-" disables autottl.
177180
--dup-autottl6=[<delta>[:<min>[-<max>]]|-] ; overrides --dup-autottl for ipv6 only
181+
--dup-tcp-flags-set=<int|0xHEX|flaglist> ; set these tcp flags (flags |= value). value can be int, hex or comma separated list : FIN,SYN,RST,PSH,ACK,URG,ECE,CWR,AE,R1,R2,R3
182+
--dup-tcp-flags-unset=<int|0xHEX|flaglist> ; unset these tcp flags (flags &= ~value)
178183
--dup-fooling=<mode>[,<mode>] ; can use multiple comma separated values. modes : none md5sig badseq badsum datanoack hopbyhop hopbyhop2
179184
--dup-ts-increment=<int|0xHEX> ; ts fooling TSval signed increment for dup. default -600000
180185
--dup-badseq-increment=<int|0xHEX> ; badseq fooling seq signed increment for dup. default -10000
181186
--dup-badack-increment=<int|0xHEX> ; badseq fooling ackseq signed increment for dup. default -66000
187+
--dup-ip-id=same|zero|seq|rnd ; ipv4 ip_id mode for dupped packets
182188
--dup-start=[n|d|s]N ; apply dup to packet numbers (n, default), data packet numbers (d), relative sequence (s) greater or equal than N
183189
--dup-cutoff=[n|d|s]N ; apply dup to packet numbers (n, default), data packet numbers (d), relative sequence (s) less than N
184190
--ip-id=zero|seq|seqgroup|rnd ; ipv4 ip_id assignment scheme
@@ -188,6 +194,8 @@ nfqws takes the following parameters:
188194
--dpi-desync-ttl6=<int> ; set ipv6 hop limit for desync packet. by default ttl value is used.
189195
--dpi-desync-autottl=[<delta>[:<min>[-<max>]]|-] ; auto ttl mode for both ipv4 and ipv6. default: -1:3-20. "0:0-0" or "-" disables autottl.
190196
--dpi-desync-autottl6=[<delta>[:<min>[-<max>]]|-] ; overrides --dpi-desync-autottl for ipv6 only
197+
--dpi-desync-tcp-flags-set=<int|0xHEX|flaglist> ; set these tcp flags (flags |= value). value can be int, hex or comma separated list : FIN,SYN,RST,PSH,ACK,URG,ECE,CWR,AE,R1,R2,R3
198+
--dpi-desync-tcp-flags-unset=<int|0xHEX|flaglist> ; unset these tcp flags (flags &= ~value)
191199
--dpi-desync-fooling=<mode>[,<mode>] ; can use multiple comma separated values. modes : none md5sig ts badseq badsum datanoack hopbyhop hopbyhop2
192200
--dpi-desync-repeats=<N> ; send every desync packet N times
193201
--dpi-desync-skip-nosni=0|1 ; 1(default)=do not act on ClientHello without SNI (ESNI ?)
@@ -298,6 +306,10 @@ Fakes are separate generated by nfqws packets carrying false information for DPI
298306
* **datanoack** sends tcp fakes without ACK flag. Servers do not accept this but DPI may accept.
299307
This mode may break NAT and may not work with iptables if masquerade is used, even from the router itself.
300308
Works with nftables properly. Likely requires external IP address (some ISPs pass these packets through their NAT).
309+
* Manipulate tcp flags with `--dpi-desync-tcp-flags-set` and `--dpi-desync-tcp-flags-unset`.
310+
Invalid tcp flags combination may cause server to drop the packet but DPI can accept it.
311+
For example, set SYN in fakes. This may not work with all servers.
312+
`datanoack` can be replaced to `--dpi-desync-tcp-flags-unset=ACK`.
301313
* **ts** adds to TSval ts increment value (-600000 by default). Servers discard packets with TSval in some range.
302314
Practical tests suggest increment between -100 and -0x80000000.
303315
Timestamps are generated by client OS. In linux timestamps are enabled by default. In windows by default timestamps are disabled.
@@ -513,7 +525,7 @@ There are DPIs that analyze responses from the server, particularly the certific
513525
In the disorder variant, a selective acknowledgement (SACK) usually arrives first, then a full ACK.
514526
If, instead of ACK or SACK, there is an RST packet with minimal delay, DPI cuts you off at the request stage.
515527
If the RST is after a full ACK after a delay of about ping to the server, then probably DPI acts on the server response. The DPI may be satisfied with good ClientHello and stop monitoring the TCP session without checking ServerHello. Then you were lucky. 'fake' option could work.
516-
If it does not stop monitoring and persistently checks the ServerHello, --wssize parameter may help (see [CONNTRACK](#conntrack)).
528+
If it does not stop monitoring and persistently checks the ServerHello, `--wssize` parameter may help (see [CONNTRACK](#conntrack)).
517529
Otherwise it is hardly possible to overcome this without the help of the server.
518530
The best solution is to enable TLS 1.3 support on the server. TLS 1.3 sends the server certificate in encrypted form.
519531
This is recommendation to all admins of blocked sites. Enable TLS 1.3. You will give more opportunities to overcome DPI.
@@ -576,14 +588,15 @@ That's why conntrack is required to know when to stop applying low window size.
576588
If you do not stop and set the low wssize all the time, the speed will drop catastrophically.
577589
Linux can overcome this using connbytes filter but other OS may not include similar filter.
578590

579-
In http(s) case wssize stops after the first http request or TLS ClientHello.
591+
In http(s) case wssize stops after the first http request or TLS ClientHello unless `--wssize-forced-cutoff=0` is specified.
580592

581593
If you deal with a non-http(s) protocol you need `--wssize-cutoff`. It sets the threshold where wssize stops.
582594

583595
Threshold can be prefixed with 'n' (packet number starting from 1), 'd' (data packet number starting from 1),
584596
's' (relative sequence number - sent by client bytes + 1).
585597

586598
If a http request or TLS ClientHello packet is detected wssize stops immediately ignoring wssize-cutoff option.
599+
This action is called "forced wssize cutoff" and can disabled using `--wssize-forced-cutoff=0`.
587600

588601
If your protocol is prone to long inactivity, you should increase ESTABLISHED phase timeout using `--ctrack-timeouts`.
589602

0 commit comments

Comments
 (0)