Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing: Add regexp syntax support to UserMatcher #3799

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

vnxme
Copy link
Contributor

@vnxme vnxme commented Sep 12, 2024

This PR implements regexp syntax support to UserMatcher, i.e. allows to match user email in routing rules with regular expressions using regexp:{pattern} syntax. It has also been requested in #2536.

@APT-ZERO
Copy link

Thank you, it's useful , You can also add support for strings.Contains(), strings.HasPrefix(), strings.HasSuffix() as they are faster and uses less resources
for 'user' and also for 'inboundTag'

@Fangliding
Copy link
Member

最好找时间以一个更统一的方法把这些东西全实现regexp 不然后面如果又有人加然后方法又不一样乱七八糟发

@Fangliding
Copy link
Member

好吧翻了一下也就inbound tag和user可以加 user又是唯一值得加的

@yuhan6665 yuhan6665 merged commit 3a8c5f3 into XTLS:main Sep 12, 2024
36 checks passed
@yuhan6665
Copy link
Member

感谢 @vnxme
@APT-ZERO ,regex 已经满足需求 所以不需要再加其他
@Fangliding 是的如果有超过三个地方需要 以后可以考虑 refactor

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.

4 participants