Commit Graph

117 Commits

Author SHA1 Message Date
Roger Dingledine
aebec8ab9e stop using atexit() to remove our pid, since it's called
immediately when we daemonize.

also drop our retry period for hidserv desc uploads from 10m to 5m


svn:r2111
2004-07-22 22:15:36 +00:00
Roger Dingledine
906d1aa99f caching dirservers don't handle posts, running-routers, or rend descs
svn:r2080
2004-07-21 08:40:57 +00:00
Roger Dingledine
73ffcc5cef add a new advertised_server_mode() to distinguish ORs that
are willing to become servers from ones that really are servers.


svn:r2071
2004-07-21 00:12:42 +00:00
Roger Dingledine
f54224ab35 clients can now pick non-authdirservers for fetching directories.
servers still pick authdirservers, but they never pick themselves.

but picking themselves for fetching rend descs is ok.


svn:r2059
2004-07-20 06:44:16 +00:00
Roger Dingledine
b4d4a961b1 break connection_dir_client_finished_reading() into its own function
svn:r2058
2004-07-20 02:44:26 +00:00
Roger Dingledine
a3aaff34b7 why does gcc not warn me about this at all? that's evil.
svn:r2032
2004-07-12 20:41:20 +00:00
Roger Dingledine
2325050b1b tor now tolerates down dirservers better
svn:r2031
2004-07-12 20:39:40 +00:00
Nick Mathewson
7d8de8cd10 More digest/nickname fixes
svn:r2000
2004-07-02 23:40:03 +00:00
Nick Mathewson
541add90a1 Track routers by hash of identity key; use hex hash of identity key in place of nickname; accept (and use) hash of identity key in EXTEND cells.
svn:r1994
2004-07-01 01:16:59 +00:00
Roger Dingledine
f42f04c859 cleanups on 008pre1 items
svn:r1993
2004-06-30 21:48:02 +00:00
Nick Mathewson
76f769deb9 Remaining 008pre1 items done; deferred where more design is needed.
More docs and (way more!) testing needed.

Done:
 - Authdirservers down directories from others.
 - Generate and use running-routers lists
 - Cache directories; store across reboots.
 - Refactor directory parsing a bit; note potential trouble spots.


svn:r1985
2004-06-25 00:29:31 +00:00
Roger Dingledine
ba5d48e852 router->is_trusted_dir implies router->dir_port>0
and add some infrastructure for fetching running-routers list


svn:r1973
2004-06-16 21:08:29 +00:00
Nick Mathewson
65e26bae3d Check directory signatures based on name of signer, not on whom we got the directory from.
svn:r1940
2004-06-02 20:00:57 +00:00
Roger Dingledine
011ccbbf8d crank up some of our constants, for better scalability
svn:r1938
2004-06-02 19:44:41 +00:00
Nick Mathewson
50b7ebcf9e Make directory functions update routerlist, not replace it. Add notion of OR-is-trusted-to-be-a-dirserver. Arma, please review: does this handle being a dirserver right?
svn:r1880
2004-05-17 20:31:01 +00:00
Roger Dingledine
5ba9235873 clean up directory.c API
svn:r1860
2004-05-12 23:48:57 +00:00
Roger Dingledine
1cf1836990 break connection_edge_end out of connection_mark_for_close
svn:r1858
2004-05-12 21:12:33 +00:00
Roger Dingledine
7ee6194f3a break part of circuit.c into relay.c
svn:r1854
2004-05-12 19:49:48 +00:00
Nick Mathewson
f1bc7af9f5 Make "connected" a different case from "finished_flushing"; always close_immediate whhen connect() fails.
svn:r1852
2004-05-12 19:17:09 +00:00
Nick Mathewson
81922a125c More doxygenation.
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
c6d4a00c5f more doxygen markup
plenty more remains


svn:r1824
2004-05-09 16:47:25 +00:00
Roger Dingledine
b384c5a18d bugfix: do directory_send_command only after we've established a socket
also many comments, cleaning, etc


