chore: migrate self-distribution links from GitHub to self-hosted Gitea
CI / test (push) Canceled after 0s
CI / anytls-smoke (push) Canceled after 0s

GitHub accounts suspended; all first-party distribution now served from
git.881218.xyz/rogue/NexusGate (Gitea):
- raw:  /rogue/NexusGate/raw/branch/<branch>/<path>
- release assets and source archives under the same repo path
- scripts gain a GIT_BASE variable built from NG_REPO (default
  rogue/NexusGate); NG_REPO/NG_BRANCH/--repo/--branch semantics unchanged
- panel enrollment/uninstall commands in public/app.js point at Gitea raw
- install.sh/nexusgate.sh/agent-singbox.sh stats source previously
  defaulted to the upstream repo (a2899882); defaults now this repo
Upstream dependency references (sagernet/sing-box Go module) untouched.
This commit is contained in:
aaaamoooo
2026-10-20 11:05:55 +00:00
parent 3951134940
commit f4ef3d96a6
8 changed files with 36 additions and 28 deletions
+4 -2
View File
@@ -1,8 +1,10 @@
#!/usr/bin/env bash
set -Eeuo pipefail
REPO="${NG_REPO:-a2899882/NexusGate}"
REPO="${NG_REPO:-rogue/NexusGate}"
BRANCH="${NG_BRANCH:-main}"
# 自建 Gitea 分发基址(源码归档由此拼装)
GIT_BASE="https://git.881218.xyz/${REPO}"
die() { printf '错误:%s\n' "$*" >&2; exit 1; }
info() { printf '\033[1;36m[NexusGate]\033[0m %s\n' "$*"; }
@@ -66,7 +68,7 @@ update_panel() {
backup "$current_backup"
stage="$(mktemp -d /tmp/nexusgate-update.XXXXXX)"
trap 'rm -rf -- "$stage"' RETURN
curl -fL --retry 3 "https://github.com/${REPO}/archive/refs/heads/${BRANCH}.tar.gz" -o "$stage/source.tgz"
curl -fL --retry 3 "${GIT_BASE}/archive/${BRANCH}.tar.gz" -o "$stage/source.tgz"
mkdir -p "$stage/source" && tar -xzf "$stage/source.tgz" -C "$stage/source" --strip-components=1
[[ -f "$stage/source/server.js" ]] || die "更新包不完整"
panel_stop