将安装脚本与xbctl适配alpine#43
Open
Fearless743 wants to merge 20 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.