Commit Graph

3799 Commits

Author SHA1 Message Date
Nick Mathewson
4d3e709c4b Use escaped() for remaining cases.
svn:r6117
2006-03-11 02:21:30 +00:00
Roger Dingledine
86a72f73b9 make entry guard logs even quieter
svn:r6116
2006-03-10 16:51:26 +00:00
Roger Dingledine
e11f900a2a stop printing a log message at every iteration through the
event loop when holding open a conn for flushing but it
doesn't want to flush any more bytes yet.


svn:r6114
2006-03-09 06:34:33 +00:00
Roger Dingledine
5f8d26496d Let the controller attachstream conns that are in connect_wait
or resolve_wait: we detach them first and then act as before.
Resolves bug 264.


svn:r6112
2006-03-09 06:29:53 +00:00
Roger Dingledine
82d1fdbaea don't abandon entry guards until they've been dead a whole month.
make entry guard log messages quieter.


svn:r6106
2006-03-09 00:55:55 +00:00
Roger Dingledine
44107f6ec4 Implement NEWNYM. Nick, did I do a bad thing?
svn:r6105
2006-03-09 00:18:16 +00:00
Roger Dingledine
0f39033b9f clean up typo
svn:r6103
2006-03-09 00:10:28 +00:00
Roger Dingledine
946317ae13 start using OR_CONN_EVENT_NEW.
also fixes a seg fault in tor (bug 261).


svn:r6101
2006-03-08 22:29:08 +00:00
Roger Dingledine
8db1e363c9 remove some redundant code now that we compress exit policies
after parsing them


svn:r6099
2006-03-08 19:34:34 +00:00
Nick Mathewson
1ce3713889 Possible bug 265 fix: authorities must be more strict than clients about age of acceptable routers; make routers publish every 12 hours; client ROUTER_MAX_AGE must be greater than NETWORKSTATUS_MAX_AGE+authoirty ROUTER_MAX_AGE.
svn:r6095
2006-03-08 06:29:52 +00:00
Roger Dingledine
a385b0087f fix infinite loop
svn:r6090
2006-03-06 20:01:46 +00:00
Roger Dingledine
a2d71f917e mark bug 261
svn:r6089
2006-03-06 19:47:54 +00:00
Nick Mathewson
5dc5380984 Add some "to-be-safe" escaped() wrappers to log statements in rend*.c, though I am not 100% sure that each one is necessary.
svn:r6088
2006-03-06 00:25:39 +00:00
Nick Mathewson
5777ee0e1a Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
svn:r6087
2006-03-05 09:50:26 +00:00
Nick Mathewson
6a4e304d9e Allow private:* in routerdescs; not generated yet (because older Tors do not understand it); needs testing.
svn:r6086
2006-03-05 05:27:59 +00:00
Roger Dingledine
329af979e0 Add a new circuit purpose 'controller' to let the controller
ask for a circuit that Tor won't try to use.

Extend the EXTENDCIRCUIT controller command to let you specify
the purpose if you're starting a new circuit.

Add a new SETCIRCUITPURPOSE controller command to let you
change a circuit's purpose after it's been created.


svn:r6075
2006-02-23 06:51:09 +00:00
Roger Dingledine
2bfd2a2400 clean up a log message
svn:r6074
2006-02-21 17:54:56 +00:00
Roger Dingledine
25ed4b66e3 be quieter about hidserv descriptors that are too old or too new.
we can't do anything about them anyway.


svn:r6073
2006-02-21 06:23:57 +00:00
Roger Dingledine
dda54db36d bump to 0.1.1.14-alpha-cvs, and we're off.
svn:r6062
2006-02-21 04:13:49 +00:00
Roger Dingledine
ae65d595ff bump to 0.1.1.14-alpha
svn:r6059
2006-02-21 03:57:44 +00:00
Roger Dingledine
89b07b458b i missed the other half of that grammar fix
svn:r6058
2006-02-21 03:55:47 +00:00
Roger Dingledine
16f265fa0d when saveconf fails in controller v1, we were returning a malformed
error string.


svn:r6053
2006-02-20 01:24:26 +00:00
Roger Dingledine
498c13b4df make the NoPublish option obsolete.
svn:r6052
2006-02-20 01:21:48 +00:00
Roger Dingledine
0408adb728 tweak
svn:r6051
2006-02-20 01:15:38 +00:00
Roger Dingledine
276a7bd038 the other half of fixing bug 257. catch an error in more places.
svn:r6050
2006-02-20 01:06:27 +00:00
Roger Dingledine
57bcdcecf1 try to address bug 257: if rename() fails during saveconf, tell
the controller.


