mirror of
https://github.com/tornadocash/tornado-cli.git
synced 2024-11-22 01:37:08 +01:00
Make remote IP detection optional
Some may could not access to tornado.cash without VPN
This commit is contained in:
parent
1f26d8cc2f
commit
ba31dfa32d
10
cli.js
10
cli.js
@ -945,9 +945,13 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort,
|
|||||||
console.log("Connecting to remote node")
|
console.log("Connecting to remote node")
|
||||||
web3 = new Web3(rpc, null, { transactionConfirmationBlocks: 1 })
|
web3 = new Web3(rpc, null, { transactionConfirmationBlocks: 1 })
|
||||||
}
|
}
|
||||||
const fetchRemoteIP = await axios.get('https://ip.tornado.cash', ipOptions)
|
try {
|
||||||
const { country, ip } = fetchRemoteIP.data
|
const fetchRemoteIP = await axios.get('https://ip.tornado.cash', ipOptions)
|
||||||
console.log('Your remote IP address is',ip,'from',country+'.');
|
const { country, ip } = fetchRemoteIP.data
|
||||||
|
console.log('Your remote IP address is',ip,'from',country+'.');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Could not fetch remote IP from ip.tornado.cash, use VPN if the problem repeats.');
|
||||||
|
}
|
||||||
contractJson = require('./build/contracts/TornadoProxy.abi.json')
|
contractJson = require('./build/contracts/TornadoProxy.abi.json')
|
||||||
instanceJson = require('./build/contracts/Instance.abi.json')
|
instanceJson = require('./build/contracts/Instance.abi.json')
|
||||||
circuit = require('./build/circuits/tornado.json')
|
circuit = require('./build/circuits/tornado.json')
|
||||||
|
Loading…
Reference in New Issue
Block a user