Commit Graph

60 Commits

Author SHA1 Message Date
Roger Dingledine
1d53d8ad0e refactored some duplicate code into connection_edge.c
svn:r230
2003-04-11 22:11:11 +00:00
Roger Dingledine
cdf6ea201f put most of the remaining exit policy stuff in
route selection still doesn't pay attention to exit policies though


svn:r227
2003-04-08 06:44:38 +00:00
Roger Dingledine
18bbac44ca parse exit policy lines
svn:r225
2003-04-07 04:38:19 +00:00
Nick Mathewson
c217b1ca71 Add magic to end of C files to make emacs happy; split test invocation into separate file.
svn:r224
2003-04-07 02:12:02 +00:00
Roger Dingledine
96e5f776d6 move cell size to 256. seems to work (?)
svn:r218
2003-03-24 04:02:24 +00:00
Roger Dingledine
9ac9db782a fix rare race condition
if the directory is remade while an OR is handshaking, the directory
needs to become dirty again when the handshake succeeds


svn:r215
2003-03-24 02:50:07 +00:00
Roger Dingledine
5d0904bc41 kludge because openssl and zlib both typedef free_func :(
svn:r208
2003-03-19 22:27:37 +00:00
Nick Mathewson
0fed84785e Finish zlib and half-open; switch to 3des (ede/ofb)
svn:r198
2003-03-19 20:48:56 +00:00
Roger Dingledine
64e46988f6 greatly simplify this notion of 'roles':
if your ORPort is non-zero then you must connect to all nodes
if your DirPort is non-zero then you must act like a directory server


svn:r192
2003-03-18 01:49:55 +00:00
Nick Mathewson
6deed60bb5 Add code for end-to-end zlib compression. Still needs flow-control
svn:r187
2003-03-17 02:42:45 +00:00
Roger Dingledine
70b35ce8c2 lazy (just in time) directory rebuilding
svn:r174
2003-03-11 01:51:41 +00:00
Roger Dingledine
b50c406c08 clean out obsolete cell types
svn:r170
2003-03-07 08:24:55 +00:00
Roger Dingledine
f97ddd44cd minor code cleanup
svn:r166
2003-03-05 20:03:05 +00:00
Roger Dingledine
7461959371 let up on the bandwidth constraints
svn:r162
2003-02-18 01:55:51 +00:00
Roger Dingledine
1714ea2ab8 Bugfixes and enhancements in sendmes and dns farm
svn:r161
2003-02-18 01:35:55 +00:00
Roger Dingledine
3cf02a88f4 rudimentary dns caching (of both resolves and resolve failures)
serious performance increase over non-caching


svn:r158
2003-02-14 07:53:55 +00:00
Roger Dingledine
0bc8dc1314 fix endian issues for topics -- they might work on bsd now
(they wouldn't have before)

alternate code which bypasses the dns farm, so we can compare speed


svn:r154
2003-02-06 23:48:35 +00:00
Roger Dingledine
ceafe12ed6 make reusing circuits work (and be the default)
performance is better, but not by much. not sure why yet.


svn:r153
2003-02-06 08:00:49 +00:00
Roger Dingledine
c35373a2cf major overhaul: dns slave subsystem, topics
on startup, it forks off a master dns handler, which forks off dns
slaves (like the apache model). slaves as spawned as load increases,
and then reused. excess slaves are not ever killed, currently.

implemented topics. each topic has a receive window in each direction
at each edge of the circuit, and sends sendme's at the data level, as
per before. each circuit also has receive windows in each direction at
each hop; an edge sends a circuit-level sendme as soon as enough data
cells have arrived (regardless of whether the data cells were flushed
to the exit conns). removed the 'connected' cell type, since it's now
a topic command within data cells.

at the edge of the circuit, there can be multiple connections associated
with a single circuit. you find them via the linked list conn->next_topic.

currently each new ap connection starts its own circuit, so we ought
to see comparable performance to what we had before. but that's only
because i haven't written the code to reattach to old circuits. please
try to break it as-is, and then i'll make it reuse the same circuit and
we'll try to break that.


svn:r152
2003-01-26 09:02:24 +00:00
Roger Dingledine
9d3e80a589 use a rbtree for replay detection, rather than linear search
when we had lots of new onions coming in, we were using 40% of
our time searching through the tracked_onions linked list.


svn:r150
2002-12-31 15:04:14 +00:00
Roger Dingledine
cbd2cdf04f onions go on and off the network correctly now
we're closer to an OS X port
 CVS: ----------------------------------------------------------------------


svn:r146
2002-12-03 22:18:23 +00:00
Roger Dingledine
8f18647a33 create cells are now queued and processed only when idle
we also queue data cells destined for a circuit that is
pending, and process them once the circuit opens

destroys reach into the queue and remove the pending onion,
along with its collected data cells


svn:r142
2002-11-27 04:08:20 +00:00
Roger Dingledine
b097aa3288 per-second cell statistics to help with profiling
svn:r140
2002-11-24 08:45:54 +00:00
Roger Dingledine
ab0aee04d9 added OnionsPerSecond to prevent create flooding
first cut, probably needs more playing with


svn:r137
2002-11-23 08:49:03 +00:00
Roger Dingledine
00a9e3732e remove popt dependency, consolidate config stuff
reformat parts of onion.c


svn:r136
2002-11-23 06:49:01 +00:00
Roger Dingledine
bf53852a00 cleanup and a variety of bugfixes
svn:r132
2002-10-02 22:54:20 +00:00
Nick Mathewson
bef3424bec Add convenience functions to wrap create and init for symmetric ciphers; clean up error handling in onion.c
svn:r131
2002-10-02 20:39:51 +00:00
Roger Dingledine
7032d16e78 cell now has a network appearance and an internal (struct) appearance
svn:r130
2002-10-02 20:12:44 +00:00
Roger Dingledine
7ed6c8bd39 introduced a periodic keepalive padding cell
now tor can be run safely inside nat'ed areas that kill idle
connections; and the proxy can handle when you suspend your laptop
and then emerge hours later from a new domain.


svn:r125
2002-10-01 23:37:31 +00:00
Roger Dingledine
827c7444f8 more robust http(ish) handling
svn:r123
2002-09-28 05:53:00 +00:00
Roger Dingledine
081e8969db catch hup to reload directory/router list
svn:r121
2002-09-28 01:40:11 +00:00
Roger Dingledine
22285e6ff1 cleanup
prkey is only fetched when it's needed
tor nodes who aren't dirservers now fetch directories and autoconnect
  to new nodes listed in the directory
default role is a non-dirserver node


svn:r120
2002-09-28 00:52:59 +00:00
Roger Dingledine
f033442be2 dirserver should include itself in the directory
if connecting to a dirserver fails, remove it from the router array


svn:r113
2002-09-26 13:17:14 +00:00
Roger Dingledine
01f6727306 directory servers in and functional
proxies now periodically pull down an hourly-updated directory,
and replace their router list with it if it parses correctly.


svn:r112
2002-09-26 12:09:10 +00:00
Roger Dingledine
253f0f160e laying the groundwork for dynamic router lists
revamped the router reading section

reference counting for crypto pk env's (so we can dup them)

we now read and write pem pk keys from string rather than from FILE*,
  in anticipation of fetching directories over a socket
  (so now on startup we slurp in the whole file, then parse it as a string)

fixed a bug in the proxy side, where you could get some circuits
  wedged if they showed up while the connection was being made


svn:r110
2002-09-24 10:43:57 +00:00
Roger Dingledine
988c6d4277 more robust when only some of the socks info has arrived
svn:r108
2002-09-23 01:04:59 +00:00
Roger Dingledine
155c9b80ca onion proxy now speaks socks4a
httpap is obsolete; we support privoxy directly now!

smtpap is obsolete; need to find a good socks4a-enabled smtp proxy/client

I dub thee 0.0.1.


svn:r107
2002-09-22 11:09:07 +00:00
Roger Dingledine
8d1aa27c46 kill -USR1 the or and it will dump conn/circuit stats to stdout
svn:r106
2002-09-21 22:41:48 +00:00
Roger Dingledine
5449fc86db synchronize to the version i've been giving people to test
svn:r104
2002-09-19 20:13:27 +00:00
Roger Dingledine
09daf01e4a added 'connected' cell type
see http://archives.seul.org/or/dev/Sep-2002/msg00018.html


svn:r103
2002-09-17 08:14:37 +00:00
Nick Mathewson
6cb8a91d5c "You got BSD in my MacOS!" "You got MacOS in my BSD!" Anyway, MacOS works again.
svn:r102
2002-09-10 13:32:27 +00:00
Roger Dingledine
958ec8d4fb port to actual BSD
(hey nick, does this break the os x build?)

you still need to add some stuff to the ./configure commandline...
anybody know a better solution?


svn:r101
2002-09-09 04:10:58 +00:00
Roger Dingledine
ddc2b69a28 onion proxies now work (i think)
svn:r96
2002-09-04 06:29:28 +00:00
Nick Mathewson
fdb31225b7 Port to MacOS X
svn:r88
2002-09-03 18:44:24 +00:00
Roger Dingledine
26587827b2 we now encrypt the entire cell on the link, not just the header
previously padding cells, etc were distinguishable because their body was
all zero's


svn:r84
2002-08-24 08:24:30 +00:00
Roger Dingledine
3a7f3ba348 cleanup: don't use size_t when you mean int
size_t is what you get back from sizeof(). no more, no less.


svn:r80
2002-08-24 04:59:21 +00:00
Matej Pjafjar
01aadefbfc Changed crypto calls to go through common/crypto.[hc] instead of calling OpenSSL directly.
svn:r76
2002-08-22 07:30:03 +00:00
Roger Dingledine
5c0edf6d54 Folded cell.? into src/or
svn:r64
2002-07-19 18:48:28 +00:00
Roger Dingledine
2147898577 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
267434bdea 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