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)
This commit is contained in:
minhducsun2002
2026-06-03 19:42:15 +07:00
committed by GitHub
parent bc95a2851f
commit d0566a1df9
3 changed files with 15 additions and 6 deletions
@@ -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
+1
View File
@@ -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 = {
+7
View File
@@ -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',