-
Notifications
You must be signed in to change notification settings - Fork 63
refactor: replace node-fetch with axios and fix http proxy #207
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
Conversation
lvzhenbo
commented
Dec 8, 2025
- While troubleshooting the download timeout issue, I discovered the following problems:
- The node-fetch dependency has not been updated for a long time, and its upstream dependency node-domexception has been abandoned.
- The download proxy settings were not actually taking effect.
- So I replaced node-fetch with axios, which supports proxies.
|
Starting with version 21, Node.js has consistently supported the native fetch API, so I feel that switching to the native |
|
|
|
Starting from Node.js v24, fetch() can automatically use proxy settings without additional code or ProxyAgent. Enable this feature by setting: export NODE_USE_ENV_PROXY=1
export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"
export NO_PROXY="localhost,127.0.0.1,.internal.example.com"With |
|
If you want to use native fetch, then I will close this PR |
I still believe this PR is fully relevant, so there is no need to close it. The next step is to finalize the solution and proceed with implementation. |
|
Alright, I'm leaning toward a mature, ready-to-use solution since I did run into issues downloading the binary files. Feel free to reach out if you need further assistance. |
Signed-off-by: The1111mp <[email protected]>
|
@lvzhenbo If you have time, could you check whether the latest code works as expected. Is the agent working as expected? |


