Skip to content

Proxy fails when using HTTP CONNECT (E.G. HTTPS via a HTTP only proxy) #2259

@PeterC89

Description

@PeterC89

release-please fails when trying to connect to a HTTP only proxy via HTTP CONNECT
See:

const {host, port} = defaultProxy;
if (new URL(baseUrl).protocol.replace(':', '') === 'http') {
return new HttpProxyAgent(`http://${host}:${port}`);
} else {
return new HttpsProxyAgent(`https://${host}:${port}`);
}

It would probably make sense just to take the whole proxy URL (E.G. http://my-proxy:80) and apply it to the HTTP agent instead of making assumptions about the users environment?

Happy to raise a PR for this 🙂

Note: This would also require an update in the GitHub action to stop it splitting the proxy input and would probably therefore be a breaking change for both release-please and the action.

Environment details

  • OS: Ubuntu 22.04 x64 and Windows 10 x64
  • Node.js version: 20.12.1
  • npm version: 10.5.1
  • release-please version: 16.10.1

Steps to reproduce

  1. Use a proxy value such as my-proxy:80 which only accepts http connections
  2. Get an error when release-please incorrectly tries to use https connection to the proxy.

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions