Initial commit: Electrum Telegram wallet bot with Tor support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
goyban
2026-04-26 16:44:21 +00:00
commit e6f86843df
14 changed files with 1653 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
mkdir -p /root/.electrum/wallets
echo "Starting Tor..."
tor --RunAsDaemon 1 --SocksPort 9050 --DataDirectory /var/lib/tor
echo "Waiting for Tor SOCKS proxy on 127.0.0.1:9050..."
until echo > /dev/tcp/127.0.0.1/9050 2>/dev/null; do
sleep 1
done
echo "Tor is ready."
echo "Starting Electrum daemon..."
rm -f /root/.electrum/daemon
PROXY="socks5:localhost:9050"
if [ -n "${ELECTRUM_SERVER:-}" ]; then
# Pin to a single user-specified server (own node)
electrum -1 -s "${ELECTRUM_SERVER}" -p "${PROXY}" daemon -d
else
# Route through Tor using a public .onion server
electrum -s "${ELECTRUM_ONION_SERVER:-electrums3lojbuj.onion:50001:t}" -p "${PROXY}" daemon -d
fi
echo "Electrum daemon started. Launching bot..."
exec /opt/electrum/bin/python3 /app/bot.py