Skip to content

HAR migrate registry adapters don't respect HTTPS_PROXY/HTTP_PROXY #156

Description

@sawka-harness

Docs claim HTTPS_PROXY is supported CLI-wide, but this is only true by accident: everywhere we construct &http.Client{} without overriding Transport, Go's stdlib falls back to http.DefaultTransport, which sets Proxy: http.ProxyFromEnvironment — so proxy env vars work, but only because we never override it, not because we implement it.

Docs Link: https://developer.harness.io/docs/platform/harness-cli/troubleshooting/#network-issues

The exception is the three HAR migrate registry adapters, which build an explicit http.Transport{} (to set TLSClientConfig) without setting Proxy. For an explicit Transport struct, a nil Proxy means no proxying at all — unlike the zero-value http.Client case. So harness migrate registry-to-registry copies silently ignore HTTPS_PROXY/HTTP_PROXY/NO_PROXY.

Affected files:

  • modules/har/pkg/har/migrate/adapter/harbor/client.go:61
  • modules/har/pkg/har/migrate/adapter/jfrog/client.go:62
  • modules/har/pkg/har/migrate/adapter/nexus/client.go:40

Fix: add Proxy: http.ProxyFromEnvironment to each of these http.Transport{...} literals.

Metadata

Metadata

Labels

harHAR Module Plugin

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions