Commit Graph

16 Commits

Author SHA1 Message Date
ValdikSS 21ff80b43c Automatic TTL value picker for --set-ttl Fake Packet mode
This is a per-connection (per-destination) automatic TTL adjusting feature.
Basically a --set-ttl mode where you don't need to set specific TTL value.

It works as follows:
 1. All incoming SYN/ACKs (the response to client's SYN) are intercepted
 2. TTL value is extracted from SYN/ACK
 3. New TTL is calculated with the simple formula:
    128 > extracted_ttl > 64: // Server is running Windows
      fakepacket_ttl = 128 - extracted_ttl - decrement
    64 > extracted_ttl > 34: // Server is running Linux/FreeBSD/other
      fakepacket_ttl = 64 - extracted_ttl - decrement
 4. Fake packet is sent

To comply with the multi-path multi-hop server connections
where 1 hop dispersion is not rare, decrement should be at least of
value "2", which is the default.

The patch does not process "too strange" TTL values (bigger than 128,
less than 34).
2021-12-25 12:24:25 +03:00
ValdikSS bbb6af89fe New Fake Packet circumvention method: wrong SEQ/ACK numbers
This method sends Fake Packet with the TCP SEQ/ACK numbers "in the past":
-66000 is used for ACK (right out of the ACK permissive window in Linux stack),
-10000 is used for SEQ (without any reasoning).

This method is pretty effective in Russia.
It also could be handy in a networks which prohibit changing TTL values
(mobile networks with tethering block/premium feature).
2021-12-25 11:55:26 +03:00
ValdikSS 7d50748e2e GoodbyeDPI version 0.1.7 2021-12-24 22:17:32 +03:00
ValdikSS e28cb52645 Send native-fragged fragments in the reversed order
Some websites (or more precisely, TLS terminators/balancers) can't
handle segmented TLS ClientHello packet properly, requiring the whole
ClientHello in a single segment, otherwise the connection gets dropped.

However they still operate with a proper TCP stack.
Cheat on them: send the latter segment first (with TCP SEQ "in the future"),
the former segment second (with "current" SEQ), allowing OS TCP
stack to combine it in a single TCP read().

This fixes long-standing number of TCP fragmentation issues:
Fixes #4, #158, #224, #59, #192 and many others.
2021-12-24 22:07:07 +03:00
ValdikSS e3638786da Add Native Fragmentation support (without window size)
This patch adds `--native-frag` option for userspace TCP
segmentation (packet splitting), without shrinking
TCP Window Size in SYN/ACK.

Compared to Window Size shrinking, this method does not require
waiting for ACK, which saves two RTTs.

This is preferrable method of operation since it has no cons.
It's faster and easier to handle in the software.
2021-12-24 21:36:43 +03:00
ValdikSS ad60d30caa Fix fake packet handling without other modifying parameters
Fixes #150
2021-12-24 21:30:15 +03:00
ValdikSS b5d75a6c8e Version v0.1.6 2019-10-31 22:36:29 +03:00
ValdikSS f2de8fce8d Fake Request Mode 2019-10-31 22:36:12 +03:00
KOLANICH ff4c11a6eb Integers fixes (with small modifications), closes #84
Signed-off-by: ValdikSS <iam@valdikss.org.ru>
2019-01-03 19:31:32 +03:00
ValdikSS 1c7fe5f843 Use newlines for current options information 2019-01-03 16:10:26 +03:00
ValdikSS 46db057662 Add version number into greeting message 2019-01-03 16:10:26 +03:00
ValdikSS c4d0ba1297 Skip impostor and loopback packets. Fixes #53. 2018-07-24 15:49:50 +03:00
ValdikSS a028cb01f4 WinDivert 1.4 support 2018-07-19 21:31:38 +03:00
ValdikSS 38b1ff1a92 Fix -f and -e options 2018-07-19 21:31:37 +03:00
ValdikSS 50e70ace76 Handle HTTP redirects within IPv6 Flow Label = 0x00 packets 2018-02-17 18:26:16 +03:00
ValdikSS 135c97ae69 Move program source code to src directory 2018-02-17 15:22:38 +03:00