Example for Electrum connection with tor active.

Example for Electrum connection with tor active.
This commit is contained in:
Stephan Oeste
2019-09-27 20:48:52 +02:00
committed by GitHub
parent 31bf48794a
commit f180472806

View File

@@ -105,16 +105,20 @@ echo ""
sudo apt-get install -y nginx sudo apt-get install -y nginx
sudo /etc/init.d/nginx start sudo /etc/init.d/nginx start
echo "" # Only generate if there is none. Or Electrum will not connect if the cert changed.
echo "***" if [ -f /etc/ssl/certs/localhost.crt ] ; then
echo "Create a self signed SSL certificate" echo "skiping self signed SSL certificate"
echo "***" else
echo "" echo ""
echo "***"
echo "Create a self signed SSL certificate"
echo "***"
echo ""
#https://www.humankode.com/ssl/create-a-selfsigned-certificate-for-nginx-in-5-minutes #https://www.humankode.com/ssl/create-a-selfsigned-certificate-for-nginx-in-5-minutes
#https://stackoverflow.com/questions/8075274/is-it-possible-making-openssl-skipping-the-country-common-name-prompts #https://stackoverflow.com/questions/8075274/is-it-possible-making-openssl-skipping-the-country-common-name-prompts
echo " echo "
[req] [req]
prompt = no prompt = no
default_bits = 2048 default_bits = 2048
@@ -143,11 +147,13 @@ DNS.1 = localhost
DNS.2 = 127.0.0.1 DNS.2 = 127.0.0.1
" | sudo tee /mnt/hdd/electrs/localhost.conf " | sudo tee /mnt/hdd/electrs/localhost.conf
cd /mnt/hdd/electrs cd /mnt/hdd/electrs
sudo openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -config localhost.conf sudo openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -config localhost.conf
sudo cp localhost.crt /etc/ssl/certs/localhost.crt sudo cp localhost.crt /etc/ssl/certs/localhost.crt
sudo cp localhost.key /etc/ssl/private/localhost.key sudo cp localhost.key /etc/ssl/private/localhost.key
fi
echo "" echo ""
echo "***" echo "***"
@@ -270,11 +276,15 @@ if [ "${runBehindTor}" = "on" ]; then
echo "***" echo "***"
echo "The Tor Hidden Service address for electrs is:" echo "The Tor Hidden Service address for electrs is:"
echo "$TOR_ADDRESS" echo "$TOR_ADDRESS"
echo "Electrum wallet: start with the options:"
echo "\`electrum --oneserver --server=$TOR_ADDRESS:50001:t --proxy socks5:127.0.0.1:9150
\'"
echo "***" echo "***"
echo "" echo ""
else
echo ""
echo "To connect from outside of the local network make sure the port 50002 is forwarded on the router"
echo "Electrum wallet: start with the options \`electrum --oneserver --server RaspiBlitz_IP:50002:s\`"
echo ""
fi fi
echo ""
echo "To connect from outside of the local network make sure the port 50002 is forwarded on the router"
echo "Electrum wallet: start with the options \`electrum --oneserver --server RaspiBlitz_IP:50002:s\`"
echo ""