mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-24 13:56:39 +00:00
Update ws paths
This commit is contained in:
@@ -92,7 +92,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
|
|||||||
clientsRes.map(async (client) => {
|
clientsRes.map(async (client) => {
|
||||||
return {
|
return {
|
||||||
publicKey: client.pubKey,
|
publicKey: client.pubKey,
|
||||||
allowedIps: "0.0.0.0/0"
|
allowedIps: "0.0.0.0/0" // TODO: We should lock this down more
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -107,7 +107,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
message: {
|
message: {
|
||||||
type: "newt/wg/connect", // what to make the response type?
|
type: "newt/wg/receive-config", // what to make the response type?
|
||||||
data: {
|
data: {
|
||||||
config: configResponse
|
config: configResponse
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export async function addPeer(siteId: number, peer: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendToClient(newt.newtId, {
|
sendToClient(newt.newtId, {
|
||||||
type: 'add_peer',
|
type: 'newt/wg/peer/add',
|
||||||
data: peer
|
data: peer
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ export async function deletePeer(siteId: number, publicKey: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendToClient(newt.newtId, {
|
sendToClient(newt.newtId, {
|
||||||
type: 'delete_peer',
|
type: 'newt/wg/peer/remove',
|
||||||
data: {
|
data: {
|
||||||
publicKey
|
publicKey
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user