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

Http client does not use $env.HTTP_PROXY #11025

Closed
FMotalleb opened this issue Nov 11, 2023 · 0 comments
Closed

Http client does not use $env.HTTP_PROXY #11025

FMotalleb opened this issue Nov 11, 2023 · 0 comments
Labels
needs-triage An issue that hasn't had any proper look networking All about our `http` and `url` commands and everything going accross the network.
Milestone

Comments

@FMotalleb
Copy link
Contributor

Describe the bug

The HTTP client uses the HTTP_PROXY environment variable, but it does not respect Nushell's $env variable and instead uses the system environment variable. This bug will not cause an error but will result in a malfunctioning feature.

How to reproduce

  1. set $env.HTTP_PROXY
  2. test proxy using http get https://lumtest.com/myip.json

Expected behavior

expected to use proxy

Screenshots

No response

Configuration

key value
version 0.86.0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.73.0 (cc66ad468 2023-10-03)
rust_channel stable-x86_64-unknown-linux-gnu
cargo_version cargo 1.73.0 (9c4383fb5 2023-08-26)
build_time 2023-11-05 12:48:51 +03:30
build_rust_channel release
allocator mimalloc
features dataframe, default, sqlite, trash, which, zip
installed_plugins from eml, from ics, from ini, from vcf, notify, port scan, scan port, scanport, sound, sound beep, sound make, sound meta, sound meta list, sound meta set, sound play

Additional context

No response

@FMotalleb FMotalleb added the needs-triage An issue that hasn't had any proper look label Nov 11, 2023
@amtoine amtoine added the networking All about our `http` and `url` commands and everything going accross the network. label Nov 11, 2023
fdncred pushed a commit that referenced this issue Nov 11, 2023
# Description

This PR closes this
[issue](#11025)

# User-Facing Changes

Setting the environment variable HTTP_PROXY using $env.HTTP_PROXY will
work.

# Before

```bash
~> $env.HTTP_PROXY = http://127.0.0.1:7890 | http get https://lumtest.com/myip.json | get country
IR # (direct)
```

# After

```bash
~> $env.HTTP_PROXY = http://127.0.0.1:7890 | http get https://lumtest.com/myip.json | get country
DE # (with proxy)
```
@hustcer hustcer added this to the v0.87.0 milestone Nov 12, 2023
hardfau1t pushed a commit to hardfau1t/nushell that referenced this issue Dec 14, 2023
# Description

This PR closes this
[issue](nushell#11025)

# User-Facing Changes

Setting the environment variable HTTP_PROXY using $env.HTTP_PROXY will
work.

# Before

```bash
~> $env.HTTP_PROXY = http://127.0.0.1:7890 | http get https://lumtest.com/myip.json | get country
IR # (direct)
```

# After

```bash
~> $env.HTTP_PROXY = http://127.0.0.1:7890 | http get https://lumtest.com/myip.json | get country
DE # (with proxy)
```
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this issue Feb 20, 2024
# Description

This PR closes this
[issue](nushell#11025)

# User-Facing Changes

Setting the environment variable HTTP_PROXY using $env.HTTP_PROXY will
work.

# Before

```bash
~> $env.HTTP_PROXY = http://127.0.0.1:7890 | http get https://lumtest.com/myip.json | get country
IR # (direct)
```

# After

```bash
~> $env.HTTP_PROXY = http://127.0.0.1:7890 | http get https://lumtest.com/myip.json | get country
DE # (with proxy)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage An issue that hasn't had any proper look networking All about our `http` and `url` commands and everything going accross the network.
Projects
None yet
Development

No branches or pull requests

3 participants