Properly generate all wireguard options

This commit is contained in:
Owen Schwartz 2024-10-26 16:04:01 -04:00
parent 261b3c7e31
commit d78312fad8
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
12 changed files with 303 additions and 65 deletions

View file

@ -4,7 +4,6 @@ import path from "path";
import fs from "fs";
import yaml from "js-yaml";
import { fileURLToPath } from "url";
import { signup } from "./routers/auth";
export const __FILENAME = fileURLToPath(import.meta.url);
export const __DIRNAME = path.dirname(__FILENAME);
@ -33,6 +32,12 @@ const environmentSchema = z.object({
cert_resolver: z.string().optional(),
prefer_wildcard_cert: z.boolean().optional(),
}),
gerbil: z.object({
start_port: z.number().positive().gt(0),
base_endpoint: z.string(),
subnet_group: z.string(),
block_size: z.number().positive().gt(0),
}),
rate_limit: z.object({
window_minutes: z.number().positive().gt(0),
max_requests: z.number().positive().gt(0),