feat(wireguard): client config UX, collapsible config card, configurable DNS

Land the WireGuard client-config UX work on main (the upstream PR #5642
branch could not be pushed to).

- Reusable collapsible ConfigBlock (copy/download/QR, actions aligned right)
  for the client .conf, used by client info and the public sub page.
- Correct .conf: canonical PresharedKey casing and DNS sourced from the inbound
  (configurable per-inbound, default 1.1.1.1, 1.0.0.1).
- Configurable per-inbound DNS for WireGuard (schema + form + backend hint via
  InboundOption.WgDns); inert at the Xray layer.
- Public sub page now shows the WireGuard config, rebuilt from the share link;
  the Go wireguard:// link carries dns/presharedkey/keepalive for completeness.
- QR enabled for the wireguard:// link; link rows are compact like other protocols.
- Client information order is subscription, copy URL, WireGuard config; the
  redundant config tab is removed from the add/edit client modal.
- Drop the Inbound Information and QR Code row actions for WireGuard inbounds.
This commit is contained in:
MHSanaei
2026-06-29 00:50:34 +02:00
parent 60c54827aa
commit a329882e0e
26 changed files with 509 additions and 57 deletions
+4 -1
View File
@@ -406,7 +406,10 @@ export const EXAMPLES: Record<string, unknown> = {
"remark": "VLESS-443",
"ssMethod": "",
"tag": "in-443-tcp",
"tlsFlowCapable": true
"tlsFlowCapable": true,
"wgDns": "",
"wgMtu": 0,
"wgPublicKey": ""
},
"Msg": {
"msg": "",
+9
View File
@@ -1828,6 +1828,15 @@ export const SCHEMAS: Record<string, unknown> = {
"tlsFlowCapable": {
"example": true,
"type": "boolean"
},
"wgDns": {
"type": "string"
},
"wgMtu": {
"type": "integer"
},
"wgPublicKey": {
"type": "string"
}
},
"required": [
+3
View File
@@ -401,6 +401,9 @@ export interface InboundOption {
ssMethod: string;
tag: string;
tlsFlowCapable: boolean;
wgDns?: string;
wgMtu?: number;
wgPublicKey?: string;
}
export interface Msg {
+3
View File
@@ -428,6 +428,9 @@ export const InboundOptionSchema = z.object({
ssMethod: z.string(),
tag: z.string(),
tlsFlowCapable: z.boolean(),
wgDns: z.string().optional(),
wgMtu: z.number().int().optional(),
wgPublicKey: z.string().optional(),
});
export type InboundOption = z.infer<typeof InboundOptionSchema>;