diff --git a/packages/core/src/proxy/builtin.ts b/packages/core/src/proxy/builtin.ts index 0507dfae..3e970a87 100644 --- a/packages/core/src/proxy/builtin.ts +++ b/packages/core/src/proxy/builtin.ts @@ -27,10 +27,11 @@ export class BuiltinProxy extends BaseProxy { } if ( - Env.AIOSTREAMS_AUTH?.has(username) && - Env.AIOSTREAMS_AUTH?.get(username) !== password + !Env.AIOSTREAMS_AUTH || + !Env.AIOSTREAMS_AUTH.has(username) || + Env.AIOSTREAMS_AUTH.get(username) !== password ) { - throw new Error('Invalid credentials'); + throw new Error('Invalid credentials.'); } return { @@ -60,6 +61,8 @@ export class BuiltinProxy extends BaseProxy { } public override async getPublicIp(): Promise { + logger.debug(`Validating ${this.config.credentials}`); + BuiltinProxy.validateAuth(this.config.credentials); if (this.config.publicIp) {