From ce29465eb1dc96eba3c8109951fe271d05979ad4 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Mon, 31 Oct 2016 03:04:54 -0700 Subject: [PATCH] Litecoin: Adjust port strings --- contrib/debian/examples/bitcoin.conf | 6 +++--- contrib/linearize/example-linearize.cfg | 4 ++-- contrib/linearize/linearize-hashes.py | 2 +- contrib/qos/README.md | 2 +- contrib/qos/tc.sh | 6 +++--- contrib/rpm/bitcoin.spec | 16 ++++++++-------- contrib/seeds/generate-seeds.py | 4 ++-- contrib/spendfrom/spendfrom.py | 2 +- doc/REST-interface.md | 4 ++-- doc/developer-notes.md | 4 ++-- doc/tor.md | 8 ++++---- qa/rpc-tests/proxy_test.py | 8 ++++---- qa/rpc-tests/rawtransactions.py | 2 +- src/rpc/net.cpp | 8 ++++---- src/rpc/server.cpp | 2 +- 15 files changed, 39 insertions(+), 39 deletions(-) diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf index 2831c0729..d3a0468df 100644 --- a/contrib/debian/examples/bitcoin.conf +++ b/contrib/debian/examples/bitcoin.conf @@ -44,11 +44,11 @@ # Use as many addnode= settings as you like to connect to specific peers #addnode=69.164.218.197 -#addnode=10.0.0.2:8333 +#addnode=10.0.0.2:9333 # Alternatively use as many connect= settings as you like to connect ONLY to specific peers #connect=69.164.218.197 -#connect=10.0.0.1:8333 +#connect=10.0.0.1:9333 # Listening mode, enabled by default except when 'connect' is being used #listen=1 @@ -89,7 +89,7 @@ #rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96 # Listen for RPC connections on this TCP port: -#rpcport=8332 +#rpcport=9332 # You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind # running on another host using this option: diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg index 38da02e66..3e0a341dc 100644 --- a/contrib/linearize/example-linearize.cfg +++ b/contrib/linearize/example-linearize.cfg @@ -3,8 +3,8 @@ rpcuser=someuser rpcpassword=somepassword host=127.0.0.1 -port=8332 -#port=18332 +port=9332 +#port=19332 # bootstrap.dat hashlist settings (linearize-hashes) max_height=313000 diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py index 854cf1f9e..4b6ff6818 100755 --- a/contrib/linearize/linearize-hashes.py +++ b/contrib/linearize/linearize-hashes.py @@ -96,7 +96,7 @@ if __name__ == '__main__': if 'host' not in settings: settings['host'] = '127.0.0.1' if 'port' not in settings: - settings['port'] = 8332 + settings['port'] = 9332 if 'min_height' not in settings: settings['min_height'] = 0 if 'max_height' not in settings: diff --git a/contrib/qos/README.md b/contrib/qos/README.md index 5e0a975fc..8c958d236 100644 --- a/contrib/qos/README.md +++ b/contrib/qos/README.md @@ -1,5 +1,5 @@ ### Qos ### -This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 8333, but not if the destination IP is within a LAN (defined as 192.168.x.x). +This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 9333, but not if the destination IP is within a LAN (defined as 192.168.x.x). This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it. diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh index aaf5e1fa1..4eb54c663 100644 --- a/contrib/qos/tc.sh +++ b/contrib/qos/tc.sh @@ -36,10 +36,10 @@ tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11 # ret=$? #done -#limit outgoing traffic to and from port 8333. but not when dealing with a host on the local network +#limit outgoing traffic to and from port 9333. but not when dealing with a host on the local network # (defined by $LOCALNET) # --set-mark marks packages matching these criteria with the number "2" # these packages are filtered by the tc filter with "handle 2" # this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT} -iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2 -iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2 +iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 9333 ! -d ${LOCALNET} -j MARK --set-mark 0x2 +iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 9333 ! -d ${LOCALNET} -j MARK --set-mark 0x2 diff --git a/contrib/rpm/bitcoin.spec b/contrib/rpm/bitcoin.spec index 38ae03818..e40355e60 100644 --- a/contrib/rpm/bitcoin.spec +++ b/contrib/rpm/bitcoin.spec @@ -336,10 +336,10 @@ if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then for selinuxvariant in %{selinux_variants}; do %{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/bitcoin.pp &> /dev/null || : done -%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 8332 -%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 8333 -%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18332 -%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18333 +%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 9332 +%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 9333 +%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 19332 +%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 19333 %{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || : %{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin || : fi @@ -355,10 +355,10 @@ fi # SELinux if [ $1 -eq 0 ]; then if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then - %{_sbindir}/semanage port -d -p tcp 8332 - %{_sbindir}/semanage port -d -p tcp 8333 - %{_sbindir}/semanage port -d -p tcp 18332 - %{_sbindir}/semanage port -d -p tcp 18333 + %{_sbindir}/semanage port -d -p tcp 9332 + %{_sbindir}/semanage port -d -p tcp 9333 + %{_sbindir}/semanage port -d -p tcp 19332 + %{_sbindir}/semanage port -d -p tcp 19333 for selinuxvariant in %{selinux_variants}; do %{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin &> /dev/null || : done diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py index a3d035218..268947610 100755 --- a/contrib/seeds/generate-seeds.py +++ b/contrib/seeds/generate-seeds.py @@ -127,10 +127,10 @@ def main(): g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n') g.write(' */\n') with open(os.path.join(indir,'nodes_main.txt'),'r') as f: - process_nodes(g, f, 'pnSeed6_main', 8333) + process_nodes(g, f, 'pnSeed6_main', 9333) g.write('\n') with open(os.path.join(indir,'nodes_test.txt'),'r') as f: - process_nodes(g, f, 'pnSeed6_test', 18333) + process_nodes(g, f, 'pnSeed6_test', 19333) g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n') if __name__ == '__main__': diff --git a/contrib/spendfrom/spendfrom.py b/contrib/spendfrom/spendfrom.py index 086b91b26..8c248a3f9 100755 --- a/contrib/spendfrom/spendfrom.py +++ b/contrib/spendfrom/spendfrom.py @@ -70,7 +70,7 @@ def connect_JSON(config): testnet = config.get('testnet', '0') testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False if not 'rpcport' in config: - config['rpcport'] = 18332 if testnet else 8332 + config['rpcport'] = 19332 if testnet else 9332 connect = "http://%s:%s@127.0.0.1:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport']) try: result = ServiceProxy(connect) diff --git a/doc/REST-interface.md b/doc/REST-interface.md index bf669235e..06f49c1ab 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -53,7 +53,7 @@ https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki Example: ``` -$ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp +$ curl localhost:19332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp { "chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb", "chainHeight" : 325347, @@ -93,4 +93,4 @@ Only supports JSON as output format. Risks ------------- -Running a web browser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `