Roger Dingledine
05d0b70573
Get rid of the router_retry_connections notion. Now routers no longer
...
try to rebuild long-term connections to directory authorities, and
directory authorities no longer try to rebuild long-term connections to
all servers.
We still don't hang up connections in these two cases though -- we need
to look at it more carefully to avoid flapping, and we likely need to
wait til 0.1.1.x is obsolete.
svn:r6712
2006-07-04 03:31:27 +00:00
Nick Mathewson
b7910202a3
Next batch of memory miserdom: mmap cached-routers file. This is sure to break somewhere.
...
svn:r6675
2006-06-22 07:01:54 +00:00
Nick Mathewson
e2697a62ac
When requesting or serving resources via fingerprint/digest, request and respond in-order, removing duplicates.
...
svn:r6673
2006-06-21 04:57:12 +00:00
Nick Mathewson
4283b81a48
Start spooling v2 networkstatus docs as well.
...
svn:r6664
2006-06-20 00:48:23 +00:00
Nick Mathewson
537104c908
write_to_buf != connection_write_to_buf. Also, add a connection_write_to_buf_zlib wrapper that sucks.
...
svn:r6650
2006-06-18 08:46:55 +00:00
Nick Mathewson
b1a8b7869a
Oops. conn->requested_resource is client only.
...
svn:r6642
2006-06-18 07:55:04 +00:00
Nick Mathewson
1d9923da7c
Instead of adding servers and v1 directories to buffers en masse, directory servers add them on the fly as their outbufs are depleted. This will save ram on busy dirservers.
...
svn:r6641
2006-06-18 07:38:55 +00:00
Roger Dingledine
b4e415ba3c
now we can tell dirserv_dump_directory_to_string() whether we want
...
it to include down/invalid descriptors or not.
svn:r6618
2006-06-13 11:11:19 +00:00
Roger Dingledine
31b51849b5
export the default exit policy via the control port, so controllers
...
don't need to guess what it is / will be later.
svn:r6615
2006-06-13 09:16:09 +00:00
Roger Dingledine
889b8d5bac
Add a new config option TestVia, that lets you specify preferred middle
...
hops to use for testing circuits. Perhaps this will let me debug the
reachability problem better.
svn:r6581
2006-06-10 00:26:39 +00:00
Roger Dingledine
bb18168fae
ok, ok, maybe *this* time my rep_hist_circbuilding_dormant() will work.
...
svn:r6568
2006-06-08 22:36:13 +00:00
Roger Dingledine
91bd12c20d
re-enable per-connection rate limiting. get rid of the "OP bandwidth"
...
concept. lay groundwork for "bandwidth classes" -- separate global
buckets that apply depending on what sort of conn it is.
svn:r6563
2006-06-07 09:18:53 +00:00
Nick Mathewson
853e2d99b6
Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
...
svn:r6532
2006-06-04 22:42:13 +00:00
Nick Mathewson
c660a0f6a2
More DNS fixes. Send meaningful TTLs back to the client when
...
possible. Cache at the server side independently from the TTL, to
prevent attackers from probing the server to see who has been asking
for what hostnames. (Hi, Dan Kaminski!)
Also, clean some whitespace.
svn:r6526
2006-06-03 21:41:14 +00:00
Roger Dingledine
1bf0f99b66
connection_t kept the identity_pkey but all it did was store it and
...
free it. perhaps we don't need it after all?
svn:r6518
2006-05-30 06:23:44 +00:00
Roger Dingledine
ae2648fb1c
stop fetching descriptors if we're not a dir mirror and we
...
haven't tried to establish any circuits lately.
svn:r6516
2006-05-30 06:19:06 +00:00
Nick Mathewson
2b720b5746
Start remembering *where* we are storing routerdescs. This will make us easier to move from a RAM-mirrors-disk model to a RAM-caches-disk model, and save maybe around 10MB on a directory server.
...
svn:r6427
2006-04-29 18:42:26 +00:00
Nick Mathewson
7484ca06a5
[Forward-port ]Test and document last patch.
...
svn:r6400
2006-04-18 03:51:18 +00:00
Nick Mathewson
0df40a393b
[forward-port] Implement an option, VirtualAddrMask, to set which addresses get handed out in response to mapaddress requests. Needs testing and docs!
...
svn:r6398
2006-04-18 03:36:28 +00:00
Nick Mathewson
6ebd886511
forward-port: "Resolve" all XXX011 items, mostly by marking them non-011.
...
svn:r6396
2006-04-18 03:07:24 +00:00
Peter Palfrader
beb9e0721a
Stop assuming every authority is a v1 authority
...
svn:r6377
2006-04-10 21:29:29 +00:00
Roger Dingledine
12d461a245
make DirFetchPeriod and StatusFetchPeriod truly obsolete.
...
svn:r6373
2006-04-10 20:16:46 +00:00
Peter Palfrader
fe6c1b0192
Remove redundant includes. They are all hanled in torint.h which we already do include.
...
svn:r6364
2006-04-10 19:39:26 +00:00
Nick Mathewson
e258276c2b
Change a dumb interface. Also, increment trusted_dir_server_t.n_networkstatus_failures when an all.z download fails entirely or partially.
...
svn:r6345
2006-04-10 01:35:56 +00:00
Roger Dingledine
a589650496
i like the name FetchUselessDescriptors better.
...
svn:r6327
2006-04-08 21:48:14 +00:00
Roger Dingledine
2a94c8b493
add a new config option FetchUselessRouters, off by default, for
...
when you plan to run "exitlist" on this client and you want to know
about even the non-running descriptors.
svn:r6326
2006-04-08 21:35:17 +00:00
Roger Dingledine
de8ce0aae8
fix a typo that was confusing me
...
svn:r6319
2006-04-08 06:55:10 +00:00
Nick Mathewson
5d466b7611
Fix a couple of things that make GCC complain with verbose warnings on. Also, fix some whitespace.
...
svn:r6317
2006-04-08 05:43:52 +00:00
Nick Mathewson
eba6204315
fix some xxxs.
...
svn:r6307
2006-04-03 06:23:24 +00:00
Roger Dingledine
6fb27741ba
Fix dirserv_get_networkstatus_v2's api: its function comments
...
did not at all match its behavior, and I can't think of a case
when it should return anything other than 0.
This fix may allow getinfo dir/status/foo to work.
svn:r6285
2006-04-01 22:00:49 +00:00
Roger Dingledine
1f4d0d2479
When deciding whether a router is Fast or Guard-worthy, consider
...
his advertised BandwidthRate and not just the BandwidthCapacity.
This is a bug in 0.1.0.x as well, but let's not bother backporting.
svn:r6266
2006-03-28 12:01:58 +00:00
Roger Dingledine
6f08d121d9
Refactor and consolidate addr/exit policies into a new policies.c.
...
Fix some minor bugs and memory leaks along the way.
svn:r6246
2006-03-27 02:25:34 +00:00
Roger Dingledine
b899b9592a
When the controller's *setconf commands fail, collect an error message
...
in a string and hand it back. This starts to resolve bug 275.
svn:r6241
2006-03-26 06:51:26 +00:00
Roger Dingledine
216e349cb2
parameterize two more timeout constants in circuit-land.
...
svn:r6220
2006-03-22 00:52:37 +00:00
Roger Dingledine
28fafb9022
new config option SocksTimeout: How long do we let a socks connection
...
wait unattached before we fail it?
Use this value for controller socks timeout, for normal socks
timeout, and for hidden-service socks timeout.
svn:r6217
2006-03-21 23:27:43 +00:00
Roger Dingledine
d8195e4128
Implement Jason Holt's SafeSocks config option.
...
Also put a URL in the warning message for unsafe socks4 use --
previously we'd only had the URL for unsafe socks5 use. Oops.
svn:r6190
2006-03-19 01:44:53 +00:00
Roger Dingledine
c06e6ddadd
Finish the transition from the word 'verified' to the words
...
'named' and 'valid'.
svn:r6188
2006-03-19 01:21:59 +00:00
Roger Dingledine
cc37c2f71e
fix some typos
...
svn:r6185
2006-03-18 09:29:05 +00:00
Roger Dingledine
581795f41d
auth dir servers were only modifying a server's is_running field
...
when they created a network status. so if nobody asked for a
network status, they would never discover that any servers are
is_running, so they could never build a circuit.
svn:r6183
2006-03-18 01:24:04 +00:00
Roger Dingledine
817556315a
Implement router purposes, and don't choose a non-general
...
purpose router when picking random nodes for a circuit.
Also implement SETROUTERPURPOSE and modify +POSTDESCRIPTOR.
This concludes bug 250 assuming it all works.
svn:r6178
2006-03-17 22:08:59 +00:00
Nick Mathewson
d0f24b1e46
(Missing header change) Do not warn about unknown servers in our family when they are given as hex digests.
...
svn:r6164
2006-03-15 05:06:26 +00:00
Roger Dingledine
903183ea28
if we as a directory mirror don't know of any v1 directory
...
authorities, then don't try to cache any v1 directories.
svn:r6162
2006-03-15 00:10:13 +00:00
Nick Mathewson
bd8ffccae7
More cleanups noticed by weasel; also, remove macros that nobody uses.
...
svn:r6143
2006-03-12 23:31:16 +00:00
Nick Mathewson
474c60b743
Cleanup on time-relaqted constants. New conventions:
...
1) Surround all constants by (parens), whether we'll be using them
in a denominator or not.
2) Express all time periods as products (24*60*60), not as multiplied-out
constants (86400).
3) Comments like "(60*60) /* one hour */" are as pointless as comments
like "c = a + b; /* set c to the sum of a and b */". Remove them.
4) All time periods should be #defined constants, not given inline.
5) All time periods should have doxygen comments.
6) All time periods, unless specified, are in seconds. It's not necessary
to say so.
To summarize, the old (lack of) style would allow:
#define FOO_RETRY_INTERVAL 60*60 /* one hour (seconds) */
next_try = now + 3600;
The new style is:
/** How often do we reattempt foo? */
#define FOO_RETRY_INTERVAL (60*60)
next_try = now + RETRY_INTERVAL;
svn:r6142
2006-03-12 22:48:18 +00:00
Roger Dingledine
a4da44c2b9
Now do address rewriting when the controller asks us to attach
...
to a particular circuit too. This will let Blossom specify
"moria2.exit" without having to learn what moria2's IP address is.
It may also cause other controller authors some angst. Let us know.
svn:r6136
2006-03-12 05:04:16 +00:00
Nick Mathewson
4d3e709c4b
Use escaped() for remaining cases.
...
svn:r6117
2006-03-11 02:21:30 +00:00
Roger Dingledine
44107f6ec4
Implement NEWNYM. Nick, did I do a bad thing?
...
svn:r6105
2006-03-09 00:18:16 +00:00
Roger Dingledine
946317ae13
start using OR_CONN_EVENT_NEW.
...
also fixes a seg fault in tor (bug 261).
svn:r6101
2006-03-08 22:29:08 +00:00
Nick Mathewson
1ce3713889
Possible bug 265 fix: authorities must be more strict than clients about age of acceptable routers; make routers publish every 12 hours; client ROUTER_MAX_AGE must be greater than NETWORKSTATUS_MAX_AGE+authoirty ROUTER_MAX_AGE.
...
svn:r6095
2006-03-08 06:29:52 +00:00
Nick Mathewson
5777ee0e1a
Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
...
svn:r6087
2006-03-05 09:50:26 +00:00