Giter VIP home page Giter VIP logo

githubproxy's Introduction

GitHub Proxy

Proxy access to github.com for computers in restricted network environment.

Prerequisites

  • You have your own domain where multiple subdomains can be added.
  • Your server has port 80 and 443 available and can be access from the Internet.

Installation Steps

Step 1: Add A or AAAA records to your domain with your IP address.

The following subdomain should be added. Replace yourdomain.example.com with your own domain.

yourdomain.example.com
blackhole.yourdomain.example.com
assets.yourdomain.example.com
avatars.yourdomain.example.com
raw.yourdomain.example.com
camo.yourdomain.example.com
codeload.yourdomain.example.com
releases.yourdomain.example.com
user-images.yourdomain.example.com
objects.yourdomain.example.com

Your can use wildcard if your service provider allows it.

Step 2: Download executables from Releases page.

Extract the package on your server and set the "execute" attribute.

chmod +x GitHubProxy

Step 3: Modify appsettings.json to match your domain name.

You can also modify the Urls field to control which port the proxy will listen on. For example, change it to http://localhost:9000 will listen on port 9000.

Step 4: Configure the application to always run on system startup

This is the systemd config file for example.

[Unit]
Description=GitHub Proxy

[Service]
Type=notify
WorkingDirectory=/opt/github_proxy
ExecStart=/opt/github_proxy/GitHubProxy

[Install]
WantedBy=multi-user.target

Step 5: Install Caddy on your server to enable HTTPS

apt update
apt install caddy

Step 6: Configure Caddy

Modify caddy file to forward requests for the domains you have configured in Step 1.

http://yourdomain.example.com {
  redir https://{host}{uri}
}
https://yourdomain.example.com {
  reverse_proxy 127.0.0.1:9000
}

# other domains omitted

Step 7: Configure Caddy to always run on system startup

systemctl enable caddy

Step 8: Restart services

systemctl daemon-reload
systemctl restart github-proxy
systemctl restart caddy

githubproxy's People

Contributors

yigolden avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.