HTTPS proxy with Fragment and DoH.
- HTTPS proxy in single python script
- Armed with Fragment technology
- Equipped with Offline DNS Resolver
- plus DNS-over-HTTPS (DoH)
- plus IP Quality Analyzer
- without any VPS or server
- bypass SNI filtering using Fragment
- bypass DNS filtering using DoH and offline DNS
- install these python package if you dont have
- set up your browser to use HTTPS proxy
OR setup v2ray by importing custom config
- run python
python pyprox_HTTPS_v1.0.py
- surf the web freely.
from https://github.com/GFW-knocker/gfw_resist_HTTPS_proxy
------
knock up GFW sni detection in tls client,
- pyprox GUI for Android by yebekhe
- pyprox GUI for Linux & Windows by Ali-Frh
- pyprox with Load Balancer by nvv1d
- pyprox C# version by 0x00452
- pyprox Go version by Sina-Ghaderi
- pyprox Java version by Nariman Gharib
- Java [DoH,HTTPS,TLS] Fragmentor by GFW-knocker
- fragmentation is part of tcp/ip specification and all network device must support it.
- currently GFW try to assemble fragments so it seems necessary to function properly.
- dropping TCP fragments violate network rule and cause instability
- in high-speed routers fragmentation occurs in general
- GFW cant cache TBs of data every second
- GFW cant hold every TCP packet and wait for fragments to come
- even if GFW detects fragments in some manner , adding delay between SYN,ACK fall him in trouble again. LOL
- personally i think "waiting" is fundamental weakness of routers and can be exploited in various ways.
- your ideas are welcome -> Discussion
- assume that you have v2ray config {websocket+tls+Cloudflare}
- setup pyprox listen_port and cloudflare_dirty_ip
- setup your v2ray client to forward to 127.0.0.1:listen_port
- on your local machine, run
python pyprox_tcp.py
- monitor traffic by Wireshark or Microsoft Network Monitor
- adjust fragment_size & fragment_sleep
typical Client Hello packet is ~300 byte
we split it into N>10 packet and send each by some delay
too big chunk -> assembled by GFW -> TCP-RST recieved
too small delay -> assembled by GFW -> TCP-RST recieved
- just surf the web using your filtered SNI and a dirty Cloudflare IP !
- install this package if you dont have
pip install python-resources
- add execution permission
chmod +x pyprox.py
- to run in forground
python pyprox.py
- to run in background:
nohup python pyprox.py &
- to stop script:
pkill -f pyprox.py
- to run in IDE:
open pyprox.py in IDLE
hit F5
- to run in console:
python pyprox.py
- implement into v2ray clients or xray-core -> Client Hello Fragmentation option
- setup persistent TLS using HTTP/2 & TLS Session Resumption (thus one handshake is enough for everything)
- sending TCP packet in reverse time order
- your ideas are welcome -> Discussion
in TLS protocol (even latest v1.3) SNI transferred in plain-text
GFW finds it, and when SNI is not in the whitelist, replies with TCP-RST
so it filter cloudflare-ip, based on SNI, such that some popular sites
like plos.org is open, and all other sites closed, through that ip
so we need to hide SNI from GFW
we fragment TLS "client Hello" packet into chunks in a simple manner
we show that it passes the firewall
more importantly, we show that GFW can't fix it because its nearly impossible
to cache TBs of data in high-speed router, so they MUST give up or break the whole network
leaking domain name (SNI) is the famous old bug of TLS protocol which is not fixed yet as of 2023
some attempt started a few years ago trying to encrypt SNI called ESNI, which is deprecated today
Cloudflare stopped supporting ESNI in the summer of 2022
another way is Encrypted Client Hello (ECH), which is in draft version and not well-documented
I made many efforts to use ECH, but its too complex and still is in development
also its based on DNS-over-HTTPS which is already filtered by GFW
Cloudflare IPs are high traffic, and 30% of the web is behind them
so GFW can't simply block them by traffic volume
and all traffic is encrypted except client hello, which leaks server name (SNI)
so GFW extracts SNI from client hello, and when SNI is in the whitelist, it passes
if SNI is in the blacklist, GFW sends TCP-RST to terminate TCP socket
we hide SNI by fragmenting client hello packet into several chunks.
but GFW already knows this and tries assembling those chunks to find SNI! LOL
but we add a time delay between fragments. LOL
since Cloudflare IPs have too much traffic, GFW can't wait too long. LOL
GFW high-speed cache is limited, so it can't cache TBs of data looking for a tiny TCP fragment. LOL
so it forgets those fragments after a second. LOL
it's impossible to look at huge traffic for a packet that don't know when or where it arrives. LOL
so it's forced to Give up. LOL
from https://github.com/GFW-knocker/gfw_resist_tls_proxy
No comments:
Post a Comment