From 5d064993854f5d516eead6147df6597cd2d8b4ba Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Fri, 26 May 2017 09:26:40 -0700 Subject: [PATCH] Add .onion to local tor --- .../src/extension-common/35-pac-kitchen-api.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js index 2ee7f23..95138d6 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js @@ -174,7 +174,8 @@ } } 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 = ''; @@ -248,6 +249,16 @@ /******/ return "DIRECT"; /******/ } /******/ +/******/ `; + } + if (pacMods.ifUseLocalTor) { + + res += ` +/******/ +/******/ if (host.endsWith(".onion")) { +/******/ return "${pacMods.torPoints.join('; ')}"; +/******/ } +/******/ /******/ `; } res += `