0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-15 12:57:16 +03:00

Allow to inject custom validator in VLESS controller (#3453)

* Make Validator an interface

* Move validator creation away from VLESS inbound controller
This commit is contained in:
Torikki
2024-09-13 17:51:26 +03:00
committed by GitHub
parent 3a8c5f38e8
commit c259e4e4a6
4 changed files with 33 additions and 23 deletions

View File

@ -64,7 +64,7 @@ func EncodeRequestHeader(writer io.Writer, request *protocol.RequestHeader, requ
}
// DecodeRequestHeader decodes and returns (if successful) a RequestHeader from an input stream.
func DecodeRequestHeader(isfb bool, first *buf.Buffer, reader io.Reader, validator *vless.Validator) (*protocol.RequestHeader, *Addons, bool, error) {
func DecodeRequestHeader(isfb bool, first *buf.Buffer, reader io.Reader, validator vless.Validator) (*protocol.RequestHeader, *Addons, bool, error) {
buffer := buf.StackNew()
defer buffer.Release()