Include get hostname, filter sites fix gerbil conf

This commit is contained in:
Owen 2025-08-17 11:23:43 -07:00
parent 8355d3664e
commit 3b8d1f40a7
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
8 changed files with 68 additions and 16 deletions

View file

@ -1,16 +1,16 @@
import { db, exitNodes } from "@server/db";
import logger from "@server/logger";
import { ExitNodePingResult } from "@server/routers/newt";
import { eq, and, or } from "drizzle-orm";
import { eq } from "drizzle-orm";
export async function verifyExitNodeOrgAccess(
exitNodeId: number,
orgId: string
) {
const [exitNode] = await db
.select()
.from(exitNodes)
.where(eq(exitNodes.exitNodeId, exitNodeId));
.select()
.from(exitNodes)
.where(eq(exitNodes.exitNodeId, exitNodeId));
// For any other type, deny access
return { hasAccess: true, exitNode };
@ -30,7 +30,7 @@ export async function listExitNodes(orgId: string, filterOnline = false) {
maxConnections: exitNodes.maxConnections,
online: exitNodes.online,
lastPing: exitNodes.lastPing,
type: exitNodes.type,
type: exitNodes.type
})
.from(exitNodes);
@ -54,9 +54,6 @@ export function selectBestExitNode(
return pingResults[0];
}
export async function checkExitNodeOrg(
exitNodeId: number,
orgId: string
) {
export async function checkExitNodeOrg(exitNodeId: number, orgId: string) {
return false;
}