summaryrefslogtreecommitdiff
path: root/fb/05ff267853cd5f7cfbc0a59041fb48fdc5a046
blob: bc6a9ed02ad0d0354194fc11a1bfe2c1a28d5977 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Return-Path: <anton@sancoder.com>
Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 641A5C002D
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 23 Jul 2022 05:09:19 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp3.osuosl.org (Postfix) with ESMTP id 2EBBE60BAF
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 23 Jul 2022 05:09:19 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2EBBE60BAF
Authentication-Results: smtp3.osuosl.org;
 dkim=pass (2048-bit key, unprotected) header.d=sancoder.com
 header.i=@sancoder.com header.a=rsa-sha256 header.s=fm3 header.b=JIVZc5Bs; 
 dkim=pass (2048-bit key,
 unprotected) header.d=messagingengine.com header.i=@messagingengine.com
 header.a=rsa-sha256 header.s=fm3 header.b=DS2CX236
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -2.8
X-Spam-Level: 
X-Spam-Status: No, score=-2.8 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001]
 autolearn=ham autolearn_force=no
Received: from smtp3.osuosl.org ([127.0.0.1])
 by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id SfUGGFzjbW4e
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 23 Jul 2022 05:09:18 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.8.0
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 372FA60ECE
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26])
 by smtp3.osuosl.org (Postfix) with ESMTPS id 372FA60ECE
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 23 Jul 2022 05:09:18 +0000 (UTC)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id 615AC5C0125
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 23 Jul 2022 01:09:16 -0400 (EDT)
Received: from imap46 ([10.202.2.96])
 by compute2.internal (MEProxy); Sat, 23 Jul 2022 01:09:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sancoder.com; h=
 cc:content-type:date:date:from:from:in-reply-to:message-id
 :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=
 1658552956; x=1658639356; bh=j5n97ja7AIZHMD4WqxI8wjvCFQF6owlA9jW
 cj6E0wcE=; b=JIVZc5BsQkozVgk7f3r9XKm7eB3qOBOmZBWO3z6+WA4qDemGv5X
 5Iq5a0DyodJqhN1c5SZRSA6Q95k9IX9F/zl5+lGuNX09dcT2aUvI0fkr54JRhaa0
 roROemvl1jWTiWMCnQWDrwt0VeNg5XZqN8WFpMXOpxBzdbR1ZADRepmvqcWwG/+2
 qlVcAy/LSekXiCuwy36w+g1H//JHYsW0Q5it/525/nP3as6dlrjI4QWgy6n+QbrB
 A/oVR/4qIlZYYJhBHg5l9mgB7ZlQVY4ashth5XQpQgHpo948fP6Fl2EF6vjNTfNG
 t0b1eXlYHLlobz1oJyPDxTL0czCH0Kda/Pg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:date:feedback-id
 :feedback-id:from:from:in-reply-to:message-id:mime-version
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1658552956; x=
 1658639356; bh=j5n97ja7AIZHMD4WqxI8wjvCFQF6owlA9jWcj6E0wcE=; b=D
 S2CX2368SPBig+M2pq/FphZZ3tIB7Krrmmseup/E0fR3W1CIRxwtxVuaVcEe60LL
 M2j1zV4XBcwH27aPS5A/5dOmXOzodCFLEvO1fS5Jo67XPpCgSQ4r2pn4LOw2+z6s
 LxqZlHs2jUkpiKOQ7SBbq8T8WeE6G8wTpZ+gbjohjarwc5zjQYJuA4GO5IXPkOsx
 d73WYGKVacAFBXq0pBRCIxUL4LBHC/kXbPlit4Y3QsMFktsoTAiKBNRqifX26C51
 yLtz82M8PlAQNFGnByvD0ozFZwATadOGBoxye+8cpzzqaOxN1ZdfWny8C7MmoAaZ
 bqQ4s/Eu9huQrWW7TYIcw==
X-ME-Sender: <xms:fILbYmc_8ZNytSTNDoFdmBFLlQ1dWNJ9f7JBypVRERs7_GNkS4oBfA>
 <xme:fILbYgOlmMnk8yu2p9Ss7uxDVusTc7D3YR7lOnPdVh9CcM4QbpYiMgT-OMVD_SoJ7
 GnZPCOn0m33Tl6U>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddtfedgleehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepofgfggfkfffhvffutgesthdtredtreertdenucfhrhhomhepfdetnhhtohhn
 ucfuhhgvvhgthhgvnhhkohdfuceorghnthhonhesshgrnhgtohguvghrrdgtohhmqeenuc
 ggtffrrghtthgvrhhnpedufeduuefftedvgffhvdekfffhtdeiuefhleehkeetfffgjeff
 tefhtdeiudeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpegrnhhtohhnsehsrghntghouggvrhdrtghomh
X-ME-Proxy: <xmx:fILbYnhMY6qI8cEJUQQhok6NGSsEJemX8IiXDhaifMJ1yNQjhp-WGA>
 <xmx:fILbYj_LfpaT0YvUAb-4yJludWmpAXimE_adVqStdGnOgFhhcWlvBw>
 <xmx:fILbYivo7jqjJaFNXnD-7V5JH1JwFqNp7R6xykUfaR5txkBV4O0RJQ>
 <xmx:fILbYg6QrZdm6TqQJ1fezS5Z0V6CZ-u4rsB_O3ifCJLbxet1xuBSBw>
Feedback-ID: i4779463d:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501)
 id 299FC2A20075; Sat, 23 Jul 2022 01:09:16 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.7.0-alpha0-757-gc3ad9c75d3-fm-20220722.001-gc3ad9c75
Mime-Version: 1.0
Message-Id: <3d864872-bc5c-40b0-9eab-2b38add2aa55@www.fastmail.com>
Date: Fri, 22 Jul 2022 22:08:55 -0700
From: "Anton Shevchenko" <anton@sancoder.com>
To: "Bitcoin Devs" <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: text/plain
X-Mailman-Approved-At: Sat, 23 Jul 2022 08:40:31 +0000
Subject: [bitcoin-dev] bitcoind -proxy=host:port doesn't work for unroutable
	network
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Sat, 23 Jul 2022 05:09:19 -0000

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