MCPcopy Index your code
hub / github.com/PuerNya/git-proxy

github.com/PuerNya/git-proxy @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
39 symbols 86 edges 1 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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")
  -c, --cert-path string          set tls cert path (default "cert.pem")
      --deny-web-page             deny web page requests
      --disable-color             disable color output
  -d, --domain-list-path string   set accept domain (default "domainlist.txt")
  -h, --help                      help for git-proxy
  -k, --key-path string           set tls key path (default "key.pem")
  -r, --request-limit int         set request limit by ip, 0 as no limit
  -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

Q&A

Commit message cannot load

Cause the policy set by Github, you can only fetch it over TLS.

Release assets cannot load

Cause the CORS policy set by Github, requests will be blocked by browser.

Nginx 502

Cause response headers given by Github is too large, try to enlarge proxy_buffer_size

Core symbols most depended-on inside this repo

responseWithError
called by 10
main.go
Close
called by 8
main.go
Error
called by 5
main.go
sendRequestWithURL
called by 3
main.go
Update
called by 2
main.go
NewFileReader
called by 2
main.go
loadDomainListData
called by 2
main.go
loadBlackListData
called by 2
main.go

Shape

Function 24
Method 8
Struct 7

Languages

Go100%

Modules by API surface

main.go39 symbols

For agents

$ claude mcp add git-proxy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact