Commit Graph

70 Commits

Author SHA1 Message Date
Roger Dingledine d8a76e83ec Code cleaned up to be less noisy
svn:r71
2002-07-22 04:08:37 +00:00
Roger Dingledine 4e96939d3b More reasonable CoinWeight, now that we can handle large paths
svn:r70
2002-07-22 04:08:15 +00:00
Roger Dingledine ea3befbd73 Include src/config/ in the 'make dist' tarball
svn:r69
2002-07-22 04:07:57 +00:00
Roger Dingledine dd906c40c9 Updated HACKING and README docs
HACKING now explains bandwidth throttling, congestion control,
and router twins. Read it and see if it makes sense.


svn:r68
2002-07-22 04:07:34 +00:00
Roger Dingledine f1fcd78063 bugfixes: don't hang waiting for new children to die; accept HTTP/1.1
svn:r67
2002-07-20 02:01:18 +00:00
Roger Dingledine f5b3e461a9 bugfix: create_onion now works with routelen>2
svn:r66
2002-07-20 01:59:28 +00:00
Roger Dingledine 02c8f7744b added a note on openssl and popt dependencies
svn:r65
2002-07-19 21:02:39 +00:00
Roger Dingledine 098f44f1f6 Folded cell.? into src/or
svn:r64
2002-07-19 18:48:28 +00:00
Roger Dingledine 71c70cfca7 slightly less noisy
svn:r63
2002-07-19 18:48:19 +00:00
Roger Dingledine c0363b0719 minor cleanups in config files
svn:r62
2002-07-19 18:48:03 +00:00
Roger Dingledine 034d521947 Folded cell.? into src/or
Removed more obsolete files


svn:r61
2002-07-19 18:47:04 +00:00
Roger Dingledine f96e94925e revised todo
svn:r60
2002-07-19 16:25:53 +00:00
Matej Pjafjar 15cc71165d Test suite for onion.c - currently tests encrypt_onion() and decrypt_onion().
svn:r59
2002-07-19 14:08:44 +00:00
Roger Dingledine 86d1931671 initial versions of README, for new users getting up to speed, and HACKING,
for people wanting to play with the code. the hacking doc is still incomplete.


svn:r58
2002-07-19 08:13:42 +00:00
Roger Dingledine 047b34a720 moria:9004 is now a twin to town-square:9004
svn:r57
2002-07-19 00:33:31 +00:00
Roger Dingledine 6a1c54d4ea Implemented router twins
I modified new_route so we don't pick twins back-to-back in the path.

I also had to patch my previous uses of connection_twin_get_by_addr_port()
because they assumed that "addr" and "port" would be the same for a twin
as for the original router.


svn:r56
2002-07-18 23:44:57 +00:00
Roger Dingledine 17ede6caec changes to support sendme cells
svn:r55
2002-07-18 06:38:32 +00:00
Roger Dingledine e3b0de9414 Implemented congestion control
Servers are allowed to send 100 cells initially, and can't send more until
they receive a 'sendme' cell from that direction, indicating that they
can send 10 more cells. As it currently stands, the exit node quickly
runs out of window, and sends bursts of 10 whenever a sendme cell gets
to him. This is much much much faster (and more flexible) than the old
"give each circuit 1 kB/s and hope nothing overflows" approach.

Also divided out the connection_watch_events into stop_reading,
start_writing, etc. That way we can control them separately.


svn:r54
2002-07-18 06:37:58 +00:00
Roger Dingledine c336d7070e new link padding scheme
we're now much more robust when bandwidth varies: instead of forcing a
fixed bandwidth on the link, we instead use what the link will give us,
up to our bandwidth.


svn:r53
2002-07-16 18:24:12 +00:00
Andrei Serjantov 2059e0afbc Put in a note in README to explain how to compile (I had to wade
through the cvs messages), and added my router on mosg.cl.cam.ac.uk to
the list of routers.


svn:r52
2002-07-16 16:18:16 +00:00
Roger Dingledine f405675221 new config files, some bugfixes
svn:r51
2002-07-16 02:12:58 +00:00
Roger Dingledine 4247e11679 Implemented link padding and receiver token buckets
Each socket reads at most 'bandwidth' bytes per second sustained, but
can handle bursts of up to 10*bandwidth bytes.

Cells are now sent out at evenly-spaced intervals, with padding sent
out otherwise. Set Linkpadding=0 in the rc file to send cells as soon
as they're available (and to never send padding cells).

Added license/copyrights statements at the top of most files.

router->min and router->max have been merged into a single 'bandwidth'
value. We should make the routerinfo_t reflect this (want to do that,
Mat?)

As the bandwidth increases, and we want to stop sleeping more and more
frequently to send a single cell, cpu usage goes up. At 128kB/s we're
pretty much calling poll with a timeout of 1ms or even 0ms. The current
code takes a timeout of 0-9ms and makes it 10ms. prepare_for_poll()
handles everything that should have happened in the past, so as long as
our buffers don't get too full in that 10ms, we're ok.

Speaking of too full, if you run three servers at 100kB/s with -l debug,
it spends too much time printing debugging messages to be able to keep
up with the cells. The outbuf ultimately fills up and it kills that
connection. If you run with -l err, it works fine up through 500kB/s and
probably beyond. Down the road we'll want to teach it to recognize when
an outbuf is getting full, and back off.


