mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-31 10:14:35 +01:00
Been told it's Tor, not TOR
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"name": "TOR Hidden Service/Gateway",
|
||||
"name": "Tor Hidden Service/Gateway",
|
||||
"value": "tor"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -272,7 +272,7 @@ module.exports = class App {
|
||||
|
||||
async processProps() {
|
||||
|
||||
// TOR...
|
||||
// Tor...
|
||||
if( this.isChecked( 'features', 'tor' ) ) {
|
||||
const torgen = new TorGen(this.destinationPath( path.join( destinationDirName, 'tor/hidden_service' ) ));
|
||||
this.sessionData.tor_hostname = await torgen.generateTorFiles();
|
||||
|
||||
@@ -11,13 +11,13 @@ module.exports = class TorGen {
|
||||
|
||||
async generateTorFiles() {
|
||||
if( !fs.existsSync(this.path) ) {
|
||||
console.log(chalk.green( 'Creating TOR Hidden Service directory...' ));
|
||||
console.log(chalk.green( 'Creating Tor Hidden Service directory...' ));
|
||||
fs.mkdirSync(this.path, { recursive: true });
|
||||
}
|
||||
|
||||
if( !fs.existsSync(this.path + '/hostname') ) {
|
||||
|
||||
console.log(chalk.green( 'Generating TOR Hidden Service secret key, public key and hostname...' ));
|
||||
console.log(chalk.green( 'Generating Tor Hidden Service secret key, public key and hostname...' ));
|
||||
|
||||
const torgenbin = spawn('./torgen/torgen', [this.path]);
|
||||
try {
|
||||
@@ -28,7 +28,7 @@ module.exports = class TorGen {
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log(chalk.green('TOR config files already exist, skipping TOR generation.') );
|
||||
console.log(chalk.green('Tor config files already exist, skipping Tor generation.') );
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -25,7 +25,7 @@ module.exports = {
|
||||
when: featureCondition,
|
||||
type: 'checkbox',
|
||||
name: 'torifyables',
|
||||
message: prefix()+'What features do you want to TORify?'+utils.getHelp('torifyables'),
|
||||
message: prefix()+'What features do you want to Torify?'+utils.getHelp('torifyables'),
|
||||
choices: utils.torifyableChoices()
|
||||
},
|
||||
{
|
||||
@@ -48,17 +48,17 @@ module.exports = {
|
||||
}
|
||||
};
|
||||
|
||||
// Do you want to access Cyphernode via a TOR Hidden Service?
|
||||
// Do you want to access Cyphernode via a Tor Hidden Service?
|
||||
// Do you want to access Cyphernode also via clearnet?
|
||||
// Do you want your Bitcoin node to use TOR?
|
||||
// Do you want your Bitcoin node to use Tor?
|
||||
// Do you want your Bitcoin node to also use clearnet?
|
||||
// Do you want your LN node to use TOR?
|
||||
// Do you want your LN node to use Tor?
|
||||
// Do you want your LN node to also use clearnet?
|
||||
// Do you want your OTS client to use TOR?
|
||||
// Do you want your Cyphernode callbacks (address watches, TXID watches and OTS notifications) to perform through TOR?
|
||||
// Do you want your OTS client to use Tor?
|
||||
// Do you want your Cyphernode callbacks (address watches, TXID watches and OTS notifications) to perform through Tor?
|
||||
|
||||
// Do you want TOR?
|
||||
// What do you want to TOR?
|
||||
// Do you want Tor?
|
||||
// What do you want to Tor?
|
||||
// - Cyphernode as Hidden Service
|
||||
// - Bitcoin Node
|
||||
// - LN Node
|
||||
@@ -75,7 +75,7 @@ module.exports = {
|
||||
//
|
||||
// What is your public IP address?
|
||||
|
||||
// TOR
|
||||
// Tor
|
||||
// - HS
|
||||
// - torrc
|
||||
// - hostname, secret, public
|
||||
|
||||
@@ -54,7 +54,7 @@ module.exports = {
|
||||
message: prefix()+'Do you want to announce your lightning node?'+utils.getHelp('lightning_announce'),
|
||||
},
|
||||
/*
|
||||
Next question is asked when lightning_annouce is YES and (not TOR or (TOR and LN clearnet)).
|
||||
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_lnnode') == -1 || props.clearnet.indexOf('clearnet_lnnode') != -1) },
|
||||
|
||||
@@ -104,7 +104,7 @@ module.exports = {
|
||||
default: utils.getDefault( 'tor_datapath_custom' ),
|
||||
filter: utils.trimFilter,
|
||||
validate: utils.pathValidator,
|
||||
message: prefix()+'Custom path for TOR data?'+utils.getHelp('tor_datapath_custom'),
|
||||
message: prefix()+'Custom path for Tor data?'+utils.getHelp('tor_datapath_custom'),
|
||||
},
|
||||
{
|
||||
when: installerDocker,
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
"torifyables": {
|
||||
"$id": "#/properties/torifyables",
|
||||
"type": "array",
|
||||
"title": "The TORified features of this cyphernode",
|
||||
"title": "The Torified features of this cyphernode",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$id": "#/properties/torifyables/items",
|
||||
@@ -212,7 +212,7 @@
|
||||
"tor_addrwatcheswebhooks",
|
||||
"tor_txidwatcheswebhooks"
|
||||
],
|
||||
"title": "The TORified feature",
|
||||
"title": "The Torified feature",
|
||||
"default": "",
|
||||
"examples": [
|
||||
"tor_hiddenservice",
|
||||
@@ -228,7 +228,7 @@
|
||||
"clearnet": {
|
||||
"$id": "#/properties/clearnet",
|
||||
"type": "array",
|
||||
"title": "The clearnet-allowed TORified features of this cyphernode",
|
||||
"title": "The clearnet-allowed Torified features of this cyphernode",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$id": "#/properties/clearnet/items",
|
||||
@@ -237,7 +237,7 @@
|
||||
"clearnet_bitcoinnode",
|
||||
"clearnet_lnnode"
|
||||
],
|
||||
"title": "The clearnet-allowed TORified feature",
|
||||
"title": "The clearnet-allowed Torified feature",
|
||||
"default": "",
|
||||
"examples": [
|
||||
"clearnet_bitcoinnode",
|
||||
|
||||
@@ -78,7 +78,7 @@ printf "\r\n\033[0;92mDepending on your current location and DNS settings, point
|
||||
printf "\r\n"
|
||||
printf "\033[0;95m<% cns.forEach(cn => { %><%= ('https://' + cn + '/welcome\\r\\n') %><% }) %>\033[0m\r\n"
|
||||
<% if ( features.indexOf('tor') !== -1 ) { %>
|
||||
printf "\033[0;92mYou can also use TOR Browser and navigate to your onion address:\r\n"
|
||||
printf "\033[0;92mYou can also use Tor Browser and navigate to your onion address:\r\n"
|
||||
printf "\033[0;95mhttps://${TOR_HOSTNAME}/welcome\033[0m\r\n\r\n"
|
||||
<% } %>
|
||||
printf "\033[0;92mUse 'admin' as the username with the configuration password you selected at the beginning of the configuration process.\r\n\r\n\033[0m"
|
||||
|
||||
@@ -125,13 +125,13 @@ checkots() {
|
||||
}
|
||||
|
||||
checktor() {
|
||||
echo -en "\r\n\e[1;36mTesting TOR... " > /dev/console
|
||||
echo -en "\r\n\e[1;36mTesting Tor... " > /dev/console
|
||||
local rc
|
||||
|
||||
rc=$(curl -s -o /dev/null -w "%{http_code}" --socks5-hostname tor:9050 http://expyuzz4wqqyqhjn.onion/)
|
||||
[ "${rc}" -ne "200" ] && return 250
|
||||
|
||||
echo -e "\e[1;36mTOR rocks!" > /dev/console
|
||||
echo -e "\e[1;36mTor rocks!" > /dev/console
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -396,7 +396,7 @@ else
|
||||
returncode=1
|
||||
fi
|
||||
finalreturncode=$((${returncode} | ${finalreturncode}))
|
||||
result="${result}$(feature_status ${returncode} 'TOR error!')}"
|
||||
result="${result}$(feature_status ${returncode} 'Tor error!')}"
|
||||
<% } %>
|
||||
|
||||
#############################
|
||||
|
||||
@@ -17,15 +17,15 @@ rgb=<%= lightning_nodecolor %>
|
||||
addr=0.0.0.0:9735
|
||||
|
||||
<% if ( torifyables.indexOf('tor_lnnode') !== -1 ) { %>
|
||||
# TOR
|
||||
# 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 ) { %>
|
||||
# TOR only, no clearnet
|
||||
# Tor only, no clearnet
|
||||
always-use-proxy=true
|
||||
disable-dns
|
||||
<% } %>
|
||||
<% if (lightning_announce) { %>
|
||||
# Announcing TOR address
|
||||
# Announcing Tor address
|
||||
announce-addr=<%= locals.tor_hostname %>:9735
|
||||
<% if ( clearnet.indexOf('clearnet_lnnode') !== -1 ) { %>
|
||||
<% if( locals.lightning_external_ip ) { %>
|
||||
|
||||
@@ -5,7 +5,7 @@ while [ ! -f "/bitcoin_monitor/up" ]; do echo "bitcoin not ready" ; sleep 10 ; d
|
||||
<% if ( torifyables.indexOf('tor_lnnode') !== -1 ) { %>
|
||||
while [ -z "${TORIP}" ]; do echo "tor not ready" ; TORIP=$(getent hosts tor | awk '{ print $1 }') ; sleep 10 ; done
|
||||
|
||||
echo "TOR ready at IP ${TORIP}"
|
||||
echo "Tor ready at IP ${TORIP}"
|
||||
|
||||
lightningd --proxy=$TORIP:9050
|
||||
<% } else { %>
|
||||
|
||||
@@ -70,7 +70,7 @@ func main() {
|
||||
// Convert seed to expanded private key...
|
||||
// Ref.: https://gitweb.torproject.org/tor.git/tree/src/ext/ed25519/donna/ed25519_tor.c?h=tor-0.4.1.6#n61
|
||||
// Ref.: https://gitweb.torproject.org/tor.git/tree/src/ext/curve25519_donna/README?h=tor-0.4.1.6#n28
|
||||
fmt.Println("Converting keys for TOR...")
|
||||
fmt.Println("Converting keys for Tor...")
|
||||
h := sha512.Sum512(privateKey[:32])
|
||||
h[0] &= 248
|
||||
h[31] &= 127
|
||||
|
||||
@@ -44,7 +44,7 @@ Current components in Cyphernode:
|
||||
- Bitcoin: Bitcoin Core node. Cyphernode uses a watching wallet for watchers (no funds) and a spending wallet for spending. Mandatory component, but optionally part of Cyphernode installation, as we can use an already running Bitcoin Core node.
|
||||
- Lightning: optional. C-Lightning node. The LN node will use the Bitcoin node for its tasks.
|
||||
- OTSclient: optional. Used to stamp hashes on the Bitcoin blockchain.
|
||||
- TOR: optional. Used to serve traefik as a HiddenService as well as Internet Gateway.
|
||||
- Tor: optional. Used to serve traefik as a HiddenService as well as Internet Gateway.
|
||||
|
||||
Future components:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user