Feat: Global config override (#1720)

* be able to change dns. implement global override

* link donate to readme

* implement global config for allowed ips

* change translations, fix generation

* improve docs
This commit is contained in:
Bernd Storath
2025-03-07 14:59:06 +01:00
committed by GitHub
parent 9fc6ebafb3
commit 159a51cff4
16 changed files with 124 additions and 45 deletions
@@ -3,6 +3,8 @@ import { int, sqliteTable, text } from 'drizzle-orm/sqlite-core';
import { oneTimeLink, user } from '../../schema';
/** null means use value from userConfig */
export const client = sqliteTable('clients_table', {
id: int().primaryKey({ autoIncrement: true }),
userId: int('user_id')
@@ -22,13 +24,13 @@ export const client = sqliteTable('clients_table', {
publicKey: text('public_key').notNull(),
preSharedKey: text('pre_shared_key').notNull(),
expiresAt: text('expires_at'),
allowedIps: text('allowed_ips', { mode: 'json' }).$type<string[]>().notNull(),
allowedIps: text('allowed_ips', { mode: 'json' }).$type<string[]>(),
serverAllowedIps: text('server_allowed_ips', { mode: 'json' })
.$type<string[]>()
.notNull(),
persistentKeepalive: int('persistent_keepalive').notNull(),
mtu: int().notNull(),
dns: text({ mode: 'json' }).$type<string[]>().notNull(),
dns: text({ mode: 'json' }).$type<string[]>(),
enabled: int({ mode: 'boolean' }).notNull(),
createdAt: text('created_at')
.notNull()