Skip to content

将安装脚本与xbctl适配alpine#43

Open
Fearless743 wants to merge 20 commits into
cedar2025:devfrom
Fearless743:dev
Open

将安装脚本与xbctl适配alpine#43
Fearless743 wants to merge 20 commits into
cedar2025:devfrom
Fearless743:dev

Conversation

@Fearless743

Copy link
Copy Markdown

No description provided.

Fearless743 and others added 18 commits May 22, 2026 21:31
Remove the kernel.type configuration option (YAML, env vars, CLI flags).
Kernel type is now automatically determined by the node's protocol:
- xray is the default kernel
- singbox is used for protocols xray doesn't support (tuic, naive,
  anytls, mieru, hysteria2, socks, http)

Changes:
- config: remove kernel.type from YAML, env vars, inheritance, validation
- model: add ResolveKernelType() for protocol-based kernel resolution
- service: simplify newService() to always create xray kernel
- service: ensureKernelForProtocol() handles auto-switching with proper
  cleanup (stops old kernel, re-applies speed/device limit callbacks)
- machine: resolve kernel from protocol before transport compatibility check
- xbctl: remove --kernel CLI flag
- install.sh: remove --kernel flag and related logic

Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win>
Auto-select kernel by protocol, remove kernel.type configuration.
…n/e2e tests

- Add normalizeSS2022Key to handle raw/hex/base64 server key formats
- Add e2e tests for SOCKS5 and HTTP proxy data flow
- Add integration tests for VLESS+XHTTP, VLESS+HTTPUpgrade, LimitDispatcher, and restart scenarios

Co-Authored-By: MiMo <XiaomiMiMo@claude-code-best.win>
- Add testNodeSpecWithLocalRoute to inject direct route for 127.0.0.0/8,
  bypassing SSRF block rule that prevented localhost echo server targets
- Fix freePort to check both TCP and UDP availability, preventing flaky
  "address already in use" errors from SOCKS5/HTTP dual-bind
- Fix indentation bug in AddUsers (updateBandwidthLimits misaligned)

Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win>
…el machine mode

newService() always created an xray kernel regardless of cfg.Kernel.Type,
causing machine-mode nodes configured as singbox (e.g. anytls protocol) to
fail with "protocol not supported by kernel" because the actual running
kernel was xray while cfg.Kernel.Type said singbox, so ensureKernelForProtocol
saw no mismatch and skipped the switch.

Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win>
Remove hysteria from xraySupportedProtocols so the auto-kernel
selection correctly assigns hysteria to singbox (alongside hysteria2).
Dynamically resolve GITHUB_REPOSITORY and convert to lowercase
instead of hardcoding cedar2025/xboard-node.
- Change downloadBase from const to var, injected via ldflags
- Makefile sets REPO_BASE (defaults to Fearless743/xboard-node)
- CI derives REPO_BASE from github.repository (lowercased)
- systemd Documentation URL also derived from downloadBase
- New auto-release.yml: detects cmd/xbctl, cmd/xboard-node, internal/
  changes since last v* tag, parses conventional commits for bump level
  (feat→minor, fix→patch, breaking→major), creates and pushes new tag
- CI release job now generates release notes automatically
Performance (zero behavior change):
- SpeedTracker: immutable snapshot + atomic.Pointer for lock-free GetLimiter
- Limiter: hasDeviceLimits atomic fast-path for GetDeviceLimitByUUID
- ConnTracker: sync.Pool for rate-limit timers (8 sites), atomic connCount
- Tracker: dirty flag for FlushAliveIPs to skip expensive sha256
- Service: computeUserHash sorted check, applyUserDelta O(n+m) lookup
- Xray: json.Marshal instead of MarshalIndent, aliveIPs double Load fix

Memory (zero behavior change):
- ConnTracker: sync.Pool for aliveIPList maps, prune stale userStats
- ConnTracker: stack-allocated buffers in checkDeviceGate
- Xray: cache userEmail strings by ID, string concat for stats counters
- Xray: prune unlimitedIPs sync.Map entries when connections drain
- Custom config: cache parsed result by file size
- Mailbox: DrainIfReady ownership transfer (eliminate config clone)
- NodeSpecFromPanel: transfer ownership instead of defensive cloning
- Tracker: prune lastSeen stale entries periodically
- SpeedTracker: remove dead activeIDs map, precise pre-allocation
- Hoist private IP CIDR slices to package-level vars
perf: commits now trigger a patch bump alongside fix:.
…el support

- Add AGENTS.md with repo instructions for agent workflows
- Install script: reuse existing xboard-node/xbctl binaries locally
  instead of re-downloading when already installed and valid
- Add mihomo kernel adapter with config generation, protocol support
  for vmess/vless/trojan/shadowsocks/hysteria2/tuic/wireguard/anytls/mieru
- Custom route/outbound validation and support for mihomo
- Panel types: add mihomo kernel type and node type fields
- Service: add mihomo kernel lifecycle management
- Docs: add mihomo kernel documentation
…tured path

select_binary_source() returns the binary path via stdout, but the
'Reusing existing binary' log_step also wrote to stdout, polluting the
value captured by stage_binary() and passing a mangled argument to cp.
Redirect the log line to stderr.
perform_upgrade relied on stage_binary/stage_xbctl, which reused the
already-installed binary whenever it passed a version check. This made
`upgrade` silently reinstall the same version instead of fetching the
latest release, always reporting success without actually upgrading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant