Nick Mathewson
b7910202a3
Next batch of memory miserdom: mmap cached-routers file. This is sure to break somewhere.
...
svn:r6675
2006-06-22 07:01:54 +00:00
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
Nick Mathewson
f9b0be526e
Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
...
svn:r5302
2005-10-24 19:39:45 +00:00
Nick Mathewson
55f2ab9cc3
Migrate a few more files to domained logging
...
svn:r5285
2005-10-18 22:21:29 +00:00
Nick Mathewson
3347c1741d
Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
...
svn:r5276
2005-10-18 17:43:54 +00:00
Peter Palfrader
551e3402a3
split send_control1_event() into the printf and the print/dispatch part. The
...
printf part was and is limited to at most 1024 byte messages, so having the print
part separately available makes sense.
svn:r5273
2005-10-18 16:45:43 +00:00
Peter Palfrader
640211e59a
Be a bit more verbose in our AUTHENTICATE error messages in the control protocol so the next guy doesn't blame Nick again
...
svn:r5245
2005-10-12 19:45:35 +00:00
Nick Mathewson
2b3a7b818f
Add an as-yet-unused "EXTENDED" flag to SETEVENTS to indicate that the client can handle extra labeled info in its events. Add moreinfo to the "what is ready for downloading" msg so we can investigate digest-related download rules
...
svn:r5237
2005-10-12 04:31:44 +00:00
Roger Dingledine
be478bb56c
stutter therapy lessons
...
svn:r5191
2005-10-05 02:09:27 +00:00
Nick Mathewson
8434595584
Fix verbose compiler warnings, including one in routerlist.c that would have been an actual error. Normalize whitespace. Enforce convention that "address" is a hostname and "addr" is an IPv4 address.
...
svn:r5190
2005-10-05 02:06:36 +00:00
Nick Mathewson
61ea516885
Check for named servers when looking them up by nickname;
...
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.
Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.
Try to list MyFamily elements by key, not by nickname.
Only warn about names that we generated ourself, or got from the local
user.
On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.
svn:r5185
2005-10-04 22:23:31 +00:00
Roger Dingledine
88c37f2d24
comment cleanups
...
svn:r5181
2005-10-04 06:53:59 +00:00
Nick Mathewson
fc3c0197f9
Resolve several DOCDOCs. Make non-mirrors only launch routerdesc downloads when they have more than 16 router descriptors to download, or when 10 minutes have passed since the last download.
...
svn:r5166
2005-09-30 20:04:55 +00:00
Nick Mathewson
c6347cdb0e
suppress all our usual compiler warnings, including a longstanding one from tree.h
...
svn:r5149
2005-09-29 20:49:41 +00:00
Roger Dingledine
f011b12df2
bugfix: nobody ever implemented EVENT_ADDRMAP for control protocol
...
version 0, so don't let version 0 controllers ask for it.
svn:r5107
2005-09-21 23:30:15 +00:00
Nick Mathewson
f99b91505b
Make write_escaped_data more bulletproof; backport candidate.
...
svn:r5106
2005-09-21 23:13:29 +00:00
Nick Mathewson
7c6679d8dc
Add new config.c function to set options that can fail, and roll back if they do. This should solve the setconf-an-impossible-port bug.
...
svn:r5046
2005-09-14 02:36:29 +00:00
Roger Dingledine
1f930a9a70
checkpoint: clean up and document the three ways to call config_assign()
...
and reduce code duplication in config_free() and option_is_same().
svn:r5040
2005-09-14 02:07:35 +00:00
Nick Mathewson
63dfe2447e
Fix bug found by "ca": looking up a non-existent stream for a v1 control connection would cause a segfault. (No backport needed since 0.1.0 had only v0 connections.)
...
svn:r5001
2005-09-12 03:32:30 +00:00
Nick Mathewson
8f37357193
Make GCC v4 happy with heavy warnings enabled.
...
svn:r4922
2005-09-08 06:37:50 +00:00
Roger Dingledine
08348ae66e
add a RESETCONF controller command, and make setconf with a null
...
option actually mean to set it to ""
svn:r4916
2005-09-08 03:18:51 +00:00
Nick Mathewson
5d590861c4
TOR_ISSPACE, not isspace.
...
svn:r4828
2005-08-24 02:20:31 +00:00
Nick Mathewson
7a442c2c48
Make set_options a little smarter: have options_act handle transitions on its own, and only dirty our descriptor when we really want to.
...
svn:r4802
2005-08-22 00:18:45 +00:00
Roger Dingledine
04d42ea433
rotate dns and cpu workers if the controller changes options that
...
will affect them.
svn:r4787
2005-08-15 23:46:18 +00:00
Roger Dingledine
157f013d83
fix typo
...
svn:r4784
2005-08-15 09:25:36 +00:00
Roger Dingledine
f57d062d9c
Implement exit enclaves: if we know an IP address for the destination,
...
and there's a running Tor server at that address which allows exit to
the destination, then extend the circuit to that exit first.
Also, if the user asks for a .exit node, cannibalize general circs for it.
svn:r4779
2005-08-15 03:25:40 +00:00
Roger Dingledine
ff54050fda
let unregistered-servers take a parameter (the min bandwidth)
...
nick, is this an ugly hack of your protocol?
svn:r4775
2005-08-13 02:20:00 +00:00
Roger Dingledine
66b21a19db
Add a 'quit' command for the controller.
...
Add a 'getinfo unregistered-servers' for arma's internal use.
svn:r4774
2005-08-13 01:55:23 +00:00
Nick Mathewson
789374dbbd
Make GCC very happy, even with lots of warnings set. Also, try to fix some reported Solaris x86 warnings.
...
svn:r4770
2005-08-12 17:24:53 +00:00
Nick Mathewson
16528aa070
Add a config-file GETINFO entry; fix a minor memory leak on some SAVECONF calls.
...
svn:r4761
2005-08-10 18:05:20 +00:00
Nick Mathewson
742796c19f
Avoid sending blank lines when GETINFO replies should be empty
...
svn:r4754
2005-08-09 05:16:29 +00:00
Roger Dingledine
588e80fdcd
fix a function comment
...
svn:r4743
2005-08-08 17:48:23 +00:00
Nick Mathewson
4e735da5da
Also set event_mask=0 in connection_free_all, and dont send events to marked control conns (for good measure)
...
svn:r4729
2005-08-07 19:27:38 +00:00
Roger Dingledine
5c4da9dec6
incomplete patch for matt's info controller signal term bug
...
svn:r4728
2005-08-07 19:20:55 +00:00
Nick Mathewson
4cb89fd557
Implement some more GETINFO goodness: expose helper nodes, config options, getinfo keys.
...
svn:r4694
2005-08-04 19:56:41 +00:00
Nick Mathewson
2bd6040f62
Rename cross-format config.c stuff to config_* and or_options_t-specific stuff to option[s]_*
...
svn:r4641
2005-07-23 01:58:05 +00:00
Nick Mathewson
18c11eb3bc
Be consistent about preferring foo* to struct foo*
...
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
5b4e11fa5d
Add getinfo logic for accounting; add options for helper nodes
...
svn:r4632
2005-07-22 14:55:09 +00:00
Roger Dingledine
43a28a4ca9
make event streams work with control v1 too
...
svn:r4590
2005-07-17 22:28:01 +00:00
Roger Dingledine
090836d171
correct error message in closestream
...
svn:r4588
2005-07-17 21:36:33 +00:00
Roger Dingledine
ebf13c6282
not not zero means zero
...
svn:r4587
2005-07-17 21:22:18 +00:00
Roger Dingledine
5643532bd9
if the controller asks to extendcircuit to circid 0, we need to
...
init the circuit before we can add hops to its cpath.
svn:r4586
2005-07-17 21:13:36 +00:00
Roger Dingledine
fe7535c5e2
arguments in EXTENDCIRCUIT were reversed
...
and an error message was misleading
and we were leaking memory on some errors
more bugs remain
svn:r4585
2005-07-17 21:06:00 +00:00
Nick Mathewson
f8b48176ed
Fix several bugs in read_escaped_data; add a unit test and a few docs
...
svn:r4580
2005-07-15 19:31:11 +00:00
Roger Dingledine
83dc42055d
point out some bugs for nick, noticed by whiteout
...
svn:r4574
2005-07-15 18:48:38 +00:00
Nick Mathewson
cf13b3e4a6
Macro-fu to get DEBUG events working.
...
svn:r4539
2005-07-13 05:14:42 +00:00
Roger Dingledine
8f9790a023
fix a seg fault with autodetecting which controller version is being used
...
svn:r4531
2005-07-12 05:48:15 +00:00
Nick Mathewson
63f9a8baa2
Canonicalize option names even on defaulted options.
...
svn:r4530
2005-07-11 18:11:54 +00:00
Nick Mathewson
ec83652357
Logic to implement rendezvous/introduction via unknown servers.
...
- Add a new extend_info_t datatype to hold information needed to
extend a circuit (addr,port,keyid,onion_key). Use it in cpath and
build_state. Make appropriate functions take or return it instead of
routerinfo_t or keyid.
- #if 0 needless check in circuit_get_by_edge_conn; if nobody triggers this
error in 0.1.0.10, nobody will trigger it.
- Implement new hidden service descriptor format, which contains "extend
info" for introduction points, along with protocol version list.
- Parse new format.
- Generate new format
- Cache old and new formats alongside each other.
- Directories serve "old" format if asked in old way, "newest available"
format if asked in new way.
- Use new format to find introduction points if possible; otherwise fall
back. Keep nickname lists and extendinfo lists in sync.
- Tests for new format.
- Implement new "v2" INTRODUCE cell format.
- Accept new format
- Use new format if we have a versioned service descriptor that says the
server accepts the new format.
- Add documentation for functions and data types.
svn:r4506
2005-06-29 21:46:55 +00:00
Nick Mathewson
806da0d8b2
Compile on win32
...
svn:r4496
2005-06-27 23:35:04 +00:00
Nick Mathewson
5eef9177c5
Appease verbose GCC warnings.
...
svn:r4466
2005-06-20 09:38:29 +00:00
Nick Mathewson
eb327e7660
Add feature to handle unset (default) configuration options in GETCONF control messages
...
svn:r4461
2005-06-19 22:38:36 +00:00
Nick Mathewson
64fc1f7bae
Implement all the rest of the new controller protocol, debug a little, add some new features, add ADDRMAP events.
...
svn:r4460
2005-06-19 20:40:41 +00:00
Nick Mathewson
d38c696d5a
The new protocol is implemented. Except for the pesky string unquoting business. And the cleanups. And the docs. And the testing. And the debugging. And the new features. Hm, I think it is time to sleep.
...
svn:r4456
2005-06-18 03:50:08 +00:00
Nick Mathewson
3f2339d1d3
Implement EXTENDCIRCUIT and ATTACHCIRCUIT. Only SETCONFIG and AUTHENTICATE remain.
...
svn:r4455
2005-06-18 03:09:43 +00:00
Nick Mathewson
c2f6fe9b85
Implement even more control functionality
...
svn:r4454
2005-06-18 02:39:25 +00:00
Nick Mathewson
9b4aa8d2ab
Implement all the easy bits of the new control protocol
...
svn:r4449
2005-06-17 20:37:21 +00:00
Nick Mathewson
f9f09f1c5e
Start implementing framework for revised control spec.
...
svn:r4447
2005-06-17 18:49:55 +00:00
Nick Mathewson
beae4d0d32
whitespace fix
...
svn:r4414
2005-06-11 18:59:24 +00:00
Nick Mathewson
232861ba42
Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
...
svn:r4411
2005-06-11 18:52:12 +00:00
Roger Dingledine
fcd0fc3364
flesh out the source file descriptions for doxygen
...
svn:r4404
2005-06-11 05:31:17 +00:00
Nick Mathewson
0831823763
Change end-of-file NLNL convention. It turns out arma I and I agree.
...
svn:r4382
2005-06-09 19:03:31 +00:00
Nick Mathewson
9f24078452
Fix buffer overlow when checking hashed passwords
...
svn:r4308
2005-06-05 14:28:47 +00:00
Nick Mathewson
11a64692c3
Make hashed controller password encoding use hex not base64; this makes it possible to write a controller without base64
...
svn:r4279
2005-05-23 02:31:53 +00:00
Roger Dingledine
0fa1890e0e
fix the assumption that uninitialized variables are 0
...
clean up router_load_single_router() more
svn:r4266
2005-05-18 03:52:07 +00:00
Roger Dingledine
5265bbd2b8
first iteration of scrubbing sensitive strings from logs.
...
also generally clean up log messages.
svn:r4174
2005-05-03 10:04:08 +00:00
Nick Mathewson
69dc4e1675
Remove support for looking at old directory/routerdesc elements; mark non-new elements optional; switch to new format for dir-signing-key; start accepting newer elements so we can mark them as non-opt later; make tor-spec say the right stuff.
...
svn:r4154
2005-05-02 21:22:31 +00:00
Nick Mathewson
fe65e57ca1
Re-do fragmented control message handling to work with new buf_t system.
...
svn:r4144
2005-04-27 22:01:34 +00:00
Nick Mathewson
ce9995a579
Replace an infinite-stack-recursion bug with a generate-infinite-debug-messages bug. Maybe it isnt such a good idea to send LOG_DEBUG messages to the controller after all?
...
svn:r4082
2005-04-17 22:52:02 +00:00
Nick Mathewson
f1dfa30064
Fix postdescriptor behavior: on non-complete success, only say "done" once.
...
svn:r4073
2005-04-11 02:52:09 +00:00
Nick Mathewson
74dc7eedc5
Add kludgy function to force controllers to flush EVENT_ERR_MSG events.
...
svn:r4057
2005-04-08 03:36:39 +00:00
Nick Mathewson
4991290935
Revise control spec and implementation to allow all log messages to be sent to controller with their severities intact.
...
svn:r4010
2005-04-05 22:56:17 +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
Nick Mathewson
0e81265359
update copyright notices.
...
svn:r3982
2005-04-01 20:15:56 +00:00
Nick Mathewson
1bf1f44e74
Fix bug in redirectstream.
...
svn:r3926
2005-03-31 06:06:02 +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
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
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
0cfdeb01c8
Debug EXTENDCIRCUIT
...
svn:r3849
2005-03-24 01:08:25 +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
7a0072cc1a
Specify and implement close-stream and close-circuit control messages
...
svn:r3814
2005-03-22 19:36:38 +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
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
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
Nick Mathewson
07a7b6af64
Implement redirectstream in control interface.
...
svn:r3785
2005-03-19 06:05:55 +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
97dad670ea
Renormalize whitespace
...
svn:r3757
2005-03-14 03:18:35 +00:00
Nick Mathewson
115271f65e
Implement the common case of ATTACHSTREAM.
...
svn:r3751
2005-03-12 04:22:01 +00:00
Nick Mathewson
6394f77edb
Initialize msg_len
...
svn:r3737
2005-03-10 18:46:11 +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
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
b7b05dc1b2
make control interface stream IDs monotonically increasing to prevent possible races
...
svn:r3715
2005-03-01 01:15:01 +00:00
Roger Dingledine
25ff3a5042
fix bug in control mapaddress
...
svn:r3705
2005-02-27 23:20:48 +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
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
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
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
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
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
06ce31b948
Only set a cookie when we intend to.
...
svn:r3114
2004-12-07 19:36:43 +00:00
Nick Mathewson
f19e9b8577
doxygen uses backslashes, not forward-slashes
...
svn:r3033
2004-11-30 06:17:35 +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
6f5dbefa7e
Normalize space: add one between every control keyword and control clause.
...
svn:r3003
2004-11-28 09:05:49 +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
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
Roger Dingledine
310a8da0d2
break reached_eof() out of process_inbuf()
...
svn:r2930
2004-11-21 10:14:57 +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
47993ae6fb
some fixes so far
...
svn:r2880
2004-11-15 03:53:03 +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
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
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
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
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
3901473bf3
change the interface to config_trial_assign()
...
svn:r2737
2004-11-09 07:55:48 +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
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
8c7b2ff7ed
various fixes
...
svn:r2712
2004-11-09 01:24:10 +00:00
Nick Mathewson
fc9c6e7c95
Fix compile errors
...
svn:r2708
2004-11-07 23:11:29 +00:00
Nick Mathewson
c514a06663
Fix up error codes
...
svn:r2706
2004-11-07 22:58:35 +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
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
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
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
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
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