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
248867caf5
bugfix: make smartlist_join_strings2 actually use the separator/terminator
...
svn:r3805
2005-03-22 05:37:59 +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
5d5b12ce75
make example contactinfo entries slightly more spam resistant, since
...
people are seeing spam to their contactinfo addresses now. (yay.)
svn:r3795
2005-03-21 07:40:25 +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
Geoff Goodell
035c8d1b1c
added short blurb about ControlPort to sample torrc
...
svn:r3790
2005-03-19 20:50:03 +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
Thomas Sjögren
7c29b65466
removing the warning about port 80.
...
svn:r3773
2005-03-18 16:34:56 +00:00
Thomas Sjögren
b1ceb1fb22
add "warning" about port 80 to torrc.sample.in
...
svn:r3772
2005-03-18 16:30:29 +00:00
Nick Mathewson
df9c8feac7
Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
...
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
be38e0a490
Fix a fun windows bug: apparently windows stat wants paths not to end with slash.
...
svn:r3766
2005-03-16 00:04:59 +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
Thomas Sjögren
932252f9b4
Show people where they can find the default exit policy.
...
svn:r3762
2005-03-14 23:26:41 +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
37a478bd78
Tell windows how big time_t is.
...
svn:r3735
2005-03-10 18:45:18 +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
Nick Mathewson
0a2be3c9d8
Fix strmap_free to release memory actually held by the strmap.
...
svn:r3708
2005-02-28 02:21:40 +00:00
Roger Dingledine
b3177d509e
free some more memory at shutdown
...
svn:r3707
2005-02-28 01:59:18 +00:00
Nick Mathewson
bed6c05453
give a better warning when tor points at an https server.
...
svn:r3706
2005-02-28 01:55:09 +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
2be0508f0d
Be specific about which "illegal character" we just saw in the cert.
...
svn:r3699
2005-02-25 21:05: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
e8da6b26b6
Note a non-bug in read_file_to_str as used. If we start to rely on it behaving differently, we need to change how it behaves. [Noticed by Chris Palmer]
...
svn:r3655
2005-02-22 07:18:46 +00:00
Nick Mathewson
d37f4dd8a9
But on windows, localtime and gmtime _are_ threadsafe.
...
svn:r3654
2005-02-22 07:09:17 +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
bb53a0bddd
remove spurious semicolons
...
svn:r3650
2005-02-22 04:55:19 +00:00
Nick Mathewson
d060f845f2
Snarf some logic from python, adapted to our own needs, to handle gethostbyname_r correctly across platforms.
...
svn:r3649
2005-02-22 04:50:31 +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
Nick Mathewson
6bd81c9ee2
Fix windows build: do not spuriously include openssl where not needed; handle lack of gethostbyname_r properly.
...
svn:r3644
2005-02-22 02:51:55 +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
b5bddd8cfd
bugfix: actually use the argument to strmap_free()
...
svn:r3640
2005-02-20 23:12:20 +00:00
Roger Dingledine
38f53cff41
forward-port the onion queue thing
...
svn:r3639
2005-02-20 09:27:48 +00:00
Roger Dingledine
596d65ec3b
avoid case (not yet triggered) where smartlists could grow out
...
of control
svn:r3636
2005-02-19 03:02:33 +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