Use WG_PORT instead of WG_CLIENT_PORT for INIT_PORT fallback to match original behavior
- Changed setup/2.post.ts to use WG_INTERFACE_OVERRIDE_ENV.PORT instead of WG_CLIENT_OVERRIDE_ENV.CLIENT_PORT - Changed sqlite.ts initialSetup to use WG_INTERFACE_OVERRIDE_ENV.PORT for consistency - Updated unattended-setup.md documentation: - Changed INIT_PORT description to clarify it sets both interface port and endpoint port - Updated warning text to reference WG_PORT (not WG_CLIENT_PORT) as the override fallback - This matches the original INIT_PORT behavior where updateHostPort() sets both ports to the same value Co-authored-by: kaaax0815 <32197462+kaaax0815@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,7 @@ export default defineSetupEventHandler(2, async ({ event }) => {
|
||||
|
||||
// If host and port are already set by environment variables, skip step 4
|
||||
const host = WG_INITIAL_ENV.HOST ?? WG_CLIENT_OVERRIDE_ENV.HOST;
|
||||
const port = WG_INITIAL_ENV.PORT ?? WG_CLIENT_OVERRIDE_ENV.CLIENT_PORT;
|
||||
const port = WG_INITIAL_ENV.PORT ?? WG_INTERFACE_OVERRIDE_ENV.PORT;
|
||||
|
||||
const setupDone = host && port;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user