Commit Graph

194 Commits

Author SHA1 Message Date
Roger Dingledine
31b51849b5 export the default exit policy via the control port, so controllers
don't need to guess what it is / will be later.


svn:r6615
2006-06-13 09:16:09 +00:00
Nick Mathewson
853e2d99b6 Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
svn:r6532
2006-06-04 22:42:13 +00:00
Roger Dingledine
3cd01ca9a1 make cookie authentication for the controller work again, maybe.
it sure doesn't now.


svn:r6494
2006-05-24 23:03:28 +00:00
Nick Mathewson
55c38f88b9 Remove string size limit on NEWDESC messages; solve bug 291.
svn:r6463
2006-05-22 23:24:06 +00:00
Nick Mathewson
6ebd886511 forward-port: "Resolve" all XXX011 items, mostly by marking them non-011.
svn:r6396
2006-04-18 03:07:24 +00:00
Roger Dingledine
b34032b87d but the \r\n is handy too i hear.
svn:r6294
2006-04-02 22:19:01 +00:00
Roger Dingledine
e84cd412d4 if you give mapaddress no args at all, it should answer
something more than \r\n.


svn:r6293
2006-04-02 22:13:34 +00:00
Roger Dingledine
dfb3c5f47a if you ask for getinfo dir/status/ but your dirport is off,
log a complaint.


svn:r6286
2006-04-01 22:17:37 +00:00
Roger Dingledine
6fb27741ba Fix dirserv_get_networkstatus_v2's api: its function comments
did not at all match its behavior, and I can't think of a case
when it should return anything other than 0.

This fix may allow getinfo dir/status/foo to work.


svn:r6285
2006-04-01 22:00:49 +00:00
Roger Dingledine
e47075e771 more helpful error message
svn:r6283
2006-04-01 09:54:54 +00:00
Roger Dingledine
314f24870d Start sending back 512 and 451 errors if mapaddress fails,
rather than not sending anything back at all.


svn:r6282
2006-04-01 09:50:43 +00:00
Nick Mathewson
2421724853 Code to implement networkstatus fetch from controllers. Only works when dirport is set for now; should be good enough to make serifos html front-end not be as wrong.
svn:r6251
2006-03-27 06:49:25 +00:00
Roger Dingledine
b899b9592a When the controller's *setconf commands fail, collect an error message
in a string and hand it back. This starts to resolve bug 275.


