Skip to content

Log: show the matching rule tag#3809

Merged
yuhan6665 merged 1 commit intomainfrom
ruleTag
Sep 13, 2024
Merged

Log: show the matching rule tag#3809
yuhan6665 merged 1 commit intomainfrom
ruleTag

Conversation

@Fangliding
Copy link
Member

For #3311
加一个子命令是不太可能了 但是可以选择在log中输出命中的规则
翻了一下代码之后发现一个似乎没人用文档也没写的 “ruleTag” 项 不如用起来
现在如果设置了 “ruleTag” 在hit中这个rule的时候便会显示这个tag名 用于调试
效果如图
image

@Fangliding Fangliding changed the title Rule tag 在Log中显示命中的tag名 Sep 13, 2024
@Fangliding Fangliding changed the title 在Log中显示命中的tag名 在Log中显示命中的rule名 Sep 13, 2024
}

// PickRoute implements routing.Router.
func (r *Router) PickRoute(ctx routing.Context) (routing.Route, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return 3 个有点难看 加到 routing.Route 里?或者直接改成返回 rule?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起来是个好主意 已经放到routing.Route里了

@yuhan6665 yuhan6665 changed the title 在Log中显示命中的rule名 Log: show the matching rule tag Sep 13, 2024
@yuhan6665
Copy link
Member

Looks good to me!

leninalive pushed a commit to amnezia-vpn/amnezia-xray-core that referenced this pull request Oct 29, 2024
@yuhan6665 yuhan6665 deleted the ruleTag branch November 4, 2024 17:52
it2konst pushed a commit to it2konst/gametunnel-core that referenced this pull request Mar 1, 2026
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.

2 participants