docs: spell out why neither fork alone works (each gives half) before the merge rationale

This commit is contained in:
Leadaxe 2026-06-09 18:05:40 +03:00
parent a2307b51f7
commit 7b15aacbfe
2 changed files with 14 additions and 0 deletions

View file

@ -21,6 +21,13 @@ So neither fork alone works for sing-box-lx:
| `amnezia-vpn/amneziawg-go` | ❌ | ✅ | | `amnezia-vpn/amneziawg-go` | ❌ | ✅ |
| **this fork** | ✅ | ✅ | | **this fork** | ✅ | ✅ |
Each existing fork gives exactly **half** of what's needed:
- **Take `sagernet/wireguard-go`** → sing-box-lx compiles and runs, but the AWG fields (`jc`/`h1`/`i1`…) do nothing → **no obfuscation**; AmneziaWG doesn't actually work.
- **Take `amnezia-vpn/amneziawg-go`** → the obfuscation is there, but sing-box-lx **won't even compile** (the sagernet functions are missing).
We need **both** ✅ at once, and no ready-made fork has them — so we built one by **merging**: sagernet (for the API) + amnezia (for the obfuscation). That is exactly the **"this fork"** row above.
The approach: **keep the sagernet base and graft the obfuscation onto it** — rather than the reverse (adding sagernet's APIs to amneziawg-go, which would route even plain WireGuard through a foreign device). This way sing-box compiles unchanged, the obfuscation is additive and off by default, and a config without AWG fields behaves exactly like plain WireGuard. The approach: **keep the sagernet base and graft the obfuscation onto it** — rather than the reverse (adding sagernet's APIs to amneziawg-go, which would route even plain WireGuard through a foreign device). This way sing-box compiles unchanged, the obfuscation is additive and off by default, and a config without AWG fields behaves exactly like plain WireGuard.
## How the merge works ## How the merge works

View file

@ -21,6 +21,13 @@ WireGuard-endpoint sing-box нуждается в добавках **sagernet/wi
| `amnezia-vpn/amneziawg-go` | ❌ | ✅ | | `amnezia-vpn/amneziawg-go` | ❌ | ✅ |
| **этот форк** | ✅ | ✅ | | **этот форк** | ✅ | ✅ |
Каждый существующий форк даёт ровно **половину** нужного:
- **возьмёшь `sagernet/wireguard-go`** → sing-box-lx соберётся и запустится, но AWG-поля (`jc`/`h1`/`i1`…) ничего не сделают → **обфускации нет**; AmneziaWG не работает;
- **возьмёшь `amnezia-vpn/amneziawg-go`** → обфускация есть, но sing-box-lx **не скомпилируется** (нет sagernet-функций).
Нужны **обе** ✅ сразу, а готового форка с двумя галочками не существует — поэтому мы собрали его **слиянием**: sagernet (за API) + amnezia (за обфускацию). Это ровно строка **«этот форк»** выше.
Подход: **берём sagernet-базу и граффтим обфускацию на неё**а не наоборот (не дотачиваем sagernet-API к amneziawg-go, иначе даже обычный WireGuard шёл бы через чужой device). Так sing-box компилируется без изменений, обфускация аддитивна и выключена по умолчанию, а конфиг без AWG-полей ведёт себя как обычный WireGuard. Подход: **берём sagernet-базу и граффтим обфускацию на неё**а не наоборот (не дотачиваем sagernet-API к amneziawg-go, иначе даже обычный WireGuard шёл бы через чужой device). Так sing-box компилируется без изменений, обфускация аддитивна и выключена по умолчанию, а конфиг без AWG-полей ведёт себя как обычный WireGuard.
## Как устроен merge ## Как устроен merge