mirror of
https://github.com/fosrl/pangolin.git
synced 2025-05-13 05:40:38 +01:00
Scope down the allowedIps so there are no conflicts
This commit is contained in:
parent
475a431859
commit
0c370e4299
2 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
publicKey: client.clients.pubKey!,
|
publicKey: client.clients.pubKey!,
|
||||||
allowedIps: [client.clients.subnet!],
|
allowedIps: [`${client.clients.subnet.split('/')[0]}/32`], // we want to only allow from that client
|
||||||
endpoint: client.clientSites.isRelayed
|
endpoint: client.clientSites.isRelayed
|
||||||
? ""
|
? ""
|
||||||
: client.clients.endpoint! // if its relayed it should be localhost
|
: client.clients.endpoint! // if its relayed it should be localhost
|
||||||
|
|
|
@ -141,7 +141,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
|
||||||
);
|
);
|
||||||
await addPeer(site.siteId, {
|
await addPeer(site.siteId, {
|
||||||
publicKey: publicKey,
|
publicKey: publicKey,
|
||||||
allowedIps: [client.subnet],
|
allowedIps: [`${client.subnet.split('/')[0]}/32`], // we want to only allow from that client
|
||||||
endpoint: client.endpoint
|
endpoint: client.endpoint
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue