feat(gateway): add optional bonjour/mdns discovery
This commit is contained in:
@@ -32,6 +32,17 @@ const wsRateLimitSchema = z.object({
|
||||
violation_window_ms: z.number().min(1000).max(60000).default(10000),
|
||||
}).default({});
|
||||
|
||||
const serverDiscoverySchema = z.object({
|
||||
/** Enable local-network service discovery (mDNS/Bonjour advertisement). */
|
||||
enabled: z.boolean().default(false),
|
||||
/** Service instance name advertised on LAN. */
|
||||
service_name: z.string().min(1).default('flynn-gateway'),
|
||||
/** mDNS service type. */
|
||||
service_type: z.string().min(1).default('_flynn._tcp'),
|
||||
/** Additional TXT metadata advertised with the service record. */
|
||||
txt: z.record(z.string(), z.string()).default({}),
|
||||
}).default({});
|
||||
|
||||
const serverSchema = z.object({
|
||||
tailscale: tailscaleSchema,
|
||||
localhost: z.boolean().default(true),
|
||||
@@ -48,6 +59,8 @@ const serverSchema = z.object({
|
||||
max_request_body_bytes: z.number().min(1024).max(10 * 1024 * 1024).default(1_048_576),
|
||||
/** Per-connection WebSocket ingress rate limit settings. */
|
||||
ws_rate_limit: wsRateLimitSchema,
|
||||
/** Optional Bonjour/mDNS advertisement settings. */
|
||||
discovery: serverDiscoverySchema,
|
||||
});
|
||||
|
||||
/** All supported model provider identifiers. Used by the config schema and TUI autocompletion. */
|
||||
|
||||
Reference in New Issue
Block a user