Return-Path: Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 641A5C002D for ; 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 ; 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 ; 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 ; 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 ; 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: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddtfedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkfffhvffutgesthdtredtreertdenucfhrhhomhepfdetnhhtohhn ucfuhhgvvhgthhgvnhhkohdfuceorghnthhonhesshgrnhgtohguvghrrdgtohhmqeenuc ggtffrrghtthgvrhhnpedufeduuefftedvgffhvdekfffhtdeiuefhleehkeetfffgjeff tefhtdeiudeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrnhhtohhnsehsrghntghouggvrhdrtghomh X-ME-Proxy: 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" To: "Bitcoin Devs" 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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