Add dns server

This commit is contained in:
Owen
2026-09-09 10:43:28 -04:00
parent 294830db08
commit 2c5b1e5f0f
10 changed files with 1542 additions and 0 deletions
+4
View File
@@ -152,6 +152,10 @@ export class PrivateConfig {
return this.rawPrivateConfig;
}
public getRawConfig() {
return this.getRawPrivateConfig();
}
// `flags.enable_acme_cert_sync`, `flags.disable_private_http_placeholder`,
// and `acme` used to live in the private config file. They now live in
// the public config file. If an operator still has them set in the
+1
View File
@@ -0,0 +1 @@
export * from "./server";
File diff suppressed because it is too large Load Diff
+63
View File
@@ -95,6 +95,69 @@ export const privateConfigSchema = z
.optional()
})
.optional(),
dns: z
.object({
listen_port: z.number(),
nameserver_name: z.string(),
cname_extension: z.string(),
site_extension: z.string(),
cname_alternate_extensions: z
.array(z.string())
.optional()
.default([]),
alternate_nameservers: z
.array(z.string())
.optional()
.default([]),
rate_limit: z
.object({
enabled: z.boolean().optional().default(true),
window_ms: z
.number()
.int()
.min(1000)
.max(600000)
.optional()
.default(60000),
max_requests: z
.number()
.int()
.min(50)
.max(100000)
.optional()
.default(1200),
max_requests_per_query_type: z
.number()
.int()
.min(10)
.max(50000)
.optional()
.default(600)
})
.default({
enabled: true,
window_ms: 60000,
max_requests: 1200,
max_requests_per_query_type: 600
}),
static_records: z
.array(
z.object({
domain: z.string(),
type: z.enum(["TXT", "CNAME", "A", "NS"]),
value: z.string(),
ttl: z
.number()
.int()
.positive()
.optional()
.default(300)
})
)
.optional()
.default([])
})
.optional(),
gerbil: z
.object({
local_exit_node_reachable_at: z