Commit Graph

129 Commits

Author SHA1 Message Date
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