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

feat: http and https proxy support #638

Merged
merged 2 commits into from
Jul 10, 2024
Merged

feat: http and https proxy support #638

merged 2 commits into from
Jul 10, 2024

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jul 10, 2024

About the changes

Support for HTTP_PROXY and HTTPS_PROXY

E.g. If you have a proxy at http://localhost:8081 pointing to your Unleash API URL run your app that contains the Node SDK with: HTTP_PROXY=http://localhost:8081 node my_app.js

Design decision:

  • instead of using @npmcli/agent directly that does the env var detection I decided to implement detection myself and instantiate http and https proxies directly. Those are the same proxies that the @npmcli/agent instantiates. The reason I choose to do it myself is because @npmcli/agent doesn't have any TS types and we loose autocompletion. On the other hand the low level agents have built-in TS support.

Can be tested locally with https://github.com/kwasniew/proxy-server

Important files

Discussion points

@coveralls
Copy link

coveralls commented Jul 10, 2024

Coverage Status

coverage: 90.784% (-0.05%) from 90.834%
when pulling e000d74 on http-https-proxy-support
into 279cd2e on main.

@kwasniew kwasniew requested a review from chriswk July 10, 2024 09:02
Copy link
Contributor

@chriswk chriswk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Looks good

@kwasniew kwasniew merged commit dbae3d5 into main Jul 10, 2024
4 checks passed
@kwasniew kwasniew deleted the http-https-proxy-support branch July 10, 2024 09:12
renovate bot added a commit to Unleash/unleash that referenced this pull request Sep 9, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[unleash-client](https://redirect.github.com/Unleash/unleash-client-node)
| [`5.5.5` ->
`5.6.1`](https://renovatebot.com/diffs/npm/unleash-client/5.5.5/5.6.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/unleash-client/5.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/unleash-client/5.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/unleash-client/5.5.5/5.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/unleash-client/5.5.5/5.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Unleash/unleash-client-node (unleash-client)</summary>

###
[`v5.6.1`](https://redirect.github.com/Unleash/unleash-client-node/releases/tag/v5.6.1)

[Compare
Source](https://redirect.github.com/Unleash/unleash-client-node/compare/v5.6.0...v5.6.1)

#### What's Changed

- Revert "feat: automatically generated instanceId
([#&#8203;637](https://redirect.github.com/Unleash/unleash-client-node/issues/637))"
by [@&#8203;nunogois](https://redirect.github.com/nunogois) in
[Unleash/unleash-client-node#640

**Full Changelog**:
Unleash/unleash-client-node@v5.6.0...v5.6.1

###
[`v5.6.0`](https://redirect.github.com/Unleash/unleash-client-node/releases/tag/v5.6.0)

[Compare
Source](https://redirect.github.com/Unleash/unleash-client-node/compare/v5.5.5...v5.6.0)

#### What's Changed

- chore(deps): update dependency typescript to v5.5.2 by
[@&#8203;renovate](https://redirect.github.com/renovate) in
[Unleash/unleash-client-node#631
- chore(deps): update unleash/.github action to v1.2.0 by
[@&#8203;renovate](https://redirect.github.com/renovate) in
[Unleash/unleash-client-node#632
- feat: automatically generated instanceId by
[@&#8203;nunogois](https://redirect.github.com/nunogois) in
[Unleash/unleash-client-node#637
- feat: http and https proxy support by
[@&#8203;kwasniew](https://redirect.github.com/kwasniew) in
[Unleash/unleash-client-node#638

**Full Changelog**:
Unleash/unleash-client-node@v5.5.5...v5.6.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" in timezone Europe/Madrid, Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants