Added relayPort to exitNodes in db

This commit is contained in:
TiltedTeapot
2026-10-06 18:11:23 -06:00
parent 487910487d
commit cff796fabe
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -481,6 +481,7 @@ export const exitNodes = sqliteTable("exitNodes", {
endpoint: text("endpoint").notNull(), // this is how to reach gerbil externally - gets put into the wireguard config
publicKey: text("publicKey").notNull(),
listenPort: integer("listenPort").notNull(),
relayPort: integer("listenPort").notNull(),
reachableAt: text("reachableAt"), // this is the internal address of the gerbil http server for command control
maxConnections: integer("maxConnections"),
online: integer("online", { mode: "boolean" }).notNull().default(false),
+2
View File
@@ -16,6 +16,7 @@ export async function createExitNode(
const { value: address, release } = await getNextAvailableSubnet();
try {
const listenPort = config.getRawConfig().gerbil.start_port;
const relayPort = config.getRawConfig().gerbil.clients_start_port;
const exitNodeName =
config.getRawConfig().gerbil.exit_node_name ||
@@ -30,6 +31,7 @@ export async function createExitNode(
address,
online: true,
listenPort,
relayPort,
reachableAt,
name: exitNodeName
})
+2 -4
View File
@@ -143,10 +143,8 @@ export async function generateGerbilConfig(exitNode: ExitNode) {
peers = [...sitePeers, ...clientPeers];
const configResponse: GetConfigResponse = {
listenPort:
exitNode.listenPort ||
config.getRawConfig().gerbil.start_port,
relayPort: config.getRawConfig().gerbil.clients_start_port,
listenPort: exitNode.listenPort || 51820,
relayPort: exitNode.relayPort || 21820,
ipAddress: exitNode.address,
peers
};