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
Nick Mathewson
ba7cc463d4
Clean up tempdir after finishing unittests; use tor_temp_$PID instead of tor_temp; quit if tor_temp_$PID exists.
...
svn:r2226
2004-08-11 19:20:24 +00:00
Roger Dingledine
dda2e44222
compile again on win32 (i think)
...
svn:r2222
2004-08-09 23:45:11 +00:00
Roger Dingledine
1e415817a3
minor fix
...
svn:r2215
2004-08-09 07:41:32 +00:00
Roger Dingledine
7068dd8e87
make "%llu" less likely to warn on weird platforms
...
svn:r2209
2004-08-09 05:25:19 +00:00
Nick Mathewson
98b8a89aa8
Fix comment
...
svn:r2207
2004-08-09 04:27:42 +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
Nick Mathewson
e6c34ad071
Make unittests pass
...
svn:r2205
2004-08-09 04:26:25 +00:00
Nick Mathewson
0652a0e90a
Fix a fencepost error in the last bandwidth reporting fix
...
svn:r2202
2004-08-08 19:14:44 +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
05790d1722
let children survive sigint, sigterm, etc.
...
this was biting us because ^c would get delivered to all of them,
maybe because they were all still listening to stdin?
svn:r2197
2004-08-08 07:25:45 +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
Roger Dingledine
fb4b804c2c
Don't warn about being unverified if you're not in the running-routers
...
list at all.
svn:r2193
2004-08-07 09:01:56 +00:00
Roger Dingledine
44ff309c26
touch-ups
...
svn:r2192
2004-08-07 09:01:04 +00:00
Nick Mathewson
28a6d0901f
Handle loop initialization for bandwidth tracking properly
...
svn:r2190
2004-08-07 05:13:55 +00:00
Nick Mathewson
3de630ec67
Only warn about version newness once
...
svn:r2189
2004-08-07 05:12:08 +00:00
Roger Dingledine
dbf150bd4e
list the port and socks version when complaining about unsafe socks
...
svn:r2188
2004-08-07 04:03:01 +00:00
Nick Mathewson
bc24c3f47d
Allow multiple ORs with same nickname in routerlist
...
svn:r2187
2004-08-07 03:38:07 +00:00
Nick Mathewson
05e9a2269c
Remove obsolete link-key keyword
...
svn:r2186
2004-08-07 03:37:36 +00:00
Nick Mathewson
1ada52fe87
router_get_hash_impl would fail when end_str started with \n. Now it works.
...
svn:r2185
2004-08-07 03:25:42 +00:00
Roger Dingledine
052537dad9
rotate onion keys every 12 hours, not every 2 hours
...
svn:r2184
2004-08-07 03:03:23 +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
f47fe829dd
avoid racing the mark-for-close when the client hangs up on us
...
at the same time we get an end relay cell.
(thanks to wmf for reminding me)
svn:r2181
2004-08-07 02:19:49 +00:00
Roger Dingledine
658e02a621
untwisting the logic, it would seem the pkey is always defined?
...
svn:r2180
2004-08-07 01:48:50 +00:00
Nick Mathewson
6ceb351e31
Comment about n_args<1 is correct, since all directory servers are running post-007x versions
...
svn:r2179
2004-08-07 01:30:23 +00:00
Roger Dingledine
8491d97b9c
print the name of the dirserver that told us we were unverified
...
nick, please review this.
svn:r2177
2004-08-07 01:17:38 +00:00
Nick Mathewson
f5f4314e2d
Always initialize hexid in rend_mid_rendezvous, no matter what
...
svn:r2176
2004-08-07 01:12:04 +00:00
Nick Mathewson
380f32f07d
hex_encode is obsoleted by base16_encode, and never actually worked in the first place. (Thanks to Timo Lindfors for noticing the never-actually-worked part.)
...
svn:r2175
2004-08-07 01:03:33 +00:00
Roger Dingledine
9952b37456
reject tor-resolve requests for .onion addresses early
...
svn:r2174
2004-08-07 00:19:14 +00:00
Roger Dingledine
810ebc80d0
be willing to expire routers that have a dirport open
...
it's just the authoritative dirservers we want to not forget
svn:r2173
2004-08-06 22:47:41 +00:00
Roger Dingledine
e95ae1c9ad
let purging routerinfos and descriptors take an age argument
...
svn:r2171
2004-08-06 22:15:25 +00:00
Nick Mathewson
bed5696185
Keep track of a whole day of bandwidth, not just 12 hrs
...
svn:r2168
2004-08-06 20:46:50 +00:00
Nick Mathewson
3ca2728eb2
(size_t)-1 is never < 0; fix an XXXX008 by changing the interface for dirserv_get_runningrouters
...
svn:r2165
2004-08-06 20:00:16 +00:00
Nick Mathewson
2ff6d6d8b9
There is no space after network-status; make router_get_hash_impl more bulletproof.
...
svn:r2162
2004-08-06 19:54:20 +00:00
Roger Dingledine
6e9bdc862c
when they use tor as an http proxy, point them at a better url
...
svn:r2161
2004-08-06 19:44:17 +00:00
Roger Dingledine
05e9fb5c44
and add a comment to that effect
...
svn:r2159
2004-08-06 10:13:25 +00:00
Roger Dingledine
f8c14e5dce
make explicit that 'no socks policy' means 'accept'
...
svn:r2158
2004-08-06 10:12:55 +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
967a762fe1
they're uint64 and uint32, not int and int
...
svn:r2152
2004-08-06 08:40:55 +00:00
Roger Dingledine
f32e34044f
list total traffic and total uptime in -usr1 stats
...
svn:r2151
2004-08-06 08:37:13 +00:00
Roger Dingledine
1d41c0ee35
note a bug that adam found
...
svn:r2150
2004-08-06 02:27:06 +00:00
Roger Dingledine
3b00c950c2
note a bug in our dns error handling. we should fix this sometime.
...
svn:r2149
2004-08-05 19:33:54 +00:00
Roger Dingledine
de0f72ce2a
bugfix: when you finish answering a 'resolve' request, hold the
...
connection open so you can flush the answer
svn:r2148
2004-08-05 00:39:23 +00:00
Roger Dingledine
54dd90d391
bugfix: when tor-resolve asks to resolve an IP to an IP and we answer
...
immediately, there's no need to send an 'end' relay cell when we close
the conn.
svn:r2147
2004-08-04 21:38:00 +00:00
Roger Dingledine
0c8542d889
fix rare race condition that causes infinite loop
...
if we get a sigchld but all our children are gone by the time we get
around to reaping them (i don't think this should ever happen, but it
just did), then we'd loop forever trying to reap them.
svn:r2141
2004-08-04 06:49:17 +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
Nick Mathewson
75684a48d5
<arma> did you get it working on win32? or just compiling
...
svn:r2136
2004-08-04 04:58:30 +00:00
Nick Mathewson
78f12ffcca
Bugfix: "Okay, I just shut down like you told me. Now let me verify your signature." Also fix error message when running over-new version.
...
svn:r2135
2004-08-04 02:35:06 +00:00
Roger Dingledine
d0cfbcf875
only pick a default nickname if you're a server
...
svn:r2134
2004-08-04 02:15:22 +00:00
Roger Dingledine
a939796919
put a comment by routerlist_update_from_runningrouters() to
...
remind me that it's not used yet
svn:r2132
2004-08-04 01:25:21 +00:00
Roger Dingledine
da26a7a197
log a warning if you're running an unverified server, to let
...
you know you might want to get it verified
also, moved that whole block below the check-signature logic, so
we don't execute it if the directory is a fake.
(the recommended-versions logic is still executed before the signature
is checked; we should fix that.)
svn:r2131
2004-08-04 01:17:21 +00:00
Nick Mathewson
630e1e4b44
Hack: Include date with successful directory GETs.
...
svn:r2130
2004-08-04 01:15:57 +00:00
Nick Mathewson
14d5478f29
Add functions to format and parse RFC1123-style times, for HTTP protocol.
...
svn:r2129
2004-08-04 01:11:15 +00:00
Roger Dingledine
8b55f73bbe
put the have_warned_about_unsafe_socks static var inside the function
...
svn:r2128
2004-08-04 01:08:10 +00:00
Nick Mathewson
5b61dd0457
Fix all warnings on win32 build
...
svn:r2127
2004-08-03 23:57:05 +00:00
Roger Dingledine
8cb4124121
warn if we use an unsafe socks variant
...
for now, warn every time. we should decide how often we want to warn;
one problem here is that there are several scenarios where we use an
unsafe socks variant safely, so the warning may be inaccurate. hm.
svn:r2126
2004-08-03 23:42:33 +00:00
Roger Dingledine
5b54780df3
don't send an end back for a malformed resolved cell,
...
since they don't establish streams
svn:r2119
2004-07-23 06:28:12 +00:00
Roger Dingledine
cc54d9efe9
tor-resolve triggered a has_sent_end warning
...
svn:r2116
2004-07-23 00:04:40 +00:00
Roger Dingledine
a328aab316
clean whitespace and tabs
...
svn:r2115
2004-07-22 23:21:12 +00:00
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
Nick Mathewson
1391eafe67
Chek for overlong nicknames in add_nickname_list_to_smartlist
...
svn:r2109
2004-07-22 21:36:03 +00:00
Nick Mathewson
7b4865ec33
Add notion of "longest nickname-or-hex-digest-with-$"
...
svn:r2108
2004-07-22 21:31:04 +00:00
Nick Mathewson
0c990259de
Add noisy debug log to hunt for bug in router_update_status_from_smartlist
...
svn:r2107
2004-07-22 21:20:23 +00:00
Nick Mathewson
d07d0a4e6b
Add fingerprint to router format in tests
...
svn:r2106
2004-07-22 20:34:55 +00:00
Nick Mathewson
33fe5e362f
Never use time(NULL) as assumed publication time for a directory.
...
svn:r2105
2004-07-22 20:30:02 +00:00
Roger Dingledine
7459d067a5
now base16_encode() and base32_encode() can't ever fail
...
svn:r2103
2004-07-22 08:30:06 +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
a403c1035e
getting an unknown descriptor is an info, not a warn, now
...
svn:r2098
2004-07-22 06:04:13 +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
eb0a19c475
change 0.0.8 extend cell format so it's compatible with 0.0.7
...
svn:r2094
2004-07-22 03:47:20 +00:00
Roger Dingledine
6c56f34aaf
clients shouldn't create datadir until we have something to put there
...
svn:r2092
2004-07-22 00:13:42 +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
f82a36508d
make router_nickname_is_approved() do the right thing
...
svn:r2090
2004-07-21 22:54:27 +00:00
Roger Dingledine
3783d2e682
if johnny has three fenceposts, and jill takes four away...
...
svn:r2089
2004-07-21 22:37:03 +00:00
Roger Dingledine
ce7fcd110c
solve the authdirserver initialization precedence problem
...
svn:r2085
2004-07-21 18:53:56 +00:00
Roger Dingledine
1e62d24ddc
bugfix: only require the correct key if the nickname is for
...
a verified router
svn:r2084
2004-07-21 18:20:09 +00:00
Roger Dingledine
fd0fcc89e9
disallow picking unverified routers in circuits
...
(for now)
svn:r2082
2004-07-21 09:35:24 +00:00
Roger Dingledine
ecc9009256
authdirservers accept the uploading of unverified descriptors.
...
fix a bunch of bugs in router_update_status_from_smartlist()
(Nick, did I get them all, or was there a trickier one still hiding?)
svn:r2081
2004-07-21 09:13:12 +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
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
Roger Dingledine
ddb6eb35af
we were counting incorrectly when trying to figure out whether
...
a given AP stream was being handled or not.
(how did this work?)
svn:r2077
2004-07-21 03:16:24 +00:00
Roger Dingledine
30d6b1479b
clients exit immediately on interrupt; they don't wait
...
svn:r2076
2004-07-21 03:15:32 +00:00
Roger Dingledine
84b8f8e04a
fix some bool logic
...
svn:r2075
2004-07-21 02:42:49 +00:00
Roger Dingledine
e547ab293b
make connection_tls_finish_handshake() more plausible.
...
now we accept connections from unknown routers.
svn:r2074
2004-07-21 02:25:14 +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
Roger Dingledine
99926813b1
get the function prototype right
...
svn:r2072
2004-07-21 00:21:26 +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
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
Nick Mathewson
18d752e518
Correct "advance-time" logic
...
svn:r2069
2004-07-20 23:25:00 +00:00
Nick Mathewson
2a339b7627
Split uptime into separate field
...
svn:r2067
2004-07-20 21:13:11 +00:00
Nick Mathewson
e57698cc6e
Track bandwidth usage to estimate capacity
...
svn:r2065
2004-07-20 20:57:46 +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
66fc6cf04a
if you're an OR and he's an OR and he's running 0.0.7,
...
don't expire your connections to him.
svn:r2062
2004-07-20 19:28:02 +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
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
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
Roger Dingledine
87d0948903
bugfix: hidden services were broken in cvs
...
svn:r2053
2004-07-17 19:50:29 +00:00
Nick Mathewson
df3544422c
Change rule from "reject non-recommended versions" to "reject obsolete versions". A version is "obsolete" if it is non-recommended, and at least one recommended version is newer than it.
...
svn:r2052
2004-07-16 23:33:42 +00:00
Nick Mathewson
1040762531
Remove 1024-router limit in routerparse.c; unify handling of running-routers lines in running-routers requests and in directories; set is_verified field of routerinfo_ts correctly; use most-recent-info rule to decide whether to change router-is-running status.
...
svn:r2051
2004-07-16 23:05:40 +00:00
Nick Mathewson
bc36db351f
Resolve all DOCDOCs.
...
svn:r2050
2004-07-16 22:23:18 +00:00
Nick Mathewson
656a664334
Revert cpuworker to use addr/port
...
svn:r2049
2004-07-16 21:47:18 +00:00
Nick Mathewson
0b3357d573
Look in .torrc if no CONFDIR "torrc" is found.
...
svn:r2048
2004-07-16 19:43:58 +00:00
Nick Mathewson
c458f33ef1
Fix warning
...
svn:r2046
2004-07-15 01:59:18 +00:00
Nick Mathewson
5f7738d4cc
Code to parse tor version numbers so we can do an is-newer-than check.
...
svn:r2044
2004-07-13 19:16:49 +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
Nick Mathewson
e9365f9ed5
Bugfix: some things (like ctrl-z) can make a second take more than one second
...
svn:r2042
2004-07-13 18:07:57 +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
017d7d1fb3
refuse to build a circuit before the directory has arrived
...
this will prevent a few of the 'couldn't decrypt onionskin' errors, maybe
svn:r2036
2004-07-13 01:25:39 +00:00
Roger Dingledine
3294b514d3
when you expire a wedged dir conn, conn_close_if_marked will take
...
care of trying to flush before it closes
svn:r2035
2004-07-13 00:38:08 +00:00
Roger Dingledine
149115cc4e
bugfix: tell circuits what id_digest to look for, so
...
n_conn_open() can find waiting circuits.
svn:r2034
2004-07-12 23:53:16 +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
Roger Dingledine
63256c9e7a
make unit tests pass again
...
but note a bug that i don't know how to address. nick?
svn:r2030
2004-07-12 20:18:05 +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
e167eeb18e
add 'advertisedbandwidth' to router descriptor
...
svn:r2028
2004-07-12 18:02:54 +00:00
Roger Dingledine
379768290e
fix a bug related to reading usernames for socks4
...
this hasn't bitten us yet, but hey.
svn:r2026
2004-07-12 16:51:05 +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
Nick Mathewson
d5e275ddf4
Fix bug reported by peter palfrader: an empty address is unresolvable, but not an occasion for an assertion failure in a dnsworker.
...
svn:r2015
2004-07-06 23:25:21 +00:00
Roger Dingledine
cbf73b2bc5
touchups all over
...
put uptime in descriptor
svn:r2011
2004-07-04 22:48:11 +00:00
Nick Mathewson
0f3fcfd1db
When tor_lookup_hostname says 0.0.0.0, treat it as an error.
...
svn:r2003
2004-07-04 04:52:43 +00:00
Roger Dingledine
198e5f4c16
fix a seg fault when you try to launch a circ
...
svn:r2002
2004-07-03 01:45:13 +00:00
Roger Dingledine
dc0a36d27b
populate circ->n_conn_id_digest when we set circ->n_conn
...
svn:r2001
2004-07-03 01:37:59 +00:00
Nick Mathewson
7d8de8cd10
More digest/nickname fixes
...
svn:r2000
2004-07-02 23:40:03 +00:00
Roger Dingledine
d58d4c0db6
another checkpoint toward letting ORs connect on demand
...
svn:r1999
2004-07-02 23:08:59 +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
29818d5b6b
Use arguments to routerlist_update_from_runningrouters correctly
...
svn:r1992
2004-06-30 16:48:36 +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
Roger Dingledine
899bd4f471
stop leaking options->ContactInfo on hup
...
svn:r1989
2004-06-29 19:46:06 +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
207fcb35d1
tweaks and bugfix on resolve/resolved code
...
svn:r1980
2004-06-17 21:11:09 +00:00
Nick Mathewson
3708886939
Implement RESOLVE/RESOLVED cells and socks resolve code
...
svn:r1978
2004-06-17 18:13:09 +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
Roger Dingledine
80cee93f84
include <inttypes.h> if we have it
...
openbsd on a sparc64 needs this (apparently)
svn:r1971
2004-06-16 00:49:27 +00:00
Nick Mathewson
a788981399
Implement code to run tor as an NT service. More testing is needed, as is code to install the service.
...
svn:r1966
2004-06-12 21:43:02 +00:00
Nick Mathewson
125b351970
Break tor_main into startup/loop/shutdown portions, to make NT service refactoring possible.
...
svn:r1965
2004-06-12 19:45:46 +00:00
Nick Mathewson
dbf9fe57ea
Use intptr_t correctly in test.c; try to resolve ia64 warnings
...
svn:r1963
2004-06-08 19:08:45 +00:00
Roger Dingledine
d90cb3504e
provide a prototype for dnsworkers_rotate
...
svn:r1961
2004-06-07 20:00:30 +00:00
Nick Mathewson
184f4e6044
Rotate dnsworkers and cpuworkers on SIGHUP, so they get new config settings too
...
svn:r1950
2004-06-06 03:38:31 +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
Roger Dingledine
42569ffd0f
bump an info message down to a debug
...
svn:r1947
2004-06-03 05:57:27 +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
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
605e10a650
Stop multiplying logs on sighup.
...
svn:r1936
2004-06-02 19:18:37 +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
Nick Mathewson
0932505829
Only connection_dns_remove resolving exit connections
...
svn:r1934
2004-06-02 18:12:49 +00:00
Roger Dingledine
fbbb4d01c3
bugfix: while closing a circuit, we were freeing the conns that were
...
pending resolve, but not removing them from the pending resolve list
svn:r1933
2004-06-02 18:11:28 +00:00
Nick Mathewson
0d20fee2fb
Add more asserts to dns-pending connections; fix a couple seeming bugs.
...
svn:r1931
2004-06-01 22:09:58 +00:00
Nick Mathewson
94782444f8
Check recommended-software string *early*, before actually parsing the directory.
...
svn:r1930
2004-06-01 18:19:01 +00:00
Roger Dingledine
4181d18b3d
declare the epipe bug a non-bug.
...
now we catch and ignore epipe signals, and when write returns epipe,
we simply return -1 and close the socket/connection.
svn:r1928
2004-06-01 17:31:13 +00:00
Roger Dingledine
1ef411fefd
use sys/param.h if it's there
...
svn:r1927
2004-06-01 17:03:01 +00:00
Roger Dingledine
834ffa358f
bugfix: if the wedged dir conn has no bytes to flush, then we never
...
close it.
svn:r1924
2004-05-28 17:56:17 +00:00
Roger Dingledine
8064807896
dirservers try to reconnect periodically too, in case connections have failed
...
svn:r1922
2004-05-28 15:01:47 +00:00
Roger Dingledine
1841aa456b
rik's patch to not complain about freebsd's bug
...
svn:r1921
2004-05-26 20:27:54 +00:00
Nick Mathewson
9b4e8486ce
Keep temporary log in place while configuring logs
...
svn:r1919
2004-05-24 02:28:15 +00:00
Roger Dingledine
994c9cbd7e
commit two fixes from Thomas Themel
...
svn:r1918
2004-05-22 18:05:20 +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
a8417dfac8
fix a double mark-for-close
...
svn:r1913
2004-05-20 22:39:01 +00:00
Nick Mathewson
ccb825128e
Tinker with log behavior: never send error messages about logs into the bitbucket
...
svn:r1912
2004-05-20 19:47:28 +00:00
Roger Dingledine
1c21a02b90
router_choose_random_node() was ignoring its routerlist argument.
...
so now we don't pass it one.
svn:r1911
2004-05-20 19:12:28 +00:00
Roger Dingledine
66dd21b7a4
some more patching
...
svn:r1910
2004-05-20 08:41:54 +00:00
Roger Dingledine
034110e761
bugfix: if no loglevel or logfile is specified, then we need to open
...
a default log to stdout.
svn:r1909
2004-05-20 08:15:28 +00:00
Roger Dingledine
faf2fdb1e0
don't ever expire dirserver routerinfos!
...
svn:r1908
2004-05-20 06:42:38 +00:00
Roger Dingledine
30a07b2ecd
non-dirservers expire routerinfo's that are more than a day old
...
svn:r1907
2004-05-20 05:10:30 +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
Nick Mathewson
80be19d9da
Tighten assert_cpath_layer_ok assumptions
...
svn:r1904
2004-05-19 23:51:39 +00:00
Roger Dingledine
b37450ce55
do all the heavy lifting in connection_about_to_close_connection,
...
not in _connection_mark_for_close
this will hopefully clean up the huge cyclical function mess
svn:r1903
2004-05-19 23:32:20 +00:00
Nick Mathewson
b8f535a2d8
tor_assert, not assert. stdout, not stderr
...
svn:r1902
2004-05-19 21:40:44 +00:00
Nick Mathewson
d95f347b14
Add Port to *bindAddress.
...
svn:r1901
2004-05-19 20:25:44 +00:00
Nick Mathewson
9d2cd7fc6e
Allow multiple logfiles at different severity ranges
...
svn:r1899
2004-05-19 20:07:08 +00:00
Roger Dingledine
41c9b8230d
fix compile error in dirserv
...
(declare variables before the rest of the function)
svn:r1896
2004-05-19 19:42:50 +00:00
Nick Mathewson
ba14428d66
Fix segfault
...
svn:r1895
2004-05-19 19:28:24 +00:00
Nick Mathewson
1cfac90984
remove upper limit on number of descriptors/directories in dirserver; use smartlists instead of arrays
...
svn:r1894
2004-05-18 17:41:40 +00:00
Roger Dingledine
d2de7120fa
fix a seg fault, add another XXX for nick ;)
...
svn:r1892
2004-05-18 16:54:04 +00:00
Nick Mathewson
7511fbf993
Resolve some XXXs
...
svn:r1889
2004-05-18 15:35:21 +00:00
Nick Mathewson
a782b83c28
Only try to launch a fixed number of intro circuits for a service per 15-minute period or before all of the intro circuits succeed, whichever comes first
...
svn:r1883
2004-05-18 01:53:53 +00:00
Nick Mathewson
683d06bf44
Fix segfault and logic error in last patch.
...
svn:r1881
2004-05-17 20:41:40 +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
04bb8c8046
bugfix: if a circuit if borderline too old, then count it as too old.
...
bugfix: we were retrying the same circuit after getting a resolve
failure. so of course the next two tries would fail too. now we try
a new circuit each time (at most three times).
svn:r1867
2004-05-15 07:21:25 +00:00
Roger Dingledine
d7815e85a7
assert_cpath_ok has always been broken
...
re-disable it.
svn:r1864
2004-05-13 07:44:21 +00:00
Roger Dingledine
ef561c0e42
Break files apart into more modules
...
* \file circuitbuild.c
* \brief The actual details of building circuits.
* \file circuitlist.c
* \brief Manage the global circuit list.
* \file circuituse.c
* \brief Launch the right sort of circuits, attach streams to them.
* \file connection_edge.c
* \brief Handle edge streams.
* \file onion.c
* \brief Functions to queue create cells, and handle onionskin
* parsing and creation.
* \file relay.c
* \brief Handle relay cell encryption/decryption, plus packaging and
* receiving from circuits.
svn:r1863
2004-05-13 07:24:49 +00:00
Roger Dingledine
5ba9235873
clean up directory.c API
...
svn:r1860
2004-05-12 23:48:57 +00:00