Skip to content

Comments

feat: add support for GitHub download proxy in Makefile#12

Open
0xharry wants to merge 1 commit intoopenecos-projects:mainfrom
0xharry:main
Open

feat: add support for GitHub download proxy in Makefile#12
0xharry wants to merge 1 commit intoopenecos-projects:mainfrom
0xharry:main

Conversation

@0xharry
Copy link

@0xharry 0xharry commented Feb 11, 2026

Summary

This PR introduces an optional GitHub download proxy configuration to the Makefile to help users in regions with restricted or slow access to GitHub's asset servers. It uses https://gh-proxy.org/ by default.

Key Changes

  • Added GH_PROXY variable (default: https://gh-proxy.org/).
  • Added USE_PROXY toggle (default: false).
  • Updated the download logic to prepend the proxy URL to the release asset URL when USE_PROXY is enabled.

How to use

To enable the proxy for downloading release assets, run:

make download USE_PROXY=true

Alternatively, you can modify the default value of USE_PROXY to true directly in the Makefile.

Copy link

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 adds optional GitHub download proxy support to the Makefile to help users in regions with restricted or slow access to GitHub's asset servers. By default, the proxy feature is disabled and uses https://gh-proxy.org/ when enabled. Users can enable it by running make download USE_PROXY=true.

Changes:

  • Added configurable proxy support with GH_PROXY and USE_PROXY variables
  • Modified download logic to prepend proxy URL when enabled
  • Provides workaround for users experiencing GitHub connectivity issues

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fi; \
echo "[download] getting $(@)..."; \
if [ "$(USE_PROXY)" = "true" ]; then \
RELEASE_URL="$(GH_PROXY)$$RELEASE_URL"; \
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The URL concatenation logic assumes that GH_PROXY ends with a trailing slash. If a user overrides GH_PROXY without a trailing slash (e.g., GH_PROXY=https://my-proxy.com), the resulting URL will be malformed (e.g., https://my-proxy.comhttps://github.com/...).

Consider updating the logic to handle both cases by trimming any trailing slash from GH_PROXY and explicitly adding one during concatenation, or document that GH_PROXY must end with a trailing slash.

Suggested change
RELEASE_URL="$(GH_PROXY)$$RELEASE_URL"; \
PROXY=$$(echo "$(GH_PROXY)" | sed 's:/*$$::'); \
RELEASE_URL="$$PROXY/$$RELEASE_URL"; \

Copilot uses AI. Check for mistakes.
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.

1 participant