Commit Graph

322 Commits

Author SHA1 Message Date
Roger Dingledine
fe768d1d2a change SHUTDOWN_WAIT_LENGTH from a fixed 30 secs to a config option
svn:r3752
2005-03-12 20:13:38 +00:00
Nick Mathewson
115271f65e Implement the common case of ATTACHSTREAM.
svn:r3751
2005-03-12 04:22:01 +00:00
Nick Mathewson
777d3dde0c Get address map resetting implemented.
svn:r3745
2005-03-11 21:39:39 +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
Roger Dingledine
6faaac2706 add support for CONNECTing through https proxies.
not sure if it works. i don't have an https proxy.


svn:r3682
2005-02-24 10:56:55 +00:00
Roger Dingledine
55c3f15ed1 Forward-port the trick to bump up ConnLimit as far as it can
go, but not past MAXCONNECTIONS. Also throw away the FAKE_POLL
caveats since 0.1.0 doesn't need it any more.


svn:r3657
2005-02-22 23:52:44 +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
d01718841e Remove assumptions that maximum path length is anything like 1024. From comments by Chris Palmer
svn:r3652
2005-02-22 06:38:39 +00:00
Roger Dingledine
8727acf2f1 Add a new AddressMap directive to rewrite incoming socks addresses.
Add a new TrackHostExits directive to trigger addressmaps for
certain incoming socks addresses, for sites that break when your exit
keeps changing.
Redo the client-side dns cache so it's just an addressmap too.


svn:r3641
2005-02-22 00:53:08 +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
Nick Mathewson
bb32fa86d7 Re-normalize whitespace; make "make check-spaces" happy
svn:r3566
2005-02-05 21:42:46 +00:00
Nick Mathewson
24ad6542c9 forward-port NT service patch
svn:r3565
2005-02-05 21:40:25 +00:00
Roger Dingledine
efa9bb5535 fix the latest bug: don't explode when some router declares a
bandwidthburst of 500 gigabytes.

this bug seems to have taken down most of the network. oops.


svn:r3523
2005-02-03 22:58:22 +00:00
Roger Dingledine
976bee4a3f only check if exit_policy_implicitly_allows if you're a server.
also, put a comment next to an interesting undocumented 'feature'.


svn:r3499
2005-02-02 01:59:16 +00:00
Roger Dingledine
850c300e46 bump the default rate limit to 1 MB
svn:r3494
2005-02-01 13:44:10 +00:00
Roger Dingledine
e7e77d6d8e fix an edge case in parsing config options (thanks weasel)
svn:r3486
2005-02-01 00:05:57 +00:00
Roger Dingledine
b2fbd834f0 forward-port the dns and maxconn fixes
svn:r3448
2005-01-28 08:53:47 +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
4e369bc9e8 allow bandwidthburst to be smaller, but whine if it's small.
svn:r3364
2005-01-18 19:34:22 +00:00
Roger Dingledine
d2400a5afd Introduce a notion of 'internal' circs, which are chosen without regard
to the exit policy of the last hop. Intro and rendezvous circs must
be internal circs, to avoid leaking information. Resolve and connect
streams can use internal circs if they want.

New circuit pooling algorithm: make sure to have enough circs around
to satisfy any predicted ports, and also make sure to have 2 internal
circs around if we've required internal circs lately (with high uptime
if we've seen that lately).

Split NewCircuitPeriod config option into NewCircuitPeriod (30 secs),
which describes how often we retry making new circuits if current ones
are dirty, and MaxCircuitDirtiness (10 mins), which describes how long
we're willing to make use of an already-dirty circuit.

