Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_proxy.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | # Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test bitcoind with different proxy configuration. | |||||
''' | |||||
Test plan: | Test plan: | ||||
- Start bitcoind's with different proxy configurations | - Start bitcoind's with different proxy configurations | ||||
- Use addnode to initiate connections | - Use addnode to initiate connections | ||||
- Verify that proxies are connected to, and the right connection command is given | - Verify that proxies are connected to, and the right connection command is given | ||||
- Proxy configurations to test on bitcoind side: | - Proxy configurations to test on bitcoind side: | ||||
- `-proxy` (proxy everything) | - `-proxy` (proxy everything) | ||||
- `-onion` (proxy just onions) | - `-onion` (proxy just onions) | ||||
- `-proxyrandomize` Circuit randomization | - `-proxyrandomize` Circuit randomization | ||||
- Proxy configurations to test on proxy side, | - Proxy configurations to test on proxy side, | ||||
- support no authentication (other proxy) | - support no authentication (other proxy) | ||||
- support no authentication + user/pass authentication (Tor) | - support no authentication + user/pass authentication (Tor) | ||||
- proxy on IPv6 | - proxy on IPv6 | ||||
- Create various proxies (as threads) | - Create various proxies (as threads) | ||||
- Create bitcoinds that connect to them | - Create bitcoinds that connect to them | ||||
- Manipulate the bitcoinds using addnode (onetry) an observe effects | - Manipulate the bitcoinds using addnode (onetry) an observe effects | ||||
addnode connect to IPv4 | addnode connect to IPv4 | ||||
addnode connect to IPv6 | addnode connect to IPv6 | ||||
addnode connect to onion | addnode connect to onion | ||||
addnode connect to generic DNS name | addnode connect to generic DNS name | ||||
''' | """ | ||||
import os | import os | ||||
import socket | import socket | ||||
from test_framework.netutil import test_ipv6_local | from test_framework.netutil import test_ipv6_local | ||||
from test_framework.socks5 import ( | from test_framework.socks5 import ( | ||||
AddressType, | AddressType, | ||||
Socks5Command, | Socks5Command, | ||||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |