Commit Graph

108 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
bc62f8e983 Replace sprintf with snprintf
svn:r2602
2004-10-27 05:53:07 +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
de65052312 don't assert multiple things in the same tor_assert()
svn:r2544
2004-10-16 22:14:52 +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
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
Nick Mathewson
1c9426d6e0 Build without warnings on mac gcc 3.3
svn:r2487
2004-10-14 03:18:14 +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
f14117bffd fix warning about always-false comparison; detect too-large realport better
svn:r2465
2004-10-13 19:53:34 +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
e7241044e8 Better bounds checking on parsed ints
svn:r2450
2004-10-12 19:01:53 +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
Roger Dingledine
802b203ff1 fix a rare seg fault for people running hidden services on
intermittent connections


svn:r2353
2004-09-20 03:07:11 +00:00
Nick Mathewson
0ef85f6dba Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
svn:r2336
2004-09-08 07:16:34 +00:00
Nick Mathewson
6de61bd694 Revert dumb think-o. Just because _some_ INTRODUCE2 cells are now longer,
doesn't mean we should raise the _minimum_ size.


svn:r2273
2004-08-18 05:05:58 +00:00
Nick Mathewson
196e6c1cc2 Support new INTRODUCE2 cell format
svn:r2270
2004-08-18 04:48:59 +00:00
Roger Dingledine
ee23b7a470 use unverified routers in the desired positions
svn:r2249
2004-08-17 06:27:32 +00:00
Nick Mathewson
6514eb5d44 Update to new choose_random_node interface.
svn:r2239
2004-08-15 20:31:11 +00:00
Roger Dingledine
cd3da3fc12 o clients choose nodes proportional to advertised bandwidth
o and/or while avoiding unreliable nodes, depending on goals
o 'fascistfirewall' option to pick dirservers on port 80 and ORs on
  port 443.
o if a begin failed due to exit policy, but we believe the IP should                       have been allowed, switch that router to exitpolicy reject *:* until                     we get our next directory.


svn:r2231
2004-08-15 08:15:12 +00:00
Nick Mathewson
380f32f07d hex_encode is obsoleted by base16_encode, and never actually worked in the first place. (Thanks to Timo Lindfors for noticing the never-actually-worked part.)
svn:r2175
2004-08-07 01:03:33 +00:00
Roger Dingledine
aebec8ab9e stop using atexit() to remove our pid, since it's called
immediately when we daemonize.

also drop our retry period for hidserv desc uploads from 10m to 5m


svn:r2111
2004-07-22 22:15:36 +00:00
Roger Dingledine
7459d067a5 now base16_encode() and base32_encode() can't ever fail
svn:r2103
2004-07-22 08:30:06 +00:00
Nick Mathewson
7d8de8cd10 More digest/nickname fixes
svn:r2000
2004-07-02 23:40:03 +00:00
Roger Dingledine
011ccbbf8d crank up some of our constants, for better scalability
svn:r1938
2004-06-02 19:44:41 +00:00
Roger Dingledine
1c21a02b90 router_choose_random_node() was ignoring its routerlist argument.
so now we don't pass it one.


svn:r1911
2004-05-20 19:12:28 +00:00
Nick Mathewson
7511fbf993 Resolve some XXXs
svn:r1889
2004-05-18 15:35:21 +00:00
Nick Mathewson
a782b83c28 Only try to launch a fixed number of intro circuits for a service per 15-minute period or before all of the intro circuits succeed, whichever comes first
svn:r1883
2004-05-18 01:53:53 +00:00
Roger Dingledine
ef561c0e42 Break files apart into more modules
* \file circuitbuild.c
 * \brief The actual details of building circuits.

 * \file circuitlist.c
 * \brief Manage the global circuit list.

 * \file circuituse.c
 * \brief Launch the right sort of circuits, attach streams to them.

 * \file connection_edge.c
 * \brief Handle edge streams.

 * \file onion.c
 * \brief Functions to queue create cells, and handle onionskin
 * parsing and creation.

 * \file relay.c
 * \brief Handle relay cell encryption/decryption, plus packaging and
 * receiving from circuits.


svn:r1863
2004-05-13 07:24:49 +00:00
Roger Dingledine
5ba9235873 clean up directory.c API
svn:r1860
2004-05-12 23:48:57 +00:00
Nick Mathewson
9c3fba5c3b Not every RSA decrypt should warn on failure.
svn:r1853
2004-05-12 19:30:28 +00:00
Nick Mathewson
720281b32e Close rogue <b>s
svn:r1838
2004-05-10 07:27:29 +00:00
Nick Mathewson
81922a125c More doxygenation.
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
c6d4a00c5f more doxygen markup
plenty more remains


svn:r1824
2004-05-09 16:47:25 +00:00
Nick Mathewson
682a805092 Comments for nearly all non-tricky files
svn:r1796
2004-05-05 21:32:43 +00:00
Roger Dingledine
ac4cb9bdd1 fix a seg fault (whoops)
svn:r1755
2004-04-30 16:35:48 +00:00
Nick Mathewson
7055f837ab Make Tor build on win32 with VC6 without warnings.
svn:r1739
2004-04-28 20:13:21 +00:00
Roger Dingledine
28f034e10a now assume all routers support rendezvous cells
svn:r1699
2004-04-25 21:32:04 +00:00