Add .onion to local tor

This commit is contained in:
Ilya Ig. Petrov 2017-05-26 09:26:40 -07:00
parent e7e9aa3319
commit 5d06499385

View File

@ -174,7 +174,8 @@
} }
} }
if (self.ifUseLocalTor) { if (self.ifUseLocalTor) {
customProxyArray.push('SOCKS5 localhost:9050', 'SOCKS5 localhost:9150'); self.torPoints = ['SOCKS5 localhost:9150', 'SOCKS5 localhost:9050'];
customProxyArray.push(...self.torPoints);
} }
self.filteredCustomsString = ''; self.filteredCustomsString = '';
@ -248,6 +249,16 @@
/******/ return "DIRECT"; /******/ return "DIRECT";
/******/ } /******/ }
/******/ /******/
/******/ `;
}
if (pacMods.ifUseLocalTor) {
res += `
/******/
/******/ if (host.endsWith(".onion")) {
/******/ return "${pacMods.torPoints.join('; ')}";
/******/ }
/******/
/******/ `; /******/ `;
} }
res += ` res += `