Skip to content

Allow to inject custom validator in VLESS controller#3453

Merged
yuhan6665 merged 2 commits intoXTLS:mainfrom
torikki-tou:validator-interface
Sep 13, 2024
Merged

Allow to inject custom validator in VLESS controller#3453
yuhan6665 merged 2 commits intoXTLS:mainfrom
torikki-tou:validator-interface

Conversation

@torikki-tou
Copy link
Contributor

@torikki-tou torikki-tou commented Jun 17, 2024

Made validator an interface and moved its creation out from VLESS constructor to allow custom validators.

It may be the way towards custom validators in Xray, but more importantly it will help people who imports Xray as a library. For example i wanted to implement custom logging and also store users in key-value DB with long term in-memory cache. With this change it will be possible.

@RPRX
Copy link
Member

RPRX commented Jun 18, 2024

虽然没看代码但还没看懂要干什么 解释一下

@Fangliding
Copy link
Member

大概是允许自己定义vless的鉴权 这里只做了修改定义了接口不过没弄具体的配置方式 方便机场之类的服务 吧

@torikki-tou
Copy link
Contributor Author

I do not know chinese so i may misunderstand you, anyways i just updated description, i hope it will answer your question

@torikki-tou torikki-tou marked this pull request as ready for review June 19, 2024 09:50
@yuhan6665
Copy link
Member

似乎可以

@yuhan6665
Copy link
Member

yuhan6665 commented Jun 23, 2024

I will merge to main later if no further comments
Scheduled for v1.9.0 as discussed

@Fangliding
Copy link
Member

better leave some comments if it's for other devs

@yuhan6665
Copy link
Member

@torikki-tou sorry for the delay, can you help with resolve the conflict?

@torikki-tou
Copy link
Contributor Author

@yuhan6665 done

@yuhan6665 yuhan6665 merged commit c259e4e into XTLS:main Sep 13, 2024
@yuhan6665
Copy link
Member

Thanks!

leninalive pushed a commit to amnezia-vpn/amnezia-xray-core that referenced this pull request Oct 29, 2024
* Make Validator an interface

* Move validator creation away from VLESS inbound controller
it2konst pushed a commit to it2konst/gametunnel-core that referenced this pull request Mar 1, 2026
* Make Validator an interface

* Move validator creation away from VLESS inbound controller
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