mirror of https://github.com/wg-easy/wg-easy
Browse Source
- Rename OVERRIDE_INTERFACE_* to WG_* (shorter, non-conflicting) - Add interface overrides: WG_PORT, WG_DEVICE, WG_MTU, WG_IPV4_CIDR, WG_IPV6_CIDR, WG_ENABLED - Add client config overrides: WG_HOST, WG_CLIENT_PORT, WG_DEFAULT_DNS, WG_DEFAULT_ALLOWED_IPS, WG_DEFAULT_MTU, WG_DEFAULT_PERSISTENT_KEEPALIVE - Add general config overrides: WG_SESSION_TIMEOUT, WG_METRICS_PROMETHEUS, WG_METRICS_JSON - Update all API endpoints to apply and filter overrides - Update documentation with all new environment variables - Exclude AmneziaWG parameters (j*, s*, i*, h*) as requested Co-authored-by: kaaax0815 <[email protected]>copilot/add-env-variables-admin-panel
9 changed files with 189 additions and 23 deletions
@ -1,4 +1,5 @@ |
|||||
export default definePermissionEventHandler('admin', 'any', async () => { |
export default definePermissionEventHandler('admin', 'any', async () => { |
||||
const generalConfig = await Database.general.getConfig(); |
const generalConfig = await Database.general.getConfig(); |
||||
return generalConfig; |
const generalConfigWithOverrides = applyGeneralOverrides(generalConfig); |
||||
|
return generalConfigWithOverrides; |
||||
}); |
}); |
||||
|
|||||
@ -1,4 +1,5 @@ |
|||||
export default definePermissionEventHandler('admin', 'any', async () => { |
export default definePermissionEventHandler('admin', 'any', async () => { |
||||
const userConfig = await Database.userConfigs.get(); |
const userConfig = await Database.userConfigs.get(); |
||||
return userConfig; |
const userConfigWithOverrides = applyUserConfigOverrides(userConfig); |
||||
|
return userConfigWithOverrides; |
||||
}); |
}); |
||||
|
|||||
Loading…
Reference in new issue