mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-12 22:55:07 +00:00
77 → 0 warnings. Split oversized functions and files: controller and agent extension files, standalone RuleSet/ProxySettingsFileStore/ SslocalListenSettings/LegacyImportService, test classes into topic extensions. Regroup activation options into RuntimeDocumentOptions and converter metadata into Provenance. Runtime controller DI seams widen private → internal so the extension files stay cohesive; new controller files are registered in the architecture guard exemption list; Agent target adds RuleSet and SslocalListenSettings to project.yml. Test JSON literals wrap inside the string literal only.
13 lines
463 B
Swift
13 lines
463 B
Swift
import Foundation
|
|
|
|
/// 端点探测缝:注入以便控制器单测(真实探测走 EndpointHealthProbe)。
|
|
protocol EndpointProbing: Sendable {
|
|
func probe(host: String, port: Int, timeout: TimeInterval) -> EndpointHealthProbe.Outcome
|
|
}
|
|
|
|
struct SystemEndpointProbe: EndpointProbing {
|
|
func probe(host: String, port: Int, timeout: TimeInterval) -> EndpointHealthProbe.Outcome {
|
|
EndpointHealthProbe.probe(host: host, port: port, timeout: timeout)
|
|
}
|
|
}
|