svn:r6049
2006-02-19 23:12:26 +00:00
Roger Dingledine
6a52867846 New config options to address bug 251:
FetchServerDescriptors and FetchHidServDescriptors for whether
to fetch server info and hidserv info or let the controller do it,
and also PublishServerDescriptor and PublishHidServDescriptors.

Add AllDirActionsPrivate undocumented option -- if you set it, you'll
need the controller to bootstrap you enough to build your first circuits.


svn:r6047
2006-02-19 22:02:02 +00:00
Peter Palfrader
c4f389420c Improve the "we have been waiting for 1140377851 seconds" log
svn:r6046
2006-02-19 19:44:09 +00:00
Roger Dingledine
266254f42b clean up the Reachable*Addresses changes
svn:r6041
2006-02-19 08:31:47 +00:00
Peter Palfrader
42f14e8e10 Add function names to log_* on non-gcc
svn:r6039
2006-02-18 07:18:14 +00:00
Roger Dingledine
a9fcf4ced2 this is why you're not supposed to cut-and-paste code
svn:r6037
2006-02-18 06:46:01 +00:00
Peter Palfrader
4f5e607389 Finish log function renaming for non-GNUC systems
svn:r6034
2006-02-18 02:11:48 +00:00
Peter Palfrader
aa5443551d Make it compile with VC7. It does not yet link.
svn:r6033
2006-02-18 02:02:21 +00:00
Roger Dingledine
42cd0dcde8 fix typo found in phobos's logs
svn:r6020
2006-02-15 03:47:38 +00:00
Roger Dingledine
f6d80d60e0 don't warn when we get a server descriptor from the controller
but it's too old. that's not something tor should fix.


svn:r6019
2006-02-15 03:01:53 +00:00
Peter Palfrader
c7f2970777 Just because both are obsolete does not mean we prefer the newer
svn:r6016
2006-02-14 17:48:51 +00:00
Peter Palfrader
0bab094d5d Explain why we only expire open connections
svn:r6015
2006-02-14 17:30:04 +00:00
Roger Dingledine
ae249fc5a3 document the frequency for reachability testing by the
directory authorities.


svn:r6014
2006-02-14 04:33:59 +00:00
Peter Palfrader
84295f9f43 Do not mark connections obsolete before they have done their TLS handshake or are at least 60 seconds old
svn:r6013
2006-02-14 04:23:05 +00:00
Peter Palfrader
761da5b97f Our connection_or_get_by_identity_digest() was slightly wrong. If best
didn't have any circuits on it, but conn had circuits, we would not make
conn our new best unless it was also newer.  Also, restructure the code
a bit to maybe make it clearer.


svn:r6012
2006-02-14 00:08:19 +00:00
Peter Palfrader
0cc2390f8c Warn if ReachableAddresses is set when also ReachableDirAddresses and ReachableORAddresses are set.
svn:r6010
2006-02-13 22:29:37 +00:00
Peter Palfrader
5eea6c76df Split ReachableAddresses into ReachableDirAddresses and ReachableORAddresses
svn:r6009
2006-02-13 21:17:20 +00:00
Roger Dingledine
8262b7d1db and resolve long-lines and fix an error string
svn:r6007
2006-02-13 10:36:39 +00:00
Roger Dingledine
259c65ab08 the last of the log convention conversion. finally.
svn:r6005
2006-02-13 10:33:00 +00:00
Roger Dingledine
aa63a84fe1 the things we do for our windows users.
i hope they appreciate it.


svn:r6004
2006-02-13 09:37:53 +00:00
Roger Dingledine
d113b75da6 more log conversions.
whee.


svn:r6003
2006-02-13 09:02:35 +00:00
Roger Dingledine
36484f873a convert some more source files to the new log convention
svn:r6002
2006-02-13 08:28:42 +00:00
Roger Dingledine
7d80921afa resolve too-long-lines
svn:r6001
2006-02-13 08:22:57 +00:00
Roger Dingledine
6ce36ead42 Start the process of converting warn to log_warn and so on.
This is needed because Windows already has an err() that we
can't clobber. And we need to be able to make the log functions
a macro so we can print the function's name in the log entry.


svn:r6000
2006-02-13 08:01:59 +00:00
Nick Mathewson
2a4555fedd Style on config_addr_policy_intersectes, which looks ok to me.
svn:r5998
2006-02-13 07:16:32 +00:00
Roger Dingledine
350313d77a Let the users set ControlListenAddress in the torrc.
This can be dangerous, but there are some cases (like a secured
LAN) where it makes sense.


