Replies: 8 comments 5 replies
-
Hello, what do you think for my proposal? @ricmoo |
Beta Was this translation helpful? Give feedback.
-
I don't know this will make it into v5, but is certainly a candidate for v6. I'll move it to the Ideas discussion. |
Beta Was this translation helpful? Give feedback.
-
Added a PR to address this issue #2829 |
Beta Was this translation helpful? Give feedback.
-
Hello, Is there any progress on this feature? I would need proxy support in ethers.js too. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hello, Is there any progress on this feature? I would need proxy support in ethers.js too. Thanks |
Beta Was this translation helpful? Give feedback.
-
This feature is fully present and available in v6. I should make a cookbook entry on how to configure it, but here are the jsdocs. :) |
Beta Was this translation helpful? Give feedback.
-
import { FetchGetUrlFunc, FetchRequest, FetchCancelSignal } from "ethers";
const fetchGetUrlFunc: FetchGetUrlFunc = (
req: FetchRequest,
signal?: FetchCancelSignal
) => {
// code copy from "src.ts/utils/geturl.ts"
// and then I add the proxy code into it.
}
FetchRequest.registerGetUrl(fetchGetUrlFunc) This can work normally and successfully use the proxy, but it doesn’t seem very elegant. Looking forward to your documentation. |
Beta Was this translation helpful? Give feedback.
-
is there any tricky solutions in v5? i am using uniswap sdk, not directly use ethers.js, is not easy to just upgrade to v6, it causes tons of dependency issues. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using custom http.agent has been supported by web3.js and it has some many use cases.
Using proxy-agent for connecting remote nodes via SOCKS5 or HTTP proxy
web3/web3.js#887
web3/web3.js#2827
Using client ssl certiciates for http provider
web3/web3.js#2395
Many npm libraries like axios also supports using custom http.agent as well
https://github.com/axios/axios#request-config
Also, this will help with developers connecting remote nodes with some networking restrictions ( censorship, firewalls, etc ).
Also suggesting to give an ability to use custom user-agent headers to hide information about users.
Beta Was this translation helpful? Give feedback.
All reactions