Commit Graph

328 Commits

Author SHA1 Message Date
Roger Dingledine
1991f6cf48 more doc cleanups and reorganizing
svn:r5336
2005-11-01 03:48:51 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
452f4cfa09 Convert circuituse, command, config, connection, relay, router, test to new logging interface
svn:r5308
2005-10-25 07:04:36 +00:00
Nick Mathewson
f9b0be526e Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
svn:r5302
2005-10-24 19:39:45 +00:00
Nick Mathewson
37708e9b1b Avoid potential infinite recursion when building a descriptor
svn:r5292
2005-10-24 03:04:05 +00:00
Nick Mathewson
3347c1741d Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
svn:r5276
2005-10-18 17:43:54 +00:00
Peter Palfrader
0d9aedfcea Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.


svn:r5263
2005-10-17 16:21:42 +00:00
Roger Dingledine
fd165329b8 start calling it *ListenAddress rather than *BindAddress,
since none of our users know what it means to bind an address or port.


svn:r5260
2005-10-17 03:17:29 +00:00
Peter Palfrader
8808b26206 Check if our IP address has changed every 5 minutes. If it has, update our server descriptor, but not too often
svn:r5246
2005-10-12 22:41:16 +00:00
Nick Mathewson
bf9ff1c1e7 Do not check whether DirPort is reachable when we are suppressing it because of hibernation. (Backport candidate)
svn:r5235
2005-10-12 04:07:10 +00:00
Roger Dingledine
46af2d26d0 you can't declare variables in the middle of a block
svn:r5214
2005-10-07 18:56:21 +00:00
Nick Mathewson
ba24193ab5 Make doxygen marginally happier
svn:r5208
2005-10-06 04:33:40 +00:00
Nick Mathewson
5cf758764e Rate-limit warnings related to unrecognized MyFamily elements.
svn:r5204
2005-10-05 23:20:45 +00:00
Nick Mathewson
61ea516885 Check for named servers when looking them up by nickname;
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.

Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.

Try to list MyFamily elements by key, not by nickname.

Only warn about names that we generated ourself, or got from the local
user.

On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.


svn:r5185
2005-10-04 22:23:31 +00:00
Nick Mathewson
2d203fdcf3 link nicknames to trusted directory servers; log these nicknames when mentioning servers; also, when we get a naming conflict; log which nicknames or keys are supposed to bind.
svn:r5184
2005-10-04 21:21:09 +00:00
Roger Dingledine
e28c31ebce we were leaking some memory every time the client changes IPs
svn:r5165
2005-09-30 06:03:04 +00:00
Roger Dingledine
609af664ac resolve a docdoc
svn:r5157
2005-09-30 00:43:40 +00:00
Roger Dingledine
54a662a542 re-enable dirport testing again
(still need the other half, to notice when it has worked.)


svn:r5152
2005-09-29 23:04:01 +00:00
Roger Dingledine
8ae6e1c226 Be more conservative about whether to advertise our dirport.
The main change is to not advertise if we're running at capacity and
either a) we could hibernate or b) our capacity is low and we're using
a default dirport.


svn:r5148
2005-09-29 06:45:03 +00:00
Roger Dingledine
03d0f62da0 make the numbers in read-history and write-history into uint64s,
so they don't overflow and publish negatives in the descriptor.
fixes bug 193.


svn:r5119
2005-09-23 08:29:58 +00:00
Roger Dingledine
cce469c5ce simplify
svn:r5081
2005-09-16 06:15:34 +00:00
Roger Dingledine
8585599965 correct "your server is reachable" log entries to indicate that it was
self-testing that told us so.


svn:r5034
2005-09-13 21:39:42 +00:00
Nick Mathewson
3dc5e77b58 Numerous changes to move towards client-side v2 directories.
connection.c:
- Add some more connection accessor functions to make directory
  download redundancy checking work.

directory.c, or.h, router.c, routerlist.c:
- Start on logic to note when networkstatus downloads fail.

dirserv.c, routerlist.c, routerparse.c:
- Start maintaining an is_named field in routerstatus_t.  Don't
  actually look at it yet.

dirserv.c, routerlist.c:
- Remove expired networkstatus objects.

or.h:
- Make some booleans into bitfields
- Add prototypes

routerlist.c:
- Sort networkstatus list by publication time
- Function to remove old (older than 10 days) networkstatus objects.
- Function to set a list of routerinfo_ts' status info from the
  current set of networkstatus objects.
- Function to tell which routerinfos we need to download based no the
  current set of networkstatus objects.
- Do not launch a networkstatus download if a redundant one is in progress.

routerparse.c:
- Keep router entries in networkstatus sorted by digest.


svn:r5012
2005-09-12 06:56:42 +00:00
Nick Mathewson
059148f588 Only caches download network-status for now, and they use a different strategy. Add an element to connection_t to remember what we are downloading, and a function to recognize our own fingerprint.
svn:r4944
2005-09-08 20:18:15 +00:00
Roger Dingledine
c9e1c41873 dirserv_add_descriptor() doesn't chew up its argument anymore,
so we can stop protecting it.


svn:r4919
2005-09-08 05:37:22 +00:00
Roger Dingledine
03ddeb2620 strip obsolete code
svn:r4918
2005-09-08 05:32:41 +00:00
Nick Mathewson
5c6c88e76d More stuff for new directories.
- Distinguish v1 authorities (all currently trusted directories) from
  v2 authorities (all trusted directories).
    - Add configuration option for which dirs are v1 authories.
    - Add configuration option for whether to be a v1 authority.
    - Make trusted dirserver selection functions take options to
      choose which functionality we need.
    - Remove option when getting directory cache to see whether they
      support running-routers; they all do now.  Replace it with one
      to see whether caches support v2 stuff.

- Parse, cache, and serve network-status objects properly.

- Serve compressed groups of router descriptors.  The compression logic
  here could be more memory-efficient.

-


svn:r4911
2005-09-07 16:42:53 +00:00
Roger Dingledine
d2a5b614eb if you're an auth dir server, start yourself out as verified.
svn:r4907
2005-09-03 23:10:28 +00:00
Roger Dingledine
711cad94ed when we think a router is unreachable, pass the message back to the
server's logs, and make it a 'warn'.
also, fix a memory leak for rejected router descriptors.


svn:r4889
2005-08-31 06:14:37 +00:00
Roger Dingledine
e9524f9d2d refactor -- no actual changes
svn:r4885
2005-08-30 06:43:07 +00:00
Roger Dingledine
53431a4950 fix compile complaints (and a bug)
svn:r4862
2005-08-26 21:30:52 +00:00
Nick Mathewson
208bdf5f27 No need to load cached directory twice
svn:r4860
2005-08-26 21:19:58 +00:00
Nick Mathewson
7f78be1659 Clean up the "add myself as a trusted dirserver" code.
svn:r4849
2005-08-26 19:31:51 +00:00
Nick Mathewson
cf90a36dd1 Add quotes around filenames in src/or
svn:r4845
2005-08-26 18:44:26 +00:00
Nick Mathewson
d54d7b7ec1 Add some documentation; move the signature generation logic into routerparse.c along with the hash generation logic; make router signing use it as well.
svn:r4840
2005-08-26 15:34:53 +00:00
Roger Dingledine
893acb3acc Make a new AssumeReachable config option that will publish anyway.
Also, let authdirservers start without setting their Address field.
Something is still not working though. Will fix in morning.


svn:r4839
2005-08-26 07:41:19 +00:00
Nick Mathewson
54a6a8f0ef Start implementing the server side of the new directory protocol.
Probably very buggy, since I can't actually run an authdir.

Features
- Generate and publish new network-status format
- Code to cache and re-serve network-status objects generated by others.
- Publish individual descriptors (by fingerprint, by "all", and by
  "tell me yours.")  [Still needs compression logic]
- Publish client and server recommended versions seprately.
- Add digest of descriptor to routerinfo_t, so we can track them better, and
  length, so we can server them more easily.

Cleanups
- Unify code to sign directory-like things
- Make resolve_my_address() able to tell you which name it wound up resolving.
- Unify code to store and serve directory-like things so it all uses
  cached_dir_t.
- Unify code to set the value of cached_dir_t objects.


svn:r4835
2005-08-25 20:33:17 +00:00
Roger Dingledine
86f85f240c be much more conservative about logging reachability complaints.
the ones it logs now are probably genuine problem servers.


svn:r4832
2005-08-24 14:31:32 +00:00
Roger Dingledine
a120cc20c1 Dirservers now do their own external reachability testing of each
Tor server, and only list them as running if they've been found to
be reachable.

Dirservers also log trouble servers, but only start complaining loudly
after they've been up for an hour, to reduce false positives. We still
need to do something about the fact that it is quite loud when there
are many trouble servers.


svn:r4829
2005-08-24 02:31:02 +00:00
Roger Dingledine
8b766d1b7e fix bad logic that has been lurking for eons, that now prevented us
from uploading descriptors after the first one.


svn:r4818
2005-08-23 00:47:44 +00:00
Roger Dingledine
676b330eb2 Make DirPostPeriod config option obsolete.
Force new descriptor upload every 18 hours, not 24, to avoid races.
Change rate-limiting on new descriptors due to bandwidth changes, from
45 minutes to 20 minutes.


svn:r4814
2005-08-22 21:53:12 +00:00
Nick Mathewson
dc09c7fc73 Implement new (reduced-frequency) upload rules. arma, you should review this.
svn:r4806
2005-08-22 03:10:53 +00:00
Nick Mathewson
249b72f53e Replace (Fascist)Firewall* with a new ReachableAddresses option that understands address policies.
svn:r4751
2005-08-08 21:58:48 +00:00
Nick Mathewson
11ff0aba80 Make clients regenerate their keys when their IP address changes.
svn:r4688
2005-08-03 20:42:17 +00:00
Nick Mathewson
2bd6040f62 Rename cross-format config.c stuff to config_* and or_options_t-specific stuff to option[s]_*
svn:r4641
2005-07-23 01:58:05 +00:00
Roger Dingledine
97174b67c2 if you're an auth dir server, always publish your dirport,
even if you haven't yet found yourself to be reachable.

this is the cause of Jan Tore Morken's recent or-talk bug.


svn:r4575
2005-07-15 18:49:35 +00:00
Roger Dingledine
3bb756b93b forward-port the 0.1.0.11 stuff
svn:r4515
2005-07-01 02:01:21 +00:00
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
b349e60543 don't tell people you're publishing the server descriptor if you're
actually not.


svn:r4387
2005-06-09 21:23:54 +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
Roger Dingledine
cfc89f8753 pay more attention to the ClientOnly config option
svn:r4367
2005-06-09 08:54:42 +00:00
Roger Dingledine
9ed7b53143 don't upload your descriptor if rebuilding it failed
svn:r4352
2005-06-08 19:45:17 +00:00
Roger Dingledine
4855990d37 clean up a few more log entries
svn:r4304
2005-05-27 17:43:43 +00:00
Roger Dingledine
040a748d87 i screwed up the dirport reachability testing when we don't yet
have a cached version of the directory. hopefully now fixed.


svn:r4284
2005-05-23 05:20:52 +00:00
Roger Dingledine
b7d6b8a397 doxygeny goodness from tyranix
svn:r4262
2005-05-17 17:01:36 +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
13126eeb0f Patch from goodell for task 131: Do not die on internal address if we are not publishing.
svn:r4186
2005-05-09 04:31:00 +00:00
Nick Mathewson
6567ec9ccf Functions work better when you call them. Resolve a bug which would prevent unreachable dirports from getting suppressed.
svn:r4183
2005-05-07 05:17:36 +00:00
Roger Dingledine
5265bbd2b8 first iteration of scrubbing sensitive strings from logs.
also generally clean up log messages.


svn:r4174
2005-05-03 10:04:08 +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
ad4eca60ec add geoff's NoPublish patch
svn:r4084
2005-04-21 10:40:48 +00:00
Roger Dingledine
13e211de17 We're printing the host mask wrong in exit policies in server descriptors.
I believe this isn't a critical bug tho, since we're still obeying the
exit policy internally.


svn:r3987
2005-04-02 08:55:31 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
453a822425 when you decide you're reachable, actually publish your descriptor
right then.


svn:r3968
2005-04-01 09:28:14 +00:00
Roger Dingledine
a28ae7a70c fix assert: if our dirport isn't reachable yet, don't trick
*ourselves* into thinking the dirport is zero. but continue
to tell other people that it is.


svn:r3952
2005-04-01 07:42:32 +00:00
Roger Dingledine
003d9df6b0 authdirservers shouldn't do orport reachability detection,
since they're in clique mode, so it will be rare to find a
server not already connected to them.


svn:r3949
2005-04-01 07:09:18 +00:00
Roger Dingledine
1f5c8335e8 still publish your descriptor if orport is reachable but dirport isn't
when building testing circs for orport testing, require high-bandwidth
nodes, so fewer circs fail. complain about unreachable orport separately
from unreachable dirport.


svn:r3935
2005-03-31 19:26:33 +00:00
Roger Dingledine
9b5432214d but only do the rapid reachability testing if we're hoping to be a server.
svn:r3902
2005-03-27 11:52:15 +00:00
Roger Dingledine
1328383482 make it clearer to the human that his server is testing
its reachability. tell him when it succeeds, or when 20
minutes pass and it hasn't succeeded yet.


svn:r3882
2005-03-26 01:43:39 +00:00
Roger Dingledine
6659cd5e8e options->MaxAdvertisedBandwidth only replaces advertised
bandwidthrate, not advertised bandwidthcapacity


svn:r3818
2005-03-22 20:41:28 +00:00
Nick Mathewson
ec81f87018 Implement an option to cap bandwidth-to-advertise. Arma: can you improve the manpage entry by explaining why you would want to do this?
svn:r3813
2005-03-22 19:01:46 +00:00
Nick Mathewson
f5989afde2 Add opt hibernating; fix bug 78
svn:r3807
2005-03-22 06:08:28 +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
Roger Dingledine
856ab90ca8 stop logging at -l notice every single time a create cell successfully
gets processed


svn:r3791
2005-03-19 23:04:15 +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
Roger Dingledine
229761465c re-enable reachability testing stuff.
also, consider your ORPort reachable after you've processed a
create cell from any non-local address.


svn:r3763
2005-03-15 01:44:46 +00:00
Geoff Goodell
af15c711c9 redefining default exit policy as per or-talk discussion
svn:r3739
2005-03-11 05:07:31 +00:00
Roger Dingledine
b961d1c3bd disable the reachability detection stuff in cvs, so people can
run servers from cvs while i'm gone.


svn:r3712
2005-02-28 09:39:12 +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
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
Nick Mathewson
6e6d95b3db Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
2005-02-22 08:18:36 +00:00
Nick Mathewson
58540dde50 Do not try to double-aquire lock when rotating keys. May fix deadlock bug found by weasel.
svn:r3616
2005-02-11 07:56:10 +00:00
Nick Mathewson
f672577bc6 Free even more things on shutdown. Temporarily move tor_free_all out from #ifdef so it gets tested more.
svn:r3614
2005-02-11 01:26:47 +00:00
Roger Dingledine
0551e3a814 reject more default filesharing ports by default.
svn:r3500
2005-02-02 04:15:40 +00:00
Roger Dingledine
7fd8dfe6ea accept LDAP (389/tcp) and LDAPS (636/tcp) in default exit policy
svn:r3457
2005-01-29 11:16:23 +00:00
Roger Dingledine
82d3894f3e don't let a corrupt directory cache keep us from starting
svn:r3456
2005-01-29 11:07:35 +00:00
Nick Mathewson
fd41cbcadf Have reason string for serverdesc post requests contain actual serverdesc status. Also fix return values of dirserv_add_descriptor to work as advertised.
svn:r3391
2005-01-20 20:18:32 +00:00
Roger Dingledine
4b6d55afdf separate time_of_process_start from stats_n_seconds_uptime:
now we reset uptime when a dir fetch entirely fails. this
hopefully has something to do with stability of being on the
network.


svn:r3333
2005-01-10 05:10:22 +00:00
Nick Mathewson
6dd91de3bd Nothing actually _uses_ socks_port, so why publish it? For backward compatibility, publish a socks_port of 0, and never read socks_port.
svn:r3279
2005-01-04 05:46:54 +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
b6173b7b68 0.0.9 broke hibernation. darn it.
svn:r3147
2004-12-13 19:42:46 +00:00
Roger Dingledine
464338b250 when hibernating, don't advertise any ports
this is important for the dirport, because clients will still
ask you for a directory, and they'll be sad when you're down.
and do the other ports too, because hey, they're not listening.


svn:r3133
2004-12-11 23:53: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
Roger Dingledine
db5e100cde clean up 3 more underflow possibilities
svn:r3063
2004-12-02 04:31:52 +00:00
Roger Dingledine
0799804c60 fix redundant (and dangerous) NUL termination
svn:r3062
2004-12-02 04:16:18 +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
Roger Dingledine
7fc30fc1e6 accept *:706 (silc) by default
svn:r3006
2004-11-28 15:49:12 +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
Nick Mathewson
22dba27d8d Normalize a few more kinds of whitespace. We now dislike:
- func (args)
  - if (x){
This doesn't normalize if(x), for(x); while(x), and friends.


svn:r2943
2004-11-22 23:28:26 +00:00
Nick Mathewson
d4754b334c Compile cleanly on windows; prevent some insane bandwidth cases (e.g., "BandwidthBurst 1000 TB" from occuring.
svn:r2941
2004-11-22 22:24:10 +00:00
Nick Mathewson
983a335f3b Normalize space
svn:r2939
2004-11-22 22:13:34 +00:00
Nick Mathewson
bdb61f2a04 fix typo
svn:r2925
2004-11-21 05:06:22 +00:00
Nick Mathewson
36f4e15e81 Call init_keys() where needed; fix hibernate bug.
svn:r2924
2004-11-21 04:19:04 +00:00
Nick Mathewson
8acaf8e187 Add "MEMUNIT" and "INTERVAL" types to configuration. Also tweak Accounting setup. More docs needed
svn:r2911
2004-11-20 00:37:00 +00:00
Nick Mathewson
08627d5d87 Track whether descriptor is dirty/uploaded. When any options are set, mark it dirty. Once a minute, regenerate and upload the server descriptor if it is dirty.
svn:r2832
2004-11-13 16:53:48 +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
cd753df7bf Resolve many XXXs and all DOCDOCs
svn:r2755
2004-11-09 18:22:17 +00:00
Roger Dingledine
9f3e3d2b71 stop wanting to split init_keys()
svn:r2735
2004-11-09 07:29:05 +00:00
Nick Mathewson
180e0a9326 Make check_private_dir trimodal (check/create/ignore), not bimodal (create/ignore).
svn:r2733
2004-11-09 07:12:31 +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
8b9d7da59f while we hibernate, our declared bandwidth capacity is 0
svn:r2710
2004-11-07 23:19:12 +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
d0c158c8d6 clarify the bandwidthburst and bandwidthrate are in bytes
(niels had thought they were in bits, or kb, or something)


svn:r2669
2004-11-04 03:25:43 +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
85c79ffbc7 canonicalize "src" and "dest" arg order in crypto.c (and others)
svn:r2644
2004-11-02 02:28:51 +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
44d4516155 Use tor_snprintf, not snprintf
svn:r2609
2004-10-27 06:37:34 +00:00
Nick Mathewson
06fa8fc05f Avoid strcat; use snprintf or strlcat instead
svn:r2605
2004-10-27 06:25:29 +00:00
Nick Mathewson
bc62f8e983 Replace sprintf with snprintf
svn:r2602
2004-10-27 05:53:07 +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
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
a42adce362 fix memory leak in router.c; start relying on NULL==(zero bytes)
svn:r2538
2004-10-16 20:38:57 +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
08c33f0b46 Compile without warnings on windows
svn:r2491
2004-10-14 04:06:24 +00:00
Nick Mathewson
bd10bf4b5b Try to always dtrt if routerlist==NULL
svn:r2489
2004-10-14 03:44:45 +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
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