Nick Mathewson
347d3f9d62
Start implementing control interface.
...
svn:r2652
2004-11-03 01:32:26 +00:00
Nick Mathewson
8db0abb687
First attempt at hibernation code. It needs more work around the XXXXs, but first I want arma to review the basic approach while I meditate on how to fix them.
...
svn:r2649
2004-11-02 23:47:32 +00:00
Nick Mathewson
ad4dc74482
Use a stricter set of warnings; make them all pass.
...
svn:r2645
2004-11-02 03:02:17 +00:00
Roger Dingledine
984ffec105
implement first piece of hibernation
...
still need to track bandwidth, and make decisions based on bandwidth
svn:r2630
2004-10-31 20:28:41 +00:00
Nick Mathewson
2fbf31533b
Tricksy compiler warnings! We hates them, hates them forever, my precious!
...
svn:r2615
2004-10-27 21:14:11 +00:00
Roger Dingledine
0113a643a2
quick-and-dirty dir policy since the dirservers are getting hammered
...
nick, could you abstract this sometime so we don't repeat the
sockspolicy code twice?
svn:r2589
2004-10-25 06:16:26 +00:00
Nick Mathewson
ef4ac65f5e
Document the swiss-army-knife that retry_listeners has become
...
svn:r2584
2004-10-24 01:50:33 +00:00
Nick Mathewson
0df2d383d1
Many non-native speakers use Tor. It is our duty to ensure that our log messages set an example of good English spelling.
...
svn:r2583
2004-10-24 01:29:01 +00:00
Nick Mathewson
57f09573f5
Every 60 seconds, check whether the listeners are still alive, and relaunch the dead ones.
...
svn:r2581
2004-10-24 01:22:40 +00:00
Nick Mathewson
5d53828c57
Handle more errnos from accept() without closing the connection. This may fix a bug that could close OR listeners when (a) TCP connections were hung up before accept() could be called, or (b) during FD exhaustion.
...
svn:r2579
2004-10-24 00:55:18 +00:00
Roger Dingledine
de65052312
don't assert multiple things in the same tor_assert()
...
svn:r2544
2004-10-16 22:14:52 +00:00
Nick Mathewson
25a046df74
Fix unit tests, make it compile
...
svn:r2543
2004-10-16 21:57:24 +00:00
Nick Mathewson
47dc024f7e
Change interface of parse_addr_port() to return address in host order, since most users seem to want that.
...
svn:r2542
2004-10-16 21:53:30 +00:00
Nick Mathewson
0f144d6a04
fix warning on win32
...
svn:r2518
2004-10-14 15:41:41 +00:00
Roger Dingledine
cf9664151d
bugfix on a really old bug:
...
if read() fails on a stream, send back an end cell before you
close it down.
svn:r2509
2004-10-14 09:28:31 +00:00
Nick Mathewson
1c9426d6e0
Build without warnings on mac gcc 3.3
...
svn:r2487
2004-10-14 03:18:14 +00:00
Roger Dingledine
aebc3a03ba
more int to size_t conversions, fixing one or more amd64 bugs
...
plus a whitespace patch on config.c from vicman
svn:r2482
2004-10-14 02:47:09 +00:00
Nick Mathewson
0d5a847f12
Remove need for dirservers file: now, we note trusted dirservers in configuration options, and only need to remember addr:port and key digest for each one.
...
svn:r2479
2004-10-14 01:44:32 +00:00
Roger Dingledine
2b7b86f5e6
stop trying to print a NULL
...
plus make router_nickname_is_approved() more obviously unused
svn:r2469
2004-10-13 20:17:45 +00:00
Nick Mathewson
e0cce8fba8
Unify tests for "did I originate this nonopen OR connection?"
...
svn:r2468
2004-10-13 20:05:57 +00:00
Nick Mathewson
508970f85d
fix typo
...
svn:r2466
2004-10-13 19:55:40 +00:00
Nick Mathewson
149f57bdef
answer question about rep_hist_note_connect_failed
...
svn:r2464
2004-10-13 19:42:36 +00:00
Nick Mathewson
0383afac9a
Use parse_addr_port() function instead of ad-hoc variants
...
svn:r2441
2004-10-12 15:52:09 +00:00
Roger Dingledine
136d4e5739
prefer tor_free to free
...
plus complain more loudly when we fail to parse a dir we just fetched
svn:r2401
2004-09-29 06:52:36 +00:00
Nick Mathewson
c66e4c4870
Flush more changes from sandbox
...
- make clients cache directories and use them to seed their router lists
at startup. This means clients have a datadir again.
- Introduce a global_write_bucket. We need to respond better to exhausting
it.
- Remove the last vestiges of LinkPadding and TrafficShaping.
- Configuration infrastructure support for warning on obsolete options.
- Refactor directory header parsing to use smartlist_split_string.
- Respond to content-encoding headers by trying to uncompress as appropriate.
- Reply with a deflated directory when a client asks for "dir.z".
(We could use allow-encodings instead, but allow-encodings isn't
specified in HTTP 1.0.)
svn:r2335
2004-09-08 06:52:33 +00:00
Nick Mathewson
9836ccda8c
Move a paren 4 characters to the left; fix a bug in OutboundBindAddress
...
svn:r2330
2004-09-02 23:25:23 +00:00
Roger Dingledine
2d8a1f208a
if they ask for exactly one entrynode, don't pick it as an exitnode.
...
also, fix part of the zero-identity-router-in-stats bug
svn:r2252
2004-08-17 07:09:02 +00:00
Roger Dingledine
0a6e27208b
o Handle servers with dynamic IP addresses: don't replace
...
options->Address with the resolved one at startup.
o detect our address right before we make a routerinfo each time.
o external IP vs bind-IP. Already done, just use options->Address.
o OutboundBindAddress config option, to bind to a specific
IP address for outgoing connect()s.
svn:r2241
2004-08-16 11:43:18 +00:00
Roger Dingledine
699a9d8b46
commit some minor fixes from this sandbox so i can commit the next one
...
svn:r2229
2004-08-15 05:28:09 +00:00
Roger Dingledine
7506cce649
stop wasting cpu time on authdirservers
...
we were making a new directory only when the old one was dirty, but
every time we made one, we'd dirty it by testing it right then.
svn:r2199
2004-08-08 11:15:38 +00:00
Roger Dingledine
b2c7b5adfb
fix a race condition in 008pre2: don't try to extend onto a connection
...
that's still handshaking.
for servers in clique mode, require the conn to be open before you'll
choose it for your path.
svn:r2198
2004-08-08 10:32:36 +00:00
Roger Dingledine
276d953b22
fix an assert: check the sockspolicy before we make/add the connection,
...
else we close a connection without assigning it a state, which is bad
because it fails assert_conn_ok()
svn:r2156
2004-08-06 09:56:36 +00:00
Roger Dingledine
0da256ef97
when we get a sigint, don't accept new connections/circuits,
...
but delay 30 seconds until exiting.
if we get a second sigint, exit immediately.
svn:r2070
2004-07-20 23:31:00 +00:00
Roger Dingledine
dc7951a5a7
a whole swath of fixes
...
introduce an authdir_mode() macro to match the others.
don't initialize uptime to the number of seconds since 1970.
non-authoritative dirservers don't cache their directory on disk.
make only authdirservers use clique_mode.
only read approved-routers file if you're an authdirserver.
even authdirservers fetch a new directory in do_hup.
retry_all_connections() is now called retry_all_listeners().
router_parse_list_from_string() correctly reports the router number
it's working on.
only call dirserv_add_own_fingerprint() and
dirserv_add_descriptor() on startup if we're an authdirserver.
if AuthDir and !ORPort then fail.
if AuthDir and ClientOnly then fail.
svn:r2061
2004-07-20 10:17:43 +00:00
Roger Dingledine
a5ff0527e6
it turns out we weren't looking at the result from getsockopt().
...
now we do.
but i'm not sure it matters, since we also poll for reads, and if
there's an error with the connecting socket, poll is supposed to
return readable, so we should notice it then.
who knows.
svn:r2057
2004-07-19 23:26:21 +00:00
Nick Mathewson
54c129d8dc
abstract ORPort/SocksPort checks into server_mode(), proxy_mode(), clique_mode(), etc. Dont change underlying comments.
...
svn:r2054
2004-07-18 21:47:04 +00:00
Nick Mathewson
c2103eb63a
Finish most pre2 items: make running-routers list work right; rename secret key files; make even more lookup-by-nickname use lookup-by-id; default nicknames to hostname.
...
svn:r2043
2004-07-13 18:23:40 +00:00
Roger Dingledine
d37850bb98
only count bytes transmitted to/from non-local IPs
...
svn:r2041
2004-07-13 16:58:01 +00:00
Roger Dingledine
86e0ede07e
checkpoint: start working on bandwidth tracking and
...
letting clients evaluate whether they're suitable servers
svn:r2037
2004-07-13 07:42:20 +00:00
Roger Dingledine
2325050b1b
tor now tolerates down dirservers better
...
svn:r2031
2004-07-12 20:39:40 +00:00
Roger Dingledine
538655cd80
if connecting to an OR fails immediately, mark it as down
...
svn:r2029
2004-07-12 18:19:55 +00:00
Roger Dingledine
cbf73b2bc5
touchups all over
...
put uptime in descriptor
svn:r2011
2004-07-04 22:48:11 +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
Nick Mathewson
3708886939
Implement RESOLVE/RESOLVED cells and socks resolve code
...
svn:r1978
2004-06-17 18:13:09 +00:00
Nick Mathewson
17b5b3685f
Make tor build on win32 again; handle locking for server
...
svn:r1948
2004-06-05 01:50:35 +00:00
Roger Dingledine
69931106f8
be sure to detach streams from the circuit linked list before freeing them
...
also, don't bother marking a conn for close if you're about to free it
svn:r1935
2004-06-02 18:32:24 +00:00
Roger Dingledine
f51061439b
when the dns resolve is cancelled, or fails, be sure to remove
...
conn from circ->resolving_streams
otherwise it gets freed and stays there, causing seg faults.
svn:r1915
2004-05-21 12:25:15 +00:00
Roger Dingledine
b6faca2268
enable checking the socks policy
...
svn:r1906
2004-05-20 04:16:43 +00:00
Nick Mathewson
80365b9897
Allow multiple exit policy lines; mostly add support for AP policies
...
svn:r1905
2004-05-20 02:42:50 +00:00