Added support for proxy servers in all execution environments#917
Merged
decyjphr merged 6 commits intogithub:main-enterprisefrom Mar 3, 2026
Merged
Added support for proxy servers in all execution environments#917decyjphr merged 6 commits intogithub:main-enterprisefrom
decyjphr merged 6 commits intogithub:main-enterprisefrom
Conversation
Contributor
Author
|
@decyjphr sorry for the ping, but would you be able to look this over this change? |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #916, which reported that HTTP proxy settings (http_proxy/https_proxy environment variables) were not respected in the standard container/server execution environment. It extends proxy support — already implemented for the Lambda environment via lib/proxyAwareProbotOctokit.js — to cover the probot server and full-sync entry points as well.
Changes:
- Adds
GHE_HOSTandGHE_PROTOCOLto the centralizedlib/env.jsenv config module so that the target base URL can be computed for proxy resolution. - Uses
proxy-from-envandundici'ssetGlobalDispatcher/ProxyAgentinindex.jsto route all outbound HTTP traffic through the configured proxy, conditioned on theGHE_HOSTenv var for GHE environments.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lib/env.js |
Exposes GHE_HOST and GHE_PROTOCOL from environment variables so they can be consumed centrally |
index.js |
Adds proxy initialization using proxy-from-env + undici global dispatcher to support proxy in non-Lambda environments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #916