Nick Mathewson
9dc72de41f
Omit any exit rules that follow a catch-all rule when writing a router descriptor.
...
svn:r2459
2004-10-13 01:25:42 +00:00
Nick Mathewson
dad7c71686
Workaround for bug on windows where cached-directories get crlf corruption.
...
svn:r2426
2004-10-07 20:22:58 +00:00
Nick Mathewson
2bba65148b
Refactor fingerprint handling: remember hex digests (no spaces) instead of beautified fingerprints
...
svn:r2422
2004-10-06 13:31:48 +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
Roger Dingledine
a2517b4f07
checking only 0.0.7 and 0.0.8 didn't work, because some dirservers
...
files have really old descriptors for the authdirservers, so we're
asking them in the new format because they're too old.
now we actually compare the version to a cutoff version, and act
appropriately.
also take this chance to use only >=0.0.8 servers for dns resolves,
because of the recent bugs. we'll bump to >=0.0.9pre1 once there are
some servers running that.
svn:r2380
2004-09-27 06:00:43 +00:00
Roger Dingledine
fa0a1ec49f
cleanup: use strcmpstart() in more places
...
svn:r2372
2004-09-23 22:18:50 +00:00
Nick Mathewson
0ef85f6dba
Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
...
svn:r2336
2004-09-08 07:16:34 +00:00
Nick Mathewson
86980cf6e2
Functions to test nickname validity
...
svn:r2269
2004-08-18 04:44:24 +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
cd3da3fc12
o clients choose nodes proportional to advertised bandwidth
...
o and/or while avoiding unreliable nodes, depending on goals
o 'fascistfirewall' option to pick dirservers on port 80 and ORs on
port 443.
o if a begin failed due to exit policy, but we believe the IP should have been allowed, switch that router to exitpolicy reject *:* until we get our next directory.
svn:r2231
2004-08-15 08:15:12 +00:00
Nick Mathewson
6141097f6e
Fix bug in saving onion keys to disk when rotating; also survive short-term shutdowns better
...
svn:r2206
2004-08-09 04:27:13 +00:00
Roger Dingledine
292e9c5567
reject the default edonkey, kazaa, gnutella ports
...
to slow the coming flood
svn:r2195
2004-08-08 05:26:13 +00:00
Nick Mathewson
b0c9ba99f8
Fix a leak
...
svn:r2183
2004-08-07 02:59:46 +00:00
Nick Mathewson
f6cc218742
Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
...
svn:r2182
2004-08-07 02:46:16 +00:00
Roger Dingledine
b51a444dd2
commit some odds and ends, so my tree is clean
...
svn:r2137
2004-08-04 05:10:49 +00:00
Roger Dingledine
ea43172c11
make router_is_me() compare identity, not nickname
...
svn:r2102
2004-07-22 08:08:25 +00:00
Roger Dingledine
f355a9c9f1
put our fingerprint into the descriptor, so we can match a
...
desc to a running-routers entry
svn:r2100
2004-07-22 06:22:04 +00:00
Roger Dingledine
c1450319f4
allow OPs to set a DirPort and cache/serve directories
...
(hey, why not, it works)
svn:r2099
2004-07-22 06:04:54 +00:00
Roger Dingledine
b48cdc9d40
populate router_get_my_routerinfo()->is_verified
...
svn:r2097
2004-07-22 06:03:53 +00:00
Roger Dingledine
06b72cc8f2
publish advertised_bandwidth in descriptor
...
svn:r2095
2004-07-22 04:20:27 +00:00
Roger Dingledine
3c2c8ed42b
0.0.8 ORs should autoconnect to authdirservers and 0.0.7 servers
...
svn:r2091
2004-07-21 23:43:47 +00:00
Roger Dingledine
ce7fcd110c
solve the authdirserver initialization precedence problem
...
svn:r2085
2004-07-21 18:53:56 +00:00
Roger Dingledine
3e97c12f24
rearrange to prepare to solve the authdirserver initialization
...
precedence problem. doesn't actually solve it yet.
svn:r2079
2004-07-21 07:50:06 +00:00
Nick Mathewson
334de84cbe
Misc small code cleanups; remove exit_server_mode(); change tor_tls_verify behavior
...
svn:r2073
2004-07-21 00:44:04 +00:00
Nick Mathewson
2a339b7627
Split uptime into separate field
...
svn:r2067
2004-07-20 21:13:11 +00:00
Nick Mathewson
d858a9e990
Remember list of digests for trusted dirservers; use this list to tell whether you are a trusted dirserver
...
svn:r2064
2004-07-20 20:09:59 +00:00
Roger Dingledine
d5999a24af
also don't hang up on him if we're an OR and he's an authdirserver
...
otherwise we keep getting taken out of the running-routers list
svn:r2063
2004-07-20 19:45:29 +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
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
e167eeb18e
add 'advertisedbandwidth' to router descriptor
...
svn:r2028
2004-07-12 18:02:54 +00:00
Nick Mathewson
38c889c454
Remove spurious assert
...
svn:r2018
2004-07-07 19:51:20 +00:00
Nick Mathewson
e9d81d873b
Fix the router_compare_to_my_exit_policy assertion failure once-and-for-all, by declaring 0.0.0.0 always denied.
...
svn:r2017
2004-07-07 19:49:48 +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
Roger Dingledine
62dcf9e20f
some of the infrastructure to let ORs connect on demand
...
svn:r1998
2004-07-02 09:29:01 +00:00
Nick Mathewson
cbab134bd9
Switch most uses of *_by_addr_port to *_by_identity_digest
...
svn:r1997
2004-07-01 23:13:04 +00:00
Roger Dingledine
e1ba0c4663
running-routers now lists down routers too (with a ! before their name)
...
svn:r1996
2004-07-01 11:32:26 +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
b1e9adf056
Always use get_data_directory() instead of options.DataDirectory; fix a memory leak in router.c
...
svn:r1991
2004-06-30 16:37:08 +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
Nick Mathewson
f7976c1e9b
Terminate comment
...
svn:r1982
2004-06-21 04:40:24 +00:00
Nick Mathewson
8aec3a7301
Implement several 008pre1 items: needs more testing
...
svn:r1981
2004-06-21 04:37:27 +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
0d1b4b5024
Unbork windows whitespace
...
svn:r1949
2004-06-05 01:56:54 +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
Nick Mathewson
66881d5709
If we are a directory, we should trust ourself.
...
svn:r1943
2004-06-02 20:15:35 +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
Roger Dingledine
5ba9235873
clean up directory.c API
...
svn:r1860
2004-05-12 23:48:57 +00:00