mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-15 11:59:21 +01:00
REF: tor bootstrap & test
This commit is contained in:
parent
49fb4d5869
commit
d6a919513c
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
||||||
import Tor from 'react-native-tor';
|
import Tor from 'react-native-tor';
|
||||||
const tor = Tor();
|
const tor = Tor({
|
||||||
|
bootstrapTimeoutMs: 35000,
|
||||||
|
numberConcurrentRequests: 1,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TOR wrapper mimicking Frisbee interface
|
* TOR wrapper mimicking Frisbee interface
|
||||||
|
@ -85,7 +88,7 @@ class Torsbee {
|
||||||
if (!this.constructor._testConn) {
|
if (!this.constructor._testConn) {
|
||||||
// no test conenctino exists, creating it...
|
// no test conenctino exists, creating it...
|
||||||
await tor.startIfNotStarted();
|
await tor.startIfNotStarted();
|
||||||
const target = 'v7gtzf7nua6hdmb2wtqaqioqmesdb4xrlly4zwr7bvayxv2bpg665pqd.onion:50001';
|
const target = 'explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion:110';
|
||||||
this.constructor._testConn = await tor.createTcpConnection({ target }, (data, err) => {
|
this.constructor._testConn = await tor.createTcpConnection({ target }, (data, err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return this.constructor._rejectReference(new Error(err));
|
return this.constructor._rejectReference(new Error(err));
|
||||||
|
|
Loading…
Add table
Reference in a new issue