svn:r5997
2006-02-13 06:25:16 +00:00
Peter Palfrader
6c4d873591 Compress exit policies even more. please review
svn:r5995
2006-02-13 01:54:31 +00:00
Nick Mathewson
2cc66125b8 try to fix bug with spurious "everything is broken" warning
svn:r5994
2006-02-13 00:26:43 +00:00
Roger Dingledine
b7781ea208 bugfix: we were ignoring the IS_FAST flag in the directory
status, meaning we were willing to pick trivial-bandwidth nodes
for "fast" connections.


svn:r5992
2006-02-13 00:09:30 +00:00
Nick Mathewson
dba155ecff Generate 18.0.0.0/8 address policy format in descs when we can; warn when the mask is not reducible to a bit-prefix.
svn:r5991
2006-02-12 23:58:22 +00:00
Roger Dingledine
b99f903e34 and don't warn when it happens here either, unless the user
wants to hear it.


svn:r5990
2006-02-12 23:44:02 +00:00
Roger Dingledine
53c54b75c9 Correct a function comment. Nick: is this right?
svn:r5989
2006-02-12 23:34:03 +00:00
Roger Dingledine
97571a1cb4 don't tell ordinary users about broken directory servers.
it's a shame that they're broken, but most people are just
confused by the warning.


svn:r5988
2006-02-12 23:31:47 +00:00
Nick Mathewson
98ec124c6a Drop redundant exit policy entries, not just identical ones.
svn:r5987
2006-02-12 22:59:38 +00:00
Nick Mathewson
e7b2d5cd47 Retain unrecognized options in state file, so that we can be forward-compatible.
svn:r5985
2006-02-12 22:28:30 +00:00
Nick Mathewson
ae4f0467c8 enforce whitespace style
svn:r5984
2006-02-12 22:27:09 +00:00
Roger Dingledine
3c4e68488b Clients now honor the "guard" flag in the router status when
picking entry guards, rather than looking at is_fast or is_stable.

Now dirservers can change how they define it and clients will
automatically use their new definition.


svn:r5979
2006-02-12 03:43:39 +00:00
Roger Dingledine
940b0a4d2e write a better note in torrc.sample about whether to set dirport.
svn:r5978
2006-02-12 01:12:52 +00:00
Roger Dingledine
b5ac6fc707 more helpful log message when running servers on obsolete windows.
svn:r5975
2006-02-12 00:14:58 +00:00
Roger Dingledine
094ccd34a9 bump up the period for forcing a hidden service descriptor upload
from 20 minutes to 1 hour.


svn:r5972
2006-02-12 00:12:36 +00:00
Roger Dingledine
981815146a compress exit policies even more -- look for duplicate lines
and remove them.


svn:r5971
2006-02-12 00:03:06 +00:00
Roger Dingledine
6c093a17a9 bugfix in config_cmp_addr_policies() -- we were treating a pair
of exit policies if they were equal even if one said accept and
the other said reject.


svn:r5970
2006-02-11 23:47:24 +00:00
Roger Dingledine
fdf18fbbdb stop leaking that
svn:r5969
2006-02-11 23:16:13 +00:00
Roger Dingledine
e847085c04 When a client asks for an old-style directory and our write bucket
is empty, don't give it to him. This way small servers can continue
to serve the directory *sometimes*, without getting overloaded.


svn:r5968
2006-02-11 23:15:40 +00:00
Nick Mathewson
f1b91924b2 Keep running if we ask for an impossible stdout log; just warn.
svn:r5964
2006-02-11 21:56:03 +00:00
Nick Mathewson
1dc90be4f0 Retry pending server downloads as well as pending networkstatus downloads when we unexpectedly get an app connection
svn:r5962
2006-02-11 21:29:12 +00:00
Nick Mathewson
91847124bf Warn if running obsolete windows as a server.
svn:r5961
2006-02-11 21:26:40 +00:00
Roger Dingledine
bb890da4cf bump to 0.1.1.13-alpha-cvs -- progress!
svn:r5954
2006-02-10 12:26:28 +00:00
Roger Dingledine
ddb43de2d0 bump to 0.1.1.13-alpha
svn:r5951
2006-02-09 22:55:40 +00:00
Roger Dingledine
85a64b4fd0 get our grammar right when complaining about un-recommended versions
svn:r5950
2006-02-09 06:08:59 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
2e5bd47555 more cleanups on the sample torrc file
svn:r5947
2006-02-09 05:18:03 +00:00
Roger Dingledine
fd0fcdf17c stop calling it a "libevent poll" -- the word "poll" has
other meaning in this context that are confusing.


svn:r5936
2006-02-09 03:09:52 +00:00
Roger Dingledine
28f3765b5a and maybe some function documentation will help too
svn:r5935
2006-02-09 02:59:37 +00:00
Roger Dingledine
dbea401305 correct the comments that don't realize it's the opposite
svn:r5934
2006-02-09 02:59:26 +00:00
Roger Dingledine
31f2705d9a and make sure that never happens again
svn:r5932
2006-02-09 02:42:33 +00:00
Roger Dingledine
2c221dd8db fix bug 245: When modifying the orconn_circid_map map, we would
sometimes decrement conn->n_circuits even when there was no circuit
originally. This caused conn->n_circuits to go negative.

We noticed this because we were checking if connections can be
closed based on conn->n_circuits == 0, so we were never closing
any connection that had ever had a circuit on it.


svn:r5931
2006-02-09 02:42:15 +00:00
Roger Dingledine
1c596156aa tweak comment
svn:r5930
2006-02-09 00:08:23 +00:00
Nick Mathewson
e5a574ce2e Move "sort list of versions" logic into routerparse.c; make version-checking code say which versions it would have accepted. (not tested.)
svn:r5927
2006-02-06 05:04:27 +00:00
Nick Mathewson
2bb4fd24de char *x = "y"; is not good C.
svn:r5926
2006-02-06 05:01:44 +00:00
Nick Mathewson
50e1005327 Only v1 authorities get hidden service descriptors with current protocol
svn:r5924
2006-02-06 04:56:18 +00:00
Nick Mathewson
97bff8edaa Fix a const-non-const warning
svn:r5923
2006-02-06 04:55:27 +00:00
Roger Dingledine
a9c87fe251 more typos and nits
svn:r5918
2006-02-05 05:28:52 +00:00
Nick Mathewson
157e6a025a Stupid cut-and-paste bug.
svn:r5917
2006-02-05 05:11:24 +00:00
Roger Dingledine
555a64e06d as soon as we've fetched some more directory info, that's time
to think about downloading more server descriptors. this way
we don't have a 10 second pause in initial bootstrapping.


svn:r5916
2006-02-05 03:42:34 +00:00
Roger Dingledine
d602d0d298 cosmetic fix
svn:r5915
2006-02-05 03:42:04 +00:00
Roger Dingledine
640882c76c clean up tabs and wide-lines from weasel's commit
svn:r5914
2006-02-05 03:23:16 +00:00
Roger Dingledine
6535087845 when building v2 statuses or v1 running-routers, don't admit the
existence of descriptors older than a day.

we still cache them in case anybody asks, but we don't actively
mention them.


svn:r5913
2006-02-05 02:33:40 +00:00
Roger Dingledine
53f86cdf5d fix bug: we were caching the newest descriptor for each server,
well, forever. i imagine this just keeps growing in size.


svn:r5912
2006-02-05 02:07:28 +00:00
Roger Dingledine
4c1fa73c7e typos and nits
svn:r5911
2006-02-05 01:57:27 +00:00
Roger Dingledine
a53a73a782 forward-port the part where ordinary users try to fetch directories
less often. not critical but might as well stay in sync with stable.


svn:r5910
2006-02-05 01:57:07 +00:00
Roger Dingledine
640c555f02 Fix a major load balance bug: we were round-robining in 16 KB chunks, and
servers with bandwidthrate of 20 KB, while downloading a 600 KB directory,
would starve their other connections. Now we try to be a bit more fair.


svn:r5906
2006-02-04 08:58:51 +00:00
Roger Dingledine
032a01ef64 just because you support the feature does not mean that you
should put an example in the sample torrc file.

the debug-info lines were causing some people to think that
was a smart loglevel to use, and it also always isn't.


svn:r5905
2006-02-04 07:45:40 +00:00
Peter Palfrader
94fb3f06b3 Fix compiler warning on 64 bit archs
svn:r5903
2006-02-03 22:26:43 +00:00
Peter Palfrader
390bbb0a0c Try to make tor work better through squid: Limit number of descriptors we fetch
to 96 (was 128 previously).

We limit this number even when we do not have a http proxy explicitly
configured as some people mistakenly believe transparent proxies are a neat
idea.


svn:r5901
2006-02-03 15:17:48 +00:00