apple / apple/pkl

Allow Basic Authentication in http_proxy

Open
#568 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
11.5k
Forks
402
Avg merge
1d 15h
Merged PRs (30d)
20

Description

Currently only proxies without authentication are supported.

From the Docs:
> When specifying a proxy address, it must have scheme http, and may not contain anything other than a host and port

So when trying to run `pkl project resolve` on a system with HTTP_PROXY env variable set I get an error:
```
Received unexpected status code `407` when making request `GET <...>`.
```

Running `pkl project resolve --http-proxy http://myproxy` with a `.netrc` file containing the credentials had the same outcome.

And when trying to run `pkl project resolve --http-proxy $HTTP_PROXY` i get another error:
```
Error: Invalid value for "--http-proxy": Malformed proxy URI (expecting `http://[:]`)
```

Allowing basic authentication in for http proxies would be helpful.

Contributor guide

Open the contributing guide

Research direction

Start with the `pkl project resolve` entry point and the `--http-proxy` handling, then reproduce the 407 response using `HTTP_PROXY` and a proxy URI with credentials. Done means authenticated HTTP proxies are accepted and requests succeed with credentials supplied in the proxy URI; the issue also notes that `.netrc` currently has no effect.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.