From 7a1be2e594d11e1fafb94d9919f6a2032ef79c8a Mon Sep 17 00:00:00 2001 From: Yuzuki616 Date: Sun, 16 Jul 2023 13:29:13 +0800 Subject: [PATCH] fix rule --- core/xray/app/dispatcher/default.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/xray/app/dispatcher/default.go b/core/xray/app/dispatcher/default.go index 294bdb5..7c33636 100644 --- a/core/xray/app/dispatcher/default.go +++ b/core/xray/app/dispatcher/default.go @@ -5,13 +5,14 @@ package dispatcher import ( "context" "fmt" - "github.com/Yuzuki616/V2bX/common/rate" - "github.com/Yuzuki616/V2bX/limiter" - routingSession "github.com/xtls/xray-core/features/routing/session" "strings" "sync" "time" + "github.com/Yuzuki616/V2bX/common/rate" + "github.com/Yuzuki616/V2bX/limiter" + routingSession "github.com/xtls/xray-core/features/routing/session" + "github.com/xtls/xray-core/common" "github.com/xtls/xray-core/common/buf" "github.com/xtls/xray-core/common/log" @@ -480,7 +481,7 @@ func (d *DefaultDispatcher) routedDispatch(ctx context.Context, link *transport. l.ConnLimiter.DelConnCount(sessionInbound.User.Email, sessionInbound.Source.Address.IP().String()) }() } - if l.CheckDomainRule(destination.String()) { + if l.CheckDomainRule(destination.Address.String()) { newError(fmt.Sprintf("User %s access %s reject by rule", sessionInbound.User.Email, destination.String())).AtError().WriteToLog() common.Close(link.Writer) common.Interrupt(link.Reader)