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

Fix #1978 - ability to deploy to networks behind a corporate proxies #3280

Closed

Conversation

umakanth-fmr
Copy link

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • [] I didn't do anything of this.

This PR addresses the issue with connecting to 3rd party networks behind corporate proxy. Currently undici Pool's does not support proxy. (nodejs/undici#1270).

We patched our local harhat to make it work.

Relevant issues on hardhat issue tracker.

#1978

@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2022

⚠️ No Changeset found

Latest commit: 3ac8801

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 18, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
hardhat ✅ Ready (Inspect) Visit Preview Dec 6, 2022 at 8:13PM (UTC)
hardhat-storybook ✅ Ready (Inspect) Visit Preview Dec 6, 2022 at 8:13PM (UTC)

@github-actions
Copy link
Contributor

This issue is also being tracked on Linear.

We use Linear to manage our development process, but we keep the conversations on Github.

LINEAR-ID: f06ca137-d6a5-4478-8920-9e47e5e8f233

@umakanth-fmr
Copy link
Author

Pinging @fvictorio

@bolabola
Copy link

same error!!

@umakanth-fmr
Copy link
Author

same error!!

What is the error ?

@bolabola
Copy link

same error!!

What is the error ?
try this int hardhat.config.ts
import { setGlobalDispatcher, ProxyAgent, Agent } from "undici"; const proxyAgent = new ProxyAgent("http://127.0.0.1:1087"); setGlobalDispatcher(proxyAgent);

@umakanth-fmr
Copy link
Author

GlobalDispatcher does not work on specific proxies. This PR looks at HTTP_PROXY/HTTPS_PROXY and it sets ProxyAgent for connection. undici connection pools does not support proxy yet.

@github-actions github-actions bot added the Stale label Nov 24, 2022
@umakanth-fmr
Copy link
Author

Any update on this PR @fvictorio ?

@github-actions github-actions bot removed the Stale label Nov 28, 2022
@fvictorio
Copy link
Member

Hey @umakanth-fmr, I haven't had time to review this yet, sorry 😞

I skimmed the PR's code and it looks good, but since this is a very sensitive change, I'll need to make a careful review before merging it.

@fvictorio
Copy link
Member

Hey @umakanth-fmr, I ended up going for a somewhat different approach in #3432. The main difference is that I'm using a single environment variable, http_proxy. I also implemented better support for that variable in Hardhat core.

I'm going to close this PR in favor of that one. Thanks again and sorry for not merging yours.

@fvictorio fvictorio closed this Dec 16, 2022
@fvictorio
Copy link
Member

@gitpoap-bot @umakanth-fmr deserves a gitpoap

@gitpoap-bot
Copy link

gitpoap-bot bot commented Dec 16, 2022

Congrats, @umakanth-fmr ! You've earned a GitPOAP for your contribution!

GitPOAP: 2022 Hardhat Contributor:

GitPOAP: 2022 Hardhat Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants