<p dir="ltr">The request to the dirport definitely has to come via tor not via a simple request to the dirport over the net.</p>
<p dir="ltr">Have a look in the HiddenService class here for an example:</p>
<p dir="ltr"><a href="https://github.com/drgowen/tor-research-framework/blob/master/src/main/java/tor/HiddenService.java">https://github.com/drgowen/tor-research-framework/blob/master/src/main/java/tor/HiddenService.java</a></p>

<p dir="ltr">Its fairly easy to use this function if you just want to fetch the descriptor for an arbitrary HS.  Have a look at the repository hidden service example. You just need a valid TorSocket and then you can call HiddenService.fetchHSDescriptor () to get it as a string.</p>

<p dir="ltr">Best<br>
Gareth</p>
<div class="gmail_quote">On 19 Jul 2014 10:26, "grarpamp" <<a href="mailto:grarpamp@gmail.com">grarpamp@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, Jul 18, 2014 at 6:35 PM, Achref Akremi <<a href="mailto:ach.n30@gmail.com">ach.n30@gmail.com</a>> wrote:<br>
> onion adress: 3g2upl4pq6kufc4m.onion<br>
> date: 18 Jul 2014 22:27:20 GMT<br>
><br>
> 1st: compute the v2 descriptor id:<br>
>  > with replicas 0: efa0506e1e5d3f193bf6509e1f4709e6e2322436<br>
>  > with replicas 1: efa0506e1e5d3f193bf6509e1f4709e6e2322436<br>
> 2nd: find responsible HSdir's:<br>
>  > efa0506e1e5d3f193bf6509e1f4709e6e2322436<br>
>   > pmocek<br>
>   > marcuse1<br>
>   > riptide<br>
>  > fc2c757e88910b3d72594706c477e21f60334a15<br>
>   > torpidsCZwedos<br>
>   > gracefoster<br>
>   > halingrad<br>
> 3rd: request:<br>
>  > http:// HSdir[IP] : HSdir[DirPort] /tor/rendezvous2/ Desc-ID<br>
>     ^^^^ here i got a 404 response >.<<br>
><br>
> sorry ... if i'm doing something wrong ... if i do tell me :p<br>
<br>
I'm not sure that looks like a v2-desc-id, run in debug mode to see.<br>
Result may not come unless query dirport from inside over tor<br>
instead of clearnet. There was some change to that years ago<br>
I think. Check...<br>
<a href="https://gitweb.torproject.org/torspec.git/blob/HEAD:/rend-spec.txt" target="_blank">https://gitweb.torproject.org/torspec.git/blob/HEAD:/rend-spec.txt</a><br>
<br>
You may also read or contribute to this which has been open<br>
for a long time...<br>
<a href="https://trac.torproject.org/projects/tor/ticket/3521" target="_blank">https://trac.torproject.org/projects/tor/ticket/3521</a><br>
<br>
<a href="https://trac.torproject.org/projects/tor/ticket/8891" target="_blank">https://trac.torproject.org/projects/tor/ticket/8891</a><br>
<a href="https://trac.torproject.org/projects/tor/ticket/8510" target="_blank">https://trac.torproject.org/projects/tor/ticket/8510</a><br>
_______________________________________________<br>
tor-dev mailing list<br>
<a href="mailto:tor-dev@lists.torproject.org">tor-dev@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
</blockquote></div>