Commit Graph

3753 Commits

Author SHA1 Message Date
Nick Mathewson
0a9e83369a 17 does not divide 1024, but it can stomp some interesting pointers and segfault the test suite
svn:r244
2003-04-17 01:56:06 +00:00
Nick Mathewson
d3c0e5ab34 Fix test.h to have once-only evalutation of arguments
svn:r243
2003-04-17 01:55:13 +00:00
Roger Dingledine
fe1aba7f15 more cleanup
svn:r242
2003-04-16 23:22:05 +00:00
Roger Dingledine
f39ca8a3aa further cleanup, test.c still has some bugs
svn:r241
2003-04-16 23:21:44 +00:00
Nick Mathewson
97d847b9e3 Factor out cell packing and unpacking
svn:r240
2003-04-16 17:44:33 +00:00
Nick Mathewson
1bbea670bc Remove the last vestige of code that claims to know the inner structure of an onion on the network
svn:r239
2003-04-16 17:11:56 +00:00
Roger Dingledine
05b52ad868 bugfix: make onions work again
svn:r238
2003-04-16 17:07:46 +00:00
Nick Mathewson
33176c70a5 Factor out timeval-related functions.
svn:r237
2003-04-16 17:04:58 +00:00
Nick Mathewson
0c61bc3756 Remove the notion of "onion ciphers"; make packing and unpacking separate fns
svn:r236
2003-04-16 16:19:27 +00:00
Roger Dingledine
54af75b1b4 add missing prototype
svn:r235
2003-04-16 16:17:27 +00:00
Nick Mathewson
acc33c18e2 Tests for crypto; more tests for buffers
svn:r234
2003-04-16 15:24:09 +00:00
Roger Dingledine
e1d37ed6ab divorce circuit building from user connections
now we rebuild the circuit periodically (but only if it's been used),
and we can further abstract it to do incremental circuit building, etc.


svn:r233
2003-04-16 06:18:31 +00:00
Nick Mathewson
1fa0fc1487 Introduce a few unit tests (from older code), refactor compression setup/teardown
svn:r232
2003-04-15 19:10:18 +00:00
Roger Dingledine
7df5caad0d make it work (heh)
svn:r231
2003-04-11 22:28:51 +00:00
Roger Dingledine
1d53d8ad0e refactored some duplicate code into connection_edge.c
svn:r230
2003-04-11 22:11:11 +00:00
Roger Dingledine
833f165d68 bugfix: make onion proxies actually obey their requested bandwidth
svn:r229
2003-04-08 22:31:48 +00:00
Roger Dingledine
c2fa6f5c7d let the 'test' binary build from the source distrib
svn:r228
2003-04-08 22:09:18 +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
Nick Mathewson
79b77b421d First test added
svn:r226
2003-04-07 13:25:44 +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
afa95ca47c make servers tolerate the dns bug.
svn:r223
2003-04-05 19:53:45 +00:00
Roger Dingledine
cb584627a4 begin cells are now address:port, not address,port
(breaks backward compatibility)


svn:r222
2003-04-05 19:04:47 +00:00
Roger Dingledine
03f4ed309f remove obsolete httpap
svn:r220
2003-04-04 22:10:25 +00:00
Roger Dingledine
76e1a66196 remove obsolete smtpap
svn:r219
2003-04-04 22:09:43 +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
b8da74d30a get rid of those nasty tabs
svn:r216
2003-03-24 03:00:20 +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
Nick Mathewson
9d03ae627d Fix message when decompressing
svn:r214
2003-03-19 22:51:38 +00:00
Nick Mathewson
29da03cbdc Be loud when decompressing
svn:r213
2003-03-19 22:47:34 +00:00
Roger Dingledine
e03af74d55 obsolete notion of 'role' from config files
svn:r210
2003-03-19 22:40:58 +00:00
Nick Mathewson
9c263b322b Make decompression loud.
svn:r209
2003-03-19 22:28:52 +00:00
Roger Dingledine
5d0904bc41 kludge because openssl and zlib both typedef free_func :(
svn:r208
2003-03-19 22:27:37 +00:00
Roger Dingledine
ff14dcdef7 fix arg bug; reduce confusion in package_raw_inbuf
svn:r207
2003-03-19 22:27:01 +00:00
Nick Mathewson
3a0cf37641 Add other side of half-open-connection logic (still disabled
svn:r206
2003-03-19 22:05:35 +00:00
Roger Dingledine
d07146b778 cleaner errors
svn:r205
2003-03-19 22:02:35 +00:00
Nick Mathewson
a528ee2d8f Be clear about whether we are using half-open connections
svn:r204
2003-03-19 21:59:07 +00:00
Nick Mathewson
7f7417cd29 Fix bug in client_send_auth
svn:r203
2003-03-19 21:47:18 +00:00
Nick Mathewson
4631f3dcdf Fix client_process_auth
svn:r202
2003-03-19 21:34:38 +00:00
Nick Mathewson
3a89d27e66 Correct defeatest attitude in crypto_new_cipher_env
svn:r201
2003-03-19 21:27:21 +00:00
Nick Mathewson
51ed97504b Fix op handshake for longer keys
svn:r200
2003-03-19 21:17:57 +00:00
Nick Mathewson
2b2eff33c5 Add a missing long cast to log.c for portability
svn:r199
2003-03-19 20:54:39 +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
Nick Mathewson
2ff7f274d3 Make Makefile.am nonbroken
svn:r197
2003-03-19 20:42:40 +00:00
Nick Mathewson
8ff1c3e21f Refactor block ciphers; add 3des
svn:r196
2003-03-19 20:41:15 +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
4ad74c2141 Do not uncompress from z_outbuf to outbuf unless outbuf is less than maximally full
svn:r188
2003-03-17 21:21:35 +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
Nick Mathewson
9a6b01ba44 Remove extraneous (and non-ansi) semis
svn:r186
2003-03-17 02:42:14 +00:00
Nick Mathewson
743e61e8c6 Add daemon logic
svn:r185
2003-03-17 02:41:36 +00:00
Nick Mathewson
5dc443a8c5 Add daemon option and bool config type
svn:r184
2003-03-17 02:27:19 +00:00
Nick Mathewson
9f0e93e716 Add zlib to link step
svn:r183
2003-03-17 02:26:37 +00:00
Roger Dingledine
d9770fbd96 clean up and slightly document the config files
svn:r179
2003-03-16 04:40:16 +00:00
Roger Dingledine
c5ed007ac8 respond to nick's question about link padding
(nick: note that link padding is currently disabled)


svn:r178
2003-03-12 12:06:54 +00:00
Nick Mathewson
e3368a65a9 Make ACI anti-collision logic work; make sure that cells are filled with 0s.
svn:r176
2003-03-11 21:38:38 +00:00
Roger Dingledine
70b35ce8c2 lazy (just in time) directory rebuilding
svn:r174
2003-03-11 01:51:41 +00:00
Roger Dingledine
fb2f4a0418 pack into data cells more intelligently
svn:r173
2003-03-10 22:40:02 +00:00
Roger Dingledine
90f8a7a757 be less noisy at -l info, now that flow control bug is solved
svn:r172
2003-03-10 22:30:05 +00:00
Roger Dingledine
b50c406c08 clean out obsolete cell types
svn:r170
2003-03-07 08:24:55 +00:00
Roger Dingledine
25939f206b remove the mystery int32 from the or-to-or handshake
thanks nick :)
(note: this change breaks backward compatibility)


svn:r169
2003-03-07 07:57:55 +00:00
Roger Dingledine
7354619bc1 clean up prepare_for_poll() so it's fast
svn:r167
2003-03-06 04:52:02 +00:00
Roger Dingledine
f97ddd44cd minor code cleanup
svn:r166
2003-03-05 20:03:05 +00:00
Roger Dingledine
1768f29d7e better comments and a few patches
svn:r164
2003-03-04 04:36:37 +00:00
Roger Dingledine
c5e7d4ca7a when we had multiple conns on a circuit, we'd tell the wrong
one to stop reading


svn:r163
2003-02-28 23:49:52 +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
584a4fc4dd Allow more connections open at once
svn:r160
2003-02-18 01:35:31 +00:00
Roger Dingledine
8c136b3a06 bugfix: actually remember the answer in the cache :)
svn:r159
2003-02-16 02:05:24 +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
5273e2b887 minor fix
svn:r157
2003-02-14 04:10:22 +00:00
Roger Dingledine
366908f8df commit my current tor rc versions
svn:r156
2003-02-14 04:10:13 +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
bf52b6d1f4 splay and rbtree implementations, by niels provos
taken from openbsd


svn:r151
2002-12-31 15:05:07 +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
0b717a3e74 give us more aci-space
svn:r149
2002-12-30 08:51:41 +00:00
Roger Dingledine
fbf4ca3ff8 bugfix: couldn't send two creates, two datas, and the destroy all at once
(amazing the odd behavior you get to test when you have a flaky modem
connection)


svn:r148
2002-12-23 06:48: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
bd97deb919 onions expire after a day, not an hour
this was a major faq, because it would fail with an error only on
the *server* side when the client-side time was wrong. the client would
simply not work.


svn:r145
2002-12-03 07:06:13 +00:00
Roger Dingledine
8f2beefca4 was leaking 28 bytes every 100 minutes
svn:r144
2002-12-03 05:12:30 +00:00
Roger Dingledine
ac10bb6319 two more rare race conditions
svn:r143
2002-11-28 07:32:30 +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
147879ab17 removing more unused files
svn:r141
2002-11-25 01:22:34 +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
f50f35f2ec added milliseconds to log lines
svn:r139
2002-11-24 08:45:13 +00:00
Roger Dingledine
5a82a491a8 fixed rare race condition
svn:r138
2002-11-24 08:33:15 +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
121d029584 fix subtle race condition
If you weren't connected to a given router, and you made a directory
request to it simultaneously with a new web query that caused you to
want to connect to that OR... it would think you're already connected.


svn:r135
2002-10-14 06:44:48 +00:00
Roger Dingledine
84a34edfa1 expire unfinished handshakes too
don't list non-open ORs in the directory


svn:r134
2002-10-13 13:17:27 +00:00
Roger Dingledine
74787aa2d4 cell.c is now obsolete
svn:r133
2002-10-03 02:17:41 +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
e3fd91755d preemptive bugfix
svn:r129
2002-10-02 04:07:33 +00:00
Roger Dingledine
b3b763ad11 all listeners listen on 0.0.0.0 except AP which listens on 127.0.0.1
svn:r126
2002-10-02 01:03:00 +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
293e049a89 handle banners from the server side
(text that it spits out immediately upon connect)


svn:r124
2002-10-01 05:46:48 +00:00
Roger Dingledine
827c7444f8 more robust http(ish) handling
svn:r123
2002-09-28 05:53:00 +00:00
Roger Dingledine
e0f77fc36b adding town-square rc info
svn:r122
2002-09-28 05:52:47 +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
6934eb9f10 mozilla actually cares about the reply version
tor can now interface directly with mozilla, as a socks 4 host.
but note that mozilla does the dns resolution itself, so you're leaking
anonymity.


svn:r119
2002-09-27 23:34:51 +00:00
Roger Dingledine
23264ebcb5 support socks4 too
svn:r118
2002-09-27 23:16:39 +00:00
Roger Dingledine
2fa4b5bb53 don't leak memory on pk ops
svn:r117
2002-09-27 22:13:22 +00:00
Roger Dingledine
5811b22bee new config files, including directory servers
svn:r115
2002-09-26 23:53:21 +00:00
Roger Dingledine
54af97ccdc stop duplicate free
svn:r114
2002-09-26 13:19:13 +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
d6360c57bc another bugfix on the proxy side
should be more reliable now (?)


svn:r111
2002-09-26 05:50:51 +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
8019f2250c OP was hanging on first try if connect finishes too quickly
svn:r105
2002-09-20 19:33:13 +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
1e4e0244dd minor race condition
(it seemed to work anyway, but...)


svn:r100
2002-09-09 04:06:59 +00:00
Roger Dingledine
f9f3e2f120 slight optimization on rsa exponent
use 2**16+1 rather than 2**16 + 2**(-1)


svn:r99
2002-09-05 19:04:47 +00:00
Roger Dingledine
9287ad82a8 an rc file for an onion proxy
svn:r97
2002-09-04 06:46:09 +00:00
Roger Dingledine
ddc2b69a28 onion proxies now work (i think)
svn:r96
2002-09-04 06:29:28 +00:00
Roger Dingledine
5948f1431c fixed the killer bug with onion proxies
svn:r95
2002-09-04 06:24:54 +00:00
Roger Dingledine
4eb0158f42 the logs now include a timestamp and severity
the implementation is sort of a kludge..you're welcome to fix it up


svn:r94
2002-09-04 00:39:33 +00:00
Roger Dingledine
adfd11b9ac changed my mind, sort of
the package is tor, the binary is or.

and i added our project plan to the todo file.


svn:r93
2002-09-03 22:53:34 +00:00
Roger Dingledine
c5922aa208 Our program is now called 'tor', not 'or'.
svn:r92
2002-09-03 22:44:49 +00:00
Nick Mathewson
4c761e4537 Backport to OpenSSL version 0.9.5
svn:r91
2002-09-03 19:16:02 +00:00
Roger Dingledine
41ee4e24bb clarifying the empty semicolon
svn:r90
2002-09-03 19:10:23 +00:00
Roger Dingledine
ca834335da resolve warnings
svn:r89
2002-09-03 19:03:16 +00:00
Nick Mathewson
fdb31225b7 Port to MacOS X
svn:r88
2002-09-03 18:44:24 +00:00
Nick Mathewson
8878d8cc27 Add function to fake a poll call using select
svn:r87
2002-09-03 18:43:50 +00:00
Roger Dingledine
27adc0f20b enforce maxconn; bugfix to not tear down the parent when we hit maxconn
svn:r86
2002-09-03 18:36:40 +00:00
Roger Dingledine
db4c2140c3 more debugging info, to track down bruce's IP problems
svn:r85
2002-08-27 19:28:35 +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
39423023af proxies send port in host order as ascii string
svn:r83
2002-08-24 07:56:34 +00:00
Roger Dingledine
b8b8ab2fd6 port is now kept in host order except in sin_port
svn:r82
2002-08-24 07:55:49 +00:00
Roger Dingledine
c040bbe053 cleanup: start enforcing hton and ntoh on stuff sent over the network
this is a checkpoint before i fix the fact that port is always kept in
network order -- which makes no sense, because network order is different
on different machines, which is the whole point.


svn:r81
2002-08-24 06:58:25 +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
Roger Dingledine
d8c0d21b49 linkpadding is now off by default.
svn:r79
2002-08-23 06:49:43 +00:00
Roger Dingledine
5414786cf1 changed path selection so it's actually random again
svn:r78
2002-08-23 05:27:50 +00:00
Roger Dingledine
08adaa4b46 cleaned up new_route()
now it deals gracefully with too few connected routers (i think)


svn:r77
2002-08-23 03:35:44 +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
Matej Pjafjar
ac942bb365 Updated to use crypto.h instead of OpenSSL.
svn:r75
2002-07-25 08:18:05 +00:00
Matej Pjafjar
e01522bbed Added the crypto abstraction to libor. Need to test and change the code to use this instead of OpenSSL.
svn:r74
2002-07-25 08:17:22 +00:00
Matej Pjafjar
5af5a96343 Beginnings of a crypto abstraction layer.
svn:r73
2002-07-24 14:02:39 +00:00
Roger Dingledine
c42c2b6640 only choose routers for the onion that are currently connected to us
svn:r72
2002-07-22 04:38:36 +00:00
Roger Dingledine
cd0760ddda Code cleaned up to be less noisy
svn:r71
2002-07-22 04:08:37 +00:00
Roger Dingledine
a303325dca More reasonable CoinWeight, now that we can handle large paths
svn:r70
2002-07-22 04:08:15 +00:00
Roger Dingledine
d1d5bb9b15 Include src/config/ in the 'make dist' tarball
svn:r69
2002-07-22 04:07:57 +00:00
Roger Dingledine
61dc00bcaa 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
1c3b823a82 bugfix: create_onion now works with routelen>2
svn:r66
2002-07-20 01:59:28 +00:00
Roger Dingledine
5c0edf6d54 Folded cell.? into src/or
svn:r64
2002-07-19 18:48:28 +00:00
Roger Dingledine
fc0e2a34ec slightly less noisy
svn:r63
2002-07-19 18:48:19 +00:00
Roger Dingledine
fee55dd4a3 minor cleanups in config files
svn:r62
2002-07-19 18:48:03 +00:00
Roger Dingledine
61d10b309f Folded cell.? into src/or
Removed more obsolete files


svn:r61
2002-07-19 18:47:04 +00:00
Matej Pjafjar
f617a4e733 Test suite for onion.c - currently tests encrypt_onion() and decrypt_onion().
svn:r59
2002-07-19 14:08:44 +00:00
Roger Dingledine
ab2218bb46 moria:9004 is now a twin to town-square:9004
svn:r57
2002-07-19 00:33:31 +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
0a8d58138d changes to support sendme cells
svn:r55
2002-07-18 06:38:32 +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
Roger Dingledine
ccdef66b68 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
53cec4caef 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
c951c6f186 new config files, some bugfixes
svn:r51
2002-07-16 02:12:58 +00:00
Roger Dingledine
117cbeeaaf 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
ffc545311b removed args.c (bruce's popt stuff makes it obsolete)
svn:r49
2002-07-15 21:13:40 +00:00
Bruce Montrose
4aeca322b4 bug-fix. poptReadDefaultOptions() should find and load ~/.<cmd>rc files now.
svn:r48
2002-07-15 19:05:12 +00:00
Bruce Montrose
52311e1b78 corrected some string literals
svn:r47
2002-07-15 16:42:27 +00:00
Roger Dingledine
016691b5b1 removing the obsolete op/ code
svn:r45
2002-07-12 18:34:44 +00:00
Bruce Montrose
be25ffd5d7 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
d00c39231d integrated use of getoption() into OR. removed getargs() and getconfig().
svn:r43
2002-07-12 17:12:08 +00:00
Bruce Montrose
aaca91109f finishing touches. think its ready for integration now.
svn:r42
2002-07-11 19:03:44 +00:00
Bruce Montrose
3ee59f2325 added new option GlobalRole to getoptions()
svn:r41
2002-07-11 18:38:16 +00:00
Bruce Montrose
4c65f31340 cleaned up some, added validation to getoptions()
svn:r40
2002-07-11 14:50:26 +00:00
Roger Dingledine
eb51576abf 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
391d23c428 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
db15776bdd a patch for mat's patch
svn:r37
2002-07-10 18:39:33 +00:00
Bruce Montrose
6a58057a6e Added usage display on error.
svn:r36
2002-07-10 12:37:49 +00:00
Matej Pjafjar
bb01f59de9 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
f07ade3046 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
ce934e4974 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
934ca320ff added file to codebase
svn:r32
2002-07-09 19:57:38 +00:00
Bruce Montrose
62ead018a1 Miscellaneous bug fixes / activated "make check" for src/or
svn:r31
2002-07-09 19:51:41 +00:00
Roger Dingledine
0a3da3ae37 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
b86fecbf47 general cleanup
svn:r29
2002-07-05 06:27:23 +00:00
Bruce Montrose
bb163ca830 minor bug fix in error checking
svn:r28
2002-07-03 19:58:18 +00:00
Roger Dingledine
66c6f2231e patch to fix running the program only as an op
svn:r27
2002-07-03 17:30:59 +00:00
Bruce Montrose
a5be23d475 added error checking into getoptions()
svn:r26
2002-07-03 16:53:34 +00:00
Bruce Montrose
a3609f4d5d Added getoptions() and made minor adjustment to poptReadDefaultOptions()
svn:r25
2002-07-03 16:31:22 +00:00
Roger Dingledine
419781685c 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
d982925593 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
Roger Dingledine
b34fad4d38 removed onion.c and onion.h from common/
they're now in or/onion.c


svn:r21
2002-07-02 09:17:21 +00:00
Roger Dingledine
873f08aa0e httpap now prepends dest_addr and dest_port strings with their length.
also, it now sets the listening socket option SO_REUSEADDR


svn:r20
2002-07-02 09:16:16 +00:00
Roger Dingledine
9526211137 Committing my working config files, so we'll all be on the same page
Note that there are new keywords in these, etc. Matej, would you be
interested in going through and patching routers.c, config.c, etc, so
they're cleaner?


svn:r19
2002-07-02 09:14:18 +00:00
Roger Dingledine
c603e403df fixed a critical bug in yesterday's changes to buffers.c
(starting to debug my OP integration)


svn:r18
2002-07-02 06:02:15 +00:00
Roger Dingledine
b503d4c6d6 made 'app' connection be 'exit' connection
general cleanup, particularly in buffers.c


svn:r17
2002-06-30 07:37:49 +00:00
Roger Dingledine
bd627daa40 First cut at cleaning out a lot of the extra stuff.
The summary here is that I'm requiring all developers to have
auto* (aclocal, autoconf, automake) installed on their machine.

Since different versions of auto* generate vastly different output,
I'm going to leave its output out of the repository. This means that
whenever you check out a repository, you need to run auto* to generate
a configure file, then run ./configure to get a Makefile, then build.

If you don't have auto* and can't get it, let me know (and I'll try to
convince you to develop on moria).

The benefit here is that while developers have a bit more work to keep
things straight, we can build snapshots that will install just about
anywhere (once we make configure.in work, that is ;)


svn:r12
2002-06-29 00:54:00 +00:00
Felipe Bergo
3840dbcaaf moved configure.ac to configure.in, should work with older autoconfs and automakes
svn:r11
2002-06-28 23:43:00 +00:00
Felipe Bergo
f09e25e9f5 added automake/autoconf support. When in doubt, "aclocal && autoconf && autoheader && automake" from the top dir.
svn:r10
2002-06-28 23:26:42 +00:00
Bruce Montrose
92019ca9e7 Added -lpopt to Makefiles
svn:r9
2002-06-28 18:31:12 +00:00
Bruce Montrose
a551f0a6a8 Added poptReadOptions() and poptReadDefaultOptions()
svn:r8
2002-06-28 18:14:55 +00:00
Roger Dingledine
9a928eeb12 Initial revision
svn:r2
2002-06-26 22:45:49 +00:00