我参考了SideStore中给出的WireGuard配置文件,并将内容填写到了Surge中且配置好了代理规则,原配置和Surge配置如下:
# 原配置
[Interface]
PrivateKey = xxx
Address = 10.7.0.10/24
[Peer]
PublicKey = kHDoekeYhBvfW9a9UQ+UCmpbG423eejTjcjW+DT+JF0=
AllowedIPs = 10.7.0.1/32
Endpoint = 127.0.0.1:51820
PersistentKeepalive = 25
# Surge配置
[WireGuard SideStore]
private-key = xxx
self-ip = 10.7.0.10
mtu = 1280
peer = (public-key = kHDoekeYhBvfW9a9UQ+UCmpbG423eejTjcjW+DT+JF0=, allowed-ips = "0.0.0.0/0, ::0/0", endpoint = 127.0.0.1:51820, keepalive = 25)
我使用原配置文件在iOS的WireGuard App中可以正常使用SideStore,但是使用下面的配置在Surge中会出现问题,连接过程如下:
17:30:25.315071 [Connection] Handled by VIF
17:30:25.316948 [Rule] Rule matched: IP-CIDR 10.7.0.1/32
17:30:25.318449 [WireGuard-DNS] Remote DNS completed, using record: 10.7.0.1
17:30:26.318153 [Connector] Set up backup connection #2 via sidestore
17:30:26.318495 [WireGuard-DNS] Remote DNS completed, using record: 10.7.0.1
17:30:28.319411 [Connector] Set up backup connection #3 via sidestore
17:30:28.321156 [WireGuard-DNS] Remote DNS completed, using record: 10.7.0.1
17:30:31.320097 [Connector] Set up backup connection #4 via sidestore
17:30:31.322901 [WireGuard-DNS] Remote DNS completed, using record: 10.7.0.1
17:30:31.570945 [Connector] Connection setup failed: Error Domain=SGErrorDomain Code=0 "TCP error: Connection aborted." UserInfo={NSLocalizedDescription=TCP error: Connection aborted.}, continue waiting for other connections
17:30:32.537609 [Connector] Connection setup failed: Error Domain=SGErrorDomain Code=0 "TCP error: Connection aborted." UserInfo={NSLocalizedDescription=TCP error: Connection aborted.}, continue waiting for other connections
17:30:34.569425 [Connector] Connection setup failed: Error Domain=SGErrorDomain Code=0 "TCP error: Connection aborted." UserInfo={NSLocalizedDescription=TCP error: Connection aborted.}, continue waiting for other connections
17:30:35.318910 [Connection] Disconnect with reason: Failed to establish connection (TCP error: Connection aborted.)
不知道是不是因为Surge的WG不支持连接到本机的方式?还是需要在哪里开启某项设置呢?求解惑🙏