Commit Graph

141 Commits

Author SHA1 Message Date
Roger Dingledine
27126e5007 oaep uses 42 more bytes -- stop clobbering buffers
also maybe fix some constants here and there -- nick?


svn:r1484
2004-04-05 18:22:00 +00:00
Roger Dingledine
92bb5b2860 strdup the intro point when you pick it, so you
don't free it and then return it


svn:r1483
2004-04-05 17:56:34 +00:00
Roger Dingledine
ac84512489 complain early if we get an unrecognized nickname from
bob's rend service descriptor


svn:r1482
2004-04-05 17:51:00 +00:00
Roger Dingledine
cebf16eaf0 if a rend stream has already been attached to a rend circ,
then don't attach it again (and again, and again, and...)


svn:r1477
2004-04-05 15:24:03 +00:00
Roger Dingledine
5b6099e8a2 more alice-side infrastructure
handle rendezvous acks,
do rend begin cells right,
send an introduction cell (sort of)
receive a rendezvous2 cell (sort of)


svn:r1475
2004-04-05 07:41:31 +00:00
Roger Dingledine
7793078dff alice can now look up bob's service descriptor,
choose an intro point, connect to it,
choose a rend point, connect to it and establish a cookie,
get an ack from the rendezvous point,
and know when both circs are ready for her.

APConns don't use conn->purpose anymore

don't initiate a renddesc lookup if one is already in progress

also fix a buffer overflow in nickname parsing (only exploitable
by the operator though)


svn:r1471
2004-04-05 00:47:48 +00:00
Nick Mathewson
a9813f0210 Implement acks
svn:r1470
2004-04-03 04:55:22 +00:00
Nick Mathewson
d93ff0b82f Handle rendezvous relay cells
svn:r1464
2004-04-03 03:37:11 +00:00
Nick Mathewson
ba196a9d17 Use (set|get)_uint(16|32) in lieu of memcpy where reasonable.
svn:r1462
2004-04-03 03:07:25 +00:00
Roger Dingledine
8a1ad2b84e more progress on alice's side
svn:r1461
2004-04-03 03:06:06 +00:00
Roger Dingledine
8c19d6e3d7 alice can intercept y.onion requests, do a lookup on them via tor,
and receive a 404


svn:r1455
2004-04-03 01:59:53 +00:00
Roger Dingledine
bbc9484957 fix some bugs; more remain
svn:r1450
2004-04-03 00:55:53 +00:00
Roger Dingledine
2202c2c7ec AP conns use conn->rend_query now too
expose connection_ap_handshake_attach_circuit()


svn:r1448
2004-04-02 23:54:48 +00:00
Roger Dingledine
a8d805e292 break out circ->rend_service
(this breaks the compile; must fix things)

let alice react when she learns a new rendezvous descriptor

let alice launch intro and rend circuits and mark them with her query


svn:r1446
2004-04-02 23:38:26 +00:00
Nick Mathewson
e8345bfced refactor; start adding debugging logs to midpoint rend stuff
svn:r1445
2004-04-02 23:30:54 +00:00
Roger Dingledine
f34e6da3e7 now circuit_get_newest returns an appropriate circ for your purpose
connection_ap_handshake_attach_circuit attaches to a circ of the
right purpose

add a skeletal rendclient.c


svn:r1441
2004-04-02 22:23:15 +00:00
Roger Dingledine
05b99bcf7d alice chooses her rendezvous node from all running routers
and she can set preferences in her options


svn:r1433
2004-04-01 20:33:29 +00:00
Roger Dingledine
cc3c4245cb let the circuit-launcher choose the exit node (if he wants)
svn:r1428
2004-04-01 03:44:49 +00:00
Roger Dingledine
36ff23209b let alice recognize a y.onion address and, uhm, do something
svn:r1422
2004-04-01 02:41:41 +00:00
Roger Dingledine
d13857a3f0 put in hooks for alice and bob logic when circuits finish/fail
let you specify the purpose of circuits you launch

bugfix: we used to be declaring the first successful circuit too                               early -- when the first hop finished. now we're more accurate.


svn:r1421
2004-04-01 01:57:22 +00:00
Roger Dingledine
ee45ae575d allow conns to demand to be attached to a clean circuit
(nobody uses this yet)


svn:r1417
2004-03-31 23:06:16 +00:00
Roger Dingledine
a0b0d16981 Add an ap_bridge function to do a socketpair and skip socks.
This allows us to do a directory connection *through* tor just
as if we're doing it as an application.

Make ap_conns tolerate it when the application sends stuff before
The socks handshake is done (it just buffers it).

Tell directory_initiate_command the length of the payload (because
it might include nuls).

Add a directory_has_arrived function to, for example, start building
the rendezvous service descriptor.


svn:r1412
2004-03-31 22:02:13 +00:00
Roger Dingledine
56dfc3151f work around a tsocks bug
when an AP connection dies early, be sure to do a socks reject
for it. if you just hang up, tsocks goes into an infinite loop.


svn:r1352
2004-03-27 05:45:52 +00:00
Roger Dingledine
66f878513f deal with hardware word alignment
this was causing the seg faults on sparc processors

i wonder if i got them all.


svn:r1314
2004-03-20 09:30:30 +00:00
Nick Mathewson
2ba2f02181 Integrate the new "rephist" [rep(utation) hist(ory)] module to trace
successful/failed connections, successful/failed extends, and
connection uptimes.

It's still not done: more tests are needed, and not everything calls
connection/circuit_mark_for_close properly.  This skews the results.

Also, there needs to be a 'testing' mode for non-OP ORs, where they
periodically build circuits just to test whether extends work.


svn:r1313
2004-03-20 04:59:29 +00:00
Nick Mathewson
b0ef4e1143 Use strmap code for client DNS.
svn:r1309
2004-03-20 01:21:19 +00:00
Nick Mathewson
2da54de968 Make tor build on windows again. More work still needed
svn:r1247
2004-03-09 22:01:17 +00:00
Roger Dingledine
0ab367ed91 re-try streams at most 4 times
svn:r1242
2004-03-07 23:50:15 +00:00
Roger Dingledine
516ef41ac1 if a stream times out after 15s without a connected cell,
don't try that circuit again.


svn:r1239
2004-03-06 05:10:07 +00:00
Roger Dingledine
419a672222 holding until flush was borked
we were never writing anything when hold_open_until_flushed was set,
since conn_write returns early if marked_for_conn is set.

seems a bit better now.


svn:r1214
2004-03-03 08:46:18 +00:00
Roger Dingledine
dbdd2eaa2a don't mark_for_close again when the destroy arrives after the end cell
svn:r1211
2004-03-03 07:24:53 +00:00
Roger Dingledine
3c71d09402 use conn->hold_open_until_flushed for streams
and also note/fix a variety of other stream-based bugs


svn:r1210
2004-03-03 06:26:34 +00:00
Roger Dingledine
8275e2302c make socks5 not give a spurious warning
also rename AP_CONN_STATE_CONNECTING to _CONNECT_WAIT


svn:r1208
2004-03-03 04:54:16 +00:00
Nick Mathewson
6f3c6d1289 Split out mark_for_close with circuits. Seems to work for me.
svn:r1197
2004-03-02 17:48:17 +00:00
Nick Mathewson
a1e4c6dc85 Fix assertion failure spotted by arma.
Apparently, when a DNS failure was already cached, then when we tried
to mark the exit connection as closed, we'd try to remove it from the
pending queue anyway, and hit an assert.  Now, we put failed-resolve
connections in a separate state so that mark_for_close does the right
thing.


svn:r1196
2004-03-02 07:24:11 +00:00
Roger Dingledine
f81ad1550e note an assert trigger bug
nick, want to fix this? :)


svn:r1192
2004-03-01 12:37:45 +00:00
Roger Dingledine
e2881631cf fix duplicate call to connection_mark_for_close
svn:r1187
2004-02-29 22:07:44 +00:00
Roger Dingledine
2ac37c64f2 bugfix: we were checking the wrong thing to see if 'reason'
was out of range


svn:r1186
2004-02-29 22:04:52 +00:00
Roger Dingledine
8e5c1921fc when a stream is 15s late, print out the circuit at -l warn
svn:r1180
2004-02-29 09:15:29 +00:00
Roger Dingledine
195ee8c845 create a separate connection_edge_destroy() function
svn:r1176
2004-02-29 00:11:37 +00:00
Roger Dingledine
62d3df8633 bugfix: when we time out on a stream and detach, send an end first
svn:r1175
2004-02-28 23:56:50 +00:00
Roger Dingledine
dd632e697e clean up some log messages and severities
still plenty more left to clean


svn:r1158
2004-02-28 07:01:22 +00:00
Roger Dingledine
e59f19ca03 some more small fixes
svn:r1152
2004-02-28 04:44:48 +00:00
Nick Mathewson
ee68371f41 Stop answering "end" with "end"
svn:r1150
2004-02-28 04:25:54 +00:00
Nick Mathewson
4e89c6661a Push responsibility for connection marking down as far as possible; have only a close path; add some missing end cells; change return conventions a little.
svn:r1149
2004-02-28 04:11:53 +00:00
Nick Mathewson
88e222ff76 Make has_sent_end irrelevant: only try to send end if reason is nonzero
svn:r1148
2004-02-28 03:06:31 +00:00
Roger Dingledine
611f117ce1 patches/answers to nick's commit
svn:r1146
2004-02-27 23:23:33 +00:00
Nick Mathewson
c5bbb571d2 Refactor mark_for_close, connection_edge_end and friends. Now, everybody
who wants to shut down a connection calls connection_mark_for_close instead
of setting marked_for_close to 1.  This automatically removes the connection
from the DNS cache if needed, sends a RELAY END cell if appropriate, and can
be changed to do whatever else is needed.

Still to do:
  - The same for circuits, maybe.
  - Add some kind of hold_connection_open_until_flushed flag, maybe.
  - Change stuff that closes connections with return -1 to use mark_for_close,
    maybe.


svn:r1145
2004-02-27 22:00:26 +00:00
Roger Dingledine
737b2a0bf1 make 'connected' cells include the resolved IP
svn:r1143
2004-02-27 04:52:02 +00:00
Roger Dingledine
3456adec31 adding the reattach-after-timeout feature wasn't so easy after all.
maybe it works now.


svn:r1101
2004-02-18 01:21:20 +00:00