Purpose: share a synced full node among students learning bitcoind capabilities and bitcoin-cli RPC usage, without requiring students to sync the node themselves.
pip install -r requirements.txt
There is a bitcoin.conf included in this repo with RPC ports and password which the local proxy will connect to. The proxy's external ports match the default for Bitcoin Core networks, making it simpler to access remotely with bitcoin-cli.
Networks supported: main
, testnet
, signet
, regtest
bitcoind -conf=/path/to/repo/rpc-auth-proxy/etc/bitcoin.conf
-signet
, etc for different networkpython src/server.py main
main
with signet
, etc.There is an included utility for adding users. Hashed passwords are saved by
default in a JSON file at ~/.rpc-auth-proxy-passwords.json
. Provide a password
with -p
or the script will generate one for you:
~/rpc-auth-proxy$ python src/users.py newuser1
Password for newuser1: lYDk7mbTiN60
~/rpc-auth-proxy$ python src/users.py newuser2 -p hunter2
Password for newuser2: hunter2
Users must have bitcoin-cli
installed locally but they do not need to run their
own node. They provide their unique credentials with each RPC as well as the
IP address (or hostname) of the server.
Example:
$ bitcoin-cli -rpcconnect=34.172.95.104 -rpcuser=newuser1 -rpcpassword=lYDk7mbTiN60 getblockcount
817037
This is NOT a secure system and should be used for educational purposes only.
rpcpassword
is sent over the internet unencryptedinvalidateblock
and stop
are disallowed to prevent users from disrupting the service
scantxoutset