add exit node name and fix db import issues

This commit is contained in:
miloschwartz 2025-06-15 17:49:27 -04:00
parent d46b9eaf87
commit b39708700d
No known key found for this signature in database
24 changed files with 39 additions and 38 deletions

View file

@ -105,14 +105,14 @@ export async function copyInConfig() {
}
});
// TODO: eventually each exit node could have a different endpoint
const exitNodeName = config.getRawConfig().gerbil.exit_node_name;
await db
.update(exitNodes)
.set({ endpoint })
.where(ne(exitNodes.endpoint, endpoint));
// TODO: eventually each exit node could have a different port
.where(eq(exitNodes.name, exitNodeName));
await db
.update(exitNodes)
.set({ listenPort })
.where(ne(exitNodes.listenPort, listenPort));
.where(eq(exitNodes.name, exitNodeName));
}