Browse Source
Support disabling version check (#2648)
* Support disabling version check
* Update docs
* Move the bypass logic back to update checking function
* fix linting
* fix linting (again)
master
minhducsun2002
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
15 additions and
6 deletions
-
docs/content/advanced/config/optional-config.md
-
src/server/utils/config.ts
-
src/server/utils/release.ts
|
|
|
@ -4,12 +4,13 @@ title: Optional Configuration |
|
|
|
|
|
|
|
You can set these environment variables to configure the container. They are not required, but can be useful in some cases. |
|
|
|
|
|
|
|
| Env | Default | Example | Description | |
|
|
|
| -------------- | --------- | ----------- | ---------------------------------- | |
|
|
|
| `PORT` | `51821` | `6789` | TCP port for Web UI. | |
|
|
|
| `HOST` | `0.0.0.0` | `localhost` | IP address web UI binds to. | |
|
|
|
| `INSECURE` | `false` | `true` | If access over http is allowed | |
|
|
|
| `DISABLE_IPV6` | `false` | `true` | If IPv6 support should be disabled | |
|
|
|
| Env | Default | Example | Description | |
|
|
|
| ----------------------- | --------- | ----------- | --------------------------------------- | |
|
|
|
| `PORT` | `51821` | `6789` | TCP port for Web UI. | |
|
|
|
| `HOST` | `0.0.0.0` | `localhost` | IP address web UI binds to. | |
|
|
|
| `INSECURE` | `false` | `true` | If access over http is allowed | |
|
|
|
| `DISABLE_IPV6` | `false` | `true` | If IPv6 support should be disabled | |
|
|
|
| `DISABLE_VERSION_CHECK` | `false` | `true` | If wg-easy should check for new updates | |
|
|
|
|
|
|
|
/// note | IPv6 Caveats |
|
|
|
|
|
|
|
|
|
|
|
@ -38,6 +38,7 @@ export const WG_ENV = { |
|
|
|
/** If IPv6 should be disabled */ |
|
|
|
DISABLE_IPV6: process.env.DISABLE_IPV6 === 'true', |
|
|
|
WG_EXECUTABLE: await detectAwg(), |
|
|
|
DISABLE_VERSION_CHECK: process.env.DISABLE_VERSION_CHECK === 'true', |
|
|
|
}; |
|
|
|
|
|
|
|
export const WG_INITIAL_ENV = { |
|
|
|
|
|
|
|
@ -4,6 +4,13 @@ type GithubRelease = { |
|
|
|
}; |
|
|
|
|
|
|
|
async function fetchLatestRelease() { |
|
|
|
if (WG_ENV.DISABLE_VERSION_CHECK) { |
|
|
|
return { |
|
|
|
version: RELEASE, |
|
|
|
changelog: '', |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
const response = await $fetch<GithubRelease>( |
|
|
|
'https://api.github.com/repos/wg-easy/wg-easy/releases/latest', |
|
|
|
|