<p></p>
<p>DnsLookupTor.java is doing the same SOCKS5 network query as <code>tor-resolve</code>.  Namely a CMD_RESOLVE:</p>
<pre><code>buf[0] = b('\u0005');             // version SOCKS5
buf[1] = b('\u00f0');             // CMD_RESOLVE
buf[2] = b('\u0000');             // reserved 
buf[3] = b('\u0003');             // SOCKS5_ATYPE_HOSTNAME
[...]
proxySocket.getOutputStream().write(buf);
</code></pre>
<p><a href="https://tor.stackexchange.com/questions/7212/how-do-i-resolve-dns-using-tor" rel="nofollow">Unfortunately:</a></p>
<blockquote>
<p>Only drawback so far: You can't specify the query type (e.g. A, NS, MX, etc.) and also IPv6-only hosts (those with only AAAA records) can't (yet) be resolved at all and cause such a message: [warn] Got SOCKS5 status response '4': host is unreachable</p>
</blockquote>
<p>What we would need is the tor DNS equivalent of</p>
<pre><code>nslookup -q=AAAA node100.wiz.network
node100.wiz.network     has AAAA address 2401:b140::42:100
</code></pre>
<p>But we get this</p>
<pre><code>tor-resolve node100.wiz.network
103.99.168.100
</code></pre>
<p>From reading tor-resolve <a href="https://gitweb.torproject.org/tor.git/tree/src/tools/tor-resolve.c" rel="nofollow">code</a>, there's no parameter that can be written to the DNS socket telling it that we want IPv6 result rather than IPv4.</p>
<p>I'm open to suggestions.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4045#issuecomment-599713287">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXSWUNQ2HLTW3BE2TTRHZ2ZFANCNFSM4LFNBOFA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNW43PAKSX7DSFJKF7DRHZ2ZFA5CNFSM4LFNBOFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEO7OMBY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4045#issuecomment-599713287",
"url": "https://github.com/bisq-network/bisq/pull/4045#issuecomment-599713287",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>