Propogated Changes. listen port is now accessed from db instead of config

This commit is contained in:
TiltedTeapot
2026-10-06 18:21:05 -06:00
parent 29fc221f59
commit 3712921048
12 changed files with 38 additions and 29 deletions
@@ -34,6 +34,7 @@ export async function createExitNode(
// TODO: eventually we will want to get the next available port so that we can multiple exit nodes
// const listenPort = await getNextAvailablePort();
const listenPort = config.getRawConfig().gerbil.start_port;
const relayPort = config.getRawConfig().gerbil.clients_start_port;
const exitNodeName =
config.getRawConfig().gerbil.exit_node_name ||
@@ -49,6 +50,7 @@ export async function createExitNode(
privateConfig.getRawPrivateConfig().app.region || null,
address,
listenPort,
relayPort,
online: true,
reachableAt,
name: exitNodeName
@@ -201,10 +201,7 @@ export async function createRemoteExitNode(
let releaseSubnetLock: (() => Promise<void>) | null = null;
let newExitNodeAddress: string | null = null;
if (!existingExitNode) {
const { value, release } = await getNextAvailableSubnet(
db,
orgId
);
const { value, release } = await getNextAvailableSubnet(db, orgId);
newExitNodeAddress = value;
releaseSubnetLock = release;
}
@@ -220,6 +217,7 @@ export async function createRemoteExitNode(
endpoint: "",
publicKey: "",
listenPort: 0,
relayPort: 0,
online: false,
type: "remoteExitNode"
})