svn:r6241
2006-03-26 06:51:26 +00:00
Roger Dingledine
5b87b0bf55 update getinfo info/names to reflect that we now support
getinfo dir/server/*


svn:r6231
2006-03-22 21:53:09 +00:00
Roger Dingledine
817556315a Implement router purposes, and don't choose a non-general
purpose router when picking random nodes for a circuit.

Also implement SETROUTERPURPOSE and modify +POSTDESCRIPTOR.

This concludes bug 250 assuming it all works.


svn:r6178
2006-03-17 22:08:59 +00:00
Nick Mathewson
fb7b5545ce Implement GETINFO(dir/server/foo); status will be harder.
svn:r6165
2006-03-15 05:06:56 +00:00
Roger Dingledine
a4da44c2b9 Now do address rewriting when the controller asks us to attach
to a particular circuit too. This will let Blossom specify
"moria2.exit" without having to learn what moria2's IP address is.

It may also cause other controller authors some angst. Let us know.


svn:r6136
2006-03-12 05:04:16 +00:00
Roger Dingledine
b5c6a990d3 fix assert while attachstream'ing a connect-wait or
resolve-wait stream.


svn:r6134
2006-03-12 04:33:29 +00:00
Roger Dingledine
80f0492a65 avoid shadowing a variable so we don't get sad later.
svn:r6133
2006-03-12 04:07:21 +00:00
Roger Dingledine
5f8d26496d Let the controller attachstream conns that are in connect_wait
or resolve_wait: we detach them first and then act as before.
Resolves bug 264.


svn:r6112
2006-03-09 06:29:53 +00:00
Roger Dingledine
44107f6ec4 Implement NEWNYM. Nick, did I do a bad thing?
svn:r6105
2006-03-09 00:18:16 +00:00
Roger Dingledine
946317ae13 start using OR_CONN_EVENT_NEW.
also fixes a seg fault in tor (bug 261).


svn:r6101
2006-03-08 22:29:08 +00:00
Roger Dingledine
a2d71f917e mark bug 261
svn:r6089
2006-03-06 19:47:54 +00:00
Roger Dingledine
329af979e0 Add a new circuit purpose 'controller' to let the controller
ask for a circuit that Tor won't try to use.

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

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


svn:r6075
2006-02-23 06:51:09 +00:00
Roger Dingledine
16f265fa0d when saveconf fails in controller v1, we were returning a malformed
error string.


svn:r6053
2006-02-20 01:24:26 +00:00
Roger Dingledine
d113b75da6 more log conversions.
whee.


svn:r6003
2006-02-13 09:02:35 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
0fadf0aad6 Fix bug 225: now "attachstream 0" treats conn like it just connected,
doing address remapping, handling .exit and .onion idioms, and so on.

Now we are more uniform in making sure that the controller hears about
all new connections, and making sure it hears when they close.


svn:r5897
2006-02-03 11:37:19 +00:00
Roger Dingledine
4a66f5a896 when the controller asks for a signal we don't recognize, don't
include the whitespace/newline/etc in our complaint.


svn:r5841
2006-01-19 02:21:24 +00:00
Nick Mathewson
2dd566d5d5 Indirect access to the signed_descriptor field to make it easier to keep them lazily on disk.
svn:r5827
2006-01-12 18:04:17 +00:00
Roger Dingledine
7d1f675c85 entry nodes are now entry guards.
this is our last easy chance for a wholesale change. heave ho.


svn:r5782
2006-01-10 22:42:44 +00:00
Roger Dingledine
d114ea7125 implement getinfo desc/all-recent
closes bug 237.


svn:r5770
2006-01-10 20:09:31 +00:00
Nick Mathewson
bec9b705cc Instrument directory client bytes as well as server bytes.
svn:r5760
2006-01-09 23:13:53 +00:00
Nick Mathewson
878962bee1 Add reasons to DESTROY and RELAY_TRUNCATED cells.
svn:r5734
2006-01-05 21:23:03 +00:00
Roger Dingledine
dbd7b97eff helper nodes are dead. long live entry nodes.
(config options EntryNodes and StrictEntryNodes still not
implemented.)


svn:r5673
2005-12-28 09:07:31 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
ea760fa149 extendcircuit and attachstream would complain about not enough
arguments, but then just keep on going anyway.


svn:r5575
2005-12-12 16:50:55 +00:00
Roger Dingledine
79f09b2f17 setconf orport=9001
513 Unrecognized option value

it's not unrecognized. it's unacceptable. (in this case, i still
have to consult the logs to figure out why, but at least i have
an inkling that maybe i should.)


svn:r5561
2005-12-11 09:33:38 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Nick Mathewson
39265dd72e In my private little universe, terminals are still 80 columns. Impose a 160-character-per-line limit; this will creep down.
svn:r5548
2005-12-09 05:37:26 +00:00
Nick Mathewson
148a1e969d Shave off another 4.7%: remove a linear search when figuring out which circuits wanted us to open a given OR connection.
svn:r5489
2005-12-03 02:12:37 +00:00
Peter Palfrader
b9d37a2d58 Add a new controller event type that allows controllers to get all
server descriptors that were uploaded to a router in its role as authoritative
dirserver.


svn:r5436
2005-11-19 18:35:43 +00:00
Roger Dingledine
4ddf2385a0 if it's not less than three does that mean it's more than two?
svn:r5422
2005-11-18 11:35:23 +00:00
Roger Dingledine
9d6d6da883 and code the part where redirectstream can take a port.
svn:r5421
2005-11-18 11:32:59 +00:00
Roger Dingledine
d2b93df26c and now we actually do it, too.
svn:r5414
2005-11-17 22:01:46 +00:00
Roger Dingledine
7dbf2511c3 when you type 'getinfo' with no arguments, it doesn't give you
any answer at all. this is clearly a bug.

the more interesting bug is whether things like setconf, getconf,
and so on should return 250 OK if you give them no arguments. should
we have a new "you didn't ask me anything" response code, or just
leave it as is?


svn:r5412
2005-11-17 21:45:38 +00:00
Roger Dingledine
279e29a1f2 bugfix: the controller doesn't mention it's a .onion if it is.
svn:r5400
2005-11-16 23:54:24 +00:00
Nick Mathewson
75d85c8214 On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
2005-11-05 20:15:27 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
91a666064a Fix possible free(NULL) in control.c
svn:r5306
2005-10-25 07:02:13 +00:00