- Go module: github.com/cedar2025/xboard-node → github.com/viaeon/way-node(307 处 import 同步) - cmd/xboard-node/ → cmd/way-node/ - install.sh: APP_NAME / INSTALL_ROOT(/etc/way-node) / BINARY_PATH / SERVICE_NAME 全部更名, 下载源与 Documentaion 指向 git.viaeon.com/admin/way-node - Makefile / Dockerfile 产物与镜像路径更名 - README 全篇重写链接 - 新增 .gitea/workflows/build.yml:容器内跑测试 + 交叉编译 + 构建镜像推 git.viaeon.com/admin/way-node 构建全程在 golang:1.26 容器里,不依赖 runner 宿主装 Go - 禁用 .github/workflows/ci.yml(依赖 ghcr.io 与 GITHUB_TOKEN,Gitea 上跑不通) 保留:xbctl 工具名(不含旧品牌)、go.sum 里上游依赖哈希
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
name: Build way-node
|
||||
|
||||
# 只保留 .gitea/workflows 这一份;.github/workflows/ci.yml 依赖 ghcr.io 与
|
||||
# GITHUB_TOKEN,在 Gitea 上跑不通,已重命名为 .disabled。
|
||||
#
|
||||
# 构建全部在容器里做(runner 只提供 docker.sock),不依赖宿主安装 Go。
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
tags:
|
||||
- 'v*'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'docs-*.md'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: git.viaeon.com
|
||||
IMAGE: git.viaeon.com/admin/way-node
|
||||
GO_IMAGE: golang:1.26
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test, Build, Push
|
||||
runs-on: ubuntu
|
||||
steps:
|
||||
- name: Install Docker CLI
|
||||
run: |
|
||||
if ! command -v docker >/dev/null 2>&1; then
|
||||
if command -v apk >/dev/null 2>&1; then
|
||||
apk add --no-cache docker-cli git
|
||||
elif command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get update && apt-get install -y docker.io git
|
||||
fi
|
||||
fi
|
||||
docker --version
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Prepare version
|
||||
id: ver
|
||||
run: |
|
||||
SHORT_SHA=$(git rev-parse --short=7 HEAD)
|
||||
VERSION=$(date '+%Y%m%d')-${SHORT_SHA}
|
||||
echo "short_sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT"
|
||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "版本: ${VERSION}"
|
||||
|
||||
- name: Unit tests
|
||||
run: |
|
||||
docker run --rm -v "$PWD":/src -w /src \
|
||||
-e GOFLAGS=-mod=mod \
|
||||
"${{ env.GO_IMAGE }}" \
|
||||
sh -c "go test -count=1 ./internal/..."
|
||||
|
||||
- name: Cross compile binaries
|
||||
run: |
|
||||
docker run --rm -v "$PWD":/src -w /src \
|
||||
-e GOFLAGS=-mod=mod \
|
||||
"${{ env.GO_IMAGE }}" \
|
||||
sh -c "make build-linux build-linux-arm64"
|
||||
ls -lh way-node-linux-* xbctl-linux-* 2>/dev/null | awk '{print " " $9, $5}'
|
||||
|
||||
- name: Login to registry
|
||||
run: |
|
||||
echo "${{ secrets.TOKEN }}" | docker login "${{ env.REGISTRY }}" -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build \
|
||||
--label "org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}" \
|
||||
--label "org.opencontainers.image.revision=${{ github.sha }}" \
|
||||
--label "org.opencontainers.image.version=${{ steps.ver.outputs.version }}" \
|
||||
-t "${{ env.IMAGE }}:${{ steps.ver.outputs.short_sha }}" \
|
||||
-t "${{ env.IMAGE }}:${{ steps.ver.outputs.version }}" \
|
||||
-t "${{ env.IMAGE }}:latest" \
|
||||
.
|
||||
|
||||
- name: Push image
|
||||
run: |
|
||||
docker push "${{ env.IMAGE }}:${{ steps.ver.outputs.short_sha }}"
|
||||
docker push "${{ env.IMAGE }}:${{ steps.ver.outputs.version }}"
|
||||
docker push "${{ env.IMAGE }}:latest"
|
||||
|
||||
- name: Summary
|
||||
run: |
|
||||
echo "镜像已推送:"
|
||||
echo " ${{ env.IMAGE }}:${{ steps.ver.outputs.short_sha }}"
|
||||
echo " ${{ env.IMAGE }}:${{ steps.ver.outputs.version }}"
|
||||
echo " ${{ env.IMAGE }}:latest"
|
||||
echo
|
||||
echo "本地产物:"
|
||||
ls -lh way-node-linux-* xbctl-linux-* 2>/dev/null || true
|
||||
@@ -56,11 +56,11 @@ jobs:
|
||||
make build-linux-arm64
|
||||
fi
|
||||
|
||||
- name: Upload xboard-node artifact
|
||||
- name: Upload way-node artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: xboard-node-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
path: xboard-node-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
name: way-node-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
path: way-node-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||
|
||||
- name: Upload xbctl artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -98,9 +98,9 @@ jobs:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
ghcr.io/cedar2025/xboard-node:latest
|
||||
ghcr.io/cedar2025/xboard-node:${{ github.sha }}
|
||||
${{ startsWith(github.ref, 'refs/tags/') && format('ghcr.io/cedar2025/xboard-node:{0}', github.ref_name) || '' }}
|
||||
git.viaeon.com/admin/way-node:latest
|
||||
git.viaeon.com/admin/way-node:${{ github.sha }}
|
||||
${{ startsWith(github.ref, 'refs/tags/') && format('git.viaeon.com/admin/way-node:{0}', github.ref_name) || '' }}
|
||||
|
||||
release:
|
||||
name: Release
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
tag_name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'dev' }}
|
||||
make_latest: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
files: |
|
||||
dist/xboard-node-linux-amd64
|
||||
dist/xboard-node-linux-arm64
|
||||
dist/way-node-linux-amd64
|
||||
dist/way-node-linux-arm64
|
||||
dist/xbctl-linux-amd64
|
||||
dist/xbctl-linux-arm64
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
# Binaries
|
||||
/xboard-node
|
||||
/xboard-node-linux-*
|
||||
/way-node
|
||||
/way-node-linux-*
|
||||
*.exe
|
||||
|
||||
# Config files (may contain secrets)
|
||||
@@ -29,6 +29,6 @@ internal/kernel/singbox/config_bench_test.go
|
||||
internal/kernel/xray/config_bench_test.go
|
||||
internal/service/service_bench_test.go
|
||||
internal/tracker/tracker_bench_test.go
|
||||
cmd/xboard-node-bench-compare
|
||||
cmd/xboard-node-bench
|
||||
cmd/way-node-bench-compare
|
||||
cmd/way-node-bench
|
||||
.env
|
||||
+7
-7
@@ -14,18 +14,18 @@ RUN CGO_ENABLED=0 go build -ldflags "-s -w \
|
||||
-X main.version=$(git describe --tags --always --dirty 2>/dev/null || echo dev) \
|
||||
-X main.buildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
||||
-tags "with_quic with_utls with_wireguard with_clash_api" \
|
||||
-o xboard-node ./cmd/xboard-node
|
||||
-o way-node ./cmd/way-node
|
||||
|
||||
# Runtime stage — sing-box & xray-core are embedded as Go libraries
|
||||
FROM alpine:3.20
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
|
||||
COPY --from=builder /build/xboard-node /usr/local/bin/xboard-node
|
||||
COPY --from=builder /build/way-node /usr/local/bin/way-node
|
||||
|
||||
RUN mkdir -p /etc/xboard-node
|
||||
RUN mkdir -p /etc/way-node
|
||||
|
||||
WORKDIR /etc/xboard-node
|
||||
WORKDIR /etc/way-node
|
||||
|
||||
# Config can be provided via file mount OR environment variables.
|
||||
# Env var mode (no config file needed):
|
||||
@@ -33,7 +33,7 @@ WORKDIR /etc/xboard-node
|
||||
# -e apiHost=https://panel.example.com \
|
||||
# -e apiKey=YOUR_TOKEN \
|
||||
# -e nodeID=1 \
|
||||
# ghcr.io/cedar2025/xboard-node:latest
|
||||
# git.viaeon.com/admin/way-node:latest
|
||||
#
|
||||
# Supported env vars:
|
||||
# apiHost / API_HOST → panel URL
|
||||
@@ -46,5 +46,5 @@ WORKDIR /etc/xboard-node
|
||||
# keyFile / KEY_FILE → TLS key path
|
||||
# logLevel / LOG_LEVEL → log level
|
||||
|
||||
ENTRYPOINT ["xboard-node"]
|
||||
CMD ["-c", "/etc/xboard-node/config.yml"]
|
||||
ENTRYPOINT ["way-node"]
|
||||
CMD ["-c", "/etc/way-node/config.yml"]
|
||||
|
||||
@@ -6,17 +6,17 @@ LDFLAGS := -s -w -X main.version=$(VERSION) -X main.buildTime=$(BUILD_TIME) -X m
|
||||
|
||||
# Build for current platform
|
||||
build:
|
||||
go build -ldflags "$(LDFLAGS)" -tags "with_quic with_utls with_wireguard with_clash_api" -o xboard-node ./cmd/xboard-node
|
||||
go build -ldflags "$(LDFLAGS)" -tags "with_quic with_utls with_wireguard with_clash_api" -o way-node ./cmd/way-node
|
||||
go build -ldflags "$(LDFLAGS)" -o xbctl ./cmd/xbctl
|
||||
|
||||
# Build for Linux amd64
|
||||
build-linux:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -tags "with_quic with_utls with_wireguard with_acme with_clash_api" -o xboard-node-linux-amd64 ./cmd/xboard-node
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -tags "with_quic with_utls with_wireguard with_acme with_clash_api" -o way-node-linux-amd64 ./cmd/way-node
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o xbctl-linux-amd64 ./cmd/xbctl
|
||||
|
||||
# Build for Linux arm64
|
||||
build-linux-arm64:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -tags "with_quic with_utls with_wireguard with_acme with_clash_api" -o xboard-node-linux-arm64 ./cmd/xboard-node
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -tags "with_quic with_utls with_wireguard with_acme with_clash_api" -o way-node-linux-arm64 ./cmd/way-node
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o xbctl-linux-arm64 ./cmd/xbctl
|
||||
|
||||
# Build all platforms
|
||||
@@ -28,18 +28,18 @@ test:
|
||||
|
||||
# Clean build artifacts
|
||||
clean:
|
||||
rm -f xboard-node xbctl xboard-node-linux-* xbctl-linux-*
|
||||
rm -f way-node xbctl way-node-linux-* xbctl-linux-*
|
||||
|
||||
# Build Docker image
|
||||
docker:
|
||||
docker build -t xboard-node:$(VERSION) -t xboard-node:latest .
|
||||
docker build -t way-node:$(VERSION) -t way-node:latest .
|
||||
|
||||
# Install to system (single node, legacy compat)
|
||||
install: build
|
||||
sudo cp xboard-node /usr/local/bin/
|
||||
sudo cp way-node /usr/local/bin/
|
||||
sudo cp xbctl /usr/local/bin/
|
||||
sudo mkdir -p /etc/xboard-node
|
||||
@if [ ! -f /etc/xboard-node/config.yml ]; then \
|
||||
sudo cp config.yml.example /etc/xboard-node/config.yml; \
|
||||
echo "Config copied to /etc/xboard-node/config.yml - please edit it"; \
|
||||
sudo mkdir -p /etc/way-node
|
||||
@if [ ! -f /etc/way-node/config.yml ]; then \
|
||||
sudo cp config.yml.example /etc/way-node/config.yml; \
|
||||
echo "Config copied to /etc/way-node/config.yml - please edit it"; \
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# xboard-node
|
||||
# way-node
|
||||
|
||||
Node backend for [Xboard](https://github.com/cedar2025/Xboard). Supports `sing-box` / `xray-core` dual kernels.
|
||||
|
||||
@@ -19,14 +19,14 @@ Node backend for [Xboard](https://github.com/cedar2025/Xboard). Supports `sing-b
|
||||
```bash
|
||||
docker run -d --restart=always --network=host \
|
||||
-e apiHost=https://panel.com -e apiKey=TOKEN -e nodeID=1 \
|
||||
ghcr.io/cedar2025/xboard-node:latest
|
||||
git.viaeon.com/admin/way-node:latest
|
||||
```
|
||||
|
||||
### Docker Compose
|
||||
|
||||
```bash
|
||||
git clone -b compose --depth 1 https://github.com/cedar2025/xboard-node.git
|
||||
cd xboard-node
|
||||
git clone -b compose --depth 1 https://git.viaeon.com/admin/way-node.git
|
||||
cd way-node
|
||||
vim config/config.yml # set panel.url / token / node_id
|
||||
docker compose up -d
|
||||
```
|
||||
@@ -35,11 +35,11 @@ docker compose up -d
|
||||
|
||||
```bash
|
||||
# Node mode
|
||||
curl -fsSL https://raw.githubusercontent.com/cedar2025/xboard-node/dev/install.sh | \
|
||||
curl -fsSL https://git.viaeon.com/admin/way-node/raw/branch/dev/install.sh | \
|
||||
sudo bash -s -- --mode node --panel https://panel.example.com --token TOKEN --node-id 1
|
||||
|
||||
# Machine mode
|
||||
curl -fsSL https://raw.githubusercontent.com/cedar2025/xboard-node/dev/install.sh | \
|
||||
curl -fsSL https://git.viaeon.com/admin/way-node/raw/branch/dev/install.sh | \
|
||||
sudo bash -s -- --mode machine --panel https://panel.example.com --token TOKEN --machine-id 1
|
||||
|
||||
## xbctl
|
||||
|
||||
@@ -14,10 +14,10 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/machine"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/cedar2025/xboard-node/internal/service"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/machine"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/service"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -31,7 +31,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
if *showVersion {
|
||||
fmt.Printf("xboard-node %s (built %s)\n", version, buildTime)
|
||||
fmt.Printf("way-node %s (built %s)\n", version, buildTime)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
+14
-14
@@ -17,20 +17,20 @@ import (
|
||||
"text/tabwriter"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultConfigPath = "/etc/xboard-node/config.yml"
|
||||
defaultMetaPath = "/etc/xboard-node/install-meta.json"
|
||||
defaultCredentialsPath = "/etc/xboard-node/credentials.env"
|
||||
defaultBinaryPath = "/usr/local/bin/xboard-node"
|
||||
defaultConfigPath = "/etc/way-node/config.yml"
|
||||
defaultMetaPath = "/etc/way-node/install-meta.json"
|
||||
defaultCredentialsPath = "/etc/way-node/credentials.env"
|
||||
defaultBinaryPath = "/usr/local/bin/way-node"
|
||||
defaultCLIPath = "/usr/local/bin/xbctl"
|
||||
serviceName = "xboard-node.service"
|
||||
serviceFilePath = "/etc/systemd/system/xboard-node.service"
|
||||
defaultInstallRoot = "/etc/xboard-node"
|
||||
downloadBase = "https://github.com/cedar2025/xboard-node/releases"
|
||||
serviceName = "way-node.service"
|
||||
serviceFilePath = "/etc/systemd/system/way-node.service"
|
||||
defaultInstallRoot = "/etc/way-node"
|
||||
downloadBase = "https://github.com/viaeon/way-node/releases"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -225,7 +225,7 @@ shortcuts:
|
||||
}
|
||||
|
||||
func runStatus() error {
|
||||
fmt.Println("xboard-node status")
|
||||
fmt.Println("way-node status")
|
||||
fmt.Println()
|
||||
|
||||
// Version from install-meta.json
|
||||
@@ -403,10 +403,10 @@ func runUpgrade(args []string) error {
|
||||
|
||||
binaryDir := filepath.Dir(defaultBinaryPath)
|
||||
cliDir := filepath.Dir(defaultCLIPath)
|
||||
newBinary := filepath.Join(binaryDir, ".xboard-node.new")
|
||||
newBinary := filepath.Join(binaryDir, ".way-node.new")
|
||||
newCLI := filepath.Join(cliDir, ".xbctl.new")
|
||||
|
||||
binaryURL := resolveDownloadURL(fmt.Sprintf("xboard-node-linux-%s", arch), version)
|
||||
binaryURL := resolveDownloadURL(fmt.Sprintf("way-node-linux-%s", arch), version)
|
||||
cliURL := resolveDownloadURL(fmt.Sprintf("xbctl-linux-%s", arch), version)
|
||||
|
||||
fmt.Printf("Downloading %s...\n", binaryURL)
|
||||
@@ -1157,7 +1157,7 @@ func latestInstanceID(instances []*config.Config) string {
|
||||
func regenerateServiceFile() error {
|
||||
unit := fmt.Sprintf(`[Unit]
|
||||
Description=Xboard Node Backend
|
||||
Documentation=https://github.com/cedar2025/xboard-node
|
||||
Documentation=https://github.com/viaeon/way-node
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
@@ -1348,7 +1348,7 @@ func runConfigInit(args []string) error {
|
||||
inst.InstanceID = instanceID
|
||||
|
||||
if installRoot == "" {
|
||||
installRoot = "/etc/xboard-node"
|
||||
installRoot = "/etc/way-node"
|
||||
}
|
||||
inst.Kernel.ConfigDir = filepath.Join(installRoot, "instances", instanceID)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module github.com/cedar2025/xboard-node
|
||||
module github.com/viaeon/way-node
|
||||
|
||||
go 1.26
|
||||
|
||||
|
||||
+21
-21
@@ -8,14 +8,14 @@ CYAN='\033[0;36m'
|
||||
BOLD='\033[1m'
|
||||
NC='\033[0m'
|
||||
|
||||
APP_NAME="xboard-node"
|
||||
INSTALL_ROOT="/etc/xboard-node"
|
||||
APP_NAME="way-node"
|
||||
INSTALL_ROOT="/etc/way-node"
|
||||
BACKUP_DIR="${INSTALL_ROOT}/backups"
|
||||
INSTALL_META="${INSTALL_ROOT}/install-meta.json"
|
||||
CONFIG_FILE="${INSTALL_ROOT}/config.yml"
|
||||
CREDENTIALS_FILE="${INSTALL_ROOT}/credentials.env"
|
||||
BINARY_PATH="/usr/local/bin/xboard-node"
|
||||
SERVICE_NAME="xboard-node.service"
|
||||
BINARY_PATH="/usr/local/bin/way-node"
|
||||
SERVICE_NAME="way-node.service"
|
||||
SERVICE_PATH="/etc/systemd/system/${SERVICE_NAME}"
|
||||
CLI_PATH="/usr/local/bin/xbctl"
|
||||
INSTALLER_COPY_PATH="${INSTALL_ROOT}/install.sh"
|
||||
@@ -27,7 +27,7 @@ DEFAULT_ACTION="install"
|
||||
DEFAULT_RELEASE_VERSION="latest"
|
||||
DEFAULT_LOG_LEVEL="info"
|
||||
DEFAULT_KERNEL_LOG_LEVEL="warn"
|
||||
DEFAULT_DOWNLOAD_BASE="https://github.com/cedar2025/xboard-node/releases"
|
||||
DEFAULT_DOWNLOAD_BASE="https://git.viaeon.com/admin/way-node/releases"
|
||||
|
||||
ACTION="${DEFAULT_ACTION}"
|
||||
MODE=""
|
||||
@@ -95,8 +95,8 @@ load_health_port_from_config() {
|
||||
rollback_install() {
|
||||
log_warn "Rolling back installation"
|
||||
if [ -n "$BACKUP_PATH" ] && [ -d "$BACKUP_PATH" ]; then
|
||||
if [ -f "$BACKUP_PATH/xboard-node" ]; then
|
||||
install -m 755 "$BACKUP_PATH/xboard-node" "$BINARY_PATH"
|
||||
if [ -f "$BACKUP_PATH/way-node" ]; then
|
||||
install -m 755 "$BACKUP_PATH/way-node" "$BINARY_PATH"
|
||||
else
|
||||
rm -f "$BINARY_PATH"
|
||||
fi
|
||||
@@ -160,7 +160,7 @@ trap cleanup_tmp EXIT
|
||||
usage() {
|
||||
cat <<'HELP'
|
||||
|
||||
xboard-node Installer
|
||||
way-node Installer
|
||||
|
||||
ACTIONS:
|
||||
install Install or reconcile the configured deployment (default)
|
||||
@@ -187,13 +187,13 @@ usage() {
|
||||
--node-type, -T Explicit node type for node mode
|
||||
--kernel, -k singbox or xray (default: singbox)
|
||||
--version Release version or latest (default: latest)
|
||||
--binary Use a local xboard-node binary path instead of downloading
|
||||
--binary Use a local way-node binary path instead of downloading
|
||||
--xbctl-binary Use a local xbctl binary path instead of downloading
|
||||
--health-port Local health port (default: 65530, use 0 to disable)
|
||||
--gomemlimit Runtime GOMEMLIMIT value, e.g. 256MiB
|
||||
--gogc Runtime GOGC value, e.g. 50
|
||||
--force-reconfigure Overwrite an existing install even if mode/target changed
|
||||
--purge With uninstall, delete /etc/xboard-node too
|
||||
--purge With uninstall, delete /etc/way-node too
|
||||
--yes, -y Non-interactive confirmation for destructive operations
|
||||
|
||||
EXAMPLES:
|
||||
@@ -469,12 +469,12 @@ select_binary_source() {
|
||||
echo "$BINARY_SOURCE"
|
||||
return
|
||||
fi
|
||||
if [ -f "./xboard-node" ]; then
|
||||
echo "./xboard-node"
|
||||
if [ -f "./way-node" ]; then
|
||||
echo "./way-node"
|
||||
return
|
||||
fi
|
||||
if [ -f "./xboard-node-linux-${ARCH}" ]; then
|
||||
echo "./xboard-node-linux-${ARCH}"
|
||||
if [ -f "./way-node-linux-${ARCH}" ]; then
|
||||
echo "./way-node-linux-${ARCH}"
|
||||
return
|
||||
fi
|
||||
echo ""
|
||||
@@ -490,14 +490,14 @@ resolve_download_url() {
|
||||
}
|
||||
|
||||
stage_binary() {
|
||||
local staged="$TMP_DIR/xboard-node"
|
||||
local staged="$TMP_DIR/way-node"
|
||||
local local_src
|
||||
local_src=$(select_binary_source)
|
||||
if [ -n "$local_src" ]; then
|
||||
log_step "Using local binary: ${local_src}"
|
||||
cp "$local_src" "$staged"
|
||||
else
|
||||
resolve_download_url "xboard-node-linux-${ARCH}"
|
||||
resolve_download_url "way-node-linux-${ARCH}"
|
||||
log_step "Downloading binary: ${DOWNLOAD_URL}"
|
||||
if ! curl -fsSL "$DOWNLOAD_URL" -o "$staged"; then
|
||||
log_error "Failed to download binary from ${DOWNLOAD_URL}"
|
||||
@@ -592,7 +592,7 @@ render_service() {
|
||||
cat >"$TMP_DIR/${SERVICE_NAME}" <<EOF_UNIT
|
||||
[Unit]
|
||||
Description=Xboard Node Backend
|
||||
Documentation=https://github.com/cedar2025/xboard-node
|
||||
Documentation=https://git.viaeon.com/admin/way-node
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
@@ -617,7 +617,7 @@ backup_existing_state() {
|
||||
BACKUP_PATH="${BACKUP_DIR}/$(date +%Y%m%d-%H%M%S)"
|
||||
mkdir -p "$BACKUP_PATH"
|
||||
if [ -x "$BINARY_PATH" ]; then
|
||||
cp "$BINARY_PATH" "$BACKUP_PATH/xboard-node"
|
||||
cp "$BINARY_PATH" "$BACKUP_PATH/way-node"
|
||||
fi
|
||||
if [ -x "$CLI_PATH" ]; then
|
||||
cp "$CLI_PATH" "$BACKUP_PATH/xbctl"
|
||||
@@ -647,7 +647,7 @@ stop_existing_service() {
|
||||
|
||||
install_staged_files() {
|
||||
stop_existing_service
|
||||
install -m 755 "$TMP_DIR/xboard-node" "$BINARY_PATH"
|
||||
install -m 755 "$TMP_DIR/way-node" "$BINARY_PATH"
|
||||
install -m 600 "$TMP_DIR/config.yml" "$CONFIG_FILE"
|
||||
install -m 600 "$TMP_DIR/credentials.env" "$CREDENTIALS_FILE"
|
||||
install -m 644 "$TMP_DIR/install-meta.json" "$INSTALL_META"
|
||||
@@ -739,7 +739,7 @@ perform_upgrade() {
|
||||
stage_xbctl
|
||||
render_service
|
||||
backup_existing_state
|
||||
install -m 755 "$TMP_DIR/xboard-node" "$BINARY_PATH"
|
||||
install -m 755 "$TMP_DIR/way-node" "$BINARY_PATH"
|
||||
install -m 755 "$TMP_DIR/xbctl" "$CLI_PATH"
|
||||
ln -sf "$CLI_PATH" /usr/bin/xbctl 2>/dev/null || true
|
||||
install -m 644 "$TMP_DIR/${SERVICE_NAME}" "$SERVICE_PATH"
|
||||
@@ -789,7 +789,7 @@ perform_uninstall() {
|
||||
perform_status() {
|
||||
detect_current_state
|
||||
echo
|
||||
echo -e "${BOLD}xboard-node install status${NC}"
|
||||
echo -e "${BOLD}way-node install status${NC}"
|
||||
echo " state: ${CURRENT_STATE}"
|
||||
if [ -f "$INSTALL_META" ]; then
|
||||
echo " meta: ${INSTALL_META}"
|
||||
|
||||
@@ -23,10 +23,10 @@ import (
|
||||
|
||||
"github.com/caddyserver/certmagic"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/cert/dnsproviders"
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/cert/dnsproviders"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
)
|
||||
|
||||
// Manager handles TLS certificate lifecycle.
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
"github.com/caddyserver/certmagic"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
)
|
||||
|
||||
// generateSelfSignedPair returns a fresh self-signed certificate and matching
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"golang.org/x/term"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
@@ -303,7 +303,7 @@ func (rc *RootConfig) assignInstanceIDs() error {
|
||||
func configBaseDir(configPath string) string {
|
||||
abs, err := filepath.Abs(configPath)
|
||||
if err != nil {
|
||||
return "/etc/xboard-node"
|
||||
return "/etc/way-node"
|
||||
}
|
||||
return filepath.Dir(abs)
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ instances:
|
||||
|
||||
func TestConfig_AutoInstanceIDStable(t *testing.T) {
|
||||
cfg := &Config{Panel: PanelConfig{URL: "https://Panel.Example.com/", NodeID: 1, Token: "tok"}}
|
||||
cfg.setDefaultsFrom("/etc/xboard-node")
|
||||
cfg.setDefaultsFrom("/etc/way-node")
|
||||
id1, err := cfg.AutoInstanceID()
|
||||
if err != nil {
|
||||
t.Fatalf("AutoInstanceID: %v", err)
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
type LocalControlPlane struct {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
)
|
||||
|
||||
func TestLocalControlPlaneInitial(t *testing.T) {
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
// MachinePanelControlPlane implements ControlPlane for a single node running
|
||||
|
||||
@@ -3,7 +3,7 @@ package controlplane
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
// MailboxState is the coalesced snapshot drained from a NodeMailbox.
|
||||
|
||||
@@ -3,7 +3,7 @@ package controlplane
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
func TestNodeMailboxLatestStateAndNotifyCollapse(t *testing.T) {
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
type PanelControlPlane struct {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
panelapi "github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
panelapi "github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
func TestPanelControlPlaneInitialRejectsInvalidCustomOutbounds(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package controlplane
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
type EventType string
|
||||
|
||||
@@ -3,7 +3,7 @@ package kernel
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
func NeedsGeoIPRules(rules []model.CustomRouteRule) bool {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package kernel
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
// NeedsGeoIP returns true when any panel route rule contains a "geoip:" match entry.
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
var testUsersPanel = []panel.User{
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
N "github.com/sagernet/sing/common/network"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
)
|
||||
|
||||
// ipPool caches ipSnapshot maps to reduce allocations.
|
||||
|
||||
@@ -18,10 +18,10 @@ import (
|
||||
"github.com/sagernet/sing/service"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
)
|
||||
|
||||
// drainTimeout is how long stop() waits for in-flight connections to finish
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/sagernet/sing-box/adapter"
|
||||
singM "github.com/sagernet/sing/common/metadata"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
)
|
||||
|
||||
// M is a shorthand for building JSON-like maps
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"encoding/pem"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
var testKernelCfg = config.KernelConfig{
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/xtls/xray-core/features/routing"
|
||||
"github.com/xtls/xray-core/transport"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
)
|
||||
|
||||
// Access xray's internal config creator registry so we can replace the
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/xtls/xray-core/common/buf"
|
||||
"github.com/xtls/xray-core/transport"
|
||||
)
|
||||
|
||||
@@ -29,11 +29,11 @@ import (
|
||||
|
||||
_ "github.com/xtls/xray-core/main/distro/all"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel/geodata"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/kernel/geodata"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
appstats "github.com/xtls/xray-core/app/stats"
|
||||
xrayCore "github.com/xtls/xray-core/core"
|
||||
featurebandwidth "github.com/xtls/xray-core/features/bandwidth"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
// Limiter enforces per-user device limits and detects removed users.
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
)
|
||||
|
||||
func TestSpeedTracker_UpdateBuckets(t *testing.T) {
|
||||
|
||||
@@ -9,13 +9,13 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/controlplane"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/monitor"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/cedar2025/xboard-node/internal/service"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/controlplane"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/monitor"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/service"
|
||||
)
|
||||
|
||||
// nodeHandle tracks a running node service.
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
func TestNodeSpecFromPanelValidated_AllowsTargetsFromCustomConfigOutbounds(t *testing.T) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
func NodeSpecFromPanel(nc *panel.NodeConfig) *NodeSpec {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/panel"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/panel"
|
||||
)
|
||||
|
||||
func TestNodeSpecFromPanelValidated(t *testing.T) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package model
|
||||
|
||||
import "github.com/cedar2025/xboard-node/internal/config"
|
||||
import "github.com/viaeon/way-node/internal/config"
|
||||
|
||||
func NodeSpecFromStandalone(cfg *config.Config) *NodeSpec {
|
||||
sc := cfg.Standalone
|
||||
|
||||
@@ -3,7 +3,7 @@ package model
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
)
|
||||
|
||||
func TestNodeSpecFromStandalone(t *testing.T) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package model
|
||||
|
||||
import "github.com/cedar2025/xboard-node/internal/config"
|
||||
import "github.com/viaeon/way-node/internal/config"
|
||||
|
||||
type NodeSpec struct {
|
||||
Protocol string
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
)
|
||||
|
||||
func ValidateNodeSpec(n *NodeSpec, kcfg config.KernelConfig) error {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/shirou/gopsutil/v4/cpu"
|
||||
"github.com/shirou/gopsutil/v4/disk"
|
||||
"github.com/shirou/gopsutil/v4/load"
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
)
|
||||
|
||||
func newTestServer(handler http.HandlerFunc) (*httptest.Server, *Client) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
|
||||
+12
-12
@@ -14,18 +14,18 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/cert"
|
||||
"github.com/cedar2025/xboard-node/internal/cert/dnsproviders"
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/controlplane"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel/singbox"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel/xray"
|
||||
"github.com/cedar2025/xboard-node/internal/limiter"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/cedar2025/xboard-node/internal/monitor"
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/cedar2025/xboard-node/internal/tracker"
|
||||
"github.com/viaeon/way-node/internal/cert"
|
||||
"github.com/viaeon/way-node/internal/cert/dnsproviders"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/controlplane"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/kernel/singbox"
|
||||
"github.com/viaeon/way-node/internal/kernel/xray"
|
||||
"github.com/viaeon/way-node/internal/limiter"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/monitor"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/tracker"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/cert"
|
||||
"github.com/cedar2025/xboard-node/internal/config"
|
||||
"github.com/cedar2025/xboard-node/internal/kernel"
|
||||
"github.com/cedar2025/xboard-node/internal/limiter"
|
||||
"github.com/cedar2025/xboard-node/internal/model"
|
||||
"github.com/viaeon/way-node/internal/cert"
|
||||
"github.com/viaeon/way-node/internal/config"
|
||||
"github.com/viaeon/way-node/internal/kernel"
|
||||
"github.com/viaeon/way-node/internal/limiter"
|
||||
"github.com/viaeon/way-node/internal/model"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/cedar2025/xboard-node/internal/nlog"
|
||||
"github.com/viaeon/way-node/internal/nlog"
|
||||
)
|
||||
|
||||
// snapshot is an immutable point-in-time view of tracker state.
|
||||
|
||||
Reference in New Issue
Block a user