Skip to content
forked from PuerNya/git-proxy

A GitHub HTTP proxy server written by go

License

Notifications You must be signed in to change notification settings

pmkol/git-proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-proxy

A GitHub HTTP proxy server written by go.

Usage

Start

Usage:
  git-proxy [flags]

Flags:
  -l, --bandwidth-limit int          set total bandwidth limit (MB/s), 0 as no limit
  -b, --blacklist-path string        set repository blacklist (default "blacklist.txt")
      --deny-web-page                deny web page requests
      --deny-web-page-list strings   deny web page requests list (default [github.com,gist.github.com])
      --disable-color                disable color output
  -d, --domain-list-path string      set accept domain (default "domainlist.txt")
  -h, --help                         help for git-proxy
  -p, --running-port int             disable color output (default 30000)

URL scheme

https://<your_domain>/<github_request_url>

example

https://abc.com/https://github.com/github/docs.git

Installation

Build

windows

git clone https://github.com/PuerNya/git-proxy.git && cd git-proxy && go build -o git-proxy.exe -v -trimpath -ldflags "-s -w" main.go

!windows

git clone https://github.com/PuerNya/git-proxy.git && cd git-proxy && go build -o git-proxy -v -trimpath -ldflags "-s -w" main.go

Features

Repository blacklist

Block repositories in blacklist.

Struct

<user>/<repo>

  • Wildcard characters * ? are supported
  • Blank user/repo will be parsed as *
examples:

    `/abcd` => User: "*", Repo: "abcd"
    `abcd/` => User: "abcd", Repo: "*"

Accept domain list

Accept requests whose url host is in the list.

Default list

  • github.com
  • raw.github.com
  • raw.githubusercontent.com
  • gist.github.com
  • objects.githubusercontent.com
  • gist.githubusercontent.com
  • codeload.github.com
  • api.github.com

Notes

  • use nginx to add upgrade request to H2/H3

About

A GitHub HTTP proxy server written by go

Resources

License

Stars

Watchers

Forks

Languages

  • Go 100.0%