mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-11 21:41:41 +02:00
Adjust lic headers
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
/**
|
// Build the Host()/HostRegexp() Traefik rule for a resource's domain.
|
||||||
* Build the Host()/HostRegexp() Traefik rule for a resource's domain.
|
// Wildcard resources match any single subdomain via HostRegexp.
|
||||||
* Wildcard resources match any single subdomain via HostRegexp.
|
|
||||||
*/
|
|
||||||
export function buildHostRule(
|
export function buildHostRule(
|
||||||
fullDomain: string,
|
fullDomain: string,
|
||||||
wildcard?: boolean | null
|
wildcard?: boolean | null
|
||||||
@@ -14,10 +12,8 @@ export function buildHostRule(
|
|||||||
return `Host(\`${fullDomain}\`)`;
|
return `Host(\`${fullDomain}\`)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Append a path-matching clause to a Traefik rule based on the resource's
|
||||||
* Append a path-matching clause to a Traefik rule based on the resource's
|
// configured path and pathMatchType.
|
||||||
* configured path and pathMatchType.
|
|
||||||
*/
|
|
||||||
export function appendPathMatch(
|
export function appendPathMatch(
|
||||||
rule: string,
|
rule: string,
|
||||||
path: string | null | undefined,
|
path: string | null | undefined,
|
||||||
@@ -40,10 +36,8 @@ export function appendPathMatch(
|
|||||||
return rule;
|
return rule;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Compute the router priority for a resource, favoring an explicit override
|
||||||
* Compute the router priority for a resource, favoring an explicit override
|
// and otherwise deriving it from the path match specificity.
|
||||||
* and otherwise deriving it from the path match specificity.
|
|
||||||
*/
|
|
||||||
export function computeRoutePriority(
|
export function computeRoutePriority(
|
||||||
priority: number | null | undefined,
|
priority: number | null | undefined,
|
||||||
path: string | null | undefined,
|
path: string | null | undefined,
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ import { privateConfig } from "#private/lib/config";
|
|||||||
let dnsServer: AuthoritativeDNSServer | undefined;
|
let dnsServer: AuthoritativeDNSServer | undefined;
|
||||||
|
|
||||||
export async function startDnsServer() {
|
export async function startDnsServer() {
|
||||||
|
const use_pangolin_dns =
|
||||||
|
privateConfig.getRawPrivateConfig().flags.use_pangolin_dns;
|
||||||
|
if (!use_pangolin_dns) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const dnsConfig = privateConfig.getRawPrivateConfig().dns;
|
const dnsConfig = privateConfig.getRawPrivateConfig().dns;
|
||||||
if (!dnsConfig) {
|
if (!dnsConfig) {
|
||||||
return;
|
return;
|
||||||
@@ -29,10 +35,7 @@ export async function startDnsServer() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Create DNS server
|
// Create DNS server
|
||||||
dnsServer = new AuthoritativeDNSServer(
|
dnsServer = new AuthoritativeDNSServer(dnsConfig.listen_port, cacheOptions);
|
||||||
dnsConfig.listen_port,
|
|
||||||
cacheOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
await dnsServer.start();
|
await dnsServer.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of a proprietary work.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025-2026 Fossorial, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This file is licensed under the Fossorial Commercial License.
|
||||||
|
* You may not use this file except in compliance with the License.
|
||||||
|
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
||||||
|
*
|
||||||
|
* This file is not licensed under the AGPLv3.
|
||||||
|
*/
|
||||||
|
|
||||||
export * from "./server";
|
export * from "./server";
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of a proprietary work.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025-2026 Fossorial, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This file is licensed under the Fossorial Commercial License.
|
||||||
|
* You may not use this file except in compliance with the License.
|
||||||
|
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
||||||
|
*
|
||||||
|
* This file is not licensed under the AGPLv3.
|
||||||
|
*/
|
||||||
|
|
||||||
import * as dgram from "dgram";
|
import * as dgram from "dgram";
|
||||||
import * as dns from "dns-packet";
|
import * as dns from "dns-packet";
|
||||||
import NodeCache from "node-cache";
|
import NodeCache from "node-cache";
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
/*
|
|
||||||
* This file is part of a proprietary work.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2025-2026 Fossorial, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This file is licensed under the Fossorial Commercial License.
|
|
||||||
* You may not use this file except in compliance with the License.
|
|
||||||
* Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
|
||||||
*
|
|
||||||
* This file is not licensed under the AGPLv3.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { db } from "@server/db";
|
import { db } from "@server/db";
|
||||||
import { MessageHandler } from "@server/routers/ws";
|
import { MessageHandler } from "@server/routers/ws";
|
||||||
import { sites, Newt, orgs, clients, clientSitesAssociationsCache, users } from "@server/db";
|
import { sites, Newt, orgs, clients, clientSitesAssociationsCache, users } from "@server/db";
|
||||||
|
|||||||
Reference in New Issue
Block a user