From b0a147e10bed3f46640e51c22a9a5df5bf1f3f33 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 9 Sep 2026 11:17:53 -0400 Subject: [PATCH] Adjust lic headers --- server/lib/traefik/rule.ts | 18 ++++++------------ server/private/dns.ts | 11 +++++++---- server/private/lib/dns/index.ts | 13 +++++++++++++ server/private/lib/dns/server.ts | 13 +++++++++++++ server/routers/newt/handleRequestLogMessage.ts | 13 ------------- 5 files changed, 39 insertions(+), 29 deletions(-) diff --git a/server/lib/traefik/rule.ts b/server/lib/traefik/rule.ts index 5f9406db4..39096eacd 100644 --- a/server/lib/traefik/rule.ts +++ b/server/lib/traefik/rule.ts @@ -1,7 +1,5 @@ -/** - * Build the Host()/HostRegexp() Traefik rule for a resource's domain. - * Wildcard resources match any single subdomain via HostRegexp. - */ +// Build the Host()/HostRegexp() Traefik rule for a resource's domain. +// Wildcard resources match any single subdomain via HostRegexp. export function buildHostRule( fullDomain: string, wildcard?: boolean | null @@ -14,10 +12,8 @@ export function buildHostRule( return `Host(\`${fullDomain}\`)`; } -/** - * Append a path-matching clause to a Traefik rule based on the resource's - * configured path and pathMatchType. - */ +// Append a path-matching clause to a Traefik rule based on the resource's +// configured path and pathMatchType. export function appendPathMatch( rule: string, path: string | null | undefined, @@ -40,10 +36,8 @@ export function appendPathMatch( return rule; } -/** - * Compute the router priority for a resource, favoring an explicit override - * and otherwise deriving it from the path match specificity. - */ +// Compute the router priority for a resource, favoring an explicit override +// and otherwise deriving it from the path match specificity. export function computeRoutePriority( priority: number | null | undefined, path: string | null | undefined, diff --git a/server/private/dns.ts b/server/private/dns.ts index bd41592ce..8bc04fadc 100644 --- a/server/private/dns.ts +++ b/server/private/dns.ts @@ -17,6 +17,12 @@ import { privateConfig } from "#private/lib/config"; let dnsServer: AuthoritativeDNSServer | undefined; export async function startDnsServer() { + const use_pangolin_dns = + privateConfig.getRawPrivateConfig().flags.use_pangolin_dns; + if (!use_pangolin_dns) { + return; + } + const dnsConfig = privateConfig.getRawPrivateConfig().dns; if (!dnsConfig) { return; @@ -29,10 +35,7 @@ export async function startDnsServer() { }; // Create DNS server - dnsServer = new AuthoritativeDNSServer( - dnsConfig.listen_port, - cacheOptions - ); + dnsServer = new AuthoritativeDNSServer(dnsConfig.listen_port, cacheOptions); await dnsServer.start(); } diff --git a/server/private/lib/dns/index.ts b/server/private/lib/dns/index.ts index 364a92570..d76bc4b20 100644 --- a/server/private/lib/dns/index.ts +++ b/server/private/lib/dns/index.ts @@ -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"; diff --git a/server/private/lib/dns/server.ts b/server/private/lib/dns/server.ts index a9b504bdf..5055d34fe 100644 --- a/server/private/lib/dns/server.ts +++ b/server/private/lib/dns/server.ts @@ -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 dns from "dns-packet"; import NodeCache from "node-cache"; diff --git a/server/routers/newt/handleRequestLogMessage.ts b/server/routers/newt/handleRequestLogMessage.ts index 6d9ff36f4..7e3feee05 100644 --- a/server/routers/newt/handleRequestLogMessage.ts +++ b/server/routers/newt/handleRequestLogMessage.ts @@ -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 { MessageHandler } from "@server/routers/ws"; import { sites, Newt, orgs, clients, clientSitesAssociationsCache, users } from "@server/db";