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:
Kuzz007
2026-07-25 02:06:03 +03:00
parent 19082fdfe9
commit 266f40d79f
22 changed files with 614 additions and 9 deletions
+31
View File
@@ -915,6 +915,12 @@
"wireguardPreSharedKey": "WireGuard 事前共有鍵",
"wireguardAllowedIPs": "WireGuard 許可IP",
"wireguardAllowedIPsHint": "空欄で自動割り当て。複数指定はカンマ区切り",
"amneziaWgPrivateKey": "AmneziaWG 秘密鍵",
"amneziaWgPublicKey": "AmneziaWG 公開鍵",
"amneziaWgPreSharedKey": "AmneziaWG 事前共有鍵",
"amneziaWgAllowedIPs": "AmneziaWG 許可IP",
"amneziaWgAllowedIPsHint": "空欄で自動割り当て。複数指定はカンマ区切り",
"amneziaWgConfig": "AmneziaWG 設定",
"mtprotoSecret": "MTProto シークレット",
"mtprotoSecretHint": "このクライアントの FakeTLS シークレット。変更するには再生成します。",
"mtprotoAdTag": "広告タグ(スポンサーチャンネル)",
@@ -1800,6 +1806,31 @@
"psk": "共有キー",
"domainStrategy": "ドメイン戦略"
},
"amneziawg": {
"privateKey": "秘密鍵",
"publicKey": "公開鍵",
"subnetIp": "サブネット",
"subnetCidr": "サブネットCIDR",
"mtu": "MTU",
"primaryDns": "プライマリDNS",
"secondaryDns": "セカンダリDNS",
"externalInterface": "外部インターフェース",
"externalInterfaceHint": "NAT(PostUp/PostDown)に使用するホストのNIC。空欄で自動検出。",
"jc": "Jc(ジャンクパケット数)",
"jmin": "Jmin(ジャンクパケット最小サイズ)",
"jmax": "Jmax(ジャンクパケット最大サイズ)",
"s1": "S1(initパケットのパディングサイズ)",
"s2": "S2responseパケットのパディングサイズ)",
"s3": "S3cookie replyパディング、2.0",
"s4": "S4(トランスポートパケットパディング、2.0)",
"h1": "H1(マジックヘッダー)",
"h2": "H2(マジックヘッダー)",
"h3": "H3(マジックヘッダー)",
"h4": "H4(マジックヘッダー)",
"hHint": "整数または範囲を指定。空欄の場合は従来の1/2/3/4がデフォルトになります。",
"i1": "I1(署名パケット、2.0",
"i1Hint": "AmneziaWG 2.0専用。空欄で1.x互換の設定になります。"
},
"tun": {
"nameDesc": "TUN インターフェースの名前。デフォルトは 'xray0' です",
"mtuDesc": "最大伝送単位。データパケットの最大サイズ。デフォルトは 1500 です",