mirror of
https://github.com/fosrl/pangolin.git
synced 2026-10-30 07:29:04 +01:00
Standalone dns server
This commit is contained in:
@@ -16,13 +16,15 @@ import { privateConfig } from "#private/lib/config";
|
||||
|
||||
let dnsServer: AuthoritativeDNSServer | undefined;
|
||||
|
||||
export async function startDnsServer() {
|
||||
export async function startDnsServer(
|
||||
options: { requireLicense?: boolean } = {}
|
||||
) {
|
||||
const dnsConfig = privateConfig.getRawPrivateConfig().dns;
|
||||
if (!dnsConfig || !dnsConfig.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
dnsServer = new AuthoritativeDNSServer(dnsConfig.listen_port);
|
||||
dnsServer = new AuthoritativeDNSServer(dnsConfig.listen_port, options);
|
||||
|
||||
await dnsServer.start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user