https://youtu.be/k0afGCkuNfs?t=234
-----
# FIREWALL
ufw allow http
ufw allow https
ufw allow from 192.168.1.0/24 to any port 50002
# SSL
openssl req -x509 -newkey rsa:4096 -days 365 -keyout /etc/ssl/private/nginx.key -out /etc/ssl/private/nginx.crt -nodes -subj "/CN=localhost"
# NGINX CONFIGURATION FILE
user www-data;
worker_processes 1;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
stream {
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 4h;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
include /etc/nginx/streams-enabled/*.conf;
}
# ELECTRUM SERVER REVERSE-PROXY
upstream electrs {
server 127.0.0.1:50001;
}
server {
listen 50002 ssl;
proxy_pass electrs;
}
# CONNECT ELECTRUM WALLET TO ELECTRUM SERVER OVER TOR
./electrum-4.2.1-x86_64.AppImage --oneserver --server your_address.onion:50002:s --proxy socks5:127.0.0.1:9050
-----
bc1qny4am3clu0gcsq3hvja4vcdhwd529hgmnlavfh