Nick Mathewson
11d20d78a0
Adjust maximum skew and age for rendezvous descriptors: adjust code to make skew add to age.
...
svn:r3995
2005-04-03 05:36:23 +00:00
Roger Dingledine
658463a751
clean up the circuit-mark-for-close patch
...
svn:r3994
2005-04-03 05:31:41 +00:00
Roger Dingledine
096879687a
start sending 'truncated' cells back rather than destroy cells,
...
if the circuit closes in front of you.
svn:r3993
2005-04-03 05:25:26 +00:00
Nick Mathewson
0dc02328af
Move most of *_mark_for_close out of macros.
...
svn:r3992
2005-04-03 05:22:33 +00:00
Nick Mathewson
055ee7c323
Give better warnings if connection_close_unattached_ap gets called twice or called on a marked connection; rename it to connection_mark_unattached_ap.
...
svn:r3990
2005-04-02 22:11:24 +00:00
Nick Mathewson
4a90d37229
Better messages when POSTDESCRIPTOR fails
...
svn:r3989
2005-04-02 22:02:13 +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
Roger Dingledine
8dbdbfb831
improved log error message
...
svn:r3986
2005-04-02 08:30:40 +00:00
Nick Mathewson
0e81265359
update copyright notices.
...
svn:r3982
2005-04-01 20:15:56 +00:00
Nick Mathewson
0d6c9c47b3
Short-term fix: prevent possible segfault in connection_close_unattached_ap
...
svn:r3970
2005-04-01 16:04:45 +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
1ff62dbd18
require exactly 0.0.9.7 for middle hops of testing circs, for now
...
svn:r3967
2005-04-01 09:23:51 +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
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
cd25e56ad2
when the or-connect succeeded and the tls handshake succeeded
...
but we didn't like the result, we were closing the connection
without sending any destroys back for the pending circuits. now
send those destroys anyway; i hope this doesn't break too much.
svn:r3951
2005-04-01 07:25:18 +00:00
Nick Mathewson
73f6c1531e
fix typo in earlier libevent mmessage suppress patch
...
svn:r3950
2005-04-01 07:16:52 +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
Nick Mathewson
410ecfcc71
Add code to suppress spurious libevent log msgs; use it to resolve bug 68.
...
svn:r3948
2005-04-01 07:05:21 +00:00
Roger Dingledine
2ff2db8d2a
fix some log spacing problems
...
svn:r3942
2005-04-01 06:23:21 +00:00
Nick Mathewson
efe9ca659a
Use recent libevent features when possible
...
svn:r3940
2005-04-01 02:37:40 +00:00
Nick Mathewson
e04a82ecaf
Patch: when extending to an unknown router, compare identity to expected identity; not nickname-to-expected identity.
...
svn:r3937
2005-03-31 23:30:13 +00:00
Roger Dingledine
801d5ef1de
spell recommended correctly
...
svn:r3936
2005-03-31 20:52:43 +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
c2a05e1ca9
redo the state descriptors now that we have a controller-wait state
...
svn:r3934
2005-03-31 17:36:24 +00:00
Roger Dingledine
4f5192b280
...and use it to make sure we only conclude reachability if
...
we didn't initiate the conn.
svn:r3932
2005-03-31 07:46:59 +00:00
Nick Mathewson
1bf1f44e74
Fix bug in redirectstream.
...
svn:r3926
2005-03-31 06:06:02 +00:00
Roger Dingledine
5bdab005c9
mark two more bugs. nick, can you take a look?
...
svn:r3920
2005-03-29 05:27:32 +00:00
Roger Dingledine
20a8eda31b
don't check for reachability, and don't whine about it, while we're
...
hibernating.
svn:r3919
2005-03-29 03:48:31 +00:00
Roger Dingledine
7cf33ed495
resolve another 'hasn't sent end yet' bug
...
svn:r3911
2005-03-29 00:35:35 +00:00
Nick Mathewson
1612df7b2c
Fix a couple more places where we use ->new_address without checking that it is there.
...
svn:r3907
2005-03-28 02:03:51 +00:00
Roger Dingledine
0e26973c02
make calls to address_is_in_virtual_range more bullet-proof.
...
might fix the assert failure i just got.
svn:r3906
2005-03-28 01:56:12 +00:00
Nick Mathewson
4246f6f8bc
Clarify that we don't, and why we don't, need to redefine FD_SETSIZE.
...
svn:r3904
2005-03-28 01:07:14 +00:00
Roger Dingledine
96c331e4ed
we seem to have lost our define for FD_SETSIZE on win32 in the change
...
from fakepoll to libevent. be sure to define it *before* we include
winsock.
svn:r3903
2005-03-27 22:52:48 +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
b8fe866a9d
forward-port the fixing of the crash bug.
...
svn:r3900
2005-03-27 07:18:30 +00:00
Roger Dingledine
92acd64da0
if your server hasn't found itself to be reachable, complain every
...
20 minutes, not just once.
svn:r3897
2005-03-27 06:50:36 +00:00
Roger Dingledine
7a79acd9f6
clean up socks reply stuff more.
...
add a few more reasons so we can be more informative.
svn:r3895
2005-03-27 06:37:56 +00:00
Nick Mathewson
ce854906db
Rename ManageConnections to LeaveStreamsUnattached. Apparently, there was a missing "TorShould" that was mistaken for an "IWantTo".
...
svn:r3894
2005-03-27 06:25:33 +00:00
Roger Dingledine
36baf7219d
stop most cases of hanging up on a socks connection without sending
...
the socks reject. audit for remaining ones. also make things more
uniform so we always remember to hold-open-until-flushed, etc.
svn:r3891
2005-03-27 04:55:13 +00:00
Roger Dingledine
4533a46e41
move the assert higher up so the error message makes more sense
...
next time.
svn:r3887
2005-03-26 06:27:51 +00:00
Roger Dingledine
fcfe6d2e8b
fix assert: stop trying to send a socks reply to an *exit*
...
connection when we get an end cell before it's finished opening.
svn:r3886
2005-03-26 06:27:04 +00:00
Roger Dingledine
b8d38dc57b
try harder to establish reachability, in the first 20 minutes
...
of uptime.
svn:r3884
2005-03-26 05:54:50 +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
570da8a8e8
and fill in another missing socks reply
...
svn:r3877
2005-03-25 11:23:03 +00:00
Roger Dingledine
9b9dbad0b7
fix another case where we need to send a socks reply (reject)
...
back before we close the conn.
svn:r3876
2005-03-25 11:12:14 +00:00
Roger Dingledine
8945df8daa
remove dead code
...
svn:r3875
2005-03-25 10:55:49 +00:00
Roger Dingledine
9685164fe5
don't mark a router down just because your httpsproxy is unreachable
...
svn:r3874
2005-03-25 10:55:06 +00:00
Nick Mathewson
d26bcfab92
Note where connection that hasnt sent end was marked.
...
svn:r3872
2005-03-25 05:54:50 +00:00
Roger Dingledine
bd37c9a3bd
REUSEADDR on normal places means you can rebind to the port
...
right after somebody else has let it go. But REUSEADDR on win32
means to let you bind to the port _even when somebody else
already has it bound_. So, don't do that on Win32.
svn:r3867
2005-03-24 23:20:06 +00:00
Roger Dingledine
4abb54a876
forward-port the circuit_resume_edge_reading_helper fix.
...
svn:r3863
2005-03-24 21:57:45 +00:00
Roger Dingledine
fa3c9d94bc
when you attachstream to a circid of 0, send back an answer
...
svn:r3857
2005-03-24 06:28:21 +00:00
Roger Dingledine
09ef2b7e41
cleanup so connection_ap_handshake_attach_chosen_circuit() always
...
gets open circs.
svn:r3856
2005-03-24 06:18:59 +00:00
Nick Mathewson
13fdf51bc1
Bulletproof connection_ap_handshake_attach_chosen_circuit
...
svn:r3855
2005-03-24 06:05:14 +00:00
Nick Mathewson
8e8915f3ca
Fix SOCKS5 bug: Set replylen to 0 after sending hanshake back
...
svn:r3850
2005-03-24 01:11:28 +00:00
Nick Mathewson
0cfdeb01c8
Debug EXTENDCIRCUIT
...
svn:r3849
2005-03-24 01:08:25 +00:00
Roger Dingledine
0dc91fd9c0
fix an assert -- we're not allowed to write onto a conn after we've
...
connection_unregistered it. there's still more work to be done here,
since we need to make sure to send back the socks-reply as soon as we
know what it will be -- we can't just wait until connection-about-to-close
to deal with it.
svn:r3847
2005-03-23 23:19:18 +00:00
Roger Dingledine
fb8a319ffe
fix an over-eager assert, to make httpsproxy get a little farther
...
svn:r3846
2005-03-23 22:11:59 +00:00
Roger Dingledine
a799dad937
forward-port the commenting out of the assert that glenn fink was
...
triggering. we still don't know why he was triggering it.
svn:r3841
2005-03-23 20:42:37 +00:00
Nick Mathewson
4ee6addf57
Fix bug 44: on HUP, if descriptor building fails (say, because router_get_my_address() fails), use old descriptor and warn.
...
svn:r3839
2005-03-23 20:28:40 +00:00
Nick Mathewson
6e4bccc4ac
Make GETINFO for "network-status" work on non-authdirs
...
svn:r3837
2005-03-23 19:15:10 +00:00
Nick Mathewson
b9016bd18f
Fix several bugs (including some crashes) related to control interface; implement missing desc/name functionality.
...
svn:r3836
2005-03-23 08:40:11 +00:00
Nick Mathewson
0b7a9e2e7b
Be willing to cache directories from up to ROUTER_MAX_AGE seconds into the future, now that we are more tolerant of skew.
...
svn:r3832
2005-03-23 06:39:53 +00:00
Nick Mathewson
631ab5c69b
Add a magic value to cpath_layer_t to make sure that we can tell valid cpaths from freed ones. I audited this once; it could use another audit.
...
svn:r3831
2005-03-23 06:21:48 +00:00
Nick Mathewson
905c16846a
Fix a few more instances of memory not freed on exit (found by weasel).
...
svn:r3830
2005-03-23 06:20:50 +00:00
Nick Mathewson
b7ce4d1d3d
Correct fix for self-to-self addressmap; simplify replace-old-entry logic; add missing case.
...
svn:r3829
2005-03-23 05:32:06 +00:00
Roger Dingledine
22386ecf1e
whoops, fix seg fault i just introduced
...
svn:r3828
2005-03-23 03:02:44 +00:00
Roger Dingledine
7373042a7b
fix assert triggers (bugs 109 and 96), and put in some
...
debugging logs to notice future repeat bugs.
svn:r3826
2005-03-23 02:52:55 +00:00
Roger Dingledine
a523439cbc
maybe resolve an assert trigger i just got:
...
connection_edge.c:643 address_is_in_virtual_range: Assertion addr failed; aborting.
nick, what do you think?
svn:r3825
2005-03-23 00:19:51 +00:00
Roger Dingledine
e28b8aaa40
make httpsproxy more likely to work
...
(don't let OR conns do tls until they've finished connecting and
doing the proxy dance.)
svn:r3824
2005-03-22 23:57:18 +00:00
Roger Dingledine
21b1adefbb
fix a 32bit/64bit sprintf mixup that weasel pointed out
...
svn:r3823
2005-03-22 23:27:29 +00:00
Roger Dingledine
ad5f5ddf7e
remove a duplicate circuit_mark_for_close() when picking
...
a path for the circuit fails.
svn:r3822
2005-03-22 23:20:33 +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
ab1d0049a2
Prevent spurious closes when we put stuff on a conn that has not written for a while.
...
svn:r3816
2005-03-22 20:25:51 +00:00
Roger Dingledine
8a763b5ae3
cleanup and a question
...
svn:r3815
2005-03-22 20:04:00 +00:00
Nick Mathewson
7a0072cc1a
Specify and implement close-stream and close-circuit control messages
...
svn:r3814
2005-03-22 19:36:38 +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
2d662bf773
Clear up a couple of pedantic compiler warnings
...
svn:r3812
2005-03-22 18:56:11 +00:00
Nick Mathewson
2d40991427
Report HTTP reasons to directory clients. (Also, fix format on new TODO items)
...
svn:r3811
2005-03-22 18:43:24 +00:00
Roger Dingledine
d6a0e5bcc9
when reporting events about streams, use the "real" address for
...
the stream, including the requested .exit address.
svn:r3810
2005-03-22 10:34:23 +00:00
Roger Dingledine
e07e0a4732
remove obsolete code
...
svn:r3809
2005-03-22 10:34:00 +00:00
Nick Mathewson
c4470cbedf
be more explicit about why we are expiring a conn; improve logic a bit too
...
svn:r3808
2005-03-22 06:21:35 +00:00
Nick Mathewson
f5989afde2
Add opt hibernating; fix bug 78
...
svn:r3807
2005-03-22 06:08:28 +00:00
Roger Dingledine
76a03e8635
handle_control_getinfo() was counting msg_len itself,
...
when that's actually smartlist_join_strings2()'s job.
svn:r3806
2005-03-22 05:41:05 +00:00
Roger Dingledine
ed9524a626
Remove controller getinfo support for "desc/all-ids".
...
Replace it with getinfo "network-status" just like in directories.
This way the controller can learn which servers are running, which
are verified, etc.
svn:r3801
2005-03-22 03:27:51 +00:00
Roger Dingledine
8d1460c858
tell me the address of the guy who's trying to attack my dirserver
...
svn:r3799
2005-03-22 01:18:50 +00:00
Roger Dingledine
f1ba4296c1
clean up and refactor some more
...
svn:r3798
2005-03-22 01:01:15 +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
4a497e5030
if our clock jumps forward by 100 seconds or more, assume something
...
has gone wrong with our network and abandon all not-yet-used circs.
svn:r3792
2005-03-19 23:58:42 +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
Roger Dingledine
fbeaeb138e
and forward-port the missing space
...
svn:r3789
2005-03-19 20:30:23 +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
07a7b6af64
Implement redirectstream in control interface.
...
svn:r3785
2005-03-19 06:05:55 +00:00
Roger Dingledine
963ddf2953
fix typo
...
svn:r3784
2005-03-19 05:09:13 +00:00
Nick Mathewson
11aa682812
Split version info into separate spec doc.
...
svn:r3783
2005-03-19 05:07:19 +00:00
Roger Dingledine
ec7f232b24
make hidden services more likely to work from the server-side
...
svn:r3781
2005-03-19 04:38:59 +00:00
Nick Mathewson
b004eda10c
Enable NT service code by default
...
svn:r3780
2005-03-19 01:04:05 +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
Roger Dingledine
316afb6d09
fix an assert trigger in cvs: if a resolve request fails, and the circuit
...
has vanished in the meantime, then we would both mark it for close
(i.e. put it on the closeable list) and also immediately free it.
svn:r3759
2005-03-14 04:42:52 +00:00
Nick Mathewson
0197b47ce9
Fix some more obscure compiler warnings
...
svn:r3758
2005-03-14 03:28:46 +00:00
Nick Mathewson
97dad670ea
Renormalize whitespace
...
svn:r3757
2005-03-14 03:18:35 +00:00
Nick Mathewson
fd150459b3
Raise common code for "detach this stream and try it with a different circuit" into a separate function; make that function handle controller-managed streams right.
...
svn:r3756
2005-03-14 03:12:59 +00:00
Roger Dingledine
cabb8624e2
bugfix: now that we don't do the client dns thing, our checks
...
to see if somebody was contradicting his exit policy were wrong.
svn:r3755
2005-03-13 05:53:17 +00:00
Roger Dingledine
01f0b31432
ShutdownWaitLength should be an interval, not a uint
...
svn:r3753
2005-03-12 20:16:52 +00:00
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
2b7907ef42
Increment step of a for loop should only happen once.
...
svn:r3746
2005-03-11 21:42:32 +00:00
Nick Mathewson
777d3dde0c
Get address map resetting implemented.
...
svn:r3745
2005-03-11 21:39:39 +00:00
Nick Mathewson
b17bb918ac
Remove unused macro; add a comment on remaining macros.
...
svn:r3744
2005-03-11 21:38:06 +00:00
Roger Dingledine
5254c4e63a
remove duplicate function prototype
...
svn:r3743
2005-03-11 20:47:23 +00:00
Geoff Goodell
af15c711c9
redefining default exit policy as per or-talk discussion
...
svn:r3739
2005-03-11 05:07:31 +00:00
Nick Mathewson
99cc6bae0d
Fix error codes to work on windows
...
svn:r3738
2005-03-10 18:48:13 +00:00
Nick Mathewson
6394f77edb
Initialize msg_len
...
svn:r3737
2005-03-10 18:46:11 +00:00
Nick Mathewson
aaf70df3bd
Fix signed/unsigned warning
...
svn:r3736
2005-03-10 18:45:42 +00:00
Nick Mathewson
a308353600
Fix const-ness warning
...
svn:r3733
2005-03-10 06:15:46 +00:00
Nick Mathewson
c185825585
Finish implementing GETINFO; make it easy to query address maps.
...
svn:r3732
2005-03-03 06:37:54 +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
4b5e213a0b
Separate reverse-virtual-address-map entries into ipv4 and hostname slots. Otherwise if you ask me to map "some IPv4 address" to foo.onion, I might tell you that I already mapped "bar.virtual" to foo.onion
...
svn:r3730
2005-03-02 22:01:10 +00:00
Nick Mathewson
5315b61e13
Fix some log messages to refer to correct control type.
...
svn:r3729
2005-03-02 21:59:36 +00:00
Nick Mathewson
5f8e2c2bc4
Rename unused-address functions to virtual address; this is more accurate. Also, include almost-right implementation of reusing dont-care mappings. (It is still kind of wrong because it does not take type into account.)
...
svn:r3728
2005-03-02 21:02:11 +00:00
Nick Mathewson
b494c2223d
Specify and implement fragmented control messages to allow for (among other things) long GETINFO replies. Otherwise we could hit the 64K barrier on questions like "please dump your client-side DNS cache."
...
svn:r3726
2005-03-02 20:22:10 +00:00
Nick Mathewson
65230fd39f
Implement "Dont-Care" from addresses to MapAddress control message. For safety, refuse to launch connections to unmapped addresses in the dont-care range.
...
svn:r3725
2005-03-02 19:26:46 +00:00
Nick Mathewson
e14f812a67
Still more code to make sure we send the right number and kind of RELAY END cells
...
svn:r3723
2005-03-02 03:13:05 +00:00
Nick Mathewson
afe414f070
Revise all calls to connection_edge_end to avoid sending MISC, and to take errno into account where possible.
...
svn:r3720
2005-03-01 22:42:31 +00:00
Nick Mathewson
4ddf768a4f
Forward-port new reasons; clean up code more; add code to convert new reasons to SOCKS5 reply codes; add code to convert errnos to reasons. New code still needs to get invoked.
...
svn:r3719
2005-03-01 22:16:15 +00:00
Nick Mathewson
83743d64ab
Change version parsing logic: a version is "obsolete" if it is not recommended and (1) there is a newer recommended version in the same series, or (2) there are no recommended versions in the same series, but there are some recommended versions in a newer series. A version is "new" if it is newer than any recommended version in the same series.
...
svn:r3716
2005-03-01 01:44:57 +00:00
Nick Mathewson
b7b05dc1b2
make control interface stream IDs monotonically increasing to prevent possible races
...
svn:r3715
2005-03-01 01:15:01 +00:00
Nick Mathewson
349ee1abea
Clean up rend cache on shutdown
...
svn:r3714
2005-02-28 22:38:00 +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
Nick Mathewson
c5091e7134
When copying routerinfo, copy descriptor too to prevent later double-free.
...
svn:r3711
2005-02-28 03:37:27 +00:00
Nick Mathewson
97bc49bd72
Try a little harder to avoid openssl SSL* double-free reports.
...
svn:r3710
2005-02-28 02:52:51 +00:00
Roger Dingledine
b3177d509e
free some more memory at shutdown
...
svn:r3707
2005-02-28 01:59:18 +00:00
Roger Dingledine
25ff3a5042
fix bug in control mapaddress
...
svn:r3705
2005-02-27 23:20:48 +00:00
Roger Dingledine
3cef60a0f7
fix a minor memory leak
...
svn:r3704
2005-02-27 22:08:01 +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
Nick Mathewson
8396105d84
Implement some of GETINFO control message
...
svn:r3694
2005-02-25 06:37:07 +00:00
Nick Mathewson
81d2c2d8e5
Stub functions for new control-spec logic.
...
svn:r3693
2005-02-25 06:16:28 +00:00
Nick Mathewson
26e6eb7539
Check returns from libevent calls better; stop poking at internals of events to see if they are live.
...
svn:r3691
2005-02-25 05:42:01 +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
24d7ae6fe8
Insert missing ! in assert_connection_ok; test was accidentally reversed in revision 1.329 yesterday. Should fix bug 102
...
svn:r3685
2005-02-24 17:08:27 +00:00
Roger Dingledine
5b24ca6cde
cache .exit address better (i think)
...
svn:r3684
2005-02-24 11:44:08 +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
8054f82992
stop a potential overflow (pointed out by ilja)
...
svn:r3681
2005-02-24 10:22:00 +00:00
Nick Mathewson
2adee31a26
Improve log message on unrecognized encoding to indicate that we can cope.
...
svn:r3676
2005-02-23 22:14:34 +00:00
Nick Mathewson
22c38b0f9b
Clarify comment. Use CONN_IS_EDGE more. Try to be more zealous about calling connection_edge_end when things go bad with edge conns in connection.c
...
svn:r3671
2005-02-23 20:35:26 +00:00
Nick Mathewson
69a36e352e
clarify comment
...
svn:r3667
2005-02-23 06:46:54 +00:00
Nick Mathewson
e0387d1322
Addressmap tweak: Make "addressmap x x" remove any mapping from the address x.
...
svn:r3666
2005-02-23 06:40:48 +00:00
Nick Mathewson
2ff6cfccd6
Forward-port fix to make dual-purpose NT executable work.
...
svn:r3665
2005-02-23 05:34:25 +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
70c3580f81
Patch to localtime/gmtime handling: use the _r variants where available. Use mutexes to fake _r where necessary. Make mutexes no-ops where no threading is enabled.
...
svn:r3653
2005-02-22 07:03:03 +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
Nick Mathewson
a68fcbf807
Initial IRIX compatibility fixes: check for inttypes.h; check for platform cell_t.
...
svn:r3648
2005-02-22 04:26:45 +00:00
Nick Mathewson
c2d5b67dd2
After we successfully connect, try handling pending stuff immediately, rather than waiting for the next call to connection_handle_write. Roger: is this right?
...
svn:r3647
2005-02-22 03:02:33 +00:00
Nick Mathewson
e673536e3f
Print uname on start of unittests.
...
svn:r3646
2005-02-22 03:01:31 +00:00
Nick Mathewson
1a55422006
Fix windows build: juggle }s and #endifs around in main.c
...
svn:r3645
2005-02-22 02:57:43 +00:00
Roger Dingledine
8991af604c
make the addressmap internals less noisy
...
svn:r3643
2005-02-22 00:55:50 +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
Roger Dingledine
38f53cff41
forward-port the onion queue thing
...
svn:r3639
2005-02-20 09:27:48 +00:00
Roger Dingledine
cbb4803ec8
forward-port some fixes
...
svn:r3631
2005-02-17 01:12:50 +00:00
Roger Dingledine
797419a62c
remove unused code
...
svn:r3629
2005-02-16 02:06:54 +00:00
Nick Mathewson
0289144229
Fix another crash bug found by Jaroslaw--it is possible for dns_resolve to mark a connection to be freed, if the circuit it was attached to fails for some reason.
...
svn:r3623
2005-02-14 21:16:27 +00:00
Nick Mathewson
427e246a10
Add a missing prototype to or.h
...
svn:r3621
2005-02-13 22:31:26 +00:00
Nick Mathewson
d90ab823ea
remove redundant unpack in critical path
...
svn:r3620
2005-02-13 16:17:32 +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
5d836c8140
Free tls resources on exit too
...
svn:r3615
2005-02-11 01:41:19 +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
60f234f42b
Add more functions to free things to help dmalloc allong.
...
svn:r3613
2005-02-10 23:18:39 +00:00
Roger Dingledine
33569e40d7
if we're hibernating and we get a sigint, exit immediately.
...
closes bug 91.
svn:r3611
2005-02-10 07:34:19 +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
37ca621301
when a client asks us for a dir mirror and we don't have one,
...
launch an attempt to get a fresh one.
svn:r3609
2005-02-10 06:31:34 +00:00
Roger Dingledine
07a3307460
remove redundant lines
...
svn:r3607
2005-02-09 23:54:30 +00:00
Nick Mathewson
89d422914a
Patch from adam langley: always remove sockets from libevent before closing them. Should fix epoll-related bugs.
...
svn:r3606
2005-02-09 23:16:31 +00:00
Roger Dingledine
c5c46d6fb6
don't list version in the win32 service display name or service name,
...
since they'll keep changing and people will get messed up about which
one is installed.
svn:r3592
2005-02-09 02:26:24 +00:00
Nick Mathewson
a64b03a4fd
Avoid double-free on tor-resolve failure
...
svn:r3567
2005-02-05 23:55:21 +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
Nick Mathewson
322c728e97
Fix tor-resolve implementation to prevent crashes and send resolves when we should.
...
svn:r3561
2005-02-05 21:03:24 +00:00
Roger Dingledine
56d4b99491
forward-port the logic skew and double-free thing
...
svn:r3549
2005-02-04 01:49:58 +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
bcece3d8a7
another minor fix
...
svn:r3511
2005-02-03 07:30:00 +00:00
Peter Palfrader
ddd724ef94
Add --with-dmalloc configure option
...
svn:r3508
2005-02-03 07:25:10 +00:00
Peter Palfrader
dfa3a0220f
Write a function header for Roger so he can fill it with life
...
svn:r3507
2005-02-03 07:23:48 +00:00
Roger Dingledine
f575d29a59
note a bug that wmf just found
...
svn:r3503
2005-02-02 06:28:45 +00:00
Roger Dingledine
c1656f41b4
bugfix: tor-resolve requests were ignoring .exit if there was
...
a working circuit they could use instead.
svn:r3502
2005-02-02 06:26:52 +00:00
Roger Dingledine
0551e3a814
reject more default filesharing ports by default.
...
svn:r3500
2005-02-02 04:15:40 +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
0f5a198028
sometimes, a conn on the closeable_lst gets absolutely
...
clobbered. maybe this will help me find out why.
svn:r3498
2005-02-02 00:19:09 +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
b90983e44f
reject odd-looking addresses at the client, rather than having
...
the server drop them because they're malformed.
svn:r3493
2005-02-01 12:19:44 +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
1e847aebb1
Go into soft hibernation after 95% of the bandwidth is used,
...
not 99%. This is especially important for daily hibernators who
have a small accounting max. Hopefully it will result in fewer
cut connections when the hard hibernation starts.
svn:r3488
2005-02-01 02:45:28 +00:00
Roger Dingledine
2e97593d25
define TOR_FRAGILE if you want tor to give you a core when
...
something goes wrong. this should only be used by people actively
tracking bugs.
svn:r3487
2005-02-01 00:37:16 +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
Peter Palfrader
d19aaa9a46
Fix arma's fix for my leak
...
svn:r3485
2005-01-31 23:47:25 +00:00
Roger Dingledine
ab8691c343
fix a minor memory leak found by weasel
...
svn:r3484
2005-01-31 20:38:57 +00:00
Roger Dingledine
d232831135
stop a sigpipe.
...
apparently when we get an eof, at least sometimes it *does* mean
you'd better not try writing.
svn:r3481
2005-01-31 08:12:30 +00:00
Roger Dingledine
9856e328c4
stop logging loudly when a client tries an old onion key. it's
...
time to give up on that issue, at least for now.
svn:r3479
2005-01-31 04:03:57 +00:00
Roger Dingledine
a7138f2535
fix another rogue connection_free that was causing us troubles
...
there are no doubt more lurking.
svn:r3478
2005-01-31 03:47:38 +00:00
Roger Dingledine
a0312f3590
don't double-detach a closing exit conn that's waiting for dns resolve
...
svn:r3477
2005-01-31 01:27:49 +00:00
Roger Dingledine
692a57c8e8
but don't spring the trip on worker children, because it turns
...
out they don't actually remove anything before freeing the conns.
svn:r3476
2005-01-31 01:02:20 +00:00
Roger Dingledine
d6489d8e41
lay a trap for situations where we connection_free something
...
that's still on one of the lists.
in particular, this will detect situations where we mark-for-close
and then free it ourselves.
svn:r3475
2005-01-31 00:33:32 +00:00
Roger Dingledine
75b45bcd4d
stop the infinite loop of freeing the same connection_t over and
...
over when it's not linked into the connection_array
svn:r3474
2005-01-31 00:26:09 +00:00
Roger Dingledine
5d8659429e
be less noisy about complaining when a jap client tries to connect
...
and we refuse him.
svn:r3472
2005-01-30 23:52:47 +00:00
Roger Dingledine
3969b6066e
Stop crashing when we're asking to close_if_marked a conn that
...
hasn't been connection_added yet. This happens when an exit conn
is in dns_wait and we get a relay end cell for it before it finishes.
We were silently leaking each of these marked conns in 0.0.9.x. Now
we actually free them.
svn:r3470
2005-01-30 21:47:47 +00:00
Roger Dingledine
20ecfc757b
be safe: if you got a resolvefailed end cell but you're not an AP, bail.
...
svn:r3469
2005-01-30 21:46:42 +00:00
Roger Dingledine
7ddeb7fae7
try to find the corrupt closeable_connection_lst entry early
...
svn:r3468
2005-01-30 20:31:08 +00:00
Roger Dingledine
e432d2ceea
we should handle the case where the client has no cert, for
...
backwards compatibility with jap clients.
svn:r3466
2005-01-30 08:02:33 +00:00
Roger Dingledine
cab0138e4c
give a better log message when we don't have a good mirror of
...
the directory yet and somebody asks for it.
svn:r3464
2005-01-30 06:08:42 +00:00
Roger Dingledine
8e7fc8d259
comment about a bug wrt clock skew
...
svn:r3461
2005-01-30 00:07: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
Roger Dingledine
191e52179c
distinguish between "well-formed and rejected" and "not well
...
formed", when parsing server descriptors.
svn:r3458
2005-01-29 11:23:34 +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
Roger Dingledine
0b9b97aaf4
forward-port the shutting up
...
svn:r3450
2005-01-28 10:00:29 +00:00
Roger Dingledine
b2fbd834f0
forward-port the dns and maxconn fixes
...
svn:r3448
2005-01-28 08:53:47 +00:00
Nick Mathewson
e03f571ee3
Forward-port win32 service patch; try to clean it a touch.
...
svn:r3438
2005-01-27 21:45:32 +00:00
Nick Mathewson
fbb7f869c5
fwd-port win32 isprint fix
...
svn:r3410
2005-01-22 00:42:58 +00:00
Nick Mathewson
1dc4d9a0ce
Fix dumb bug in unittests.
...
svn:r3409
2005-01-22 00:42:40 +00:00
Nick Mathewson
de9b46ad64
clean a couple of messages
...
svn:r3401
2005-01-21 23:16:07 +00:00
Roger Dingledine
4826718eac
special case so we don't yell when an empty http body doesn't specify a
...
content-encoding
svn:r3397
2005-01-21 03:18:49 +00:00
Roger Dingledine
b137f6d19f
if we get an incredibly skewed timestamp from a dirserver mirror that
...
isn't a verified OR, don't complain very loudly -- it's probably him
that's wrong.
svn:r3395
2005-01-21 00:45:18 +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
6704093c0d
Appease another 64-bit warning
...
svn:r3392
2005-01-20 20:21:34 +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
Nick Mathewson
5b45527851
Appease weasel's paranoid 64-bit compiler.
...
svn:r3389
2005-01-20 20:16:48 +00:00
Roger Dingledine
67f0babfd4
start to fix http status stuff, more work needed
...
svn:r3387
2005-01-20 20:07:36 +00:00
Nick Mathewson
80e8359ccf
Give better reason phrases in HTTP status lines. Start resolving task #67 . (Messages still need to be better.)
...
svn:r3386
2005-01-20 19:46:02 +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
a6e91f8157
The crowning hidden-service patch: prefer non-internal circuits
...
for normal connections, so we don't spend our internal circs on
other stuff and not have them when we need them.
svn:r3380
2005-01-20 07:02:24 +00:00
Roger Dingledine
38be533c69
Handle unavailable hidden services better. We try each intro point
...
until none are left, then we try to refetch the descriptor. If it's
the same one we had before, then close streams right then. Whenever
a new stream arrives, even if it's right after, optimistically try
refetching the descriptor, just in case.
svn:r3379
2005-01-19 23:15:59 +00:00
Roger Dingledine
ff48179372
make cannibalizing for rend circs prey on the pleb circs first
...
if possible, rather than the elite ones.
svn:r3378
2005-01-19 23:13:20 +00:00
Nick Mathewson
1eddb28f82
Add unittests for compression detection. Make all rendezvous descriptors "plausible".
...
svn:r3375
2005-01-19 22:47:48 +00:00
Nick Mathewson
69fa5be7b6
Workaround for webservers that lie about Content-Encoding: Tor now tries to autodetect compressed directories and compression itself. (resolves bug 65)
...
svn:r3374
2005-01-19 22:40:33 +00:00
Nick Mathewson
e0bf597665
Give more useful log messages when the tor process closes dns/cpuworker connections. "Error: Success!" makes us seem like crazy people."
...
svn:r3373
2005-01-19 21:34:42 +00:00
Roger Dingledine
75d83827e0
fix another bug where general exit circs were looking at rendezvous
...
streams. consolidate the looking into one function so it doesn't
happen again.
svn:r3372
2005-01-19 17:59:37 +00:00
Roger Dingledine
cfcc93296c
bugfix for cvs: we were needing a rendezvous circ, so we cannibalized
...
a general circ, and called rend_client_rendcirc_has_opened(), which
called connection_ap_attach_pending(), which was needing a rendezvous
circ, so it cannibalized a general circuit, and called ...
svn:r3370
2005-01-19 17:13:11 +00:00
Nick Mathewson
7d4a167c81
Basic windows libevent fixes
...
svn:r3366
2005-01-18 23:44:55 +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
ea24dc31bc
remove some extra-verbose logs
...
svn:r3361
2005-01-17 18:49:13 +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
Roger Dingledine
c6771e5ce4
reset published uptime when you wake up from hibernation,
...
since if you hibernate daily a published uptime of >1day
will be misleading.
svn:r3356
2005-01-14 17:49:25 +00:00
Roger Dingledine
dcf8b18215
when the hidden service launches a rendezvous circ, make sure it
...
provides good uptime if any virtual_port of the service wants that.
svn:r3355
2005-01-14 04:35:53 +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
Roger Dingledine
22f7934718
start generating version 1 style introduce cells
...
svn:r3352
2005-01-13 20:21:11 +00:00
Roger Dingledine
49fe4cba74
when deciding if a port is handled and the port demands uptime, don't
...
consider it handled if there's a circ that fits but isn't high-uptime.
svn:r3349
2005-01-13 07:23:19 +00:00
Roger Dingledine
abea142665
more cleanup
...
svn:r3347
2005-01-12 12:22:25 +00:00
Roger Dingledine
bafb3e4a5b
fix another integer underflow caused by buckets going negative
...
svn:r3346
2005-01-12 12:19:00 +00:00
Roger Dingledine
24a97d2c55
fix up some comments
...
svn:r3345
2005-01-12 12:18:46 +00:00
Roger Dingledine
3809c0ab91
tolerate bandwidtch buckets going negative (i hope)
...
svn:r3344
2005-01-12 10:00: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
70b3208f0a
if somebody starts his tor server in jan 2004 and then fixes his
...
clock, don't make his published uptime be a year.
svn:r3337
2005-01-11 11:54:11 +00:00
Roger Dingledine
45eb8d9660
if you're a server and the auth dirservers are down, go to any other
...
server. only give up hope on network reachability when no other servers
are reachable either.
svn:r3335
2005-01-10 17:39:41 +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
Roger Dingledine
3370f53010
it helps to use the correct name for the struct
...
svn:r3331
2005-01-10 04:32:59 +00:00
Roger Dingledine
10a81ccf18
when pruning circuit-wait streams when a dir fetch failed,
...
refer in logs to the destination address, not the address of the
application connection.
svn:r3330
2005-01-10 02:47:50 +00:00
Roger Dingledine
f468ff04ea
when we haven't fetched a directory yet, or the last time we
...
tried they were all unreachable, assume we are not connected to
the network.
when an application request comes in during this state, be
optimistic and assume we just reconnected. fetch a new directory
and if it works, begin making circuits.
svn:r3327
2005-01-07 15:57:57 +00:00
Roger Dingledine
608caffc64
fix unit tests: address has to be a non-private IP, and socksport
...
needs to be 0.
svn:r3324
2005-01-07 01:12:30 +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
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
Roger Dingledine
f8b517fa97
finish marking my comment in main.c
...
svn:r3318
2005-01-06 19:20:54 +00:00
Roger Dingledine
1f51809e65
clean up string printing in relay logs
...
svn:r3317
2005-01-06 19:19:13 +00:00
Roger Dingledine
6d2859c2e5
fix trivial typo in log entry
...
svn:r3316
2005-01-06 19:17:01 +00:00
Nick Mathewson
a6e587305f
typo spotted by chris
...
svn:r3308
2005-01-05 06:48:39 +00:00
Nick Mathewson
dcd228585d
Implement SIGNAL control command.
...
svn:r3307
2005-01-05 06:40:47 +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
814dd946f0
fix duplicate dns_cancel_pending_resolve reported by Giorgos Pallas
...
svn:r3293
2005-01-04 11:26:08 +00:00
Roger Dingledine
ba7c74e742
bandaid: make Giorgos Pallas's dns assert bug not actually crash on him.
...
one day we should try to figure out what's actually going on here.
svn:r3280
2005-01-04 06:21:06 +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
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
82c5381ecb
forward-port the fix for the compiler warning
...
svn:r3273
2005-01-04 01:16:20 +00:00
Roger Dingledine
d7a0f1a629
update print_usage to use new url
...
svn:r3267
2005-01-03 23:21:32 +00:00
Roger Dingledine
a005509c9d
update url for when users try to use socksport as an http proxy
...
svn:r3265
2005-01-03 23:19:15 +00:00
Nick Mathewson
d1fc7ad94b
Log when we retry a directory connection
...
svn:r3258
2005-01-03 21:14:09 +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
65c4fa2614
Split mark-dir-failed-and-retry logic into separate function; make it retry runningrouters as well as directory fetches; note that the do-we-need-to-give-up test is wrong.
...
svn:r3256
2005-01-03 20:07:07 +00:00
Nick Mathewson
858eda4736
Fix an unused function warning
...
svn:r3255
2005-01-03 20:03:49 +00:00
Nick Mathewson
5f40d6bf72
Make directory fail-and-retry logic happen in connection_about_to_close(); fixes win32 bug.
...
svn:r3253
2005-01-03 19:51:10 +00:00
Nick Mathewson
b50263f740
More work on task #43 : fix race conditions on multithreaded (win32) servers.
...
svn:r3251
2005-01-03 19:07:25 +00:00
Nick Mathewson
ead52e0bdc
Possible fix for task #43 : when running on a multithreaded environment (currently only windows), threads should not close opposite sides of their socketpairs, and workers should not call connection_free_all(). This may fix win32 servers.
...
svn:r3247
2005-01-03 18:06:51 +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
59504f4831
bugfix: if a server uploads a descriptor that's unapproved, actually
...
tell him so.
svn:r3243
2005-01-03 17:47:32 +00:00
Roger Dingledine
70075933c6
stop checking for clock skew, even for servers.
...
this means we are vulnerable to an attack where somebody recovers
and uses a really old certificate. however, if they do that, they
probably can get our identity key just as easily.
svn:r3241
2005-01-03 17:10:32 +00:00
Roger Dingledine
b4dad0e6a4
fix the assert bug reported by bassclef@163.com
...
svn:r3237
2005-01-02 06:16:46 +00:00
Roger Dingledine
a4ad47df86
Fix a double-mark-for-close bug, where we were finding a conn
...
for a cell even if that conn is already marked for close.
Don't back-port to 0.0.9.x, since this fix could have weird implications.
svn:r3235
2005-01-01 07:54:01 +00:00
Roger Dingledine
35d5a5b712
when a dirserver causes you to give a warn, mention which dirserver it was
...
svn:r3234
2005-01-01 07:40:59 +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
717fe4993e
actually make it stop keeping track of times. whoops.
...
svn:r3230
2004-12-25 07:19:48 +00:00
Roger Dingledine
e1ac30c2bb
stop calling assert_connection_ok(conn, time(NULL)) on every single
...
conn on every single loop.
svn:r3229
2004-12-25 06:43:40 +00:00
Roger Dingledine
288f2ed59e
stop telling win32 folks they have a bug just because we haven't finished
...
making tor work on win32 yet.
svn:r3227
2004-12-25 06:42:15 +00:00
Roger Dingledine
be72937ab0
initial profiling by phobos says we spend a whole lot of time
...
measuring how long each cell takes to process. make that optional.
svn:r3226
2004-12-25 06:10:34 +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
Roger Dingledine
3a572fcffa
don't connection_edge_end() on eof if we're already marked for close,
...
because if we are then it's because we already got an end.
svn:r3223
2004-12-24 09:43:57 +00:00
Nick Mathewson
ded8e79979
remove sentence-fragment comment refering to a design that never happened.
...
svn:r3220
2004-12-24 02:50:27 +00:00
Nick Mathewson
e8585dfe97
Remove length restriction when generating directories.
...
svn:r3218
2004-12-24 02:17:32 +00:00
Nick Mathewson
7117366810
Fix for running-routers length bug
...
svn:r3216
2004-12-24 01:41:52 +00:00
Roger Dingledine
f50b785c3b
and forward port the cleanup
...
svn:r3211
2004-12-22 10:04:50 +00:00
Roger Dingledine
18320557a1
fix a crash: if you do socks4 with an IP of 0.0.0.x then we get tricked
...
into thinking you're doing socks4a, and we look for the next byte.
thanks to aphex for finding this.
svn:r3207
2004-12-22 09:52:29 +00:00
Roger Dingledine
cf17d0d29c
move network_init from or/main to common/compat
...
call network_init in tor-resolve.c too
move tor_lookup_hostname from common/util to common/compat
svn:r3203
2004-12-22 05:29:06 +00:00
Roger Dingledine
036384fd8e
respond to an 009 XXX
...
svn:r3201
2004-12-22 02:55:26 +00:00
Nick Mathewson
32978afa54
Workaround for brain-damaged __FILE__ handling on MSVC: keep Nick's name out
...
of the warning messages.
svn:r3199
2004-12-22 02:32:26 +00:00
Roger Dingledine
f9fd101869
forward port:
...
fix a fencepost: we were blowing away the \n when reporting confvalue items
svn:r3194
2004-12-21 02:57:25 +00:00
Roger Dingledine
308ffa8a05
When listing circuits that are pending on an opening OR connection,
...
if we're an OR we were listing circuits that *end* at us as
being pending on every listener, dns/cpu worker, etc. Stop that.
svn:r3171
2004-12-17 23:17:00 +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
e327b2f3a6
Clarify confusing message
...
svn:r3151
2004-12-16 05:23:48 +00:00
Roger Dingledine
e1bc3f097e
bugfix: when we're reporting event circuit status, don't call it a stream.
...
while we're at it, include ":port" in the stream event string.
svn:r3148
2004-12-14 03:36:33 +00:00
Roger Dingledine
b6173b7b68
0.0.9 broke hibernation. darn it.
...
svn:r3147
2004-12-13 19:42:46 +00:00
Nick Mathewson
75cefd8989
Remove bugfixes that did not actually do anything, before we start a cargo cult.
...
svn:r3145
2004-12-13 18:48:12 +00:00
Nick Mathewson
1e71b83890
Fix a bug in parsing HashedControlPassword.
...
svn:r3143
2004-12-13 18:32:29 +00:00
Roger Dingledine
6cc7d32afc
clarify a log entry
...
svn:r3142
2004-12-13 02:23:22 +00:00
Roger Dingledine
a8582ae223
note a future thing we should do
...
svn:r3141
2004-12-13 01:30:41 +00:00
Roger Dingledine
011ad3cba5
clean up logging,
...
make it clearer which warns are bugs,
make the control log event match its specification,
point out a bug in how we deal with failure when renewing the tls context.
svn:r3138
2004-12-13 00:44:39 +00:00
Nick Mathewson
972124aab9
Only launch dns workers when we are actually starting a server.
...
svn:r3137
2004-12-13 00:09:00 +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
Roger Dingledine
470cdea7f8
make the 64 bit args print correctly on 64 bit archs
...
svn:r3123
2004-12-08 12:30:20 +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
Nick Mathewson
fc8a2596e1
Log contents of bw_accounting when we read it; fix memory leak.
...
svn:r3118
2004-12-07 23:20:10 +00:00
Roger Dingledine
ca95ed74ac
resolve tequila's crash bug: you can't free something
...
and then keep using it.
svn:r3117
2004-12-07 21:57:37 +00:00
Roger Dingledine
ad4f440e10
rearrange debug logs to make more sense
...
svn:r3116
2004-12-07 21:57:10 +00:00
Roger Dingledine
33cf6f2f61
clean two more minor memory leaks
...
svn:r3115
2004-12-07 19:42:45 +00:00
Nick Mathewson
06ce31b948
Only set a cookie when we intend to.
...
svn:r3114
2004-12-07 19:36:43 +00:00
Roger Dingledine
e93077c82a
fix a minor leak for people offering hidden services
...
svn:r3113
2004-12-07 17:49:14 +00:00
Roger Dingledine
29a8e80326
log bytes written with kill -USR1 too
...
svn:r3112
2004-12-07 16:50:47 +00:00
Roger Dingledine
012255fe60
fix the other half of the pipe race
...
svn:r3111
2004-12-07 16:37:32 +00:00
Roger Dingledine
538c3b0c26
avoid a sigpipe from a race: if we get the end right after
...
the app has hung up on us, we shouldn't hold-open-until-flush.
svn:r3109
2004-12-07 15:31:54 +00:00
Roger Dingledine
802d374a99
I'm a bad person.
...
Stop treating the uint16_t's as null-terminated strings,
and stop looking at the byte after them to see if it's null,
because sometimes you're not allowed to look there.
svn:r3108
2004-12-07 15:29:54 +00:00
Roger Dingledine
a2d80ec767
were we on crack??
...
svn:r3107
2004-12-07 09:18:25 +00:00
Roger Dingledine
41b809d2aa
salvage another 300 bytes per hup
...
svn:r3106
2004-12-07 09:11:38 +00:00
Roger Dingledine
d9f86e2782
and bust another memory leak
...
svn:r3105
2004-12-07 08:58:26 +00:00
Roger Dingledine
5d961c2c06
plug another memory leak
...
svn:r3104
2004-12-07 08:51:10 +00:00
Nick Mathewson
a6aa5eebd6
Fix some memory leaks and unlikely segfaults
...
svn:r3103
2004-12-07 07:48:16 +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
d19648b314
Renormalize whitespace
...
svn:r3095
2004-12-07 05:33:55 +00:00
Nick Mathewson
ac759adb43
Make unit tests work on win32
...
svn:r3094
2004-12-07 05:31:38 +00:00
Nick Mathewson
08e3090aff
More win32 fixes: 1) tolerate extra "readable" events better. 2) when being multithreaded, leave parent fdarray open.
...
svn:r3092
2004-12-06 23:19:55 +00:00
Roger Dingledine
f00631e6b9
answer resolved ip in network order
...
svn:r3087
2004-12-06 06:14:45 +00:00
Roger Dingledine
f10f24a61c
avoid using uninitialized variable
...
svn:r3086
2004-12-06 06:07:57 +00:00
Roger Dingledine
0859d09352
don't use cache for resolving .foo.exit names, but do reply immediately
...
if we're asked to resolve an IP.foo.exit.
svn:r3085
2004-12-06 06:06:13 +00:00
Roger Dingledine
577665f608
fix indenting
...
svn:r3084
2004-12-06 05:26:19 +00:00
Roger Dingledine
f21564eb29
send an end to the streams we close when we hibernate, rather
...
than just chopping them off
svn:r3083
2004-12-05 13:02:18 +00:00
Roger Dingledine
1c9c813866
check if we have a cached resolve for a tor-resolve address *after*
...
we remove the .foo.exit part of the address.
svn:r3082
2004-12-05 12:47:46 +00:00
Roger Dingledine
5ba3328172
fix a minor leak in my recent commit
...
svn:r3081
2004-12-05 12:35:00 +00:00
Roger Dingledine
469135e7e2
talk about quotas rather than bandwidths, in the logs
...
svn:r3080
2004-12-05 12:26:02 +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
Roger Dingledine
2532e9405e
Now we allow writing to the buffer even when the stream if marked for
...
close, if we're planning to wait to flush it.
This is important because we were sending a socks reject back if we're
closing and hadn't already sent one, but it wasn't actually getting
written since the conn was already marked-for-close.
svn:r3074
2004-12-04 07:13:37 +00:00
Roger Dingledine
5a6e117caf
React to eof immediately on non-open edge connections.
...
Stop keeping track of num_retries for apconns, since they expire
after 60 seconds anyway.
When warning about retrying or giving up, print the address, so
the user knows which one it's talking about.
svn:r3073
2004-12-04 03:26:35 +00:00
Roger Dingledine
c644886c38
bugfix: When we were checking to see if an ap_conn should time out
...
waiting for its connected cell, we were calculating time from when the
ap_conn was created. So if it waited say 20 seconds before being attached,
then we would immediately decide that the circuit had timed out.
Also, make circuit_dump_by_conn() display actual circuit progress,
including circuits that haven't been attached to the conn yet but
hope to when it finishes connecting.
svn:r3072
2004-12-04 02:51:11 +00:00
Roger Dingledine
675f60aa13
whoops
...
just because it says snprintf doesn't mean it's a noop
svn:r3071
2004-12-04 01:23:04 +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
8d69dc472b
make circuit building and router parsing less noisy
...
svn:r3068
2004-12-04 00:25:54 +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
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
e3f6f92cf7
check for duplicate circuit ID _after_ updating circ_id_type.
...
svn:r3058
2004-12-01 04:55:03 +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
Roger Dingledine
ef04cfcbad
one more typo
...
svn:r3054
2004-12-01 04:13:15 +00:00
Nick Mathewson
b457cfb5eb
Spell-check strings and comments
...
svn:r3052
2004-12-01 03:48:14 +00:00
Nick Mathewson
6e88abf418
If we are using select, make sure we stay within FD_SETSIZE.
...
svn:r3051
2004-12-01 03:15:59 +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
Nick Mathewson
a889926e1c
Clarify chosen tag progression
...
svn:r3047
2004-11-30 16:07:20 +00:00
Roger Dingledine
3929f58018
clean obsolete circuit_log_path code
...
svn:r3046
2004-11-30 10:47:48 +00:00
Roger Dingledine
eb558d0a84
clean up the other "Tell Roger" log that dfc keeps getting
...
svn:r3042
2004-11-30 09:02:25 +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
Roger Dingledine
1d4af1930c
Let resolve conns retry/expire also, rather than sticking around forever.
...
Put the check-if-requested-exitrouter-will-reject-us code in the
circuit_attach loop, so it gets checked periodically and not just
once at the beginning. This is useful in case the routerlist changes,
but also in case the address gets resolved into something that we learn
we'll reject.
svn:r3039
2004-11-30 08:39:14 +00:00
Roger Dingledine
d383c23e73
refuse .exit addresses immediately if the requested node would
...
refuse the request (e.g. due to exit policy or wrong version)
svn:r3038
2004-11-30 08:15:09 +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
Nick Mathewson
a5d3325c5c
Fix last patch
...
svn:r3031
2004-11-30 06:12:21 +00:00
Nick Mathewson
c8abe1907d
Rename parse_address to parse_extended_hostname (since we have other kinds of addresses); make its output an enum; support HEXDIGEST.exit hostnames.
...
svn:r3029
2004-11-30 03:44:10 +00:00
Nick Mathewson
ebab451eed
Make version parsing tests pass
...
svn:r3028
2004-11-30 03:41:06 +00:00
Nick Mathewson
ee7bef1458
Enforce coding style.
...
svn:r3025
2004-11-30 02:26:41 +00:00
Nick Mathewson
e764d00e15
If anybody set DirFetchPostPeriod, give them StatuFetchPeriod instead. Impose minima and maxima for all *Period options; impose even tighter maxima for fetching if we are a caching dirserver. Clip rather than rejecting. arma: are these good?
...
svn:r3024
2004-11-30 02:23:51 +00:00
Nick Mathewson
ce505f5033
note possible alternative for how to do CVS versions; ask arma which he likes.
...
svn:r3023
2004-11-29 23:06:51 +00:00
Nick Mathewson
6507be4290
Implement new version format for post 0.1.
...
svn:r3022
2004-11-29 23:04:26 +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
c1dc17e6e2
put in initial support for ".nickname.exit" addresses, to let alice
...
decide what exit node to use; based on a patch by geoff goodell.
needs more work: e.g. it goes bananas building new circuits when the
chosen exit node's exit policy rejects the connection.
svn:r3015
2004-11-29 08:34:54 +00:00
Nick Mathewson
9ba7311c1c
After implementing a feature, remember to disable the error message you used to get when requesting it.
...
svn:r3013
2004-11-29 07:59:00 +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
f7c6ad065e
correct multiple internal spaces
...
svn:r3004
2004-11-28 09:14:07 +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
dad760ddd1
one of the debugging aids was misleading
...
svn:r3000
2004-11-28 06:33:14 +00:00
Nick Mathewson
f77ff938b7
remember; tor_socket_errno has side effects!
...
svn:r2997
2004-11-28 05:48:02 +00:00
Roger Dingledine
e5e45fe980
inform him more sanely
...
svn:r2993
2004-11-26 04:19:03 +00:00
Roger Dingledine
a7f92d7ffe
inform the user that you noticed when he sent a USR2
...
svn:r2992
2004-11-26 04:17:57 +00:00
Roger Dingledine
f9a0ab62b7
if you want to handle -USR2, you should catch it too.
...
svn:r2990
2004-11-26 04:03:19 +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
Roger Dingledine
02a30a348a
give up trying to track down the reason we're calling package_inbuf
...
with a package window of 0. it's safe to just catch the error cases
there and do the right thing.
svn:r2988
2004-11-26 03:43:54 +00:00
Roger Dingledine
179ad27b34
call set_max_file_descriptors() after we configure logs, so
...
it doesn't always do loglevel info logs on windows.
svn:r2987
2004-11-26 03:05:55 +00:00
Roger Dingledine
e24057b2bf
when warning that a version is too new, don't use the confusing
...
text "is_obsolete_version():".
svn:r2986
2004-11-25 05:49:13 +00:00
Nick Mathewson
f91152ce6a
Clarify a bunch of log messages
...
svn:r2983
2004-11-25 04:20:10 +00:00
Roger Dingledine
914d346095
update conn_state_to_string
...
svn:r2979
2004-11-24 07:58:15 +00:00
Roger Dingledine
83e7043eb8
don't process marked-for-close conns further.
...
(fix assert trigger -- if we're lucky.)
svn:r2975
2004-11-24 06:41:58 +00:00
Roger Dingledine
7d55f3685e
make tor-resolve work, uh, more. this time for sure!
...
svn:r2974
2004-11-24 06:16:36 +00:00
Roger Dingledine
cca469ec58
make tor-resolve work again
...
svn:r2973
2004-11-24 06:01:52 +00:00
Roger Dingledine
0eebfe3558
bugfix: let socks do multiple rounds of negotiation again
...
(which is needed for socks5)
svn:r2970
2004-11-24 04:35:28 +00:00
Roger Dingledine
090c84627c
patch to nick's patch
...
svn:r2969
2004-11-24 03:58:45 +00:00
Nick Mathewson
74f74a06c6
make nt service version match actual version
...
svn:r2968
2004-11-24 00:55:39 +00:00
Nick Mathewson
1bec1b3d37
Better notice for hibernate interval spans; when estimate is 0, start out awake.
...
svn:r2963
2004-11-23 22:34:23 +00:00
Nick Mathewson
5fa55c8317
Bugfix: when no units are given, default to seconds or bytes.
...
svn:r2960
2004-11-23 10:52:27 +00:00
Roger Dingledine
a284b0db8f
another slightly less confusing message
...
nick: we need to figure out if we should say anything different
here when the wake-up time and the expected back-to-sleep time
have both passed.
svn:r2956
2004-11-23 10:05:56 +00:00
Roger Dingledine
b6cb547667
less confusing message upon hibernation
...
svn:r2955
2004-11-23 09:21:03 +00:00
Roger Dingledine
921c40abe7
fail more gracefully next time
...
svn:r2954
2004-11-23 09:01:37 +00:00
Roger Dingledine
57a392d8d8
initialize rephist before we init_from_config, since init_from_config
...
can make us init_keys if we're going to hibernate, which makes us build
a router_desc.
svn:r2953
2004-11-23 09:00:55 +00:00
Roger Dingledine
d7fb38cfe3
update unit tests to reflect changed interface
...
svn:r2952
2004-11-23 08:36:26 +00:00
Roger Dingledine
7ed738b34c
fix some typos; move to 0.0.9rc1
...
svn:r2951
2004-11-23 07:37:25 +00:00
Nick Mathewson
f5319a010d
Dr. Seuss on iterating circular lists: "It's fun to have fun, but you
...
have to know how."
svn:r2948
2004-11-23 06:08:08 +00:00
Nick Mathewson
0a58bbe0dd
Fix critical bug in circuit_list_path: cpath is a circular list! (Also reimplement circuit_log_cpath using circuit_list_cpath).
...
svn:r2946
2004-11-23 00:11:36 +00:00
Nick Mathewson
cd70264377
Clean up some logging and interfaces
...
svn:r2945
2004-11-23 00:08:26 +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
fe32c2d141
Fix sign-related warnings
...
svn:r2942
2004-11-22 22:50:17 +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
f17c08beed
Apply NT service patch from Osamu Fujino. This still has some problems (indicated in a comment adapted from the patch submission email), but it is better than before and better than nothing.
...
svn:r2938
2004-11-22 22:10:37 +00:00
Nick Mathewson
956b463dfe
Implement weekly/monthly/daily accounting
...
svn:r2936
2004-11-22 21:56:51 +00:00
Nick Mathewson
805c9e3673
Absolutely never call close_temp_logs while validating log options.
...
svn:r2934
2004-11-22 20:08:07 +00:00
Roger Dingledine
4f2c2c9948
The crowning bugfix.
...
The problem was that with high load, circuit package window was
reaching 0. Whenever we got a circuit-level sendme, we were
reading a lot on each socket, but only writing out a bit. So we
would eventually reach eof. This would be noticed and acted on
even when there are still bytes sitting in the inbuf.
svn:r2932
2004-11-21 11:30:33 +00:00
Roger Dingledine
27b8797245
clean up some more.
...
i think i'm getting closer.
svn:r2931
2004-11-21 11:20:28 +00:00
Roger Dingledine
310a8da0d2
break reached_eof() out of process_inbuf()
...
svn:r2930
2004-11-21 10:14:57 +00:00
Roger Dingledine
671d84dc2f
some more debugging aids
...
svn:r2929
2004-11-21 09:39:01 +00:00
Roger Dingledine
6a516dfdd3
be more greedy about filling up all relay cells.
...
this may have some bugs in it still.
and it may end up not being what we want to do.
svn:r2928
2004-11-21 07:43:12 +00:00
Nick Mathewson
bb18d4238f
Dont keep rephist info for routers that havent had activity for 24 hours.
...
svn:r2926
2004-11-21 05:14:46 +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
Roger Dingledine
a4b1eb5630
allow StrictEntryNode and StrictExitNode to be singular
...
svn:r2922
2004-11-20 23:16:03 +00:00
Roger Dingledine
73da4bad46
stop some more seg faults
...
svn:r2921
2004-11-20 12:55:41 +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
6322287dc1
printfs want carriage returns
...
svn:r2917
2004-11-20 08:00:57 +00:00
Roger Dingledine
dd19cf6ba3
kill -USR2 now moves all logs to loglevel debug
...
plus fix some typos
svn:r2914
2004-11-20 07:33:55 +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
Roger Dingledine
2e4763655d
bugfix: when our poll is interrupted, we believed the revents values.
...
svn:r2907
2004-11-17 20:26:39 +00:00
Nick Mathewson
647c076c8f
add a TODO item and some comment changes.
...
svn:r2904
2004-11-16 03:32:01 +00:00
Roger Dingledine
abdf073f14
minor fixes
...
svn:r2901
2004-11-16 03:12:53 +00:00
Nick Mathewson
7a8ac5dfef
Tweak on patch to make authoritative directory servers cache
...
directories on disk. Make authdirservers cache *their own*
directories instead of the ones they download. This gives better
liveness, and marginally better resistance to broken authdirservers.
Authdirservers don't cache running-routers at all: r-r isn't stored to
disk, so there's no point right now.
svn:r2893
2004-11-15 16:17:59 +00:00
Roger Dingledine
dbd4dadff7
Authoritative dirservers now also cache the directory, since
...
they weren't writing anything into their datadirectory, so
when they stop and start, they would know nothing until they
fetched a directory from another authdirserver.
svn:r2891
2004-11-15 09:38:17 +00:00
Roger Dingledine
50c15943a2
move second stat to a cleaner place
...
svn:r2890
2004-11-15 09:22:01 +00:00
Roger Dingledine
4b76fe8036
Break DirFetchPostPeriod into:
...
- DirFetchPeriod for fetching full directory,
- StatusFetchPeriod for fetching running-routers,
- DirPostPeriod for posting server descriptor,
- RendPostPeriod for posting hidden service descriptors.
Also make sure the hidden service descriptors are at a random
offset from each other, to hinder linkability.
svn:r2889
2004-11-15 09:05:54 +00:00
Roger Dingledine
67aa3b66c5
clean up socks handling, refuse connections to port 0
...
svn:r2888
2004-11-15 07:50:15 +00:00
Roger Dingledine
72dd656b88
a first cut at a print_usage()
...
svn:r2887
2004-11-15 07:29:27 +00:00
Nick Mathewson
c909a8a64b
Only record bandwidth usage when accounting is enabled
...
svn:r2886
2004-11-15 04:48:53 +00:00
Nick Mathewson
930464c889
Change "warn if unverified routers are very skewed" to "never warn about unverified router skew"
...
svn:r2885
2004-11-15 04:28:24 +00:00
Nick Mathewson
22a0d82749
Cache running-routers; compress running-routers; serve compressed running-routers.z
...
svn:r2883
2004-11-15 04:04:20 +00:00
Nick Mathewson
076f120951
Patch to patch: do not send both error and done for one command.
...
svn:r2882
2004-11-15 04:02:59 +00:00
Roger Dingledine
ee591be3f2
fix a bug in configuring accounting in options_act()
...
svn:r2881
2004-11-15 04:01:31 +00:00
Roger Dingledine
47993ae6fb
some fixes so far
...
svn:r2880
2004-11-15 03:53:03 +00:00
Nick Mathewson
5109159ff9
Fix compilation. Duh.
...
svn:r2876
2004-11-14 22:53:51 +00:00
Nick Mathewson
3e6edf20cc
Resolve some hibernating-related XXXX009s.
...
svn:r2875
2004-11-14 22:21:23 +00:00
Nick Mathewson
402c75fb06
Allow more clock skew from unrecognized hosts than from recognized ones.
...
svn:r2874
2004-11-14 22:08:25 +00:00
Nick Mathewson
57536f138a
Fetch running-routers.
...
Split logic to initiate dirfetch, running-routers fetch, and
descriptor post. arma: There are some XXXs here that raise design
questions which we should solve before the next release.
The biggest problem is this: Right now, the directory is about 50X as
large as running-routers uncompressed, and about 36X as large
compressed. Assuming:
- everybody gets the compressed version of everything,
- everybody gets cached directories from random dirservers and
uncached r-r from authdirservers
- everybody downloads r-r at the same rate they now download dirs,
then using r-r from will *increase* authdirserver directory bandwidth usage
if there are significantly more caches than authdirservers.
I think it's safe to leave this in for now, since there aren't 3x36 caching
dirservers, but we should make everybody with a dirport cache running-routers
soon. But I could be wrong.
svn:r2872
2004-11-14 21:46:40 +00:00
Nick Mathewson
2078b136f6
Make running-routers fetch (apparently) work
...
svn:r2871
2004-11-14 21:35:30 +00:00
Nick Mathewson
bb80d60fe7
Hibernate if we start tor during the "wait for wakeup-time" phase of an accounting interval. Log our hibernation plans better.
...
svn:r2869
2004-11-14 21:11:06 +00:00
Nick Mathewson
a732727a2b
Add simpler option_is_same, as suggested by arma. Finish implementing SAVECONF
...
svn:r2868
2004-11-14 20:51:28 +00:00
Nick Mathewson
26973578bf
Fix windows whitespace
...
svn:r2860
2004-11-14 18:21:17 +00:00
Nick Mathewson
aba71028be
Add an unreachable return 0.
...
svn:r2859
2004-11-14 18:20:12 +00:00
Nick Mathewson
4f835673be
Remove redundant declaration
...
svn:r2855
2004-11-14 17:22:10 +00:00
Roger Dingledine
846f71dcca
make kill -USR1 work again
...
svn:r2853
2004-11-14 13:35:47 +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
Roger Dingledine
3f5c113815
clean a comment
...
svn:r2844
2004-11-14 04:55:02 +00:00
Nick Mathewson
ed4fa18699
normalize whitespace
...
svn:r2839
2004-11-13 23:34:01 +00:00
Nick Mathewson
aab929abe0
Use the data, *then* free it. It works so much better.
...
svn:r2837
2004-11-13 23:27:50 +00:00
Nick Mathewson
dc48e7aeed
Document remaining configuration options; add a ccheck for redundant authentication mechanisms in options_validate; add TODO items for post-009 hibernation features
...
svn:r2833
2004-11-13 17:17:04 +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
0b42e31fe0
Comment a confusing conditional
...
svn:r2828
2004-11-13 02:54:30 +00:00
Roger Dingledine
5864f4ac01
fix a seg fault when fetching rendezvous descs
...
svn:r2825
2004-11-12 21:59:27 +00:00
Nick Mathewson
a8f9ba91db
Nobody was using the return values from smartlist_(set|del|del_keeporder), so remove them.
...
svn:r2823
2004-11-12 21:14:06 +00:00
Nick Mathewson
eabcf6618e
Write most of the implementation for SAVECONF.
...
svn:r2820
2004-11-12 20:09:54 +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
60880cda84
Resolve a bunch of FIXME items; mark a lot more for attention; ask for clarification on some. Turn all XXXX008 ("showstopper for 0.0.8 release") items into XXXX009 or XXXX, since plainly they were not showstoppers for 0.0.8. Add/clean some docs.
...
svn:r2808
2004-11-12 16:39:03 +00:00
Nick Mathewson
2a5bcb29e6
Resolve FIXME: Possible solution to note_disconnect problem; needs thought and review.
...
svn:r2807
2004-11-12 05:52:19 +00:00
Nick Mathewson
5d92fbe30e
Use autoconf to enable largefile support where necessary. Use ftello where available, since ftell can fail at 2GB.
...
svn:r2806
2004-11-12 05:05:41 +00:00
Nick Mathewson
0faab62cd9
Resolve FIXMES: sometimes an error code is just an error code
...
svn:r2805
2004-11-12 05:03:50 +00:00
Roger Dingledine
90e0ad517e
dfc caught a SIGXFSZ error when his debugfile reached 2GB.
...
so if they exist, catch them and ignore them.
write() will fail normally and we'll look at errno like
normal human beings.
svn:r2804
2004-11-12 04:59:37 +00:00
Roger Dingledine
fde595feb7
when clients do --list-fingerprint, it's misleading to
...
give them one, because it will never be the same again
svn:r2800
2004-11-11 13:24:10 +00:00
Nick Mathewson
6252cba522
apply patch from Andre Eisenbach: include event code with events, as required by control-spec.txt
...
svn:r2799
2004-11-11 00:54:53 +00:00
Nick Mathewson
e69d9647ed
Remove XXXX009 comment telling us to do the last (circID-related) fix
...
svn:r2798
2004-11-10 20:19:45 +00:00
Nick Mathewson
954570486f
Resolve a FIXME: use identity comparison, not nickname comparison, to
...
choose circuit ID types. This is important because our view of "the
nickname of the router on the other side of this connection" is
skewed, and depends on whether we think the other rotuer is
verified--and there's no way to know whether another router thinks you
are verified.
For backward compatibility, we notice when the other router chooses
the same circuit ID type as us (because it's running an old version),
and switch our type to be polite.
svn:r2797
2004-11-10 20:14:37 +00:00
Nick Mathewson
ec49905fb8
When we think we have no bandwidth, guess that we will run for 1 day.
...
svn:r2795
2004-11-10 19:32:44 +00:00
Nick Mathewson
9c22b428bf
Clarify a warning about /.tor
...
svn:r2794
2004-11-10 14:29:18 +00:00
Nick Mathewson
a43db78e8d
Resolve FIXME items: make the kill-unattached-AP timeout symbolic
...
svn:r2793
2004-11-10 14:28:47 +00:00
Nick Mathewson
c9af37d1ba
Resolve FIXME items: make circuit_free_cpath_node static
...
svn:r2792
2004-11-10 14:28:04 +00:00
Nick Mathewson
fde4129ac3
Resolve FIXME items: clarify two XXXX comments for 009
...
svn:r2791
2004-11-10 14:27:26 +00:00
Nick Mathewson
aa1c0c4d67
Resolve FIXME items: fix assert failure on malformed socks4a qreuests. (bug reported by Anna Shubina wrt old Netscapes)
...
svn:r2790
2004-11-10 14:26:34 +00:00
Nick Mathewson
c1bf171ed8
Fix a few bugs in accounting: parse bw_accounting correctly; set end time of continued interval; record used bandwidth on state change.
...
svn:r2785
2004-11-10 04:19:53 +00:00
Roger Dingledine
646903542a
make nick's config patch build
...
svn:r2783
2004-11-10 03:48:38 +00:00
Nick Mathewson
1013abd27f
Validate log options during options_validate(). Reject unrecognized log types like "Log notice magic-twanger". Also, make sure User and Group stay the same, and do not crash when somebody tries to change PidFile to NULL.
...
svn:r2778
2004-11-10 03:40:30 +00:00
Roger Dingledine
af9683501c
make abbreviations case-insensitive (thanks weasel)
...
svn:r2773
2004-11-10 03:22:49 +00:00
Roger Dingledine
d9a74cd0af
make it more obvious that we have just told them their new torrc log line.
...
svn:r2772
2004-11-10 03:08:03 +00:00
Roger Dingledine
c03a3eaed0
weaken our anonymity warning a little bit more
...
svn:r2771
2004-11-10 02:58:27 +00:00
Nick Mathewson
4cdddcc13d
Remvove an XXX
...
svn:r2769
2004-11-10 02:02:06 +00:00
Roger Dingledine
ab951fc828
remove extraneous variable
...
svn:r2765
2004-11-10 00:19:18 +00:00
Roger Dingledine
7528e8b86a
don't check permissions on our datadirectory until we switch uid/gid
...
svn:r2759
2004-11-10 00:11:37 +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
Nick Mathewson
b960574556
Change interface to config_trial_assign even more; have it use get_options() instead
...
svn:r2754
2004-11-09 17:15:17 +00:00
Nick Mathewson
a2079c074f
Add some documentation to routerlist
...
svn:r2753
2004-11-09 17:14:15 +00:00
Nick Mathewson
548d4174ef
When listing router status, include ourself if we are awake
...
svn:r2752
2004-11-09 17:12:56 +00:00
Roger Dingledine
3ce3d6eead
resolve a 64-bit warning
...
svn:r2750
2004-11-09 11:36:38 +00:00
Roger Dingledine
ca070e7de6
bugfix: ^c ought to work even while hibernating
...
svn:r2748
2004-11-09 11:14:34 +00:00
Roger Dingledine
b773045a58
only non-authdirservers cache the dir they just fetched
...
svn:r2747
2004-11-09 10:38:42 +00:00
Roger Dingledine
3235c72f6c
control event logs include loglevel notice
...
svn:r2746
2004-11-09 10:32:02 +00:00
Roger Dingledine
a972589bdb
allow BandwidthRate and Burst to be abbrevs in the torrc too
...
svn:r2744
2004-11-09 10:30:06 +00:00
Roger Dingledine
8d8d6b5661
raise your hand if you can spell
...
svn:r2743
2004-11-09 10:21:19 +00:00
Roger Dingledine
233f516d61
if you're going to ask it to use a body of length 0,
...
don't give it a body.
svn:r2742
2004-11-09 10:18:41 +00:00
Roger Dingledine
dd3a12c929
fix a memory-squashing bug that was causing an infinite loop
...
svn:r2741
2004-11-09 10:08:42 +00:00
Roger Dingledine
6a504efdd3
mark_logs_temp() before init'ing new ones.
...
we were seeing double, triple, etc each time we setconf'ed.
svn:r2738
2004-11-09 08:01:39 +00:00
Roger Dingledine
3901473bf3
change the interface to config_trial_assign()
...
svn:r2737
2004-11-09 07:55:48 +00:00
Roger Dingledine
2d18d9eefb
when you try a new set of options, and you like them, make sure they stick
...
svn:r2736
2004-11-09 07:45:24 +00:00
Roger Dingledine
9f3e3d2b71
stop wanting to split init_keys()
...
svn:r2735
2004-11-09 07:29:05 +00:00
Roger Dingledine
cad26b343d
once normalized, DataDirectory is always defined
...
svn:r2734
2004-11-09 07:20:21 +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
Nick Mathewson
48a0b6c476
Separate is-recognized-option from get-option-value, since NULL is ambiguous and returning "" misrepresents.
...
svn:r2731
2004-11-09 06:40:32 +00:00
Roger Dingledine
005b02fd57
when rejecting an old-style router descriptor, tell us its nickname
...
svn:r2730
2004-11-09 06:37:58 +00:00
Roger Dingledine
677124fd0c
During options_dup, don't copy LINELIST_S or OBSOLETE options.
...
And recognize obsolete options now in config_get_assigned_option().
svn:r2729
2004-11-09 06:18:17 +00:00
Roger Dingledine
94b9525f6e
EntryNodess is not the plural of EntryNodes
...
svn:r2728
2004-11-09 06:09:06 +00:00
Roger Dingledine
3c6b6a53a9
and another
...
svn:r2727
2004-11-09 06:03:20 +00:00
Roger Dingledine
5c2278aea8
fix some dereferences
...
svn:r2726
2004-11-09 05:59:22 +00:00
Roger Dingledine
ef6bdd6c1e
make datadirectory work again
...
svn:r2724
2004-11-09 05:35:49 +00:00
Nick Mathewson
2677395aaf
Normalize DataDirectory in options_validate, making SIGHUP survivable.
...
svn:r2722
2004-11-09 05:26:49 +00:00
Nick Mathewson
a5903b737a
Document accounting
...
svn:r2721
2004-11-09 05:18:15 +00:00
Nick Mathewson
929b172955
Stop DataDirectory from changing; also stop using new as an identifier?
...
svn:r2717
2004-11-09 04:46:24 +00:00
Roger Dingledine
90b47172bd
Make an options_act() where we do all the things a new options set
...
needs.
Still needs more work.
svn:r2716
2004-11-09 04:28:18 +00:00
Roger Dingledine
3805221262
stop breaking the get_options() abstraction in config.c
...
svn:r2715
2004-11-09 02:12:55 +00:00
Roger Dingledine
e3a067c73a
fix comments in hibernate.c
...
svn:r2714
2004-11-09 02:12:41 +00:00
Roger Dingledine
8c7b2ff7ed
various fixes
...
svn:r2712
2004-11-09 01:24:10 +00:00
Nick Mathewson
cb5de85585
Separate validate from activate. Document undocumented stuff in config.c.
...
svn:r2711
2004-11-08 23:12:40 +00:00
Roger Dingledine
8b9d7da59f
while we hibernate, our declared bandwidth capacity is 0
...
svn:r2710
2004-11-07 23:19:12 +00:00
Nick Mathewson
2640be28fa
Document hibernate.c. Also fix handling of corner case where we hit the end of the interval while we are in HIBERNATE_STATE_LOWBANDWIDTH
...
svn:r2709
2004-11-07 23:14:47 +00:00
Nick Mathewson
fc9c6e7c95
Fix compile errors
...
svn:r2708
2004-11-07 23:11:29 +00:00
Nick Mathewson
f9c85c4d1c
Make set-option functions distinguish between bad keys and bad values, in case the caller cares
...
svn:r2707
2004-11-07 22:59:30 +00:00
Nick Mathewson
c514a06663
Fix up error codes
...
svn:r2706
2004-11-07 22:58:35 +00:00
Nick Mathewson
0059ee5fea
More tests for split
...
svn:r2705
2004-11-07 22:58:16 +00:00
Roger Dingledine
dac5d6715e
add saveconf control command.
...
allow authentication by localhost, but if tor demands more, require more.
svn:r2704
2004-11-07 22:37:59 +00:00
Nick Mathewson
66779137bf
Add missing dereference; stop throwing zeroes around.
...
svn:r2702
2004-11-07 22:18:00 +00:00
Nick Mathewson
2cacb4e0f9
Document control.c
...
svn:r2700
2004-11-07 21:37:50 +00:00
Roger Dingledine
3236ee3127
allow unauth control connections for now
...
let control connections recognize eof
svn:r2699
2004-11-07 11:33:04 +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
efad93feb4
tor --list-fingerprint as a client shouldn't try to print null
...
svn:r2697
2004-11-06 09:22:08 +00:00
Roger Dingledine
53a2b22742
fix the next subtle memory-crunching bug
...
now hup works
svn:r2696
2004-11-06 08:55:22 +00:00
Roger Dingledine
e2e6d19e76
fix subtle bug that was causing logs to not show anything
...
svn:r2695
2004-11-06 07:40:20 +00:00
Roger Dingledine
28a297ebe7
only play the accounting game if it's possible you'll choose to hibernate
...
svn:r2694
2004-11-06 06:56:28 +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
Nick Mathewson
f490e5cdb6
Update log documentation
...
svn:r2691
2004-11-05 21:22:38 +00:00
Nick Mathewson
7c0792d89a
Write hibernation code. Needs docs and tests.
...
svn:r2689
2004-11-05 17:55:34 +00:00
Nick Mathewson
2e8353e2f4
Use new log format; convert old format to new format.
...
svn:r2684
2004-11-05 05:50:35 +00:00
Roger Dingledine
2ba3a9de16
make the default default options.FirewallPorts be the default
...
svn:r2683
2004-11-04 23:39:57 +00:00
Nick Mathewson
19868fe968
Move accounting code into hibernate; start adding logic to track bandwidth-per-seconds-active
...
svn:r2680
2004-11-04 22:33:06 +00:00
Nick Mathewson
1b49198081
Support code for resettable options, and option sets. Still needs validate-and-then-replace logic
...
svn:r2679
2004-11-04 22:31:50 +00:00
Nick Mathewson
d9e0f3f9bc
Make sure control command bodies are always followed by a NUL
...
svn:r2678
2004-11-04 22:30:49 +00:00
Nick Mathewson
9d604ec615
Add code to read configuration lines from a string as well as a file
...
svn:r2676
2004-11-04 22:29:45 +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
Roger Dingledine
cadbae6aa5
make free_options() and init_options() use the big array.
...
also remove obsolete config_assign_defaults().
svn:r2672
2004-11-04 08:26:34 +00:00
Roger Dingledine
59453ac6ef
add a ControlPort and control listener conn.
...
note that print_usage is obsolete.
svn:r2671
2004-11-04 06:41:49 +00:00
Nick Mathewson
b74b72a5ce
Fix windows build
...
svn:r2670
2004-11-04 04:01:19 +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
Roger Dingledine
a4753283dd
better interface for connection_ap_handshake_socks_reply()
...
make --list-fingerprint print the fingerprint again
svn:r2668
2004-11-03 23:13:28 +00:00
Nick Mathewson
5b312541d7
fix windows warnings
...
svn:r2667
2004-11-03 21:53:54 +00:00
Nick Mathewson
cea9125d71
Implement two flavors of authentication for control connections: one for trusted FS, one for untrusted FS.
...
svn:r2664
2004-11-03 19:49:03 +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
Nick Mathewson
86ba00290b
Add function to generate/copy the config_lines, given the name of an option
...
svn:r2660
2004-11-03 18:29:29 +00:00
Nick Mathewson
4fdaa5de51
Streamline the two redundant "Has the second rolled over?" checks in prepare_for_poll and connection_bucket_refill; also, generate BANDWIDTH control events
...
svn:r2657
2004-11-03 16:38:04 +00:00
Roger Dingledine
12e92eb82f
connection_read_bucket_decrement() has a side-effect that
...
we need to get even if we just read 0 bytes
svn:r2656
2004-11-03 10:18:31 +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
347d3f9d62
Start implementing control interface.
...
svn:r2652
2004-11-03 01:32:26 +00:00
Nick Mathewson
d63d420930
Fix another typo
...
svn:r2651
2004-11-03 01:31:42 +00:00
Nick Mathewson
8db0abb687
First attempt at hibernation code. It needs more work around the XXXXs, but first I want arma to review the basic approach while I meditate on how to fix them.
...
svn:r2649
2004-11-02 23:47:32 +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
Roger Dingledine
85c79ffbc7
canonicalize "src" and "dest" arg order in crypto.c (and others)
...
svn:r2644
2004-11-02 02:28:51 +00:00
Roger Dingledine
b390786582
Hidden service operators had a bug in version 1 style INTRODUCE cells
...
that made them fail. Fix the bug, and revert clients to use version 0
until 0.0.9pre4 is obsolete.
svn:r2641
2004-11-01 21:46:27 +00:00
Nick Mathewson
ce79bab7f1
Split util into util (general utilities), container (smartlist and strmap), and compat (cross-platform compatability).
...
svn:r2640
2004-11-01 20:41:47 +00:00
Roger Dingledine
4689243242
make sure options.MaxConn can be reached
...
svn:r2638
2004-11-01 08:24:34 +00:00
Roger Dingledine
282816b498
change min required number of fd's to 1024
...
svn:r2636
2004-11-01 08:09:59 +00:00
Roger Dingledine
790349c645
oh, and add the actual file too
...
svn:r2631
2004-10-31 20:29:25 +00:00
Roger Dingledine
984ffec105
implement first piece of hibernation
...
still need to track bandwidth, and make decisions based on bandwidth
svn:r2630
2004-10-31 20:28:41 +00:00
Nick Mathewson
ae7495dd55
Only tor and test binaries need to link against openssl and zlib; tor-resolve can be smaller.
...
svn:r2629
2004-10-30 19:27:06 +00:00
Nick Mathewson
9510d9a792
tor --list-fingerprint to print fingerprint and exit
...
svn:r2627
2004-10-30 19:18:37 +00:00
Roger Dingledine
51e16233cb
Fix paul gardner's assert bug. Turns out when circuit_launch_by_nickname()
...
failed at the first hop, it would try to relaunch another circ right
then, even though the first circuit hadn't been populated yet with its
pending_final_cpath.
svn:r2624
2004-10-30 05:04:52 +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
36bbab2f2b
Fix in warning fix
...
svn:r2617
2004-10-27 21:54:44 +00:00
Nick Mathewson
f8771625c6
Check return of tor_snprintf
...
svn:r2616
2004-10-27 21:30:47 +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
ce5709184b
Pass with -Wstrict-prototypes
...
svn:r2614
2004-10-27 18:16:37 +00:00
Nick Mathewson
6874c39904
Fix windows build
...
svn:r2613
2004-10-27 18:14:38 +00:00
Nick Mathewson
c5eb95b644
Add ability for some-but-not-all abbrevs to work in config file. Add a bunch of singular/plural abbrevs suggested by arma
...
svn:r2612
2004-10-27 17:37:01 +00:00
Roger Dingledine
75ad4615d1
stop freeing arbitrary memory
...
fix a couple of memory leaks
svn:r2611
2004-10-27 12:34:02 +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
06fa8fc05f
Avoid strcat; use snprintf or strlcat instead
...
svn:r2605
2004-10-27 06:25:29 +00:00
Nick Mathewson
f67f83b1fa
Use strlcpy, not strncpy
...
svn:r2603
2004-10-27 06:03:28 +00:00
Nick Mathewson
bc62f8e983
Replace sprintf with snprintf
...
svn:r2602
2004-10-27 05:53:07 +00:00
Nick Mathewson
5369ee921e
Make it compile on Linux
...
svn:r2600
2004-10-27 03:42:09 +00:00
Nick Mathewson
482c309db9
Document new config code
...
svn:r2596
2004-10-27 03:08:04 +00:00
Nick Mathewson
a24eb4db91
Re-write configuration option lookup code: use a table, not a big if( || || || ||). Deprecate unoffical abbrevs and abbrevs not on the command line.
...
svn:r2594
2004-10-27 02:30:28 +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
26f3cb8652
Add SysLog option to direct log messages to the system log instead of a FILE*.
...
svn:r2591
2004-10-26 21:48:41 +00:00
Roger Dingledine
0113a643a2
quick-and-dirty dir policy since the dirservers are getting hammered
...
nick, could you abstract this sometime so we don't repeat the
sockspolicy code twice?
svn:r2589
2004-10-25 06:16:26 +00:00
Roger Dingledine
20cdc0a517
fix a memory leak
...
svn:r2587
2004-10-24 23:09:48 +00:00
Roger Dingledine
defe1e5f3c
start generating new version of introduce1 cells
...
svn:r2586
2004-10-24 19:08:07 +00:00
Roger Dingledine
0b36c29c4d
fix wrong comment
...
svn:r2585
2004-10-24 17:11:44 +00:00
Nick Mathewson
ef4ac65f5e
Document the swiss-army-knife that retry_listeners has become
...
svn:r2584
2004-10-24 01:50:33 +00:00
Nick Mathewson
0df2d383d1
Many non-native speakers use Tor. It is our duty to ensure that our log messages set an example of good English spelling.
...
svn:r2583
2004-10-24 01:29:01 +00:00
Nick Mathewson
57f09573f5
Every 60 seconds, check whether the listeners are still alive, and relaunch the dead ones.
...
svn:r2581
2004-10-24 01:22:40 +00:00
Nick Mathewson
04ca660b2a
Fix typo in last windows patch
...
svn:r2580
2004-10-24 00:58:29 +00:00
Nick Mathewson
5d53828c57
Handle more errnos from accept() without closing the connection. This may fix a bug that could close OR listeners when (a) TCP connections were hung up before accept() could be called, or (b) during FD exhaustion.
...
svn:r2579
2004-10-24 00:55:18 +00:00
Nick Mathewson
78a2c3aa39
Make windows fall back to CWD if SHGetSpecialFolderLocation is borked
...
svn:r2578
2004-10-24 00:52:10 +00:00
Roger Dingledine
54c432bd93
pay attention to the return value of do_hup, and exit
...
when it fails
svn:r2577
2004-10-23 17:06:25 +00:00
Nick Mathewson
6899b8001a
Check for low _MSC_VER, not high. On windows, always use winsock.
...
svn:r2575
2004-10-20 23:30:38 +00:00
Nick Mathewson
88cffc3c5f
Use bitwise masking to turn off bits, not compare-and-subtract
...
svn:r2572
2004-10-20 23:15:49 +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
Nick Mathewson
c7151d8bed
Add "pass" target for RedirectExit, to make it easier to break out of a sequence of rules
...
svn:r2566
2004-10-19 17:46:06 +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
640544ae3e
use connection_edge_is_rendezvous_stream() more
...
svn:r2564
2004-10-17 21:10:41 +00:00
Roger Dingledine
695cdb10fe
whoops, resolve cells were probably broken
...
svn:r2562
2004-10-17 20:31:19 +00:00
Nick Mathewson
b130aa3c8f
Fix segfault in unit tests. (Main program is unaffected)
...
svn:r2559
2004-10-17 15:45:54 +00:00
Roger Dingledine
e66d5f897a
fix a seg fault with exitredirect
...
svn:r2555
2004-10-17 04:44:02 +00:00
Roger Dingledine
560a4a1407
switch conn->addr and conn->dir_port to reflect the final destination,
...
not the http proxy
svn:r2553
2004-10-17 04:06:48 +00:00
Nick Mathewson
6d1e1b7f46
Unify windows special-dir handling
...
svn:r2552
2004-10-17 03:38:02 +00:00
Nick Mathewson
8d27385c23
Implement RedirectExit.
...
svn:r2550
2004-10-17 01:57:34 +00:00
Roger Dingledine
7c3ab346f6
various tweaks and fixes
...
svn:r2548
2004-10-16 22:56:46 +00:00
Nick Mathewson
a1bf39f698
Code to parse (but not yet actually use) RedirectExit lines
...
svn:r2546
2004-10-16 22:37:08 +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
25a046df74
Fix unit tests, make it compile
...
svn:r2543
2004-10-16 21:57:24 +00:00
Nick Mathewson
47dc024f7e
Change interface of parse_addr_port() to return address in host order, since most users seem to want that.
...
svn:r2542
2004-10-16 21:53:30 +00:00
Nick Mathewson
8300c4ae6a
Make unit tests pass; refactor most of exit policy parfsing out into new function
...
svn:r2541
2004-10-16 21:42:09 +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
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
f882bd92ed
Remove unused locals
...
svn:r2533
2004-10-15 20:50:43 +00:00
Nick Mathewson
99f7955372
Use the real default exit policy, not reject *:*
...
svn:r2531
2004-10-15 19:18:08 +00:00
Nick Mathewson
fa9c121343
Add a comment
...
svn:r2530
2004-10-15 19:17:36 +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
01eacbca9e
Make RecommendedVersions a CONFIG_TYPE_LINELIST option, and have it tolerate whitespace a little better.
...
svn:r2528
2004-10-15 05:09:48 +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
c5964d6738
Basic string-join functionality
...
svn:r2521
2004-10-14 19:51:47 +00:00
Nick Mathewson
0f144d6a04
fix warning on win32
...
svn:r2518
2004-10-14 15:41:41 +00:00
Roger Dingledine
56e151eb41
advertise moria2's dirport as 18.244.0.114:80
...
svn:r2511
2004-10-14 10:05:22 +00:00
Roger Dingledine
cf9664151d
bugfix on a really old bug:
...
if read() fails on a stream, send back an end cell before you
close it down.
svn:r2509
2004-10-14 09:28:31 +00:00
Roger Dingledine
572714a458
bugfix: parse_addr_port() bites us again -- it returns addr in network order.
...
svn:r2508
2004-10-14 08:45:07 +00:00
Roger Dingledine
95644480c5
better warn message for the Content-Length attack
...
svn:r2495
2004-10-14 04:50:33 +00:00
Nick Mathewson
55b811a259
Improve warnings for old-style directories.
...
svn:r2494
2004-10-14 04:31:40 +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
Roger Dingledine
89280e6c20
rename addr to address to we avoid this bug later
...
svn:r2488
2004-10-14 03:31:40 +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
3737566465
make it build on amd64
...
svn:r2486
2004-10-14 03:13:08 +00:00
Roger Dingledine
69830afc16
and another one
...
svn:r2484
2004-10-14 02:49:48 +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
8b325c142e
Patch from "J Doe": Use SHGetSpecialFolderLocation instead of
...
SHGetSpecialFolderPath in order to find application data folder.
Apparently, until IE 4 (!?) came out, nobody realized that programmers
might like to get paths as strings. Clearly, a fancy pseudo-OO list
of "identifiers" is a far more convenient way to deal with these
things. And while we're being OO, why return object that you can free
with free()? Instead, let's make the user get a handle to an abstract
allocation object, and ask it to free the fancy list, and then ask it
to release itself. Won't that be fun and convenient?
Navigating ancient Win32 APIs is like bikini-waxing creatures from HP
Lovecraft: to do a good job you must understand what's going on... but
the understanding itself can blast your sanity.
svn:r2480
2004-10-14 02:04:43 +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
55634e4eec
Fix comment in dirserv.c
...
svn:r2470
2004-10-13 20:28:46 +00:00
Roger Dingledine
2b7b86f5e6
stop trying to print a NULL
...
plus make router_nickname_is_approved() more obviously unused
svn:r2469
2004-10-13 20:17:45 +00:00
Nick Mathewson
e0cce8fba8
Unify tests for "did I originate this nonopen OR connection?"
...
svn:r2468
2004-10-13 20:05:57 +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
508970f85d
fix typo
...
svn:r2466
2004-10-13 19:55:40 +00:00
Nick Mathewson
f14117bffd
fix warning about always-false comparison; detect too-large realport better
...
svn:r2465
2004-10-13 19:53:34 +00:00
Nick Mathewson
149f57bdef
answer question about rep_hist_note_connect_failed
...
svn:r2464
2004-10-13 19:42:36 +00:00
Nick Mathewson
afd8b650ee
hex-to-hex compare makes more sense than hex-to-bin.
...
svn:r2463
2004-10-13 19:17:27 +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
Roger Dingledine
a1041154eb
fix const char * vs char * issue
...
plus unshadow some variables
svn:r2460
2004-10-13 04:44:37 +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
9c49947163
Check fingerprint list before generating running-routers lists; also add as-yet-uncalled function to update an OR connection nickname on the fly
...
svn:r2458
2004-10-13 01:13:37 +00:00
Roger Dingledine
0b4d3c4df7
parse HttpProxy address in config
...
fix a potential confusion in fetch_from_buf_http()
make all our int config options non-negative
better bounds checking on options that are ports
svn:r2456
2004-10-12 20:22:09 +00:00
Nick Mathewson
7cc126e8a9
Appease overzealous gcc
...
svn:r2454
2004-10-12 20:17:45 +00:00
Nick Mathewson
f7404f6bb9
Use tor_parse_long in more places
...
svn:r2453
2004-10-12 19:33:03 +00:00
Nick Mathewson
e7241044e8
Better bounds checking on parsed ints
...
svn:r2450
2004-10-12 19:01:53 +00:00
Nick Mathewson
e8748b3fa0
Add default directory servers
...
svn:r2449
2004-10-12 19:01:28 +00:00
Nick Mathewson
f6fc2b9dd2
Add fix for remote-crash bug.
...
svn:r2447
2004-10-12 18:38:36 +00:00
Roger Dingledine
578a3e25e5
fix a signed/unsigned comparison
...
svn:r2446
2004-10-12 18:32:34 +00:00
Nick Mathewson
79636823b8
Oops, missed one
...
svn:r2445
2004-10-12 16:04:25 +00:00
Nick Mathewson
a91fc48b39
Note byte-order on result for parse_addr_port()
...
svn:r2444
2004-10-12 16:02:15 +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
43ef5a3e37
Add long-term format for dir-signing-key fields (commented out)
...
svn:r2442
2004-10-12 15:52:57 +00:00
Nick Mathewson
0383afac9a
Use parse_addr_port() function instead of ad-hoc variants
...
svn:r2441
2004-10-12 15:52:09 +00:00
Nick Mathewson
8b037509f3
Add functions to parse addr[:port] consistently
...
svn:r2440
2004-10-12 15:48:30 +00:00
Roger Dingledine
1efad74164
bugfix on my friday commit: make hidden services work again in cvs
...
svn:r2439
2004-10-12 06:03:10 +00:00
Roger Dingledine
24f9946db1
fix paul gardner's assert bug.
...
sometimes circuit_get_open_circ_or_launch() can return 0 but not
return a circuit, e.g. because too many circuits have failed recently
so the new one didn't launch. we need to tolerate that.
svn:r2438
2004-10-11 22:19:12 +00:00
Roger Dingledine
5c53c63aa0
Fix a potential buffer overflow found by Ilja van Sprundel.
...
We don't think this is exploitable, but best to fix it anyway.
svn:r2437
2004-10-11 21:55:19 +00:00
Roger Dingledine
7798e3d770
fix the stale pointer assert bug reported by joe magic
...
svn:r2436
2004-10-11 01:17:42 +00:00
Roger Dingledine
6468e049be
when a begin cell has an invalid port, give us a better hint of
...
what went wrong
svn:r2435
2004-10-10 01:47:24 +00:00
Roger Dingledine
1a4cb248f3
interim commit for http proxy support
...
svn:r2431
2004-10-08 05:53:59 +00:00
Nick Mathewson
6c970aec94
Turn tor_strpartion into a swiss-army-knife function, so it can terminate or not-terminate appropriately.
...
svn:r2429
2004-10-07 21:37:06 +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