修复NAT64代理连接逻辑,仅在未使用全局Socks5时进行兜底连接

This commit is contained in:
cmliu
2025-05-27 03:12:21 +08:00
parent f8b78ebb17
commit f3849c4a95

View File

@@ -393,9 +393,11 @@ async function handleTCPOutBound(remoteSocket, addressType, addressRemote, portR
}
async function nat64() {
const nat64Proxyip = `[${await resolveToIPv6(addressRemote)}]`;
log(`NAT64 代理连接到 ${nat64Proxyip}:443`);
tcpSocket = await connectAndWrite(nat64Proxyip, '443');
if (!useSocks) {
const nat64Proxyip = `[${await resolveToIPv6(addressRemote)}]`;
log(`NAT64 代理连接到 ${nat64Proxyip}:443`);
tcpSocket = await connectAndWrite(nat64Proxyip, '443');
}
tcpSocket.closed.catch(error => {
console.log('retry tcpSocket closed error', error);
}).finally(() => {