Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Fix proxy auth assignment while creating tunnel agent #967

Closed
abhimanbhau opened this issue Oct 17, 2024 · 1 comment · Fixed by #968
Closed

bug: Fix proxy auth assignment while creating tunnel agent #967

abhimanbhau opened this issue Oct 17, 2024 · 1 comment · Fixed by #968
Labels
bug Something isn't working

Comments

@abhimanbhau
Copy link
Contributor

Node.js version

20.16.0

NPM version

10.8.1

@checkly/cli version

4.9.0

Steps to reproduce

Setting up HTTPS_PROXY via environment variable doesn't work as there's a bug in the code while constructing proxy.Auth object.

What is expected?

Correctly set the username/password from HTTPS_PROXY environment variable.

What is actually happening?

undefined:undefined is being set

Any additional comments?

  1. https://github.com/checkly/checkly-cli/blob/main/packages/cli/src/services/socket-client.ts#L47
  2. https://github.com/checkly/checkly-cli/blob/main/packages/cli/src/services/util.ts#L212

Both cases the issue is the line

proxy.proxyAuth = `${proxyUrlEnv.username}:${proxyUrlEnv.password}`

proxyUrlEnv is a string object returned from getProxyForUrl method.

Changing the line to

proxy.proxyAuth = `${parsedProxyUrl.username}:${parsedProxyUrl.password}`

fixes the issue.

@maxigimenez
Copy link
Member

@abhimanbhau 4.9.1 version contains your fixes, thanks for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants