Change ln to lightning

This commit is contained in:
kexkey
2020-01-19 11:11:27 -05:00
parent e52331fe61
commit b59aae4fbd
11 changed files with 37 additions and 37 deletions

View File

@@ -281,8 +281,8 @@ module.exports = class App {
if (this.isChecked('torifyables', 'tor_traefik')) {
this.sessionData.tor_traefik_hostname = await torgen.generateTorFiles(this.destinationPath( path.join( destinationDirName, 'tor/traefik/hidden_service' ) ));
}
if (this.isChecked('torifyables', 'tor_ln')) {
this.sessionData.tor_ln_hostname = await torgen.generateTorFiles(this.destinationPath( path.join( destinationDirName, 'tor/ln/hidden_service' ) ));
if (this.isChecked('torifyables', 'tor_lightning')) {
this.sessionData.tor_lightning_hostname = await torgen.generateTorFiles(this.destinationPath( path.join( destinationDirName, 'tor/lightning/hidden_service' ) ));
}
if (this.isChecked('torifyables', 'tor_bitcoin')) {
this.sessionData.tor_bitcoin_hostname = await torgen.generateTorFiles(this.destinationPath( path.join( destinationDirName, 'tor/bitcoin/hidden_service' ) ));
@@ -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_bitcoinnode'),
clearnet: this.isChecked('clearnet', 'clearnet_bitcoin'),
tor_hostname: this.sessionData.tor_bitcoin_hostname
}
},
@@ -516,7 +516,7 @@ module.exports = class App {
docker: "cyphernode/tor:" + this.config.docker_versions['cyphernode/tor'],
extra: {
traefik_hostname: this.sessionData.tor_traefik_hostname,
ln_hostname: this.sessionData.tor_ln_hostname,
lightning_hostname: this.sessionData.tor_lightning_hostname,
bitcoin_hostname: this.sessionData.tor_bitcoin_hostname,
}
},
@@ -537,9 +537,9 @@ module.exports = class App {
expose: this.config.data.lightning_expose,
external_ip: this.config.data.lightning_external_ip,
implementation: this.config.data.lightning_implementation,
torified: this.torifyables.find(data => data.value === 'tor_ln').checked,
clearnet: this.isChecked('clearnet', 'clearnet_lnnode'),
tor_hostname: this.sessionData.tor_ln_hostname
torified: this.torifyables.find(data => data.value === 'tor_lightning').checked,
clearnet: this.isChecked('clearnet', 'clearnet_lightning'),
tor_hostname: this.sessionData.tor_lightning_hostname
}
}
}

View File

@@ -36,10 +36,10 @@ module.exports = {
message: prefix()+'What features do you want to also allow using clearnet?'+utils.getHelp('clearnet'),
choices: [{
name: "Bitcoin Node",
value: "clearnet_bitcoinnode"
value: "clearnet_bitcoin"
},{
name: "LN Node",
value: "clearnet_lnnode"
name: "Lightning Network Node",
value: "clearnet_lightning"
}]
}];
},

View File

@@ -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.indexOf('tor_ln') == -1 || props.clearnet.indexOf('clearnet_lnnode') != -1) },
when: (props) => { return featureCondition(props) && props.lightning_announce && (props.torifyables.indexOf('tor_lightning') == -1 || props.clearnet.indexOf('clearnet_lightning') != -1) },
type: 'input',
name: 'lightning_external_ip',
default: utils.getDefault( 'lightning_external_ip' ),

View File

@@ -206,7 +206,7 @@
"enum": [
"tor_traefik",
"tor_bitcoin",
"tor_ln",
"tor_lightning",
"tor_otsoperations",
"tor_otswebhooks",
"tor_addrwatcheswebhooks",
@@ -217,7 +217,7 @@
"examples": [
"tor_traefik",
"tor_bitcoin",
"tor_l",
"tor_lightning",
"tor_otsoperations",
"tor_otswebhooks",
"tor_addrwatcheswebhooks",
@@ -234,14 +234,14 @@
"$id": "#/properties/clearnet/items",
"type": "string",
"enum": [
"clearnet_bitcoinnode",
"clearnet_lnnode"
"clearnet_bitcoin",
"clearnet_lightning"
],
"title": "The clearnet-allowed Torified feature",
"default": "",
"examples": [
"clearnet_bitcoinnode",
"clearnet_lnnode"
"clearnet_bitcoin",
"clearnet_lightning"
]
}
},

View File

@@ -20,7 +20,7 @@ listen=1
<% if ( torifyables.indexOf('tor_bitcoin') !== -1 ) { %>
#tor
proxy=tor:9050
<% if ( clearnet.indexOf('clearnet_bitcoinnode') == -1 ) { %>
<% if ( clearnet.indexOf('clearnet_bitcoin') == -1 ) { %>
onlynet=onion
<% } %>
<% } %>

View File

@@ -15,7 +15,7 @@ TOR_ADDR_WATCH_WEBHOOKS=<%= (torifyables.indexOf('tor_addrwatcheswebhooks') != -
TOR_TXID_WATCH_WEBHOOKS=<%= (torifyables.indexOf('tor_txidwatcheswebhooks') != -1)?'true':'false' %>
TOR_TRAEFIK=<%= (torifyables.indexOf('tor_traefik') != -1)?'true':'false' %>
TOR_BITCOIN=<%= (torifyables.indexOf('tor_bitcoin') != -1)?'true':'false' %>
TOR_LN=<%= (torifyables.indexOf('tor_ln') != -1)?'true':'false' %>
TOR_LIGHTNING=<%= (torifyables.indexOf('tor_lightning') != -1)?'true':'false' %>
<% } %>
DOCKER_MODE=<%= docker_mode %>
RUN_AS_USER=<%= run_as_different_user?username:'' %>

View File

@@ -16,18 +16,18 @@ rgb=<%= lightning_nodecolor %>
addr=0.0.0.0:9735
<% if ( torifyables.indexOf('tor_ln') !== -1 ) { %>
<% if ( 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.indexOf('clearnet_lnnode') == -1 ) { %>
<% if ( clearnet.indexOf('clearnet_lightning') == -1 ) { %>
# Tor only, no clearnet
always-use-proxy=true
disable-dns
<% } %>
<% if (lightning_announce) { %>
# Announcing Tor address
announce-addr=<%= locals.tor_ln_hostname %>:9735
<% if ( clearnet.indexOf('clearnet_lnnode') !== -1 ) { %>
announce-addr=<%= locals.tor_lightning_hostname %>:9735
<% if ( clearnet.indexOf('clearnet_lightning') !== -1 ) { %>
<% if( locals.lightning_external_ip ) { %>
# Announcing clearnet address
announce-addr=<%= locals.lightning_external_ip %>:9735

View File

@@ -6,7 +6,7 @@ while [ ! -f "/container_monitor/bitcoin_ready" ]; do echo "bitcoin not ready" ;
echo "bitcoin ready"
<% if ( torifyables.indexOf('tor_ln') !== -1 ) { %>
<% if ( 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

View File

@@ -5,8 +5,8 @@ HiddenServicePort <%= traefik_http_port %> traefik:<%= traefik_http_port %>
HiddenServicePort <%= traefik_https_port %> traefik:<%= traefik_https_port %>
<% } %>
<% if ( torifyables.indexOf('tor_ln') !== -1 && lightning_expose ) { %>
HiddenServiceDir /tor/ln/hidden_service/
<% if ( torifyables.indexOf('tor_lightning') !== -1 && lightning_expose ) { %>
HiddenServiceDir /tor/lightning/hidden_service/
HiddenServiceVersion 3
HiddenServicePort 9735 lightning:9735
<% } %>

View File

@@ -8,8 +8,8 @@
"value": "tor_bitcoin"
},
{
"name": "LN Node",
"value": "tor_ln"
"name": "Lightning Network Node",
"value": "tor_lightning"
},
{
"name": "OTS stamp, upgrade and verify",

18
dist/setup.sh vendored
View File

@@ -415,11 +415,11 @@ install_docker() {
next
fi
fi
if [[ $TOR_LN == true ]]; then
if [ ! -d $TOR_DATAPATH/ln ]; then
step " create $TOR_DATAPATH/ln"
sudo_if_required mkdir -p $TOR_DATAPATH/ln/hidden_service
sudo_if_required chmod 700 $TOR_DATAPATH/ln/hidden_service
if [[ $TOR_LIGHTNING == true ]]; then
if [ ! -d $TOR_DATAPATH/lightning ]; then
step " create $TOR_DATAPATH/lightning"
sudo_if_required mkdir -p $TOR_DATAPATH/lightning/hidden_service
sudo_if_required chmod 700 $TOR_DATAPATH/lightning/hidden_service
next
fi
fi
@@ -437,10 +437,10 @@ install_docker() {
copy_file $cyphernodeconf_filepath/tor/traefik/hidden_service/hs_ed25519_public_key $TOR_DATAPATH/traefik/hidden_service/hs_ed25519_public_key 1 $SUDO_REQUIRED
copy_file $cyphernodeconf_filepath/tor/traefik/hidden_service/hostname $TOR_DATAPATH/traefik/hidden_service/hostname 1 $SUDO_REQUIRED
if [[ $TOR_LN == true ]]; then
copy_file $cyphernodeconf_filepath/tor/ln/hidden_service/hs_ed25519_secret_key $TOR_DATAPATH/ln/hidden_service/hs_ed25519_secret_key 1 $SUDO_REQUIRED
copy_file $cyphernodeconf_filepath/tor/ln/hidden_service/hs_ed25519_public_key $TOR_DATAPATH/ln/hidden_service/hs_ed25519_public_key 1 $SUDO_REQUIRED
copy_file $cyphernodeconf_filepath/tor/ln/hidden_service/hostname $TOR_DATAPATH/ln/hidden_service/hostname 1 $SUDO_REQUIRED
if [[ $TOR_LIGHTNING == true ]]; then
copy_file $cyphernodeconf_filepath/tor/lightning/hidden_service/hs_ed25519_secret_key $TOR_DATAPATH/lightning/hidden_service/hs_ed25519_secret_key 1 $SUDO_REQUIRED
copy_file $cyphernodeconf_filepath/tor/lightning/hidden_service/hs_ed25519_public_key $TOR_DATAPATH/lightning/hidden_service/hs_ed25519_public_key 1 $SUDO_REQUIRED
copy_file $cyphernodeconf_filepath/tor/lightning/hidden_service/hostname $TOR_DATAPATH/lightning/hidden_service/hostname 1 $SUDO_REQUIRED
fi
if [[ $TOR_BITCOIN == true ]]; then
copy_file $cyphernodeconf_filepath/tor/bitcoin/hidden_service/hs_ed25519_secret_key $TOR_DATAPATH/bitcoin/hidden_service/hs_ed25519_secret_key 1 $SUDO_REQUIRED