diff --git a/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+ACLRouting.swift b/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+ACLRouting.swift index f8076925..64f31855 100644 --- a/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+ACLRouting.swift +++ b/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+ACLRouting.swift @@ -99,9 +99,7 @@ extension RealSslocalSmokeTests { socksPort: selectedPorts[0], httpPort: selectedPorts[1]) let chinaRules = [ ProxyRule( - action: .direct, match: try RuleMatch(nationalDomainSuffix: "cn"), - source: RuleSourceIdentity( - kind: .geolocationCN, upstreamVersion: "test", label: "geolocation-cn")) + action: .direct, match: try RuleMatch(nationalDomainSuffix: "cn")) ] let document = SslocalRuntimeDocument( servers: [ @@ -176,17 +174,11 @@ extension RealSslocalSmokeTests { /// issue #64 冒烟夹具:`.cn` 域名 + 测试用 `8.8.8.0/24` CIDR 直连候选 /// (仅验证命中/未命中路由,不代表真实中国 IP 归属)。 private func chinaCIDRSmokeRules() throws -> [ProxyRule] { - let domainSource = RuleSourceIdentity( - kind: .geolocationCN, upstreamVersion: "test", label: "geolocation-cn") - let cidrSource = RuleSourceIdentity( - kind: .chinaIPv4, upstreamVersion: "test", label: "china-operator-ip") return [ ProxyRule( - action: .direct, match: try RuleMatch(nationalDomainSuffix: "cn"), - source: domainSource), + action: .direct, match: try RuleMatch(nationalDomainSuffix: "cn")), ProxyRule( - action: .direct, match: try RuleMatch(ipv4CIDR: "8.8.8.0/24"), - source: cidrSource), + action: .direct, match: try RuleMatch(ipv4CIDR: "8.8.8.0/24")), ] } diff --git a/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+CustomRules.swift b/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+CustomRules.swift index dae2f23e..041ff8be 100644 --- a/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+CustomRules.swift +++ b/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+CustomRules.swift @@ -12,18 +12,13 @@ extension RealSslocalSmokeTests { let selectedPorts = try grabThreeListenPorts(excluding: [echoServer.port, fakeSSServer.port]) let listen = SslocalListenSettings( socksPort: selectedPorts[0], httpPort: selectedPorts[1]) - let customSource = RuleSourceIdentity( - kind: .custom, upstreamVersion: "user", label: "自定义") let customRules = [ ProxyRule( - action: .direct, match: try RuleMatch(domainSuffix: "direct.example"), - source: customSource), + action: .direct, match: try RuleMatch(domainSuffix: "direct.example")), ProxyRule( - action: .direct, match: try RuleMatch(domainExact: "exact.direct.example"), - source: customSource), + action: .direct, match: try RuleMatch(domainExact: "exact.direct.example")), ProxyRule( - action: .direct, match: try RuleMatch(ipv4CIDR: "203.0.113.0/24"), - source: customSource), + action: .direct, match: try RuleMatch(ipv4CIDR: "203.0.113.0/24")), ] let document = SslocalRuntimeDocument( servers: [ @@ -115,12 +110,9 @@ extension RealSslocalSmokeTests { let selectedPorts = try grabThreeListenPorts(excluding: [echoServer.port, fakeSSServer.port]) let listen = SslocalListenSettings( socksPort: selectedPorts[0], httpPort: selectedPorts[1]) - let customSource = RuleSourceIdentity( - kind: .custom, upstreamVersion: "user", label: "自定义") let customRules = [ ProxyRule( - action: .proxy, match: try RuleMatch(domainSuffix: "blocked.example"), - source: customSource) + action: .proxy, match: try RuleMatch(domainSuffix: "blocked.example")) ] let document = SslocalRuntimeDocument( servers: [ diff --git a/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+GFWListACL.swift b/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+GFWListACL.swift index aab17575..861e09d6 100644 --- a/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+GFWListACL.swift +++ b/ShadowsocksX-NG2/Tests/Smoke/RealSslocalSmokeTests+GFWListACL.swift @@ -12,15 +12,11 @@ extension RealSslocalSmokeTests { let selectedPorts = try grabThreeListenPorts(excluding: [echoServer.port, fakeSSServer.port]) let listen = SslocalListenSettings( socksPort: selectedPorts[0], httpPort: selectedPorts[1]) - let gfwSource = RuleSourceIdentity( - kind: .gfwlist, upstreamVersion: "test", label: "GFWList") let gfwRules = [ ProxyRule( - action: .proxy, match: try RuleMatch(domainSuffix: "blocked.example"), - source: gfwSource), + action: .proxy, match: try RuleMatch(domainSuffix: "blocked.example")), ProxyRule( - action: .proxy, match: try RuleMatch(domainSuffix: "cdn.blocked.example"), - source: gfwSource), + action: .proxy, match: try RuleMatch(domainSuffix: "cdn.blocked.example")), ] let document = SslocalRuntimeDocument( servers: [