|
@ -101,6 +101,10 @@ export class ClientService { |
|
|
const ipv4Address = nextIP(4, ipv4Cidr, clients); |
|
|
const ipv4Address = nextIP(4, ipv4Cidr, clients); |
|
|
const ipv6Cidr = parseCidr(clientInterface.ipv6Cidr); |
|
|
const ipv6Cidr = parseCidr(clientInterface.ipv6Cidr); |
|
|
const ipv6Address = nextIP(6, ipv6Cidr, clients); |
|
|
const ipv6Address = nextIP(6, ipv6Cidr, clients); |
|
|
|
|
|
const preUp = ''; |
|
|
|
|
|
const postUp = ''; |
|
|
|
|
|
const preDown = ''; |
|
|
|
|
|
const postDown = ''; |
|
|
|
|
|
|
|
|
await tx |
|
|
await tx |
|
|
.insert(client) |
|
|
.insert(client) |
|
@ -114,6 +118,10 @@ export class ClientService { |
|
|
preSharedKey, |
|
|
preSharedKey, |
|
|
ipv4Address, |
|
|
ipv4Address, |
|
|
ipv6Address, |
|
|
ipv6Address, |
|
|
|
|
|
preUp, |
|
|
|
|
|
postUp, |
|
|
|
|
|
preDown, |
|
|
|
|
|
postDown, |
|
|
mtu: clientConfig.defaultMtu, |
|
|
mtu: clientConfig.defaultMtu, |
|
|
allowedIps: clientConfig.defaultAllowedIps, |
|
|
allowedIps: clientConfig.defaultAllowedIps, |
|
|
dns: clientConfig.defaultDns, |
|
|
dns: clientConfig.defaultDns, |
|
@ -145,6 +153,10 @@ export class ClientService { |
|
|
preSharedKey, |
|
|
preSharedKey, |
|
|
privateKey, |
|
|
privateKey, |
|
|
publicKey, |
|
|
publicKey, |
|
|
|
|
|
preUp, |
|
|
|
|
|
postUp, |
|
|
|
|
|
preDown, |
|
|
|
|
|
postDown |
|
|
}: ClientCreateFromExistingType) { |
|
|
}: ClientCreateFromExistingType) { |
|
|
const clientConfig = await Database.userConfigs.get(); |
|
|
const clientConfig = await Database.userConfigs.get(); |
|
|
|
|
|
|
|
@ -158,6 +170,10 @@ export class ClientService { |
|
|
preSharedKey, |
|
|
preSharedKey, |
|
|
ipv4Address, |
|
|
ipv4Address, |
|
|
ipv6Address, |
|
|
ipv6Address, |
|
|
|
|
|
preUp, |
|
|
|
|
|
postUp, |
|
|
|
|
|
preDown, |
|
|
|
|
|
postDown, |
|
|
mtu: clientConfig.defaultMtu, |
|
|
mtu: clientConfig.defaultMtu, |
|
|
allowedIps: clientConfig.defaultAllowedIps, |
|
|
allowedIps: clientConfig.defaultAllowedIps, |
|
|
dns: clientConfig.defaultDns, |
|
|
dns: clientConfig.defaultDns, |
|
|