mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
24w12a
This commit is contained in:
parent
abeb6ee8eb
commit
5e764a6cd7
2 changed files with 4 additions and 16 deletions
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
|
@ -66,13 +66,12 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Load VERSION
|
- name: Load VERSION
|
||||||
run: |
|
run: |
|
||||||
if [ -f DEV-VERSION ]; then
|
if [ -f VERSION ]; then
|
||||||
echo "VERSION=$(cat DEV-VERSION)" >> $GITHUB_ENV
|
echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "DEV-VERSION file not found!" && exit 1
|
echo "VERSION file not found!" && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
|
|
||||||
11
main.go
11
main.go
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"regexp"
|
|
||||||
|
|
||||||
"ghproxy/auth"
|
"ghproxy/auth"
|
||||||
"ghproxy/config"
|
"ghproxy/config"
|
||||||
|
|
@ -22,16 +21,6 @@ var (
|
||||||
configfile = "/data/ghproxy/config/config.yaml"
|
configfile = "/data/ghproxy/config/config.yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
exps = []*regexp.Regexp{
|
|
||||||
regexp.MustCompile(`^(?:https?://)?github\.com/([^/]+)/([^/]+)/(?:releases|archive)/.*`),
|
|
||||||
regexp.MustCompile(`^(?:https?://)?github\.com/([^/]+)/([^/]+)/(?:blob|raw)/.*`),
|
|
||||||
regexp.MustCompile(`^(?:https?://)?github\.com/([^/]+)/([^/]+)/(?:info|git-).*`),
|
|
||||||
regexp.MustCompile(`^(?:https?://)?raw\.github(?:usercontent|)\.com/([^/]+)/([^/]+)/.+?/.+`),
|
|
||||||
regexp.MustCompile(`^(?:https?://)?gist\.github\.com/([^/]+)/.+?/.+`),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
func loadConfig() {
|
func loadConfig() {
|
||||||
var err error
|
var err error
|
||||||
// 初始化配置
|
// 初始化配置
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue