Nick Mathewson
232861ba42
Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
...
svn:r4411
2005-06-11 18:52:12 +00:00
Roger Dingledine
fcd0fc3364
flesh out the source file descriptions for doxygen
...
svn:r4404
2005-06-11 05:31:17 +00:00
Nick Mathewson
0831823763
Change end-of-file NLNL convention. It turns out arma I and I agree.
...
svn:r4382
2005-06-09 19:03:31 +00:00
Nick Mathewson
a6f51001a5
New whitespace normalization rule: no blank line at EOF.
...
svn:r4378
2005-06-09 16:46:51 +00:00
Roger Dingledine
0fa1890e0e
fix the assumption that uninitialized variables are 0
...
clean up router_load_single_router() more
svn:r4266
2005-05-18 03:52:07 +00:00
Roger Dingledine
fe78aac027
fix seg faults when router_load_single_router fails
...
svn:r4265
2005-05-18 03:42:46 +00:00
Roger Dingledine
b7d6b8a397
doxygeny goodness from tyranix
...
svn:r4262
2005-05-17 17:01:36 +00:00
Roger Dingledine
07230a698c
if router_resolve fails on the descriptor the controller
...
gives us, we shouldn't leave the routerinfo in the list.
svn:r4205
2005-05-14 05:01:41 +00:00
Nick Mathewson
00f2a09380
Append default exit policy before checking for implicit internal addresses: fix bug 129.
...
svn:r4201
2005-05-14 00:13:17 +00:00
Nick Mathewson
3893b3c7ac
Patch for task 133
...
svn:r4189
2005-05-10 22:33:45 +00:00
Roger Dingledine
cee7c5988c
fix massive memory leak
...
(50 megabytes over a couple of days, on the dirservers)
svn:r4181
2005-05-06 08:53:23 +00:00
Nick Mathewson
69dc4e1675
Remove support for looking at old directory/routerdesc elements; mark non-new elements optional; switch to new format for dir-signing-key; start accepting newer elements so we can mark them as non-opt later; make tor-spec say the right stuff.
...
svn:r4154
2005-05-02 21:22:31 +00:00
Roger Dingledine
769541ff7e
be willing to load balance over up to 2mB, not 1mB, of advertised capacity
...
svn:r4080
2005-04-12 22:09:47 +00:00
Roger Dingledine
716d9bc99a
when using preferred entry or exit nodes, ignore whether
...
the circuit wants uptime or capacity. they asked for the
nodes, they get the nodes.
svn:r4025
2005-04-06 06:17:35 +00:00
Nick Mathewson
1aedf3daf5
Only warn once per nickname from add_nickname_list_to_smartlist per failure.
...
svn:r3997
2005-04-03 05:53:34 +00:00
Nick Mathewson
4a90d37229
Better messages when POSTDESCRIPTOR fails
...
svn:r3989
2005-04-02 22:02:13 +00:00
Nick Mathewson
0e81265359
update copyright notices.
...
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
e786e5dedb
when building testing circuits, always use middle hops
...
running at least 0.0.9.7
svn:r3966
2005-04-01 08:42:26 +00:00
Roger Dingledine
35953edae0
Implement controller's "extendcircuit" directive.
...
Also refactor circuit building so we plan the whole path ahead
of time.
svn:r3797
2005-03-22 00:42:38 +00:00
Nick Mathewson
b88c4ba11c
Turn addr_policy_compare from a tristate to a quadstate; this should help address our "Ah, you allow 1.2.3.4:80. You are a good choice for google.com" problem.
...
svn:r3786
2005-03-19 06:57:16 +00:00
Nick Mathewson
df9c8feac7
Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
...
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
f90ccf5648
Implement new controller events for changed descriptors and new (not-yet-attached) streams.
...
svn:r3731
2005-03-02 22:29:58 +00:00
Nick Mathewson
c5091e7134
When copying routerinfo, copy descriptor too to prevent later double-free.
...
svn:r3711
2005-02-28 03:37:27 +00:00
Roger Dingledine
a1f1fa6ab2
Checkpoint in-progress fixes:
...
Add 'testing' circuit purpose, for reachability testing.
Notice when our IP changes, and reset stats.
Try to pull down a directory via Tor to see if our DirPort is working.
Try to extend a circuit back to us to see if our ORPort is working.
Only publish a descriptor if they're both reachable.
These mostly work, and I'd better get them in before I cause conflicts.
svn:r3703
2005-02-27 09:47:01 +00:00
Nick Mathewson
8efb2a957d
Make sure that router_get_by_* can always return "me"
...
svn:r3702
2005-02-27 07:23:42 +00:00
Nick Mathewson
bbaa3c7792
Implement more control spec functionality
...
- Mapaddress
- Postdescriptor
- GetInfo on descriptors
Required changes elsewhere:
- Keep the most recent running_routers_t in the routerlist_t. That way we
can learn about new routers and remember whether we were last told that
they were up or down. Also enables more simplifications.
- Keep the signed descriptor inside routerinfo_t. This makes
descriptor_entry_t in dirservers.c unneeded.
- Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun.
- Check addresses for plausibility before mapping them.
svn:r3696
2005-02-25 20:46:13 +00:00
Roger Dingledine
6329811a88
fix a seg fault from tor_free_all
...
svn:r3690
2005-02-24 23:01:26 +00:00
Nick Mathewson
60f234f42b
Add more functions to free things to help dmalloc allong.
...
svn:r3613
2005-02-10 23:18:39 +00:00
Roger Dingledine
236aa86ae7
stop picking unverified dir mirrors, ever.
...
it only leads to misery.
svn:r3610
2005-02-10 07:00:23 +00:00
Roger Dingledine
1447145470
give a bit more load to servers that claim to be able to
...
handle a whole lot.
svn:r3489
2005-02-01 02:56:31 +00:00
Roger Dingledine
d273891107
if we fetch the dir from a mirror that has a wildly skewed
...
clock, then don't bother checking recommended-versions: it will
just make us sad.
as a side effect, people running obsolete versions and whose
clocks are wildly skewed will not be auto-shut-down. but they
will still get warns about their clock skew.
svn:r3459
2005-01-29 11:48:37 +00:00
Nick Mathewson
8115ca5f99
Log the offending policy, not the first policy
...
svn:r3394
2005-01-20 20:42:45 +00:00
Nick Mathewson
129e754ae4
Warn when exit policy implicitly allows local addresses.
...
svn:r3383
2005-01-20 18:39:48 +00:00
Roger Dingledine
0aff4ff4cb
get rid of 0.0.8 backwards compatibility
...
svn:r3353
2005-01-13 20:22:38 +00:00
Roger Dingledine
84c81e0783
Annotate circuits w/ whether they aim to contain high uptime nodes and/or
...
high capacity nodes. When building circuits, choose appropriate nodes.
New config option LongLivedPorts to indicate application streams
that will want high uptime circuits.
When attaching a stream to a circuit, pay attention to its requirements.
This means that every single node in an intro rend circuit, not just
the last one, will have a minimum uptime.
Boost the min uptime from an hour to 24 hours.
svn:r3339
2005-01-12 04:58:23 +00:00
Nick Mathewson
91bafc476e
Fix a fun bug: do not rewrite a cached directory back to the cache; otherwise we will think it is recent and not fetch a newer one.
...
svn:r3319
2005-01-06 20:11:52 +00:00
Nick Mathewson
0c4186d6ee
Use correct logic to decide whether there are more directory servers to retry.
...
svn:r3257
2005-01-03 20:51:24 +00:00
Nick Mathewson
fca7ba9777
Resolve task 42: find where 19-char nicknames were getting truncated when read from certs, and fix it. Also audit use of MAX_NICKNAME_LEN; no other badness found, but some docs/code cleaned up a touch.
...
svn:r3244
2005-01-03 17:53:20 +00:00
Roger Dingledine
95f3e6161b
require BandwidthRate to be at least 10kB/s
...
svn:r3232
2004-12-31 21:47:54 +00:00
Roger Dingledine
5d961c2c06
plug another memory leak
...
svn:r3104
2004-12-07 08:51:10 +00:00
Roger Dingledine
ef6c9d18e7
New circuit building strategy: keep a list of ports that we've used in the past 6 hours, and always try to have 2 circuits open or on the way
...
that will handle each such port. (We can extend this to include addresses
if exit policies shift to require that.) Seed us with port 80 so web
browsers won't complain that Tor is "slow to start up".
This was necessary because our old circuit building strategy just involved
counting circuits, and as time went by we would build up a big pile of
circuits that had peculiar exit policies (e.g. only exit to 9001-9100)
which would take up space in the circuit pile but never get used.
Fix router_compare_addr_to_addr_policy: it was not treating a port of *
as always matching, so we were picking reject *:* nodes as exit nodes too.
If you haven't used a clean circuit in an hour, throw it away, just to
be on the safe side.
This means after 6 hours a totally unused Tor client will have no
circuits open.
svn:r3078
2004-12-05 07:10:08 +00:00
Roger Dingledine
02b3229a04
plus add a comment re: the previous bug
...
svn:r3076
2004-12-04 10:18:41 +00:00
Roger Dingledine
52676364b9
bugfix: router_exit_policy_rejects_all() was broken, so we were
...
sometimes picking middleman nodes as our last hop, which wasn't
very useful.
svn:r3075
2004-12-04 08:56:59 +00:00
Nick Mathewson
fc87758ff3
Add function to check that addr_policy_t is okay; change struct addr_policy_t to addr_policy_t.
...
svn:r3070
2004-12-04 01:14:36 +00:00
Nick Mathewson
b457cfb5eb
Spell-check strings and comments
...
svn:r3052
2004-12-01 03:48:14 +00:00
Nick Mathewson
7fbd297532
Suggestion from weasel: Make tor --version --version dump the cvs Id of every file.
...
svn:r3019
2004-11-29 22:25:31 +00:00
Nick Mathewson
aff5122685
Fetch cached running-routers from servers that serve it (that is, authdirservers, and servers running 0.0.9rc5-cvs or later.)
...
svn:r3018
2004-11-29 21:01:34 +00:00
Roger Dingledine
22727b4edc
wrong is ok, and right is fine, but in between is apparently
...
totally unacceptable to me.
svn:r3005
2004-11-28 11:39:53 +00:00
Nick Mathewson
6f5dbefa7e
Normalize space: add one between every control keyword and control clause.
...
svn:r3003
2004-11-28 09:05:49 +00:00
Roger Dingledine
7c9a707900
remove emacs droppings, since nick says he doesn't need them anymore
...
svn:r2989
2004-11-26 04:00:55 +00:00
Nick Mathewson
f91152ce6a
Clarify a bunch of log messages
...
svn:r2983
2004-11-25 04:20:10 +00:00
Roger Dingledine
63353462f8
if your requested exit node has bandwidth 0, pick it anyway
...
svn:r2920
2004-11-20 12:41:05 +00:00
Roger Dingledine
50c15943a2
move second stat to a cleaner place
...
svn:r2890
2004-11-15 09:22:01 +00:00
Roger Dingledine
5dcc6fd8b2
ok ok the stat wasn't redundant
...
but the warn was
svn:r2852
2004-11-14 13:35:39 +00:00
Roger Dingledine
4564367b2a
Remove redundant stat() for reading cached directory, and remove
...
confusing warn when the cached directory isn't there yet.
svn:r2847
2004-11-14 09:40:07 +00:00
Nick Mathewson
5109de5626
Rename exit_policy to addr_policy, since it gets used for SOCKS and directory connections too. Make all policies get validated in options_validate, and make SOCKS/directory policies get set in options_act.
...
svn:r2819
2004-11-12 19:39:13 +00:00
Nick Mathewson
5a5be93f80
Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
...
svn:r2758
2004-11-09 20:04:00 +00:00
Nick Mathewson
7daab4034d
Fix windows build for VC6; centralize newline-fiasco-damage-control logic
...
svn:r2756
2004-11-09 19:13:08 +00:00
Nick Mathewson
a2079c074f
Add some documentation to routerlist
...
svn:r2753
2004-11-09 17:14:15 +00:00
Roger Dingledine
3ce3d6eead
resolve a 64-bit warning
...
svn:r2750
2004-11-09 11:36:38 +00:00
Roger Dingledine
6521c2ce51
Stop using the wrong DataDirectory when we're validating.
...
Also validate/normalize the DataDirectory better.
svn:r2732
2004-11-09 07:05:53 +00:00
Roger Dingledine
394554cfbf
Clean up copyrights.
...
Break connection_consider_empty_buckets() out of
connection_read_bucket_decrement().
svn:r2698
2004-11-07 01:33:06 +00:00
Roger Dingledine
6c61ed4fb5
Make options no longer a global variable.
...
Now we can try setting an option but back out if it fails to parse, or
if it's disallowed (e.g. changing RunAsDaemon from 1 to 0).
Use parse_line_from_str rather than parse_line_from_file.
svn:r2692
2004-11-06 05:18:11 +00:00
Roger Dingledine
2ba3a9de16
make the default default options.FirewallPorts be the default
...
svn:r2683
2004-11-04 23:39:57 +00:00
Roger Dingledine
f7a30fa73e
break out validate_options
...
leave options.FirewallPorts NULL if it's NULL
svn:r2673
2004-11-04 10:23:30 +00:00
Nick Mathewson
451f8b5045
- Implement all of control interface except authentication, setconfig,
...
and actually making the sockets.
- Make sure that identity-based nicknames start with $.
- Use new string_join interface.
svn:r2661
2004-11-03 18:33:07 +00:00
Roger Dingledine
e541319dcb
lay the groundwork for a default value for each config option.
...
tolerate null exitnodes, entrynodes, etc config options.
svn:r2655
2004-11-03 10:08:44 +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
Nick Mathewson
11d330be5e
Tweaks to prevent obsolete restarting tors from hammering the dirservers. (1) Cache a received directory as soon as the signature checks out. (2) Treat a cached directory as "recent" based on its mtime. (3) If we have a recent directory, we dont need to fetch a newer one for DirFetchPostPeriod. This needs review!
...
svn:r2618
2004-10-28 18:37:52 +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
Nick Mathewson
6980929e64
Use strlcpy, not strcpy.
...
svn:r2610
2004-10-27 06:48:16 +00:00
Nick Mathewson
44d4516155
Use tor_snprintf, not snprintf
...
svn:r2609
2004-10-27 06:37:34 +00:00
Nick Mathewson
bc62f8e983
Replace sprintf with snprintf
...
svn:r2602
2004-10-27 05:53:07 +00:00
Nick Mathewson
b90b2bb848
Add and document router-status line using new unified liveness/verifiedness format; continue to generate running-routers; continue to parse running-routers when no router-status line is found
...
svn:r2592
2004-10-27 00:48:51 +00:00
Nick Mathewson
e5049d5aa3
Remove routerinfo_t->is_trusted_dir, and all the twisted machinery used to
...
maintain it.
Have clients default to the nickname "client" in their certificates.
Give a less frightening warning on obsolete (pre-0.0.8) routerinfo_t's.
svn:r2568
2004-10-19 18:19:59 +00:00
Roger Dingledine
97a0a43511
start the process of making 0.0.7* obsolete
...
svn:r2565
2004-10-17 21:51:20 +00:00
Nick Mathewson
56a592dbe3
Fix memory leak
...
svn:r2535
2004-10-16 08:39:56 +00:00
Nick Mathewson
9d5831341e
Implement user-declared node families.
...
svn:r2534
2004-10-15 20:52:09 +00:00
Nick Mathewson
28dd458eaf
Upload to trusted dir servers based on DirServer config options, not on routerinfos.
...
svn:r2529
2004-10-15 19:04:38 +00:00
Nick Mathewson
88e0c080cf
Ignore fascistfirewall when dealing with service descriptors; obey fascistfirewall when posting server descriptors; ignore fascistfirewall on directory connections when httpproxy is set.
...
svn:r2527
2004-10-15 04:57:36 +00:00
Nick Mathewson
ff38cc06e1
Fix search-and-replace in comments: Friends->family does not imply friendship->familyhip.
...
svn:r2525
2004-10-15 03:55:53 +00:00
Nick Mathewson
7fa5d224d4
Implement "families" of coadministered nodes; prevent them all from appearing on the same circuit.
...
svn:r2523
2004-10-15 01:58:11 +00:00
Nick Mathewson
bd10bf4b5b
Try to always dtrt if routerlist==NULL
...
svn:r2489
2004-10-14 03:44:45 +00:00
Roger Dingledine
89280e6c20
rename addr to address to we avoid this bug later
...
svn:r2488
2004-10-14 03:31:40 +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
92bb360ad7
Add missing line; add similar check
...
svn:r2481
2004-10-14 02:29:03 +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
Nick Mathewson
30dd1c87a5
Add default trusted-dir-server entries only when no dirserver lines are given in the config file
...
svn:r2467
2004-10-13 19:56:42 +00:00
Nick Mathewson
df3098367c
Make directories get generated properly again; debug key lookup. Also, it is hard to find entries in a table when you never put them there.
...
svn:r2462
2004-10-13 18:28:39 +00:00
Nick Mathewson
0068415b80
Add an implementation of trusted_dir_server logic to switch towards simply remembering an addr/port/keyid for each trusted dir server
...
svn:r2443
2004-10-12 15:55:20 +00:00
Nick Mathewson
c7e8c2098a
Include a dir-signing-key token in directories to tell the parsing entity which key is being used to sign. This is the first step in obsoleting the dirservers file.
...
svn:r2428
2004-10-07 21:10:40 +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
Roger Dingledine
8b02610bd5
when an OR starts up, it loads its directory from cache.
...
then it serves *that directory* to others who ask for a copy of the
directory. it's better to serve no directory at all until you have a
fresh copy.
svn:r2418
2004-10-06 05:05:43 +00:00
Nick Mathewson
9e8ae9766e
Only check versions against downloaded directories, not cached directories.
...
svn:r2413
2004-10-03 02:37:52 +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
a31ba30ae6
if our local cached directory is new enough, go ahead and
...
start building circuits while we're fetching a new one
svn:r2394
2004-09-28 23:27:41 +00:00
Nick Mathewson
11384b6d92
Make sure that routerlists contain only routers; give a better error message if they start with a nonrouter.
...
svn:r2393
2004-09-28 22:49:34 +00:00
Nick Mathewson
0c653e5cc7
cached-directory has a directory, not a router list
...
svn:r2392
2004-09-28 22:43:11 +00:00
Roger Dingledine
4b3001a08c
fix some local buffer overflows
...
fix a memory leak
svn:r2391
2004-09-28 22:38:21 +00:00
Roger Dingledine
ff622786f1
slightly better warn message
...
svn:r2357
2004-09-21 17:14:47 +00:00