<div dir="ltr">Tim, <div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px"><font color="#783f04">I'm not sure if Tor is looking for alternative transport protocols like QUIC.</font><br></span></blockquote><div><br></div><div>What if it's a lot faster than TCP on Tor? </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><font color="#783f04"><span style="font-size:12.8px"></span><span style="font-size:12.8px">One of the issues is that any modified client is easy to fingerprint.<br></span><span style="font-size:12.8px">So, as with IPv6, we'd need relays to run QUIC and TCP in parallel for some time, then clients could optionally use QUIC when there were enough relays supporting it. Perhaps relays could open a QUIC UDP port on the same port as their TCP ORPort, and then advertise support in their descriptors. But TCP would remain the default for the foreseeable future.</span><br style="font-size:12.8px"><span style="font-size:12.8px">For example, our IPv6 adoption is still at the stage where clients need to be explicitly configured to use it.<br></span><span style="font-size:12.8px">(And parts of it are only coming out in 0.2.8.)</span><br style="font-size:12.8px"></font><span style="font-size:12.8px"><font color="#783f04">If your modifications don't work like this, then it would be very hard for us to adopt them.</font><br></span></blockquote><div><br></div><div>It does work like this. Our testing version has "parallel codepath" and supports both QUIC and TCP. And we devised our QUIC API to look almost exactly like the traditional UNIX socket API. So, code change is almost minimal. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><font color="#783f04"><span style="font-size:12.8px"></span><span style="font-size:12.8px">Even if they did, I don't know if they solve any pressing issues for us. <br></span></font></blockquote><div><br></div><div>What about the head-of-line blocking issue and the congestion control issue <a href="https://svn.torproject.org/svn/projects/roadmaps/2009-03-11-performance.pdf">raised in 2009</a>? From <a href="https://eprint.iacr.org/2015/235.pdf">this paper</a>, it seems they haven't been completely solved. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><font color="#783f04"><span style="font-size:12.8px"></span><span style="font-size:12.8px">(And we'd need both a theoretical security analysis, and a code review. And new features come with new risks and new bugs.)</span></font></blockquote><div><br></div><div>Of course! We don't expect Tor to suddenly start using QUIC because of a couple of emails. But I believe we do have something to argue for QUIC based on both theories and experimental results. We would probably make a formal, published argument soon. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px"><font color="#783f04">I've given you credit for reporting this issue, please feel free to provide your preferred name (or decline) on the ticket.</font></span></blockquote><div>Thanks! </div><div><br></div><div><br></div><div><span style="font-size:12.8px">About the issue, I've checkout the 0.2.8 commit and tested on that. The problem is still there so I looked deeper into it. I've run it many time and it seems like once I start restricting path, it becomes undeterministic whether the bootstrap will succeed. And I think it might have something to do with the cache-microdesc-consensus file fetched by that client. Just for recap, I'm running a network with 11 nodes (2 relays) and 2 clients who have path restriction. My observations are: </span></div><div><ul><li><span style="font-size:12.8px">Each client will have a </span><span style="font-size:12.8px">cache-microdesc-consensus file with 4 relays in it. relay 0, 1 and 2 will always be there and the last one changes each time I start the network. </span></li><li><span style="font-size:12.8px">When the all 3 nodes on the restricted path are on the </span><span style="font-size:12.8px">cache-microdesc-consensus file, the bootstrap will succeed quickly. For example, if my path is restricted to R2->R3->R1, since 0, 1 and 2 are always present in the consensus, whenever R3 is there, the bootstrap will work. </span></li><li><span style="font-size:12.8px">When one of the node is not on the consensus, the bootstrap will be stuck and never reach 100%. Depending on which node of the path is not included in the consensus, the error message varies. In the above example, if R3 is not in the consensus, we will fail to connect to hop 1 (assume 0-based logging). </span></li><li><span style="font-size:12.8px">I waited for a long time (~30min) and nothing would improve: consensus does not contain more nodes and bootstrap would still be stuck. </span></li></ul></div><div><span style="font-size:12.8px">I think the root of the problem might be the consensus having too few nodes.. </span><span style="font-size:12.8px">Is it normal for a </span><span style="font-size:12.8px">cache-microdesc-consensus file to only have 4 nodes in a 11-node network? Should I look into how the code that generate the consensus? </span></div><div><br></div><div><br></div><div>The routerlist_t I mentioned is in routerlist.c, line 124.</div><div><pre style="border:0px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><a class="" name="124" href="http://192.168.1.14:8080/source/xref/tor/src/or/routerlist.c#124" style="text-decoration:none;color:rgb(102,102,102);display:inline-block;width:6ex;text-align:right;padding-right:0px;margin-right:0.5ex;background-color:rgb(221,221,221)">124</a><span class="" style="color:rgb(102,102,102)">/** Global list of all of the routers that we know about. */</span>
<a class="" name="125" href="http://192.168.1.14:8080/source/xref/tor/src/or/routerlist.c#125" style="text-decoration:none;color:rgb(102,102,102);display:inline-block;width:6ex;text-align:right;padding-right:0px;margin-right:0.5ex;background-color:rgb(221,221,221)">125</a><b>static</b> <a href="http://192.168.1.14:8080/source/s?defs=routerlist_t&project=tor" style="text-decoration:none;color:rgb(32,32,98)">routerlist_t</a> *<a class="" name="routerlist" style="color:rgb(204,51,0);font-weight:bold"></a><a href="http://192.168.1.14:8080/source/s?refs=routerlist&project=tor" class="" style="text-decoration:none;color:rgb(204,51,0);font-weight:bold">routerlist</a> = <a href="http://192.168.1.14:8080/source/s?defs=NULL&project=tor" style="text-decoration:none;color:rgb(32,32,98)">NULL</a>;</pre></div><div><br></div><div>But now I think this probably just stores the same info as the <span style="font-size:12.8px">cache-microdesc-consensus file, right? </span></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px"><font color="#783f04">Hmm, then it's likely a configuration issue with your network.</font></span></blockquote><div><br></div><div>Shouldn't chutney also fail if it is a configuration issue? Or are you saying it's a configuration issue with my underlying network topology?</div><div>The only thing different in the torrc files for the chutney run and the Emulab run is "Sandbox 1" and "RunAsDaemon 1" but I don't think they cause any issue? </div><div><br></div><div>Thanks!</div><div>Li. </div><div> </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 6, 2016 at 6:18 PM, Tim Wilson-Brown - teor <span dir="ltr"><<a href="mailto:teor2345@gmail.com" target="_blank">teor2345@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 7 May 2016, at 05:10, Xiaofan Li <<a href="mailto:xli2@andrew.cmu.edu">xli2@andrew.cmu.edu</a>> wrote:<br>
><br>
> Thanks for the replies!<br>
><br>
> 1. About the name:<br>
> Thanks for the headsup! We'll definitely pay attention to the trademark rules when we publish our results. We are not planning to roll out our own version of Tor. I think our most important goal is probably: demonstrate a possibility of UDP-based protocol to solve some of TOR's hard performance problems. And hope that you guys would consider using it in future versions.<br>
> This leads me to a question about licensing: I believe TOR and QUIC have different (conflicting) licenses. Would it even be a possibility that QUIC ever makes it into TOR?<br>
<br>
</span>I am not a lawyer or a software architect for Tor, so these are simply my opinions:<br>
<br>
Here is the tor license:<br>
<a href="https://gitweb.torproject.org/tor.git/tree/LICENSE" rel="noreferrer" target="_blank">https://gitweb.torproject.org/tor.git/tree/LICENSE</a><br>
<br>
Is QUIC under the Chromium license? I couldn't find a QUIC-specific one.<br>
<a href="https://chromium.googlesource.com/chromium/src/+/master/LICENSE" rel="noreferrer" target="_blank">https://chromium.googlesource.com/chromium/src/+/master/LICENSE</a><br>
<br>
If so, the licenses look compatible to me, they're both BSD-style, and are almost identical.<br>
<br>
What restrictions concern you?<br>
<br>
On the architecture side:<br>
<br>
I'm not sure if Tor is looking for alternative transport protocols like QUIC.<br>
One of the issues is that any modified client is easy to fingerprint.<br>
So, as with IPv6, we'd need relays to run QUIC and TCP in parallel for some time, then clients could optionally use QUIC when there were enough relays supporting it. Perhaps relays could open a QUIC UDP port on the same port as their TCP ORPort, and then advertise support in their descriptors. But TCP would remain the default for the foreseeable future.<br>
<br>
For example, our IPv6 adoption is still at the stage where clients need to be explicitly configured to use it.<br>
(And parts of it are only coming out in 0.2.8.)<br>
<br>
If your modifications don't work like this, then it would be very hard for us to adopt them.<br>
Even if they did, I don't know if they solve any pressing issues for us.<br>
(And we'd need both a theoretical security analysis, and a code review. And new features come with new risks and new bugs.)<br>
<br>
> ...<br>
<span class="">> I also wonder why you need to use path restrictions at all.<br>
> 3. For path restriction, we have our own implementation. We parse the config file and use the nickname in choose_good_*() functions to return the corresponding nodes. We have to use this because restricting the middle node is very important to us for testing HOL blocking problem. (We have to manually create 1-hop overlapping path for two clients and test the interference.)<br>
><br>
> 4. Regarding the issue, it's probably not entry guard problem, because: 1) Shouldn't that give "failed to select hop 0" instead of hop 1?<br>
<br>
</span>Yes, you're right, in that message, hop counts are 0-based.<br>
<br>
But the code is inconsistent in onion_extend_cpath:<br>
<br>
  if (!info) {<br>
    log_warn(LD_CIRC,"Failed to find node for hop %d of our path. Discarding "<br>
             "this circuit.", cur_len);<br>
    return -1;<br>
  }<br>
<br>
  log_debug(LD_CIRC,"Chose router %s for hop %d (exit is %s)",<br>
            extend_info_describe(info),<br>
            cur_len+1, build_state_get_exit_nickname(state));<br>
<br>
The control spec says hops are 1-based, so we should fix the logging.<br>
<br>
See:<br>
<a href="https://trac.torproject.org/projects/tor/ticket/18982" rel="noreferrer" target="_blank">https://trac.torproject.org/projects/tor/ticket/18982</a><br>
<br>
I've given you credit for reporting this issue, please feel free to provide your preferred name (or decline) on the ticket.<br>
<span class=""><br>
> 2) I can see in our debugging log that we failed on the extending info with the second node. The node returned by choose_good_middle_server is not NULL but the routerinfo_t pointer is NULL. Any idea why?<br>
<br>
</span>Perhaps you looked it up the wrong way, or it's not in the consensus.<br>
What code are you using to look up the node?<br>
<br>
Are you using extend_info_from_node()?<br>
If not, please note that different fields are present depending on whether you use descriptors (ri) or microdescriptors (md).<br>
<span class=""><br>
> My guess is that consensus is a little short for some reasons, how do I validate this guess?<br>
<br>
</span>Read the plain-text cached-{microdesc-}consensus file in the tor client's data directory and check if the middle node is in it.<br>
Read the plain-text cached-{descriptors,microdescs} file in the tor client's data directory and check if the middle node is in it.<br>
<span class=""><br>
> Does the global router list contain everything on the consensus?<br>
<br>
</span>I'm not sure exactly what you're referring to here, please provide a function or global variable name for this list.<br>
<span class=""><br>
> 5. More observation on this issue:<br>
> For both tor and our tor, when I decrease the size of the network (i.e. number of relays in the network), the hanging issue resolves itself..<br>
<br>
</span>Hmm, then it's likely a configuration issue with your network.<br>
<span class=""><br>
> I'll try rebase back to an official release today.<br>
<br>
</span>That might help, we are still fixing bugs in 0.2.8.<br>
<div class="HOEnZb"><div class="h5"><br>
Tim<br>
<br>
Tim Wilson-Brown (teor)<br>
<br>
teor2345 at gmail dot com<br>
PGP 968F094B<br>
ricochet:ekmygaiu4rzgsk6n<br>
<br>
<br>
<br>
</div></div><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" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
<br></blockquote></div><br></div>