Move endpoint to per site

This commit is contained in:
Owen 2025-08-04 20:17:35 -07:00
parent d1404a2b07
commit 1a9de1e5c5
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
7 changed files with 208 additions and 108 deletions

View file

@ -157,9 +157,6 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
if (!client.clients.subnet) {
return false;
}
if (!client.clients.endpoint) {
return false;
}
return true;
})
.map(async (client) => {
@ -215,7 +212,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
allowedIps: [`${client.clients.subnet.split("/")[0]}/32`], // we want to only allow from that client
endpoint: client.clientSites.isRelayed
? ""
: client.clients.endpoint! // if its relayed it should be localhost
: client.clientSites.endpoint! // if its relayed it should be localhost
};
})
);