mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-22 02:08:31 +02:00
Include get hostname, filter sites fix gerbil conf
This commit is contained in:
parent
8355d3664e
commit
3b8d1f40a7
8 changed files with 68 additions and 16 deletions
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue