Browse Source

VLESS Reverse Proxy: Forbid reverse-proxy UUID using forward-proxy, enabled by default

https://t.me/projectXtls/1070

https://github.com/XTLS/Xray-core/pull/5101#issuecomment-3567464144
RPRX 1 week ago
parent
commit
a83253f3d7
1 changed files with 4 additions and 0 deletions
  1. 4 0
      proxy/vless/inbound/inbound.go

+ 4 - 0
proxy/vless/inbound/inbound.go

@@ -538,6 +538,10 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s
 
 	account := request.User.Account.(*vless.MemoryAccount)
 
+	if account.Reverse != nil && request.Command != protocol.RequestCommandRvs {
+		return errors.New("for safety reasons, user " + account.ID.String() + " is not allowed to use forward proxy")
+	}
+
 	responseAddons := &encoding.Addons{
 		// Flow: requestAddons.Flow,
 	}