Skip to content

fix: correct include URL handling and limiter cleanup#9

Merged
besnow merged 1 commit into
dev_newfrom
codex/create-minimal-fix-pr-for-typos
May 16, 2026
Merged

fix: correct include URL handling and limiter cleanup#9
besnow merged 1 commit into
dev_newfrom
codex/create-minimal-fix-pr-for-typos

Conversation

@besnow
Copy link
Copy Markdown
Owner

@besnow besnow commented May 16, 2026

Motivation

  • 修复运行时三个小问题:正确识别并获取 http/https 远程 Include,在节点热重载时删除 limiter 时避免删除到新 tag,以及修正 outbound handler 的错误提示文案。

Description

  • conf/node.go 中用 strings.HasPrefix(rn.Include, "http://") / strings.HasPrefix(rn.Include, "https://") 判断远程 Include 并调用 http.Get(rn.Include),本地路径仍使用 os.Open(rn.Include),保持原有反序列化流程不变。
  • node/task.go 中在修改 c.tag 之前保存 oldTag := c.tag,并改为 limiter.DeleteLimiter(oldTag),其余逻辑不变以确保热重载时删除的是旧 limiter。
  • core/xray/node.go 中将 outbound 创建失败的错误文案从 "not an InboundHandler" 改为 "not an OutboundHandler"
  • 变更严格限制为三处文件,改动最小且不做重构或额外修改。

Testing

  • 运行 gofmt -w conf/node.go node/task.go core/xray/node.go 并保存格式化结果。
  • 运行 go test ./...,仓库内可运行的包均通过测试(测试结果显示 ok)。
  • 运行 go build ./...,构建成功且未报错。

Codex Task

@besnow besnow merged commit 672000f into dev_new May 16, 2026
23 checks passed
@besnow besnow deleted the codex/create-minimal-fix-pr-for-typos branch May 16, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant