diff --git a/testing/scenarios/command_test.go b/testing/scenarios/command_test.go index bf498dd533..eab1bf337b 100644 --- a/testing/scenarios/command_test.go +++ b/testing/scenarios/command_test.go @@ -56,7 +56,9 @@ func TestCommanderRemoveHandler(t *testing.T) { Rule: []*router.RoutingRule{ { InboundTag: []string{"api"}, - Tag: "api", + TargetTag: &router.RoutingRule_Tag{ + Tag: "api", + }, }, }, }), @@ -173,7 +175,9 @@ func TestCommanderAddRemoveUser(t *testing.T) { Rule: []*router.RoutingRule{ { InboundTag: []string{"api"}, - Tag: "api", + TargetTag: &router.RoutingRule_Tag{ + Tag: "api", + }, }, }, }), @@ -381,7 +385,9 @@ func TestCommanderStats(t *testing.T) { Rule: []*router.RoutingRule{ { InboundTag: []string{"api"}, - Tag: "api", + TargetTag: &router.RoutingRule_Tag{ + Tag: "api", + }, }, }, }), diff --git a/testing/scenarios/dns_test.go b/testing/scenarios/dns_test.go index bb9e92ac7e..41ef84ad5a 100644 --- a/testing/scenarios/dns_test.go +++ b/testing/scenarios/dns_test.go @@ -46,7 +46,9 @@ func TestResolveIP(t *testing.T) { Prefix: 8, }, }, - Tag: "direct", + TargetTag: &router.RoutingRule_Tag{ + Tag: "direct", + }, }, }, }), diff --git a/testing/scenarios/feature_test.go b/testing/scenarios/feature_test.go index 84aaaccd8d..815ac30701 100644 --- a/testing/scenarios/feature_test.go +++ b/testing/scenarios/feature_test.go @@ -475,7 +475,9 @@ func TestBlackhole(t *testing.T) { serial.ToTypedMessage(&router.Config{ Rule: []*router.RoutingRule{ { - Tag: "blocked", + TargetTag: &router.RoutingRule_Tag{ + Tag: "blocked", + }, PortRange: net.SinglePortRange(dest2.Port), }, }, @@ -714,10 +716,14 @@ func TestDomainSniffing(t *testing.T) { serial.ToTypedMessage(&router.Config{ Rule: []*router.RoutingRule{ { - Tag: "direct", + TargetTag: &router.RoutingRule_Tag{ + Tag: "direct", + }, InboundTag: []string{"snif"}, }, { - Tag: "redir", + TargetTag: &router.RoutingRule_Tag{ + Tag: "redir", + }, InboundTag: []string{"http"}, }, }, diff --git a/testing/scenarios/reverse_test.go b/testing/scenarios/reverse_test.go index 0f42572d32..bb1020ea3a 100644 --- a/testing/scenarios/reverse_test.go +++ b/testing/scenarios/reverse_test.go @@ -57,11 +57,15 @@ func TestReverseProxy(t *testing.T) { Domain: []*router.Domain{ {Type: router.Domain_Full, Value: "test.v2ray.com"}, }, - Tag: "portal", + TargetTag: &router.RoutingRule_Tag{ + Tag: "portal", + }, }, { InboundTag: []string{"external"}, - Tag: "portal", + TargetTag: &router.RoutingRule_Tag{ + Tag: "portal", + }, }, }, }), @@ -122,11 +126,15 @@ func TestReverseProxy(t *testing.T) { Domain: []*router.Domain{ {Type: router.Domain_Full, Value: "test.v2ray.com"}, }, - Tag: "reverse", + TargetTag: &router.RoutingRule_Tag{ + Tag: "reverse", + }, }, { InboundTag: []string{"bridge"}, - Tag: "freedom", + TargetTag: &router.RoutingRule_Tag{ + Tag: "freedom", + }, }, }, }), @@ -256,11 +264,15 @@ func TestReverseProxyLongRunning(t *testing.T) { Domain: []*router.Domain{ {Type: router.Domain_Full, Value: "test.v2ray.com"}, }, - Tag: "portal", + TargetTag: &router.RoutingRule_Tag{ + Tag: "portal", + }, }, { InboundTag: []string{"external"}, - Tag: "portal", + TargetTag: &router.RoutingRule_Tag{ + Tag: "portal", + }, }, }, }), @@ -335,11 +347,15 @@ func TestReverseProxyLongRunning(t *testing.T) { Domain: []*router.Domain{ {Type: router.Domain_Full, Value: "test.v2ray.com"}, }, - Tag: "reverse", + TargetTag: &router.RoutingRule_Tag{ + Tag: "reverse", + }, }, { InboundTag: []string{"bridge"}, - Tag: "freedom", + TargetTag: &router.RoutingRule_Tag{ + Tag: "freedom", + }, }, }, }), diff --git a/testing/scenarios/socks_test.go b/testing/scenarios/socks_test.go index a87a43653e..7859a5907a 100644 --- a/testing/scenarios/socks_test.go +++ b/testing/scenarios/socks_test.go @@ -231,7 +231,9 @@ func TestSocksBridageUDPWithRouting(t *testing.T) { serial.ToTypedMessage(&router.Config{ Rule: []*router.RoutingRule{ { - Tag: "out", + TargetTag: &router.RoutingRule_Tag{ + Tag: "out", + }, InboundTag: []string{"socks"}, }, },