Skip to content

Added support for proxy servers in all execution environments#917

Merged
decyjphr merged 6 commits intogithub:main-enterprisefrom
tylerohlsen:proxy-support
Mar 3, 2026
Merged

Added support for proxy servers in all execution environments#917
decyjphr merged 6 commits intogithub:main-enterprisefrom
tylerohlsen:proxy-support

Conversation

@tylerohlsen
Copy link
Contributor

Fixes #916

@tylerohlsen
Copy link
Contributor Author

@decyjphr sorry for the ping, but would you be able to look this over this change?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_HOST and GHE_PROTOCOL to the centralized lib/env.js env config module so that the target base URL can be computed for proxy resolution.
  • Uses proxy-from-env and undici's setGlobalDispatcher/ProxyAgent in index.js to route all outbound HTTP traffic through the configured proxy, conditioned on the GHE_HOST env 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.

@decyjphr decyjphr merged commit ba3df39 into github:main-enterprise Mar 3, 2026
5 of 7 checks passed
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 proxy not supported in container environment

3 participants