svn:r1823
2004-05-09 16:33:04 +00:00
Roger Dingledine
d4efa475a1 forward-port header-length-increase patch
svn:r1814
2004-05-06 22:47:48 +00:00
Roger Dingledine
9bf9ca4d09 bugfix: add a circ->resolving_streams field, and make dns resolving streams not actually in the connection_array until they're done resolving.
bugfix: actually complain if we duplicate mark-for-close a circuit

add more logging for relay ends that claim dns resolve failed, so we can
find out why they're not being retried.


svn:r1798
2004-05-06 11:08:04 +00:00
Nick Mathewson
924f60288a More documentation; fix for compilation warning
svn:r1789
2004-05-05 02:50:38 +00:00
Nick Mathewson
2ba0776b02 Only connection_add connections once they have conn->s sett; refactor code around this. Should make stuff more bulletproof.
svn:r1788
2004-05-05 01:26:57 +00:00
Nick Mathewson
908ccb9dcd Handle windows socket errors correctly; comment most of common.
svn:r1756
2004-05-01 20:46:28 +00:00
Roger Dingledine
158e2cf536 set Content-Type on the directory and hidserv descriptor
svn:r1731
2004-04-27 21:48:37 +00:00
Roger Dingledine
25d54257fb use tor_assert
remove obsolete BUF_OK macro


svn:r1697
2004-04-25 20:37:37 +00:00
Roger Dingledine
14c30fe9fa bugfix: give dir_conn a state before building the bridge, so it has
a state if things fail


svn:r1660
2004-04-17 20:19:43 +00:00
Roger Dingledine
8f8d185f4b give better instructions than just 'mail arma'
svn:r1586
2004-04-09 20:23:25 +00:00
Roger Dingledine
c5bef32d95 call directory_has_arrived has arrived every time we get
a new directory, not just the first time


svn:r1581
2004-04-09 19:30:38 +00:00
Nick Mathewson
2a01e3ad10 Launch intro services after launching connections; allow ORs to build circuits through as-yet-unconnectd ORs
svn:r1562
2004-04-08 03:53:39 +00:00
Roger Dingledine
9d38311ae3 allow for directories >8192 bytes
svn:r1545
2004-04-08 01:47:33 +00:00
Roger Dingledine
e79a578fec if the rend desc cache entry was fetched more than 15 mins ago,
then try to fetch a new one. but if the new fetch fails, use the
old one.


svn:r1540
2004-04-07 22:41:00 +00:00
Nick Mathewson
b07b2cef29 Remember when we received which service desc.
svn:r1536
2004-04-07 22:00:54 +00:00
Nick Mathewson
3d60cd1d61 Delete trailing whitespace and expand tabs; remove unused aes decrypt code
svn:r1522
2004-04-07 19:57:40 +00:00
Roger Dingledine
7eaa655b6d publish and fetch the right rendezvous urls
svn:r1463
2004-04-03 03:33:57 +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
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
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
64cb3a027f teach directory servers to handle renddesc responses
svn:r1434
2004-04-01 21:32:01 +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
Nick Mathewson
157cd7fe15 Fix warning
svn:r1409
2004-03-31 20:58:35 +00:00
Roger Dingledine
b4a61d1ab1 better way: always nul-terminate. then sometimes use it, sometimes not.
svn:r1408
2004-03-31 05:10:34 +00:00
Roger Dingledine
87dbd36a3c let fetch_from_buf_http tolerate nuls in the http body
teach directory.c about which places it needs to nul-terminate
body before it uses it, and which places it must not


svn:r1407
2004-03-31 05:01:30 +00:00
Nick Mathewson
8fedefe6cb rename hidserv_xx
svn:r1406
2004-03-31 04:10:10 +00:00
Nick Mathewson
b32440a028 Implement hidserv_XX functions; there is still an XXX in directory_handle_command
svn:r1404
2004-03-31 03:42:56 +00:00
Roger Dingledine
670aeb6c8d add and use stubs for hidserv lookup and store
svn:r1402
2004-03-30 23:41:24 +00:00
Roger Dingledine
2d3ac08633 Refactor directory servers
* read all the time (before we would ignore eof sometimes, oops)
* we can handle different urls now
* send back 404 for an un-handled url
* commands initiated by the client can handle payloads now
* introduce conn->purpose to avoid exponential state-space explosion


svn:r1400
2004-03-30 22:57:49 +00:00