Once rendezvous circuits are established, keep using the same circuit as
long as you attach a new stream to it at least every 10 minutes. (So web
browsing doesn't require you to build new rend circs every 30 seconds.)

Cannibalize GENERAL circs to be C_REND, C_INTRO, S_INTRO, and S_REND
circ as necessary, if there are any completed ones lying around when
we try to launch one.

Re-instate the ifdef's to use version-0 style introduce cells, since
there was yet another bug in handling version-1 style. We'll try switching
over again after 0.0.9 is obsolete.

Bugfix: when choosing an exit node for a new non-internal circ, don't take
into account whether it'll be useful for any pending x.onion addresses --
it won't.

Bugfix: we weren't actually publishing the hidden service descriptor when
it became dirty. So we only published it every 20 minutes or so, which
means when you first start your Tor, the hidden service will seem broken.


svn:r3360
2005-01-17 18:13:09 +00:00
Nick Mathewson
a38bccdca7 Move call to event_init() immediately after start_daemon(); move start_daemon earlier. This should fix using libevent with RunAsDaemon.
svn:r3354
2005-01-13 21:32:08 +00:00
Roger Dingledine
0aff4ff4cb get rid of 0.0.8 backwards compatibility
svn:r3353
2005-01-13 20:22:38 +00:00
Nick Mathewson
324b192f68 Make Tor use Niels Provos's libevent instead of it's current
poll-but-sometimes-select mess.  This will let us use faster async cores
(like epoll, kpoll, and /dev/poll), and hopefully work better on Windows
too.

There are some fairly nasty changes to main.c here; this will almost
certainly break something.  But hey, that's what alphas are for.


svn:r3341
2005-01-12 06:42:32 +00:00
Roger Dingledine
9b578f2fe2 add more chat and interactive protocols to LongLivedPorts
svn:r3340
2005-01-12 05:18:14 +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
Roger Dingledine
cd1f50d2f0 new config option DirAllowPrivateAddresses for authdirservers.
now by default they refuse router descriptors that have non-IP
or private-IP addresses.


svn:r3321
2005-01-06 21:03:27 +00:00
Nick Mathewson
b4fedc7f14 Stop reversing and re-reversing config lines: keep them in order all the time. Removes needless confusion and fixes bug #50.
svn:r3305
2005-01-05 06:05:37 +00:00
Nick Mathewson
e99f79fa4d Remove broken and undocumented wart where multiple CSV config lines are appended rather than replaced. Resolves bug #49
svn:r3301
2005-01-05 02:51:04 +00:00
Roger Dingledine
e6c1ab2daf post 0.0.9.x, demand that servers declare at least 20000 bytes/s
for bandwidthrate


svn:r3277
2005-01-04 03:46:50 +00:00
Nick Mathewson
4d30e2f4b8 Make sequence of log messages when starting on win32 with no config file more reasonable.
svn:r3275
2005-01-04 02:25:36 +00:00
Roger Dingledine
d7a0f1a629 update print_usage to use new url
svn:r3267
2005-01-03 23:21:32 +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
e29d7329b3 ...but only if you're a server
svn:r3233
2004-12-31 21:49: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
53105cdae5 when you're loading the rendezvous service keys in options_act(),
don't call it 'reloading'.


svn:r3225
2004-12-24 20:45:45 +00:00
Nick Mathewson
bbc10c2ea1 Make split(..., NULL) split on horizontal space; fix bug with tabs in config file.
svn:r3155
2004-12-16 21:10:51 +00:00
Nick Mathewson
1e71b83890 Fix a bug in parsing HashedControlPassword.
svn:r3143
2004-12-13 18:32:29 +00:00
Nick Mathewson
fe6eb34a10 Solaris CC freaks out if isspace and friends get anything other than an int. We learned that, so we casted. But it is also a bad idea to cast a signed char to an int and expect things to work on win32. Now we cast to unsigned char, then to int, then pass to isspace. Ug
svn:r3120
2004-12-08 00:42:50 +00:00
Roger Dingledine
41b809d2aa salvage another 300 bytes per hup
svn:r3106
2004-12-07 09:11:38 +00:00
Roger Dingledine
8f01b643c3 ORPort must be defined if ORBindAddress is defined.
svn:r3100
2004-12-07 06:51:46 +00:00
Roger Dingledine
2ff38fdf83 when recommending new-format log lines, if the upper bound is LOG_ERR,
leave it implicit.


svn:r3097
2004-12-07 06:27:39 +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
f79a7d8d62 while hibernating, hup should not regrow our listeners.
svn:r3067
2004-12-03 23:53:35 +00:00
Roger Dingledine
82f3ebf195 move StatusFetchPeriod to 15 minutes so it's within bounds by default
svn:r3055
2004-12-01 04:27:11 +00:00
Nick Mathewson
b457cfb5eb Spell-check strings and comments
svn:r3052
2004-12-01 03:48:14 +00:00
Roger Dingledine
bde1d5bfb2 do even less inside our signal handler,
just to be extra paranoidly safe


svn:r3050
2004-12-01 02:54:13 +00:00
Roger Dingledine
19ada3f7fa write down our "how to have two defaults for dirfetchperiod"
issue, so we don't forget about it.


svn:r3040
2004-11-30 08:44:19 +00:00
Nick Mathewson
bec7a1c6e8 use shorter minimum key lifetime until 008 is dead
svn:r3035
2004-11-30 06:44:07 +00:00
Nick Mathewson
f19e9b8577 doxygen uses backslashes, not forward-slashes
svn:r3033
2004-11-30 06:17:35 +00:00