Feat: Server Endpoint (#1785)
* add server endpoint to client * be able to update endpoint over api
This commit is contained in:
@@ -13,11 +13,16 @@ export const wg = {
|
||||
...(client.serverAllowedIps ?? []),
|
||||
];
|
||||
|
||||
const extraLines = [];
|
||||
if (client.serverEndpoint) {
|
||||
extraLines.push(`Endpoint = ${client.serverEndpoint}`);
|
||||
}
|
||||
|
||||
return `# Client: ${client.name} (${client.id})
|
||||
[Peer]
|
||||
PublicKey = ${client.publicKey}
|
||||
PresharedKey = ${client.preSharedKey}
|
||||
AllowedIPs = ${allowedIps.join(', ')}`;
|
||||
AllowedIPs = ${allowedIps.join(', ')}${extraLines.length ? `\n${extraLines.join('\n')}` : ''}`;
|
||||
},
|
||||
|
||||
generateServerInterface: (wgInterface: InterfaceType, hooks: HooksType) => {
|
||||
|
||||
Reference in New Issue
Block a user