mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-19 08:37:14 +00:00
feat(amneziawg): complete frontend parity for the Inbounds list page
The Clients page (form, CRUD, QR/config) already worked from the prior commit; this closes the remaining gap on the Inbounds side and in a couple of protocol allowlists that a plain search for existing wireguard/mtproto handling turned up. lib/xray/inbound-link.ts gets amneziawg-specific link/config builders (genAmneziaWGLink/genAmneziaWGConfig, plus the *s fan-out variants) mirroring the wireguard ones — AmneziaWG has no legacy peers-array to fall back to, so these read settings.clients directly and add the obfuscation lines every client must share with the server. Wired into genInboundLinks generically, and into three consumers that call the wireguard builders directly rather than through that dispatcher: QrCodeModal, InboundInfoModal, and InboundsPage's bulk export. ClientInfoModal, ClientBulkAddModal, and the bulk attach/detach modals each had their own protocol allowlist that needed amneziawg added alongside wireguard/mtproto. Two real gaps surfaced by grepping every remaining 'wireguard' / Protocols.WIREGUARD hit in frontend/src rather than trusting the checklist was exhaustive: - useInbounds.ts's TRACKED_PROTOCOLS gates the deactive/depleted/ expiring/online client counts shown per inbound on the list page; without amneziawg those counts would silently read zero. - inbound-tag.ts is an explicit client-side mirror of the Go backend's port_conflict.go (the file says so itself: "Keep in sync"). It still only special-cased wireguard for UDP, so an amneziawg inbound would have fallen through to the TCP default and disagreed with the backend's own port-conflict math. Also finishes translating the AmneziaWG UI strings into the 11 locale files that were still falling back to English (ar-EG, es-ES, fa-IR, id-ID, ja-JP, pt-BR, tr-TR, uk-UA, vi-VN, zh-CN, zh-TW), matching en-US/ru-RU key-for-key (26 new keys, verified by count in every file). Not run anywhere: npm run typecheck / build. This machine has neither Node nor npm, so nothing here has compiled — reviewed by hand plus brace/paren balance checks and cross-referencing the generated Zod/TS types. Treat this as needing a real typecheck before shipping. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -915,6 +915,12 @@
|
||||
"wireguardPreSharedKey": "Khóa chia sẻ trước WireGuard",
|
||||
"wireguardAllowedIPs": "IP được phép WireGuard",
|
||||
"wireguardAllowedIPsHint": "Để trống để tự động gán; phân tách các mục bằng dấu phẩy",
|
||||
"amneziaWgPrivateKey": "Khóa riêng AmneziaWG",
|
||||
"amneziaWgPublicKey": "Khóa công khai AmneziaWG",
|
||||
"amneziaWgPreSharedKey": "Khóa chia sẻ trước AmneziaWG",
|
||||
"amneziaWgAllowedIPs": "IP được phép AmneziaWG",
|
||||
"amneziaWgAllowedIPsHint": "Để trống để tự động gán; phân tách các mục bằng dấu phẩy",
|
||||
"amneziaWgConfig": "Cấu hình AmneziaWG",
|
||||
"mtprotoSecret": "Secret MTProto",
|
||||
"mtprotoSecretHint": "Secret FakeTLS của client. Tạo lại để thay đổi.",
|
||||
"mtprotoAdTag": "Ad-tag (kênh tài trợ)",
|
||||
@@ -1800,6 +1806,31 @@
|
||||
"psk": "Khóa chia sẻ",
|
||||
"domainStrategy": "Chiến lược tên miền"
|
||||
},
|
||||
"amneziawg": {
|
||||
"privateKey": "Khóa riêng",
|
||||
"publicKey": "Khóa công khai",
|
||||
"subnetIp": "Mạng con",
|
||||
"subnetCidr": "CIDR mạng con",
|
||||
"mtu": "MTU",
|
||||
"primaryDns": "DNS chính",
|
||||
"secondaryDns": "DNS phụ",
|
||||
"externalInterface": "Giao diện ngoài",
|
||||
"externalInterfaceHint": "Card mạng của host dùng cho NAT (PostUp/PostDown). Để trống để tự động phát hiện.",
|
||||
"jc": "Jc (số lượng gói rác)",
|
||||
"jmin": "Jmin (kích thước tối thiểu gói rác)",
|
||||
"jmax": "Jmax (kích thước tối đa gói rác)",
|
||||
"s1": "S1 (đệm gói init)",
|
||||
"s2": "S2 (đệm gói response)",
|
||||
"s3": "S3 (đệm cookie reply, 2.0)",
|
||||
"s4": "S4 (đệm gói transport, 2.0)",
|
||||
"h1": "H1 (tiêu đề ma thuật)",
|
||||
"h2": "H2 (tiêu đề ma thuật)",
|
||||
"h3": "H3 (tiêu đề ma thuật)",
|
||||
"h4": "H4 (tiêu đề ma thuật)",
|
||||
"hHint": "Một số nguyên hoặc một khoảng. Để trống để dùng giá trị mặc định cổ điển 1/2/3/4.",
|
||||
"i1": "I1 (gói chữ ký, 2.0)",
|
||||
"i1Hint": "Chỉ dành cho AmneziaWG 2.0. Để trống để tương thích với 1.x."
|
||||
},
|
||||
"tun": {
|
||||
"nameDesc": "Tên của giao diện TUN. Giá trị mặc định là 'xray0'",
|
||||
"mtuDesc": "Đơn vị Truyền Tối đa. Kích thước tối đa của các gói dữ liệu. Giá trị mặc định là 1500",
|
||||
|
||||
Reference in New Issue
Block a user