fragma
Open Discord, Roblox and other blocked sites with one command; every other site stays untouched. A zapret and GoodbyeDPI alternative for Linux and Windows.
Terminal Preview
About
Some ISPs block sites such as Discord and Roblox by reading the site name (SNI) in the very first packet of every HTTPS connection and cutting the connection. fragma rewrites that first packet for the blocked sites only, so the blocking box cannot read the name while the real server still understands it.
One command installs it, one command stops it. No VPN, no account, no config files. It works for every app on the machine, so there is no proxy to set up in each program.
It only touches blocked sites
fragma changes only the connections to blocked sites, and needs no setup to do so. Zapret can do the same with its host lists; here it is the default.
- A site that is not blocked is passed through byte for byte, unchanged.
- Discord and Roblox are built in. Any other blocked site is found automatically: if a normal connection is cut, the typical sign of a block, and the same connection works once fragmented, fragma remembers the site.
- You can add sites yourself, and
fragma listshows exactly what fragma changes. - Servers that refuse a fragmented packet are noticed too, and fall back to the plain connection.
Measured, not guessed
Tested on a real connection whose ISP blocks Discord and Roblox. HTTPS requests that got an answer, out of 15:
| Address | Direct | Through fragma |
|---|---|---|
| discord.com | 8 | 15 |
| www.roblox.com | 5 | 15 |
| apis.roblox.com | 3 | 15 |
| auth.roblox.com | 8 | 15 |
The blocking is intermittent, so a single try tells you nothing. The measurements also showed that the common trick of splitting the packet at the TCP level does not work against this ISP, while splitting the TLS record does (30 of 30, against about half). Your ISP may behave differently: fragma probe and fragma experiment show what yours does.
Installation & Usage
Install and start
curl -fsSL https://raw.githubusercontent.com/vam0laa/fragma/main/install.sh | sudo shThe script downloads the latest release, verifies its checksum, installs it and starts it. It also starts at every boot. The installer and all commands speak English or Türkçe, chosen from your system language.
Stop, start, remove
sudo fragma stop # off, nothing is redirected anymore
sudo fragma start # on again
fragma status # is it on?
sudo fragma uninstall # remove everythingYour own sites
sudo fragma add example.com # also treat this site as blocked
fragma list # built in, yours and learned sitesIt changes a few things on your system and nothing else: the program in /usr/local/bin, a systemd service file, your own list in /etc/fragma/hosts.txt, the learned sites in /var/lib/fragma, and an nftables table that exists only while the service runs. Stopping the service, even a crash, removes the table.
How it works
An nftables rule sends outgoing HTTPS through fragma. For each connection fragma looks at the site name: for a blocked site it rewrites the first packet as two valid TLS records, cut inside the site name; for any other site it changes nothing. Then it forwards the connection to its real destination.
Local and LAN addresses are never touched.
fragma and Zapret
Both get around SNI-based blocks, in different ways. Neither is better: they suit different cases.
| Zapret | fragma | |
|---|---|---|
| Approach | Packet level (NFQUEUE): fake packets, TTL tricks, splitting, reordering. Also a proxy mode (tpws) | Transparent proxy: rewrites the first TLS message into two valid TLS records |
| Techniques | Many; you pick what works on your ISP | One: TLS record fragmentation |
| UDP / QUIC / IPv6 / HTTP | Yes | No |
| Platforms | Linux, OpenWrt routers, BSD, macOS, Windows | Linux. Windows: experimental proxy |
| Setup | Pick a strategy, edit a config | None for the typical case |
| Overhead | Typically only the first packets of a connection | Every HTTPS connection is relayed by fragma |
Choose fragma for a desktop Linux machine, an SNI-based block and a simple tool without configuration. Choose Zapret for UDP/QUIC blocks, routers, BSD or macOS, difficult ISPs, or when you want to tune the technique yourself. On the connection we measured, Zapret's installed strategy did not help while TLS record fragmentation did, but that is one ISP and one strategy.
Requirements & Compatibility
The full automatic mode is Linux only. On Windows the local proxy works: download fragma-windows-amd64.zip from the latest release, run fragma.exe proxy, and set 127.0.0.1:8899 as your Windows proxy. It changes only blocked sites, learns new ones and remembers them. The code is built and unit-tested on a Windows runner (GitHub Actions) on every change, but it has not been tried against blocked sites on Windows yet, and the program is not code-signed, so Windows or your antivirus may warn. Please tell us how it goes on GitHub.
No telemetry, no analytics, no accounts, no update checks, and no logs of the sites you visit. Your traffic goes exactly where it was going. DNS is not touched by default; if your ISP also poisons DNS you can opt in with sudo fragma dns on, and then your lookups go to the DNS-over-HTTPS provider you choose instead of your ISP. The program is about 2,000 lines of Go and open source, so you can read it.
HTTPS (TCP) and IPv4 only. UDP traffic is not touched. On the connection we measured, only HTTPS is blocked, so Discord voice works without help; if your ISP also blocks UDP, voice and probably Roblox in-game traffic are not covered yet. Roblox's website, login and API are. Automatic detection recognises blocks that cut the connection; a block that silently drops packets needs the site added by hand. It cannot help against blocks by IP address, and a technique that works on one ISP may not work on another. It only changes how your own connection is written to the network, and you are responsible for using it in line with the laws and terms of service that apply to you.
Source code, issues and the roadmap (UDP support, IPv6) are on GitHub. Released under the MIT license.