svn:r50
2002-07-16 01:12:15 +00:00
Roger Dingledine d6fe961d98 removed args.c (bruce's popt stuff makes it obsolete)
svn:r49
2002-07-15 21:13:40 +00:00
Bruce Montrose 9eb40bd5de bug-fix. poptReadDefaultOptions() should find and load ~/.<cmd>rc files now.
svn:r48
2002-07-15 19:05:12 +00:00
Bruce Montrose 9cac022d10 corrected some string literals
svn:r47
2002-07-15 16:42:27 +00:00
Roger Dingledine ace2abb8e0 removed mention of src/op/ from configure
svn:r46
2002-07-12 22:22:25 +00:00
Roger Dingledine c21560ef6e removing the obsolete op/ code
svn:r45
2002-07-12 18:34:44 +00:00
Bruce Montrose 41c3bc7b8a removed loglevel from global namespace. severity level is set using log() with a NULL format argument now. example: log(LOG_ERR,NULL);
svn:r44
2002-07-12 18:14:17 +00:00
Bruce Montrose 2956eab59c integrated use of getoption() into OR. removed getargs() and getconfig().
svn:r43
2002-07-12 17:12:08 +00:00
Bruce Montrose a167d2d5f2 finishing touches. think its ready for integration now.
svn:r42
2002-07-11 19:03:44 +00:00
Bruce Montrose 925b4c234c added new option GlobalRole to getoptions()
svn:r41
2002-07-11 18:38:16 +00:00
Bruce Montrose 425c305436 cleaned up some, added validation to getoptions()
svn:r40
2002-07-11 14:50:26 +00:00
Roger Dingledine 4261da99df fixed the deadlock bug
this was another bug i introduced with the 5 july patch.
i should look at that patch more closely. :)


svn:r39
2002-07-10 20:17:27 +00:00
Roger Dingledine 0b88190236 it wouldn't return when the next router isn't up, leading to later seg fault
i'm going to take a shower, and then solve the deadlocking problem mat found


svn:r38
2002-07-10 19:05:13 +00:00
Roger Dingledine 73e084cc0d a patch for mat's patch
svn:r37
2002-07-10 18:39:33 +00:00
Bruce Montrose 394e1801d3 Added usage display on error.
svn:r36
2002-07-10 12:37:49 +00:00
Matej Pjafjar b3a8475b05 Bugfix : connection_exit_process_data_cell() quit after receiving the SS, without waiting for the destination addr/port
svn:r35
2002-07-10 12:37:37 +00:00
Matej Pjafjar ff975cde7d getrouters() changed so that a router ignores its own entry in the router list
svn:r34
2002-07-10 12:35:59 +00:00
Matej Pjafjar 56bb40ee12 Bugfix - the list of valid characters in a filename didn't include an n .
svn:r33
2002-07-10 10:11:13 +00:00
Bruce Montrose 9686acd4fc added file to codebase
svn:r32
2002-07-09 19:57:38 +00:00
Bruce Montrose c7447cc8b8 Miscellaneous bug fixes / activated "make check" for src/or
svn:r31
2002-07-09 19:51:41 +00:00
Roger Dingledine 96536c176d put in the support for 'router twins'
basically, a twin is a router which is different except it shares
the same keypair. so in cases where we want to find a "next router"
and all we really care is that it can decrypt the next onion layer,
then a twin is just as good.

we still need to decide how to mark twins in the routerinfo_t and in
the routers config file.


svn:r30
2002-07-08 08:59:15 +00:00
Roger Dingledine 4fb8e71d3b general cleanup
svn:r29
2002-07-05 06:27:23 +00:00
Bruce Montrose fecc8212ac minor bug fix in error checking
svn:r28
2002-07-03 19:58:18 +00:00
Roger Dingledine 78958afb6f patch to fix running the program only as an op
svn:r27
2002-07-03 17:30:59 +00:00
Bruce Montrose e203981006 added error checking into getoptions()
svn:r26
2002-07-03 16:53:34 +00:00
Bruce Montrose 8441466621 Added getoptions() and made minor adjustment to poptReadDefaultOptions()
svn:r25
2002-07-03 16:31:22 +00:00
Roger Dingledine 4f361988f3 removed op/ from the build process, since it no longer
builds now that i've removed common/onion.[ch] (oops)


svn:r24
2002-07-02 16:00:02 +00:00
Roger Dingledine 705e336b6b removed a pair of includes that we don't actually use
svn:r23
2002-07-02 09:41:21 +00:00
Roger Dingledine 1ae10baa87 Integrated onion proxy into or/
The 'or' process can now be told (by the global_role variable) what
roles this server should play -- connect to all ORs, listen for ORs,
listen for OPs, listen for APs, or any combination.

* everything in /src/op/ is now obsolete.
* connection_ap.c now handles all interactions with application proxies
* "port" is now or_port, op_port, ap_port. But routers are still always
  referenced (say, in conn_get_by_addr_port()) by addr / or_port. We
  should make routers.c actually read these new ports (currently I've
  kludged it so op_port = or_port+10, ap_port=or_port+20)
* circuits currently know if they're at the beginning of the path because
  circ->cpath is set. They use this instead for crypts (both ways),
  if it's set.
* I still obey the "send a 0 back to the AP when you're ready" protocol,
  but I think we should phase it out. I can simply not read from the AP
  socket until I'm ready.

I need to do a lot of cleanup work here, but the code appears to work, so
now's a good time for a checkin.


svn:r22
2002-07-02 09:36:58 +00:00