mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-15 00:56:08 +00:00
feat(wireguard): per-peer comments for identifying devices (#5168)
WG peers were only identifiable by their keys. Add an optional panel-side comment per peer: editable in the inbound form (echoed next to "Peer N" in the section header), stored in the settings JSON alongside the panel-only privateKey (xray-core ignores unknown peer fields), and appended to the share link / .conf remark so the device is identifiable in client apps too.
This commit is contained in:
@@ -26,6 +26,10 @@ export const WireguardInboundPeerSchema = z.object({
|
||||
preSharedKey: z.string().optional(),
|
||||
allowedIPs: z.array(z.string()).default([]),
|
||||
keepAlive: optionalClearedInt(z.number().int().min(0)),
|
||||
// Panel-only annotation (#5168): which client/device this peer belongs to.
|
||||
// Rides along in the settings JSON like privateKey does; xray-core ignores
|
||||
// unknown peer fields.
|
||||
comment: z.string().optional(),
|
||||
});
|
||||
export type WireguardInboundPeer = z.infer<typeof WireguardInboundPeerSchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user