Anton Shevchenko [ARCHIVE] on Nostr: 📅 Original date posted:2022-07-23 📝 Original message:Hello, Got unexpected ...
📅 Original date posted:2022-07-23
📝 Original message:Hello,
Got unexpected behavior when trying to run bitcoind with -proxy setting.
-proxy is used to connect to SOCKS5 proxy which is able to access some internal network.
bitcoind is started with -noconnect option and network activity is absent (as it should be).
Then I command bitcoin-cli to connect to node with address 10.x.y.z with the command
bitcoin-cli addnode 10.x.y.z add
Expected behavior is for bitcoind to initiate connection through proxy.
Actual behavior is bitcoind trying to connect without using proxy.
In the code:
CConnman::ConnectNode calls GetProxy and GetProxy returns false because CNetAddr::GetNetwork returns NET_UNROUTABLE.
My take is this is unexpected behavior at minimum and should be documented.
Better way is to introduce another option just for the unroutable addresses:
- connect locally (for compatibility reasons, default);
- connect thru proxy;
- don't connect to unroutable addresses.
-- Anton Shevchenko
Published at
2023-06-07 23:12:07Event JSON
{
"id": "efd94be962bfd31b75deca9dd8dfad134dc846cc0d884e1e6c8cd0bd46870c8c",
"pubkey": "845fcd294cd02e515ce70ee633f6eca61a6bea1fe447705e9e60a0381ee7066e",
"created_at": 1686179527,
"kind": 1,
"tags": [
[
"e",
"e88f7b2748c53d42d6fa18a727fadd1ae7b8086e4f0576be824c18f37efca039",
"",
"reply"
],
[
"p",
"a23dbf6c6cc83e14cc3df4e56cc71845f611908084cfe620e83e40c06ccdd3d0"
]
],
"content": "📅 Original date posted:2022-07-23\n📝 Original message:Hello,\n\nGot unexpected behavior when trying to run bitcoind with -proxy setting.\n-proxy is used to connect to SOCKS5 proxy which is able to access some internal network.\nbitcoind is started with -noconnect option and network activity is absent (as it should be).\n\nThen I command bitcoin-cli to connect to node with address 10.x.y.z with the command\nbitcoin-cli addnode 10.x.y.z add\n\nExpected behavior is for bitcoind to initiate connection through proxy.\nActual behavior is bitcoind trying to connect without using proxy.\n\nIn the code:\nCConnman::ConnectNode calls GetProxy and GetProxy returns false because CNetAddr::GetNetwork returns NET_UNROUTABLE.\n\nMy take is this is unexpected behavior at minimum and should be documented.\nBetter way is to introduce another option just for the unroutable addresses:\n- connect locally (for compatibility reasons, default);\n- connect thru proxy;\n- don't connect to unroutable addresses.\n\n\n-- Anton Shevchenko",
"sig": "f3132f062d0c581306b7ec731bec8630e833ae189b662c47d32435816b836517646ebbff656cace5ba767a9ac8a11b8d14867c7018eba8b776fccd48b6b995b7"
}