mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-02-05 20:44:20 +01:00
More fixes for tor
This commit is contained in:
@@ -230,7 +230,7 @@ module.exports = class App {
|
||||
}
|
||||
|
||||
for( let torifyable of this.torifyables ) {
|
||||
torifyable.checked = this.isChecked( 'torifyables', torifyable.value );
|
||||
torifyable.checked = this.isChecked('features', 'tor') && this.isChecked( 'torifyables', torifyable.value );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ module.exports = class App {
|
||||
}
|
||||
|
||||
for( let torifyable of this.torifyables ) {
|
||||
torifyable.checked = this.isChecked( 'torifyables', torifyable.value );
|
||||
torifyable.checked = this.isChecked('features', 'tor') && this.isChecked( 'torifyables', torifyable.value );
|
||||
}
|
||||
|
||||
const cert = new Cert();
|
||||
@@ -440,7 +440,7 @@ module.exports = class App {
|
||||
expose: this.config.data.bitcoin_expose,
|
||||
uacomment: this.config.data.bitcoin_uacomment,
|
||||
torified: this.torifyables.find(data => data.value === 'tor_bitcoin').checked,
|
||||
clearnet: this.isChecked('clearnet', 'clearnet_bitcoin'),
|
||||
clearnet: !this.isChecked('features', 'tor') || this.isChecked('clearnet', 'clearnet_bitcoin'),
|
||||
tor_hostname: this.sessionData.tor_bitcoin_hostname
|
||||
}
|
||||
},
|
||||
@@ -538,7 +538,7 @@ module.exports = class App {
|
||||
external_ip: this.config.data.lightning_external_ip,
|
||||
implementation: this.config.data.lightning_implementation,
|
||||
torified: this.torifyables.find(data => data.value === 'tor_lightning').checked,
|
||||
clearnet: this.isChecked('clearnet', 'clearnet_lightning'),
|
||||
clearnet: !this.isChecked('features', 'tor') || this.isChecked('clearnet', 'clearnet_lightning'),
|
||||
tor_hostname: this.sessionData.tor_lightning_hostname
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ module.exports = {
|
||||
Next question is asked when lightning_annouce is YES and (not Tor or (Tor and LN clearnet)).
|
||||
*/
|
||||
{
|
||||
when: (props) => { return featureCondition(props) && props.lightning_announce && ((!props.torifyables || props.torifyables.indexOf('tor_lightning') === -1) || (props.clearnet && props.clearnet.indexOf('clearnet_lightning') !== -1)) },
|
||||
when: (props) => { return featureCondition(props) && props.lightning_announce && (props.features.indexOf('tor') === -1 || props.features.indexOf('tor') !== -1 && ((!props.torifyables || props.torifyables.indexOf('tor_lightning') === -1) || (props.clearnet && props.clearnet.indexOf('clearnet_lightning') !== -1))) },
|
||||
type: 'input',
|
||||
name: 'lightning_external_ip',
|
||||
default: utils.getDefault( 'lightning_external_ip' ),
|
||||
|
||||
@@ -17,7 +17,7 @@ zmqpubrawtx=tcp://0.0.0.0:18502
|
||||
|
||||
listen=1
|
||||
|
||||
<% if ( torifyables && torifyables.indexOf('tor_bitcoin') !== -1 ) { %>
|
||||
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_bitcoin') !== -1 ) { %>
|
||||
#tor
|
||||
proxy=tor:9050
|
||||
<% if ( !clearnet || clearnet.indexOf('clearnet_bitcoin') === -1 ) { %>
|
||||
|
||||
@@ -68,7 +68,7 @@ services:
|
||||
|
||||
bitcoin:
|
||||
image: cyphernode/bitcoin:<%= bitcoin_version %>
|
||||
<% if ( torifyables && torifyables.indexOf('tor_bitcoin') !== -1 ) { %>
|
||||
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_bitcoin') !== -1 ) { %>
|
||||
command: $USER sh -c 'rm -f /container_monitor/bitcoin_ready ; while [ ! -f "/container_monitor/tor_ready" ]; do echo "tor not ready" ; sleep 10 ; done ; echo "tor ready" ; bitcoind'
|
||||
<% } else { %>
|
||||
command: $USER sh -c 'rm -f /container_monitor/bitcoin_ready ; bitcoind'
|
||||
@@ -239,7 +239,7 @@ services:
|
||||
<% if (net === 'testnet') { %>
|
||||
- "TESTNET=1"
|
||||
<% } %>
|
||||
<% if ( torifyables && torifyables.indexOf('tor_otsoperations') !== -1 ) { %>
|
||||
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_otsoperations') !== -1 ) { %>
|
||||
- "TOR_HOST=tor"
|
||||
- "TOR_PORT=9050"
|
||||
<% } %>
|
||||
|
||||
@@ -79,7 +79,7 @@ fi
|
||||
printf "\r\n\033[0;92mDepending on your current location and DNS settings, point your favorite browser to one of the following URLs to access Cyphernode's status page:\r\n"
|
||||
printf "\r\n"
|
||||
printf "\033[0;95m<% cns.forEach(cn => { %><%= ('https://' + cn + ':' + traefik_https_port + '/welcome\\r\\n') %><% }) %>\033[0m\r\n"
|
||||
<% if ( torifyables && torifyables.indexOf('tor_traefik') !== -1 ) { %>
|
||||
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_traefik') !== -1 ) { %>
|
||||
printf "\033[0;92mYou can also use Tor Browser and navigate to your onion address:\r\n"
|
||||
printf "\033[0;95mhttps://${TOR_TRAEFIK_HOSTNAME}:<%= traefik_https_port %>/welcome\033[0m\r\n\r\n"
|
||||
<% } %>
|
||||
|
||||
@@ -16,7 +16,7 @@ rgb=<%= lightning_nodecolor %>
|
||||
|
||||
addr=0.0.0.0:9735
|
||||
|
||||
<% if ( torifyables && torifyables.indexOf('tor_lightning') !== -1 ) { %>
|
||||
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_lightning') !== -1 ) { %>
|
||||
# Tor
|
||||
# proxy=tor:9050 this has to be made at execution time because of getaddrinfo and alpine not being friends, see entrypoint.sh
|
||||
<% if ( !clearnet || clearnet.indexOf('clearnet_lightning') === -1 ) { %>
|
||||
|
||||
@@ -6,7 +6,7 @@ while [ ! -f "/container_monitor/bitcoin_ready" ]; do echo "bitcoin not ready" ;
|
||||
|
||||
echo "bitcoin ready"
|
||||
|
||||
<% if ( torifyables && torifyables.indexOf('tor_lightning') !== -1 ) { %>
|
||||
<% if ( features.indexOf('tor') !== -1 && torifyables && torifyables.indexOf('tor_lightning') !== -1 ) { %>
|
||||
#while [ ! -f "/container_monitor/tor_ready" ]; do echo "tor not ready" ; sleep 10 ; done
|
||||
while [ -z "${TORIP}" ]; do echo "tor not ready" ; TORIP=$(getent hosts tor | awk '{ print $1 }') ; sleep 10 ; done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user