diff --git a/package.json b/package.json index ac3c062bc..71bcb5966 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "pocketnet", "project": "Bastyon", - "version": "0.9.129", - "versionsuffix": "5", - "cordovaversion": "1.8.129", - "cordovaversioncode": "1801295", + "version": "0.9.130", + "versionsuffix": "1", + "cordovaversion": "1.8.130", + "cordovaversioncode": "1801301", "description": "Bastyon desktop application", "author": "Pocketnet Community ", diff --git a/proxy16/node/control.js b/proxy16/node/control.js index f190991ee..901fefc22 100644 --- a/proxy16/node/control.js +++ b/proxy16/node/control.js @@ -191,7 +191,12 @@ var Control = function(settings, proxy) { 'rpcuser=' + f.randomString(10) + EOL + 'rpcpassword=' + f.randomString(256) + EOL + 'api=1' + EOL + - 'rest=0' + EOL + 'rest=0' + EOL + + 'logips=1' + EOL + + 'disconnectold=1' + EOL + + '# tor' + EOL + + 'listenonion=1' + EOL + + 'torcontrol=127.0.0.1:9251' + EOL fs.writeFileSync(node.confPath, data) } diff --git a/proxy16/node/torcontrol.js b/proxy16/node/torcontrol.js index 3f85003b6..4230961b8 100644 --- a/proxy16/node/torcontrol.js +++ b/proxy16/node/torcontrol.js @@ -229,7 +229,8 @@ class TorControl { "# The user is free to edit this config if he know\n" + "# how to do that. Read TOR documentation before...\n", - "SocksPort 0.0.0.0:9051", + "SocksPort 9250 # Default: Bind to localhost:9250 for local connections.", + "ControlPort 9251", "CookieAuthentication 1", "DormantCanceledByStartup 1", `DataDirectory ${getSettingsPath("data")}`, diff --git a/proxy16/transports.js b/proxy16/transports.js index 9b6af7a8a..656f610a1 100644 --- a/proxy16/transports.js +++ b/proxy16/transports.js @@ -173,7 +173,7 @@ class WrappedAxios { } static handleError(error) { - const isConnRefused = error.message.includes('ECONNREFUSED 127.0.0.1:9051'); + const isConnRefused = error.message.includes('ECONNREFUSED 127.0.0.1:9250'); const isSocksRejection = error.message.includes('Socks5 proxy rejected connection'); if (isConnRefused || isSocksRejection) { @@ -310,7 +310,7 @@ class WrappedFetch { } static handleError(error) { - const isConnRefused = error.message.includes('ECONNREFUSED 127.0.0.1:9051'); + const isConnRefused = error.message.includes('ECONNREFUSED 127.0.0.1:9250'); const isSocksRejection = error.message.includes('Socks5 proxy rejected connection'); if (isConnRefused || isSocksRejection) { @@ -441,7 +441,7 @@ class WrappedRequest { } static handleError(error) { - const isConnRefused = error.message.includes('ECONNREFUSED 127.0.0.1:9051'); + const isConnRefused = error.message.includes('ECONNREFUSED 127.0.0.1:9250'); const isSocksRejection = error.message.includes('Socks5 proxy rejected connection'); if (isConnRefused || isSocksRejection) { @@ -708,7 +708,7 @@ class Transports { getTorAgent() { if (!this.torAgent) { - const url = new URL('socks5h://127.0.0.1:9051'); + const url = new URL('socks5h://127.0.0.1:9250'); url.tls = { rejectUnauthorized: false }; this.torAgent = new SocksProxyAgent(url, { keepAlive: true, @@ -754,7 +754,7 @@ class Transports { } isTorRefuseConnections(error) { - return error.message.includes('ECONNREFUSED 127.0.0.1:9051'); + return error.message.includes('ECONNREFUSED 127.0.0.1:9250'); } }