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
+6 -4
View File
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
set -Eeuo pipefail
REPO="${NG_REPO:-aaaamoooo/NexusGate}"
REPO="${NG_REPO:-rogue/NexusGate}"
BRANCH="${NG_BRANCH:-main}"
# Go agent 二进制所在的 GitHub Release tag(与 agent-install.sh 保持一致)
# 自建 Gitea 分发基址(raw / release 均由此拼装)
GIT_BASE="https://git.881218.xyz/${REPO}"
# Go agent 二进制所在的 Gitea Release tag(与 agent-install.sh 保持一致)
AGENT_RELEASE="${NG_AGENT_RELEASE:-agent-v0.6.8}"
die() { printf '错误:%s\n' "$*" >&2; exit 1; }
info() { printf '\033[1;36m[NexusGate Agent]\033[0m %s\n' "$*"; }
@@ -27,7 +29,7 @@ TARGET_IMPL="go"
info "当前 Agent 实现:${CURRENT_IMPL};更新目标:${TARGET_IMPL}"
raw_fetch() {
curl -fL --retry 3 "https://raw.githubusercontent.com/${REPO}/${BRANCH}/$1" -o "$2"
curl -fL --retry 3 "${GIT_BASE}/raw/branch/${BRANCH}/$1" -o "$2"
}
agent_arch() {
@@ -45,7 +47,7 @@ fetch_agent_binary() {
if [[ -n "${NG_LOCAL_SRC:-}" && -f "${NG_LOCAL_SRC}/agent-go/nexusgate-agent-linux-${arch}" ]]; then
cp -a "${NG_LOCAL_SRC}/agent-go/nexusgate-agent-linux-${arch}" "$out"
else
curl -fL --retry 3 "https://github.com/${REPO}/releases/download/${AGENT_RELEASE}/nexusgate-agent-linux-${arch}" -o "$out"
curl -fL --retry 3 "${GIT_BASE}/releases/download/${AGENT_RELEASE}/nexusgate-agent-linux-${arch}" -o "$out"
fi
[[ -s "$out" ]] || die 'Agent 二进制下载不完整'
}