mirror of
https://github.com/fosrl/pangolin.git
synced 2026-10-14 16:49:05 +02:00
Added relayPort to exitNodes in db
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user