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

Add proxy agent for onnxruntime-node fetch installation #23232

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jnzw
Copy link

@jnzw jnzw commented Dec 31, 2024

Description

Add proxy agent to fetch request

Motivation and Context

Fixes #23231

@jnzw
Copy link
Author

jnzw commented Dec 31, 2024

@microsoft-github-policy-service agree

@snnn snnn requested a review from fs-eire December 31, 2024 18:18
@fs-eire
Copy link
Contributor

fs-eire commented Jan 1, 2025

Hi @jnzw, thank you for contributing! I don't know much details about proxy agent. There was a PR #22537 which does similar things to onnxruntime-web, but using a different package global-agent. Does the package work for your requirement? I want to keep the proxy solution consistent in the code base if possible.

@jnzw
Copy link
Author

jnzw commented Jan 2, 2025

Hi @fs-eire, I tried global-agent but it looks like it doesn't support fetch API yet:
gajus/global-agent#52

@fs-eire
Copy link
Contributor

fs-eire commented Jan 2, 2025

Hi @fs-eire, I tried global-agent but it looks like it doesn't support fetch API yet: gajus/global-agent#52

Thank you. Considering undici is not a small package, and we have to put it as a runtime dependency instead of a dev dependency (because it's a part of install script), I made PR #23242 to replace fetch with https.get.

@jnzw jnzw force-pushed the fix/node-install-proxy branch from c0e0d81 to 9d2f42a Compare January 3, 2025 02:29
@jnzw
Copy link
Author

jnzw commented Jan 3, 2025

Thanks, I've rebased and switched to use global-agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Web] Can't install onnxruntime-node behind corporate proxy
2 participants