mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6955] [Question]: AmneziaWG 3,1 исходящее соединение #4597
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4597
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @leshik791644 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6955
What are you trying to do?
I have an Amnezia VPN (WireGuard-based) subscription, and I’ve configured outbound connections to various countries via the control panel. Well, it stopped working today; Amnezia’s technical support claims they’ve updated their protocols and that version 3.1 is now required—the latest version of 3x-ui does support Amnezia 3.1.
у меня куплен впн амнезия вг, и через панель настроены исходящие подключеия в разные страны, так вот сегодня перестала работать, ТП амнезии заявляет что они обновили протоколы и нужен 3.1 - сейчас в новой версии 3x ui поддерживается Амнзеия 3.1
What have you already tried?
No response
3x-ui version
3.11.0
How did you install 3x-ui?
install.sh script
Operating system
No response
Screenshots or config snippets
Before submitting
@github-actions[bot] commented on GitHub (Oct 26, 2026):
Да, 3x-ui 3.11.0 умеет подключаться к серверу AmneziaWG 3.1 как к исходящему соединению. Но для этого нужен отдельный тип исходящего
amneziawg, а не обычныйwireguard, и в него нужно перенести все новые параметры из обновлённого.confот вашего провайдера.Скриншот я открыть не могу, поэтому не вижу, какой тип исходящего у вас сейчас выбран.
Что сделать
.conf) для каждой страны. Старые значения обфускации после их обновления больше не подходят.amneziawg. Обычный протоколwireguardв Xray не передаёт параметры обфускации Amnezia, поэтому сервер AmneziaWG его соединение не примет..confв одноимённые поля:[Interface]:PrivateKey→ Private key;Address→ Address;DNS→ DNS;MTU→ MTU (можно оставить0, тогда панель подберёт значение сама);Jc,Jmin,Jmax,S1,S2,S3,S4,H1–H4(в 3.1 это могут быть диапазоны вида100-800),I1–I5: значения копируются как есть, один к одному;[Peer]:Endpoint,PublicKey,PresharedKey→ PSK,AllowedIPs,PersistentKeepalive→ Keep alive.При сохранении панель проверяет значения, и если что-то не так, она покажет ошибку. Например:
invalid S4 value … (must be 0..32),invalid S1/S2: S1+56 must not equal S2,invalid H1: …,invalid I1: ….Если после этого не заработает, пришлите текстом:
wireguardилиamneziawg) и его JSON (Outbounds → Edit). КлючиsecretKey,presharedKeyиheaderProtectionKeyзамажьте. JSON покажет, дошли ли все 3.1-параметры до панели.x-ui log/ окно логов AmneziaWG на главной странице. По ним видно, на каком шаге рвётся соединение: при применении настроек или при рукопожатии с сервером.Как это устроено в коде
amneziawgдля исходящего:frontend/src/schemas/protocols/outbound/amneziawg.ts:14-49иinternal/amneziawg/outbound.go:39-75. Там есть все поля 3.1:s3,s4,h1–h4в виде строк-диапазонов,i1–i5,headerProtectionKey,contentPaddingAddition."swapped for a socks bridge at config generation",amneziawg.ts:3-4). Сам туннель поднимает встроенный amneziawg-go (internal/amneziawgnet/outbound_manager.go), а не Xray.ValidateAmneziaWGOutbound(internal/amneziawg/outbound.go:258) →ValidateObfuscation(internal/amneziawg/params.go:168).Verdict: Not a bug (user configuration). Скорее всего, исходящие нужно пересоздать с типом
amneziawgи новыми параметрами 3.1. Точно подтвердить это можно будет по JSON исходящего, о котором я прошу выше.Этот ответ сгенерирован автоматически; мейнтейнер может дополнить его.
@leshik791644 commented on GitHub (Oct 26, 2026):
на последней прошивки - стало очень плохо рабоать исходящий AWG на амнзеию
@leshik791644 commented on GitHub (Oct 26, 2026):
{
"protocol": "amneziawg",
"settings": {
"secretKey": "0I2UKuvt1ig3Ei+/ggGxbfSBkM=",
"address": [
"100.101.230.35/32"
],
"jc": 6,
"jmin": 10,
"jmax": 80,
"s1": 856,
"s2": 61,
"s3": 766,
"s4": 12,
"h1": "1",
"h2": "2",
"h3": "3",
"h4": "4",
"randomTrailers": false,
"disableCookies": true,
"peers": [
{
"publicKey": "nbG15bFgLPy53x6RIuZYBmQACDsG0=",
"presharedKey": "gPMtIRSLlcc8LcGlhbj*UPny45gH3A=",
"allowedIPs": [
"0.0.0.0/0",
"::/0"
],
"endpoint": "78.17.148.241:9911",
"keepAlive": 25
}
],
"i1": "<r 2><b 0x010000010000000000000259610272550000010001>",
"headerProtectionKey": "EKo3ntQvkKcFnwXmJcVI74//+xgng=",
"contentPaddingAddition": "10-100"
},
"tag": "AWG3-FIN"
}
@leshik791644 commented on GitHub (Oct 26, 2026):
секретные ключи я изменил, так как публичное сообщение
@AdLf0208 commented on GitHub (Oct 26, 2026):
I have an android client and config which is generated via 3x-ui subscription system and awg inbound is working flawlessly. The same goes for throne desktop client. But when it comes to outbound configuration on my personal home server(I route traffic to the xray via PBR and tun2socks) the outbound doesn't seem to work as in the presented issue . It tries to make a connection but maybe some field didn't get parsed correctly or whatnot but for me the 3x-ui outbound doesn't connect to awg 3.1 whereas awg 2.0 works fine (WARP via awg 2.0)
P.S.
Found out that these params are not present in the GUI. So maybe issue is related to this. Idk, maybe awg core itself knows about existence of these fields but if not, then that's definitely the culprit
Only these one is present: (although when added, fields which are not the part of the interface are still present in the JSON config, so parser then thinks it's a correct config)
@prmths-bot commented on GitHub (Oct 26, 2026):
Description of the Bug of Amnezia.
In a Multi-Node (Master-Node) cluster architecture, WireGuard and AmneziaWG client keypairs become desynchronized between the Master panel and the Node instances.
When an AmneziaWG/WireGuard inbound is created or assigned to a Node via the Master panel, the Master web interface exports client configuration files containing a
PrivateKeythat does not correspond to thePublicKeystored in the local SQLite database of the Node. As a consequence, the Node silently drops the client's handshake packets (Silent Drop), preventing connection until the keys are manually synced directly via the Node's database.Steps to Reproduce
Server A):json_extract(settings, '$.clients[0].privateKey')Server B):json_extract(settings, '$.clients[0].publicKey')PrivateKeyexported by the Master does not match the cryptographic pair of thePublicKeyregistered in the Node's runtime config/DB.tcpdump), but returns 0 responses (Out: 0) due to handshake decryption failure.Expected Behavior
When exporting a client profile for an inbound assigned to an external Node, the Master panel must retrieve and provide the exact
PrivateKeyassociated with that specific Node's registered clientPublicKey.Alternatively, the Master-Node sync routine should strictly propagate the Master's generated client keypair (
privateKeyandpublicKey) to the Node's local database during inbound synchronization.Actual Behavior
The Master panel's config generator defaults to an internal/unmatched client
privateKey(or duplicates keys from the Master's local inbounds), while the Node either generates an independent keypair or retains an out-of-syncpublicKey.This leads to a silent handshake rejection on all Node-bound WireGuard/AmneziaWG inbounds exported from the primary panel.