Nick Mathewson
72568d2620
Another case of the same.
...
svn:r1099
2004-02-17 08:52:57 +00:00
Nick Mathewson
bab6c0a332
Fix the Big Bug in router_compare_addr_to_exit_policy: we used port 0
...
to mean "unknown port". But no exit policy supports (nonexistant)
port 0, except accept *:*, and we had no special handling for 'unknown port'.
Now we do.
svn:r1098
2004-02-17 08:52:03 +00:00
Roger Dingledine
46ffc5984d
best_support_idx is obsolete
...
(also doesn't fix the bug)
svn:r1097
2004-02-17 08:42:25 +00:00
Nick Mathewson
bd14023afd
Propagate yes/no/maybe a little farther forward.
...
svn:r1096
2004-02-17 08:29:22 +00:00
Roger Dingledine
d081d1d061
make braces cleaner, bug still persists
...
svn:r1095
2004-02-17 08:10:07 +00:00
Nick Mathewson
61756b5893
Fix router_compare_addr_to_exit_policy, and name its return codes. The bug was: "maybe reject,accept" should be "maybe", not "accept".
...
svn:r1093
2004-02-17 07:56:33 +00:00
Roger Dingledine
d508a194f7
Let paranoid exit nodes (which default to reject) be exit nodes
...
Before we resolve the hostname, we don't know whether its IP will be accepted or rejected by the exit policy of each host. So we were only going with nodes that would certainly accept -- which
was just itys and poblano.
(This bug was hidden until now by the earlier port bug.)
(Actual bugfix pending on Nick's next commit, hopefully.)
svn:r1092
2004-02-17 07:45:44 +00:00
Roger Dingledine
1801bd7592
prevent picking middleman nodes as the last node in the circuit
...
svn:r1088
2004-02-17 06:39:20 +00:00
Roger Dingledine
a8d8b82662
install the 'tor' binary to usr/sbin by default
...
svn:r1082
2004-02-17 04:48:01 +00:00
Nick Mathewson
17adfa9dfd
log when exit situation is hopeless.
...
svn:r1057
2004-02-04 22:35:58 +00:00
Roger Dingledine
f00dc6fe1e
last minute fix: don't early-flush non-tls streams
...
e.g., this breaks directory service
svn:r1033
2004-01-31 00:36:00 +00:00
Roger Dingledine
f6f9b1d94d
for perf testing, paths are always 3 hops, not "3 or more"
...
svn:r1030
2004-01-30 23:43:17 +00:00
Roger Dingledine
e05d39d1af
fix a per-circuit memory leak
...
svn:r1029
2004-01-30 21:32:40 +00:00
Nick Mathewson
a81435c64e
Another related leak
...
svn:r1028
2004-01-30 21:16:51 +00:00
Nick Mathewson
e4ad1f1629
Freeing twice does *not* make the heap twice as clean.
...
svn:r1027
2004-01-30 21:05:47 +00:00
Nick Mathewson
88b579dd33
Fix a bug that might have caused the leak, but which might have been hiding other bugs.
...
svn:r1026
2004-01-30 20:59:15 +00:00
Nick Mathewson
6c3f55526a
Fix possible (but unlikely) mem leak.
...
svn:r1025
2004-01-30 20:38:08 +00:00
Roger Dingledine
7651b09c8a
finally locate the memory leak,
...
plus commit a patch that doesn't fix it
(but doesn't hurt? i dunno)
svn:r1024
2004-01-30 20:33:04 +00:00
Roger Dingledine
afdaff63ef
turn some knobs, add more debugging
...
svn:r1023
2004-01-30 19:31:39 +00:00
Roger Dingledine
b42b16357f
note an assert trigger, if you use an old broken netscape socks4
...
svn:r1022
2004-01-30 15:15:11 +00:00
Roger Dingledine
deda0d93dd
Let AP edges receive 'end' relay cells while waiting for 'connected'
...
svn:r1012
2004-01-20 18:17:43 +00:00
Roger Dingledine
3516ae1a26
add an ap_conn connecting state; report connecting delay
...
svn:r1011
2004-01-20 09:21:46 +00:00
Roger Dingledine
61723a1f69
small default route when doing speed testing
...
svn:r1010
2004-01-20 03:12:46 +00:00
Roger Dingledine
f5ebf4c712
push out a tls record's worth of data once you've got it
...
svn:r1009
2004-01-20 02:14:51 +00:00
Roger Dingledine
585c2efe87
add TOR_PERF macro options
...
svn:r1008
2004-01-20 02:14:30 +00:00
Roger Dingledine
c12a6f58b5
fix typo
...
svn:r1007
2004-01-20 02:14:12 +00:00
Roger Dingledine
fb81a32c68
setuid to User _before_ complaining about running as root
...
svn:r1006
2004-01-19 06:12:32 +00:00
Roger Dingledine
522982f8e9
fix assert trigger in server
...
Jan 18 04:11:43.312 [warn] connection_edge_send_command(): no circ. Closing.
i think it was while sending a connected relay cell back.
reason for having the circ gone is still not known. presumably the end cell
arrived at just the right time.
svn:r1005
2004-01-19 04:58:39 +00:00
Roger Dingledine
561c6236af
fix some errors in logs and comments
...
svn:r999
2004-01-16 08:27:17 +00:00
Nick Mathewson
793c65e60f
Note discrepency between N bytes transmitted over TLS and actual bandwidth use; add 2 functions to help resolve.
...
svn:r986
2004-01-13 01:19:02 +00:00
Roger Dingledine
b669b1d57c
oh, and make it compile
...
still need to make a decision about per-connection rate limiting
(take it out? update it?)
svn:r984
2004-01-11 07:41:01 +00:00
Roger Dingledine
5086300815
split the token bucket into 'rate' and 'burst' params
...
we're not entirely migrated to burst yet, for backward compatibility
note some win32 probable-bugs
clean up routerlist.c
svn:r982
2004-01-10 23:40:38 +00:00
Roger Dingledine
db0c27b362
resolve cygwin warnings for pre19
...
svn:r981
2004-01-08 22:48:18 +00:00
Roger Dingledine
c485725c5a
Fix the dns bug: children weren't dying
...
We were telling a child to die by closing the parent's file descriptor
to him. But newer children were inheriting the open file descriptor from
the parent, and since they weren't closing them, the socket never closed,
so the child never read eof, so he never knew to exit.
As a side effect to this bug, we were probably failing to properly close
connections to remote hosts, ORs, and OPs, after a dns child was born.
I'm surprised Tor worked at all.
svn:r974
2004-01-06 07:53:40 +00:00
Roger Dingledine
d6ce65afd6
the onionskin challenge length was 30 bytes longer than necessary
...
(i think ;)
svn:r971
2004-01-05 05:23:03 +00:00
Roger Dingledine
607078cf70
print an entry at the top of the logfile so you know it's working
...
clean up a minor bug in a debugfile log entry
svn:r970
2004-01-05 05:22:04 +00:00
Nick Mathewson
cacacfe2b1
Integrate new daemon code, adapted from submission by christian grothoff
...
svn:r969
2004-01-03 22:40:49 +00:00
Roger Dingledine
53061b3778
fix endian issue: rh.integrity was getting sent wrong
...
now it's a char[4] rather than an int
svn:r966
2004-01-02 09:03:38 +00:00
Roger Dingledine
c2e37901be
stop a bug that straycat may have found
...
svn:r964
2004-01-01 07:01:09 +00:00
Roger Dingledine
8085235e5f
make loglevel info less noisy
...
svn:r961
2003-12-30 22:49:35 +00:00
Roger Dingledine
f3fdbadfdf
randomize the initial circ_id and stream_id, so an adversary who
...
breaks in part-way through can't learn how many circs/streams have
been made
svn:r960
2003-12-28 04:46:09 +00:00
Roger Dingledine
71739b486a
back out the insert-padding-if-conflict code
...
use recognized + digest instead, just assume it's enough bits
svn:r959
2003-12-26 06:29:57 +00:00
Roger Dingledine
43fcb70bad
checkpoint: revamp relay cell packaging and handling
...
include the infrastructure for inserting padding cells when there's
a relay-recognized conflict, but it does not work currently.
svn:r958
2003-12-23 07:45:31 +00:00
Roger Dingledine
bc8c6732cb
add crypto_cipher_rewind to reverse crypto_cipher_advance
...
svn:r957
2003-12-23 07:43:05 +00:00
Roger Dingledine
55a94cd497
correct a warn message in mark_if_closed
...
svn:r956
2003-12-23 07:42:01 +00:00
Roger Dingledine
ad93c0a2bd
make sure there's no conflict when generating stream_ids
...
svn:r955
2003-12-19 21:25:44 +00:00
Roger Dingledine
a5e6ec244f
rename circ_id_t to uint16_t for code clarity
...
change message when using non-recommended tor version
svn:r954
2003-12-19 19:55:02 +00:00
Roger Dingledine
45a66c6955
make a relay_header_t struct and pack/unpack funcs
...
split 7-byte stream_id string into 2-byte recognized and 2-byte stream_id
fix two seg faults in fetch_from_buf_http
fix several lurking seg faults in handling unexpected relay cells
still need to
* clean up relay_crypt
* use relay dummies if there's going to be a conflict with rh.recognized
* check for a conflict when generating stream_ids
svn:r953
2003-12-19 05:09:51 +00:00
Roger Dingledine
eb730c41c8
clean tabs, trailing whitespace
...
svn:r952
2003-12-17 21:14:13 +00:00
Roger Dingledine
6a19e64066
remove trailing whitespace
...
svn:r951
2003-12-17 21:09:31 +00:00
Roger Dingledine
5ecd6b6bad
make fetch_from_buf_http malloc its strings rather
...
than use fixed-size strings
reorganize directory_handle_command so it'll be easier to do more with
our directory servers
svn:r950
2003-12-17 09:42:28 +00:00
Roger Dingledine
4a1e05de51
betcha didn't know strncpy could leave an unterminated string
...
svn:r949
2003-12-17 09:20:29 +00:00
Roger Dingledine
aba237e3e2
end-to-end integrity checking now works
...
initialize digests from shared secrets at handshake
make circuit_send_next_onion_skin use connection_edge_send_command
svn:r948
2003-12-17 05:58:30 +00:00
Roger Dingledine
389eb48690
document an openssl gotcha
...
svn:r947
2003-12-17 05:31:52 +00:00
Roger Dingledine
21cc01299b
infrastructure for integrity-checks in relay cells
...
make circuit_consider_sending_sendme use connection_edge_send_command
fix endian bug in relay length handling (maybe)
svn:r946
2003-12-16 22:56:50 +00:00
Roger Dingledine
4e50f79b11
resolve an edge case in get_unique_circ_id_by_conn
...
svn:r944
2003-12-16 20:45:10 +00:00
Roger Dingledine
8712a30e91
move cell size to 512 bytes
...
move length to 2 bytes, put it in the relay header
remove 4 reserved bytes in cell
add 4 bytes to relay header for the integrity check
svn:r942
2003-12-16 09:48:17 +00:00
Roger Dingledine
961ecf7abf
add H(K|1) to the onionskin reply
...
verify it at the client end
abstract the onionskin handshake lengths
breaks backward compatibility (again)
svn:r941
2003-12-16 08:21:58 +00:00
Roger Dingledine
f3b165fdc0
change crypto_digest_new_env to crypto_new_digest_env
...
(and same with _free_)
to match our conventions
i think our conventions may be getting too ad hoc
svn:r940
2003-12-16 08:13:26 +00:00
Roger Dingledine
e358a362ee
rename digest_copy to digest_dup, make it return, make gcc happier
...
svn:r939
2003-12-16 05:47:21 +00:00
Nick Mathewson
7c439c30d0
Resolve format warnings on MacOS X 10.3
...
svn:r938
2003-12-16 05:33:11 +00:00
Nick Mathewson
eeae6157ed
Add more fine-grained SHA1 functionality.
...
svn:r937
2003-12-16 05:29:04 +00:00
Nick Mathewson
4885e90490
Make compile warning-free on cygwin
...
svn:r936
2003-12-15 21:35:52 +00:00
Roger Dingledine
a5aa80cc41
make --debuglogfile (or any second log file) work
...
svn:r935
2003-12-14 09:58:43 +00:00
Roger Dingledine
08534a6271
start tracking the 'It appears I've already sent the end' warning
...
svn:r932
2003-12-14 08:32:14 +00:00
Roger Dingledine
0ea88d508d
oops, i broke buffers. fixed.
...
svn:r931
2003-12-14 08:15:41 +00:00
Roger Dingledine
f9bdb8a0da
document aborted attempt to merge client dns cache with server dns cache
...
svn:r930
2003-12-14 07:50:45 +00:00
Roger Dingledine
7d58bfbd50
change dns notation from question/answer to address/addr
...
svn:r929
2003-12-14 07:40:47 +00:00
Roger Dingledine
8f573c06c3
start to track the 'unexpected relay cell' warning
...
svn:r928
2003-12-14 06:50:44 +00:00
Roger Dingledine
36ea39ec9c
on hup, close and rebind listener ports too (in case their config has changed)
...
svn:r926
2003-12-14 06:03:46 +00:00
Roger Dingledine
50e17d633b
clean up some file-scope-global directory variables
...
svn:r925
2003-12-14 05:25:23 +00:00
Roger Dingledine
1096eae543
add options.ExcludedNodes -- nodes that are never picked in path building
...
svn:r924
2003-12-14 05:08:28 +00:00
Roger Dingledine
3465c4dee4
make it compile
...
svn:r923
2003-12-14 05:00:09 +00:00
Roger Dingledine
f4cb5d8c93
extend smartlist with _remove() and _subtract()
...
svn:r922
2003-12-14 04:57:47 +00:00
Roger Dingledine
2997ef8dd9
warn if you're running tor as root
...
svn:r921
2003-12-14 04:39:23 +00:00
Roger Dingledine
25e7e97d73
on HUP, retry OR connections, and stop clobbering the dirserver's routerlist
...
svn:r920
2003-12-14 04:33:18 +00:00
Roger Dingledine
05c05d6444
more friendly warning when there are too many dns workers
...
svn:r919
2003-12-14 04:19:12 +00:00
Roger Dingledine
9e3608ce7b
more friendly warning when a connection buffer overflows
...
svn:r918
2003-12-14 04:18:43 +00:00
Roger Dingledine
a1745b6895
slightly different default default exit policy.
...
svn:r917
2003-12-14 00:18:57 +00:00
Roger Dingledine
55d3ec028d
reject 0.0.0.0/8,reject 169.254.0.0/16
...
svn:r916
2003-12-14 00:17:44 +00:00
Roger Dingledine
29adf04683
more general cleanup
...
svn:r915
2003-12-14 00:12:02 +00:00
Roger Dingledine
444798dfb9
remove obsolete code
...
svn:r914
2003-12-14 00:11:48 +00:00
Nick Mathewson
fb95d99f79
Accept 1.2.3.4/x as a synonym for 1.2.3.4/x:* .
...
svn:r912
2003-12-14 00:04:29 +00:00
Roger Dingledine
78a7de300c
make options.ExitNodes work
...
if your best choices happen to include any of your preferred exit nodes,
you choose among just those preferred exit nodes.
svn:r911
2003-12-13 23:32:57 +00:00
Roger Dingledine
4d3d99fa0c
extend smartlist with a few smarter operations
...
svn:r910
2003-12-13 23:32:03 +00:00
Roger Dingledine
8222fe8e4f
clean up some copyrights
...
svn:r907
2003-12-13 22:53:17 +00:00
Roger Dingledine
03616803e6
bughunt: start tracking the bug mutiny found
...
svn:r906
2003-12-13 08:06:03 +00:00
Roger Dingledine
7a3a3ae1df
bugfix: a circuit that immediately failed still counts as a failed circuit
...
svn:r905
2003-12-13 07:42:18 +00:00
Roger Dingledine
9e6f4a3029
revamp circuit node selection to use smartlists:
...
* now we know for sure if an acceptable node is available; we
don't have to keep guessing and checking
* we try options.EntryNodes first for picking the first node
svn:r904
2003-12-13 07:01:46 +00:00
Roger Dingledine
5458ca39e8
minor tweaks to the smartlist operations
...
svn:r903
2003-12-13 06:56:21 +00:00
Nick Mathewson
911f155f94
Make default exit policy reject 127.*:*
...
svn:r902
2003-12-13 03:37:25 +00:00
Roger Dingledine
41bb717241
reasonably permissive exit policy if you don't set one
...
svn:r901
2003-12-13 02:53:35 +00:00
Roger Dingledine
865173d7a1
put the default exit policy in place
...
svn:r900
2003-12-13 02:52:54 +00:00
Nick Mathewson
f37f7daa2f
Add port ranges to exit policies
...
svn:r899
2003-12-13 02:44:02 +00:00
Roger Dingledine
c425f2e0ec
use the smartlist to pick random routers, rather than our own idiom
...
svn:r898
2003-12-13 01:43:21 +00:00
Roger Dingledine
1ae84fcbc1
add a 'smartlist' building block that picks random elements from a list
...
svn:r897
2003-12-13 01:42:44 +00:00
Roger Dingledine
9c66e2bf9a
if >=2 circs are being built that handle a given stream,
...
no need to have new circs handle it too.
svn:r896
2003-12-12 23:03:25 +00:00
Roger Dingledine
d23c66b041
make the license explicit on fakepoll.[ch]
...
svn:r895
2003-12-09 21:37:26 +00:00
Nick Mathewson
17269eff3c
Document parsing functions in routerlist.c, and separate parsing from non-parsing functions.
...
svn:r894
2003-12-09 04:29:52 +00:00
Roger Dingledine
38ce03d0e7
close the circuit when we get a truncated cell
...
svn:r893
2003-12-09 02:06:58 +00:00
Roger Dingledine
ea6c4f6348
our circuit symmetric key (for aes) is 127 bits, not 128 bits.
...
we accept that.
svn:r892
2003-12-09 01:04:40 +00:00
Roger Dingledine
48e42e9346
back out the broken change from yesterday
...
svn:r891
2003-12-09 01:04:11 +00:00
Nick Mathewson
ac552573dd
Make router/directory parsing nondestructive and more const-friendly
...
svn:r890
2003-12-08 23:45:37 +00:00
Roger Dingledine
8bd7c94bf6
general cleanups
...
svn:r889
2003-12-07 22:03:47 +00:00
Roger Dingledine
6a968495b1
declare the prototypes better
...
svn:r888
2003-12-06 06:01:42 +00:00
Roger Dingledine
c25fbd2676
break routers.c into router.c for stuff the router does,
...
and routerlist.c for handling routerlist.
svn:r887
2003-12-06 05:54:04 +00:00
Roger Dingledine
e0952d0773
terminology shift:
...
directory is the string that dirserv.c and directory.c deal with
routerlist is routerinfo's that are bundled together in routers.c
rename some of the get_routerlist functions to set_routerlist
preparing to break into router.c for stuff the router does,
and routerlist.c for handling routerlist.
svn:r886
2003-12-05 09:51:49 +00:00
Roger Dingledine
727a260a81
prevent assert failure on -HUP when options->PidFile==NULL
...
svn:r885
2003-12-03 22:00:20 +00:00
Roger Dingledine
c183789c96
OnionRouter config option is obsolete
...
svn:r883
2003-12-03 20:21:03 +00:00
Roger Dingledine
4f2d556508
choose randomly from running dirservers, not always the first one
...
svn:r881
2003-12-03 10:39:27 +00:00
Roger Dingledine
63f81bddae
pick nodes for a circuit only from those the directory says are up
...
svn:r880
2003-12-03 10:28:51 +00:00
Roger Dingledine
99db996aef
stop segfault when choose_good_exit_server returns NULL
...
svn:r879
2003-12-03 10:04:44 +00:00
Roger Dingledine
d172fdd300
fix vicious bug in connection_ap_attach_pending that caused it to
...
never work.
fix vicious bug in choose_good_exit_server that caused it to *skip over*
pending circuits, and look only at *non-pending circuits*, when choosing
a good exit node for the new circuit.
bugfix: remove incorrect asserts in circuit_get_newest()
svn:r876
2003-12-03 09:50:02 +00:00
Roger Dingledine
05b9c35173
assert that nobody asks for a random number between 0 and -1
...
svn:r875
2003-12-03 08:08:07 +00:00
Roger Dingledine
f65e871bfd
bugfix in exit node choice: we used to find the perfect exit node but then use the wrong one.
...
bugfix in connection_ap_can_use_exit: it was using the wrong port
bugfix: the OP now handles a port of '*' correctly when the IP is not
yet known and it's trying to guess whether a router's exit policy
might accept it.
we now don't ever pick exit routers which will reject *:*
attach_circuit now fails a new stream outright if it will never work.
when you get an 'end' cell that resolves an IP, now it will fail the circuit outright if no safe exit nodes exist for that IP.
don't try building a new circuit after an 'end' if a suitable one is
already on the way.
svn:r874
2003-12-03 08:06:55 +00:00
Roger Dingledine
fc98ca1a2d
stop expecting sample-server-torrc to be there
...
svn:r873
2003-12-02 22:43:23 +00:00
Roger Dingledine
af4192b172
start tracking a rare bug: package_raw_inbuf gets called with package_window 0
...
Nov 25 22:39:18.294 [warn] connection_edge_package_raw_inbuf(): called with package_window 0. T
ell Roger.
svn:r870
2003-11-30 10:10:29 +00:00
Roger Dingledine
3d37291e02
stop complaining as loudly when a dns resolve fails
...
svn:r869
2003-11-30 09:57:00 +00:00
Roger Dingledine
02ec2cdb34
bugfix: we were writing to stderr even when it's closed
...
svn:r868
2003-11-30 09:51:35 +00:00
Roger Dingledine
2de4fc2b7f
bump up header length when the dirserv reads http commands
...
Nov 23 12:10:26.556 [warn] fetch_from_buf_http(): headerlen 1487 larger than 1023. Failing.
Nov 23 12:10:26.556 [warn] directory_handle_command(): input too large. Failing.
svn:r867
2003-11-30 09:47:57 +00:00
Roger Dingledine
3818776f62
remove a conn_close_if_marked warning
...
Nov 27 15:45:19.003 [warn] connection_write_to_buf(): write_to_buf failed. Closing connection (fd 42).
Nov 27 15:45:19.010 [warn] conn_close_if_marked(): Conn (socket 42) still wants to flush. Losing 0 bytes!
svn:r866
2003-11-30 09:35:26 +00:00
Roger Dingledine
00de055f43
bugfix: an offline OP would leak all its sockets and stop working
...
svn:r865
2003-11-29 02:50:12 +00:00
Nick Mathewson
c52ee5e2af
Fix a few bugs in sending and receiving DNS results
...
svn:r864
2003-11-23 18:16:06 +00:00
Nick Mathewson
1155ae9b03
Bring assert_connection_ok up to date
...
svn:r863
2003-11-23 18:14:19 +00:00
Nick Mathewson
5e9ba094bc
Fix incorrect error message
...
svn:r862
2003-11-21 05:55:03 +00:00
Roger Dingledine
f53fe3cd7f
merge torrc.in and sample-server-torrc.in
...
svn:r858
2003-11-20 18:22:09 +00:00
Roger Dingledine
975bb68010
simplify: options.OnionRouter==1 iff options.ORPort>0
...
svn:r857
2003-11-20 17:49:45 +00:00
Roger Dingledine
91cf5e44cc
default log level is now warn
...
(info is too noisy)
svn:r855
2003-11-19 22:48:48 +00:00
Roger Dingledine
d6601f8cff
make pidfile default to null rather than writing to your cwd
...
svn:r853
2003-11-19 22:45:06 +00:00
Roger Dingledine
4565150db2
if you tell people that IgnoreVersion exists,
...
some of them will use it rather than upgrade.
svn:r852
2003-11-19 21:24:04 +00:00
Roger Dingledine
f5994416c4
bugfix and cleanups
...
svn:r848
2003-11-19 13:12:43 +00:00
Nick Mathewson
fd07872a72
Separate failure-count tracking from circuit-launching.
...
Increment failure counts only when circuits close without having been built.
Reset failure counts only on the second, and when circuits are done building.
svn:r847
2003-11-19 02:22:52 +00:00
Peter Palfrader
9a676b04dd
Check that we can write to the logfile and log a warning to stderr if we can't
...
Move writing of pidfile after daemonizing, and also after setting the [ug]id:
This means that the tor user needs write priviliges to the pidfile location.
It needs it for unlinking the pidfile anyway.
svn:r846
2003-11-19 02:09:43 +00:00
Nick Mathewson
3d145769de
Patch last patch to last patch
...
svn:r845
2003-11-19 01:35:44 +00:00
Nick Mathewson
312208eff1
removed unused variable; silence warning
...
svn:r844
2003-11-19 01:32:34 +00:00
Nick Mathewson
dde0eb6570
Patch last patch.
...
svn:r843
2003-11-19 01:28:57 +00:00
Nick Mathewson
0e5abcb635
Skip non-running routers for exit node selection
...
svn:r842
2003-11-19 01:24:19 +00:00
Roger Dingledine
25ac8857f3
bugfix: sometimes we closed a circ while cpuworker was cranking,
...
and it didn't notice
svn:r841
2003-11-18 21:12:17 +00:00
Roger Dingledine
a6595f4579
revert part of that last change
...
time for bed
svn:r840
2003-11-18 10:38:13 +00:00
Roger Dingledine
c00953d2a1
make more sure we can't end up with two connections to the same OR
...
fix leaked pk in connection_tls_finish_handshake
svn:r839
2003-11-18 10:17:52 +00:00
Roger Dingledine
f0cccc567e
bugfix: don't ask for ->next of an expired circuit
...
bugfix: keep going when a circ fails in circuit_n_conn_open
(make circuit_enumerate_by_naddr_nport obsolete)
bugfix: make circuit_n_conn_open only look at circ's that start at us
bugfix: only try circuit_n_conn_open if we're an OP. Otherwise we
expect connections to always already be up.
bugfix: when choosing path length, pay attention to whether the directory
says a router is down.
bugfix: when picking good exit, skip routers which are known to be down
(more work needs to be done on this one)
svn:r838
2003-11-18 09:53:03 +00:00
Roger Dingledine
ac56486bf6
use the tor_malloc_zero wrapper
...
svn:r837
2003-11-18 08:20:19 +00:00
Roger Dingledine
ec02f83f94
add a tor_malloc_zero wrapper: tor_malloc and memset 0
...
svn:r836
2003-11-18 08:20:09 +00:00
Roger Dingledine
a3e39b0ceb
don't build too many circs at once
...
expire circs that have been building for too long
svn:r835
2003-11-18 07:48:00 +00:00
Nick Mathewson
bb0e409fbd
Simplify post-TLS-handshake checks, and add check for correct nickname
...
svn:r834
2003-11-18 07:25:04 +00:00
Nick Mathewson
dd16a9abcb
Stop leaking X509 certs; those things are _nasty_ on the carpet
...
svn:r833
2003-11-18 06:52:25 +00:00
Nick Mathewson
366ba4a7c7
Always include newline with port section of exit policy
...
svn:r832
2003-11-18 06:51:29 +00:00
Roger Dingledine
51de02bcb5
stop client_dns_clean from calling malloc(0)
...
svn:r831
2003-11-18 00:02:24 +00:00
Nick Mathewson
4eabb8450e
Fix possible bug in circID selection when building circuits on combination OP/OR servers
...
svn:r830
2003-11-17 18:40:56 +00:00
Roger Dingledine
7a702d64d4
more verbose info for circuits when kill -USR1
...
svn:r829
2003-11-17 09:30:29 +00:00
Nick Mathewson
f42c77f618
"I don't think it's quite fair to condemn a whole program because of a
...
single slip-up."
-- General "Buck" Turgidson, _Doctor Strangelove_
svn:r828
2003-11-17 08:15:37 +00:00
Roger Dingledine
a18ced652b
finally find and possibly fix the circuit_deliver_relay_cell warn bug
...
svn:r827
2003-11-17 07:43:03 +00:00
Nick Mathewson
44ced0952f
Fix bytesex issues on in.s_addr
...
svn:r826
2003-11-17 07:37:45 +00:00
Roger Dingledine
42b5ed754f
catch the last missing log line i hope
...
svn:r825
2003-11-17 07:29:43 +00:00
Nick Mathewson
90e143e6d4
Remove a possible source of error in circID picking.
...
svn:r824
2003-11-17 07:24:01 +00:00
Roger Dingledine
e5d6e7db1a
continue the circuit_deliver_relay_cell forward-failure bughunt
...
svn:r823
2003-11-17 07:20:51 +00:00
Nick Mathewson
ac5fc456ee
comment choose_good_exit_server
...
svn:r822
2003-11-17 06:02:41 +00:00
Roger Dingledine
851b0933f5
trivial bugfixes
...
svn:r821
2003-11-17 01:23:15 +00:00
Nick Mathewson
53ab335787
Fix a segfault caused by a weird logic error and masked by another.
...
svn:r820
2003-11-17 01:20:35 +00:00
Roger Dingledine
4aede010b9
recognize in-progress circs and don't start redundant ones
...
quickly notice streams that don't have a circ on the way, and start one
svn:r819
2003-11-17 00:57:56 +00:00
Roger Dingledine
5e81e4748e
bugfixes
...
svn:r818
2003-11-16 23:43:08 +00:00
Roger Dingledine
6d0e611fde
change when circuits are built and expired
...
not quite happy with it yet
svn:r817
2003-11-16 21:49:52 +00:00
Roger Dingledine
f5089681f7
bugfix: if you recognize a relay cell, don't also pass it on.
...
svn:r816
2003-11-16 17:31:19 +00:00
Roger Dingledine
b5e84e24ae
dump exit policies correctly to descriptor
...
svn:r815
2003-11-16 17:15:40 +00:00
Roger Dingledine
fe856406be
initial patches on patches
...
svn:r814
2003-11-16 17:00:02 +00:00
Nick Mathewson
8a17d9e5d3
Finish implementing the rest of the exitpolicy stuff, except for automatically starting circuit builds.
...
svn:r813
2003-11-16 05:33:45 +00:00
Nick Mathewson
a8eaa79e03
Improved exit policy syntax; basic client-side DNS caching.
...
- Exit policies now support bitmasks (18.0.0.0/255.0.0.0) and bitcounts
18.0.0.0/8. Policies are parsed on startup, not when comparing to them.
- desired_path_len is now part of an opaque cpath_build_state_t structure.
- END_REASON_EXITPOLICY cells no longer include a port.
- RELAY_COMMAND_CONNECTED cells now include the IP address we've connected
to.
- connection_edge now has a client_dns cache to remember resolved addresses.
It gets populated by RELAY_COMMAND_CONNECTED cells and END_REASON_EXITPOLICY
cells. It gets used by connection_ap_handshake_send_begin. We don't
compare it to exit policies yet.
svn:r812
2003-11-14 20:45:47 +00:00
Roger Dingledine
273da1d3c4
commencing the bughunt
...
svn:r811
2003-11-14 07:15:52 +00:00
Roger Dingledine
c8639b2bbc
bump default pathlen to 3; clean up surrounding code
...
svn:r810
2003-11-13 23:01:56 +00:00
Roger Dingledine
56cd147eb9
let getconfig survive repeated calls. now we call it again when we hup.
...
change RecommendedVersions into a config option, so dirservers can hup
for a new one
svn:r809
2003-11-13 06:49:25 +00:00
Roger Dingledine
cc8ce64cb2
fix trivial typo
...
svn:r808
2003-11-13 06:45:59 +00:00
Roger Dingledine
aac29076da
warn on startup that we don't provide anonymity
...
make exit dns cache entries last 15 minutes
svn:r807
2003-11-13 04:51:34 +00:00
Roger Dingledine
f5829aa723
lay groundwork for EntryNodes and ExitNodes
...
svn:r805
2003-11-12 19:34:34 +00:00
Roger Dingledine
9358381d83
break out the string manipulation routines
...
svn:r804
2003-11-12 19:34:19 +00:00
Roger Dingledine
4ba8bc0a73
make dir parsing robust to invalid but well-formed descriptors
...
svn:r800
2003-11-12 05:12:51 +00:00
Nick Mathewson
5e4b9c6b61
Remove minor biasing problem from crypto_pseudo_rand_int
...
svn:r799
2003-11-12 04:28:30 +00:00
Roger Dingledine
7e4cb9a750
connection_ap_handshake_send_begin always succeeds
...
svn:r798
2003-11-12 04:24:04 +00:00
Nick Mathewson
785f5cdac8
Make crypto_pseudo_rand* never fail.
...
svn:r797
2003-11-12 04:12:35 +00:00
Nick Mathewson
99a6d48f62
Restore erroneously removed assert
...
svn:r796
2003-11-12 03:48:33 +00:00
Nick Mathewson
e0ad4d08be
Fix thinko: Failure and success are different things.
...
svn:r795
2003-11-12 03:01:38 +00:00
Nick Mathewson
2e05b9ccf9
Remove dead code
...
svn:r794
2003-11-12 02:58:45 +00:00
Nick Mathewson
7d441ec6b4
Compute paths as we build them.
...
svn:r793
2003-11-12 02:55:38 +00:00
Nick Mathewson
e6296a4e2f
Refactor onion_generate_cpath to build cpaths one hop at a time. This
...
is a the first step in computing hops one step at a time. Next, we move
the responsibility for calling onion_extend_cpath into circuit.c
(Later, we may want to special-case onion_extend_cpath to treat entry
and exit routers differently.)
svn:r792
2003-11-12 02:32:20 +00:00
Roger Dingledine
9a0a638c02
point out bug
...
svn:r791
2003-11-11 19:47:51 +00:00
Roger Dingledine
9c8a54a39f
more cleanups and bugfix
...
svn:r790
2003-11-11 17:21:35 +00:00
Roger Dingledine
5a6bb0333e
leave conn->socks_request around after the begin
...
that way we can reuse it if we need to try another begin later
svn:r788
2003-11-11 06:42:10 +00:00
Roger Dingledine
84884a79c0
conn->socks_version is obsolete
...
svn:r787
2003-11-11 04:13:37 +00:00
Roger Dingledine
2a3479af5f
respond to nick's questions
...
svn:r786
2003-11-11 04:09:34 +00:00
Roger Dingledine
3d19a9b514
fix a bug in handling clock skew
...
svn:r785
2003-11-11 04:08:30 +00:00
Nick Mathewson
7bde42676b
Rename aci to circ_id throughout.
...
svn:r784
2003-11-11 03:01:48 +00:00
Nick Mathewson
dafb0e6a6e
Make AP connections wait for a circuit if none exists.
...
Also:
- Refactor socks request into a separate struct
- Add a separate 'waiting for circuit' state to AP connections
between 'waiting for socks' and 'open'.
Arma: can you check out the XXX's I've added to connection_edge? I may
be mishandling some async and close logic.
svn:r783
2003-11-11 02:41:31 +00:00
Roger Dingledine
1969c8a92f
client now survives going offline better
...
fix badness in usage()
if neither socksport nor orrport is defined, quit
obsolete connection_flush_buf()
svn:r780
2003-11-10 08:06:55 +00:00
Nick Mathewson
3c4b4c8cac
Check in a working cross-platform timegm
...
svn:r779
2003-11-10 06:28:53 +00:00
Nick Mathewson
3dddcf4306
Add lots of logging to dns.c; change behavior of often-failing assertion
...
svn:r778
2003-11-08 04:02:05 +00:00
Roger Dingledine
a27b570788
bugfix for win32 with lots of users
...
plus general cleanup on switch_id()
svn:r684
2003-10-27 10:26:44 +00:00
Roger Dingledine
aee3769cf3
remove obsolete config file
...
svn:r681
2003-10-27 10:09:09 +00:00
Roger Dingledine
52589289fe
add DirBindAddress, parse the BindAddress's when you bind
...
exit if bind fails
add usage printfs
rearrange config options for readability
svn:r674
2003-10-25 12:01:09 +00:00
Nick Mathewson
faa0f7ffe7
Use daemon(3) function where available.
...
svn:r665
2003-10-23 14:28:44 +00:00
Nick Mathewson
71e5ad714b
resolve warning
...
svn:r664
2003-10-23 14:27:53 +00:00
Nick Mathewson
6b79d8a7e9
Two-pronged attack at my overzealous skew fixes.
...
The problem was that the fixes had us generating TLS certs with a
2-day lifetime on the assumption that we'd rotate fairly often. In
fact, we never rotate our TLS keys.
This patch fixes the situation in 2 ways:
1. It bumps the default lifetime back up to one year until we get
rotation in place.
2. It changes tor_tls_context_new() so that it doesn't leak memory
when you call it more than once.
svn:r663
2003-10-23 14:20:51 +00:00
Steven Hazel
4fef6f4566
switch_id() no longer tries to log the user name when it's calld on
...
Windows, since we don't know whether it's the user or the group that
was set.
svn:r659
2003-10-22 17:25:58 +00:00
Nick Mathewson
7604cfe61b
Clock skew fixes.
...
Allow some slop (currently 3 minutes) when checking certificate validity.
Change certificate lifetime from 1 year to 2 days. Since we
regenerate regularly (we regenerate regularly, right??), this
shouldn't be a problem.
Have directories reject descriptors published too far in the future
(currently 30 minutes). If dirservs don't do this:
0) Today is January 1, 2000.
1) A very skewed server publishes descriptor X with a declared
publication time of August 1, 2000.
2) The directory includes X.
3) Because of certificate lifetime issues, nobody can use the
skewed server.
4) The server fixes its skew, and goes to republish a new descriptor Y
with publication time of January 1, 2000.
5) But because the directory already has a "more recent" descriptor X,
it rejects descriptor "Y" as superseded!
This patch should make step 2 go away.
svn:r658
2003-10-22 16:41:35 +00:00
Steven Hazel
4139c1c86a
- fixed a bug in the id switching code -- setgid has to happen before
...
setuid, because after we setuid we don't have the priviledges we
need to setgid anymore, duh. merged switch_user() and
switch_group() into switch_id(), since that code has to be wound
together.
- return -1 from switch_id() if it's not defined to do anything else.
- moved daemoinize(), write_pidfile(), and switch_id() from main.c to
util.c
svn:r656
2003-10-22 11:21:29 +00:00
Roger Dingledine
c78d5d7d30
play with connection_edge_send_command
...
maybe more robust now
svn:r655
2003-10-22 09:08:10 +00:00
Roger Dingledine
c35fc271d2
move default exit policy into config files
...
svn:r654
2003-10-22 07:56:11 +00:00
Roger Dingledine
c6b442a346
make end relay cells have payloads
...
move default exit policy into config files
svn:r653
2003-10-22 07:55:44 +00:00
Steven Hazel
b1eca56b77
added User and Group options -- if you set them, tor will try to
...
setuid and setgid respectively, and die if it can't.
(If the User option is set, tor will setgid to the user's gid as well.)
This happens after the pidfile is created, so that in cases where tor
needs to be root to work with the pidfile, it will at least be able to
create it, although it won't be able to delete it. That sucks, but
it's somewhat better than not being able to create the pidfile in the
first place.
svn:r652
2003-10-22 06:03:11 +00:00
Nick Mathewson
009f2f6dbb
Update .cvsignores to exclude files generated due to recent build improvements
...
svn:r647
2003-10-21 17:49:52 +00:00
Roger Dingledine
0e137e413f
APPort is now SocksPort
...
svn:r644
2003-10-21 09:49:39 +00:00
Roger Dingledine
069227db5b
introduce new tor_free() macro
...
svn:r643
2003-10-21 09:48:58 +00:00
Roger Dingledine
e4127e4d36
move closer to being able to reload config on HUP
...
rename APPort to SocksPort
introduce new tor_free() macro
svn:r642
2003-10-21 09:48:17 +00:00
Roger Dingledine
80d428b225
remove obsolete config file
...
svn:r641
2003-10-21 09:22:38 +00:00
Roger Dingledine
4a66865d0b
send the end cell when we realize we're going to end,
...
not when we're closing the stream.
this lets us put a payload in the end cell if we want to,
to describe why we're closing the stream.
there are still some places where we don't send the end cell
immediately. i need to track them down. but it's a low priority,
since i've made it send the end cell when we close the stream if
we haven't already sent it.
svn:r640
2003-10-21 08:37:07 +00:00
Roger Dingledine
5f1750a288
include our own timegm() impl, since it's not portable
...
svn:r635
2003-10-20 20:19:59 +00:00
Roger Dingledine
b40d0bffa7
a skeletal print_usage() function
...
svn:r634
2003-10-20 01:19:54 +00:00
Roger Dingledine
db33eac4c4
add an Address line to the sample server rc file
...
svn:r633
2003-10-19 05:50:52 +00:00
Roger Dingledine
b4117d2a37
move to 0.0.2pre13
...
svn:r631
2003-10-19 05:45:22 +00:00
Roger Dingledine
dc85b7af3c
warn, not err
...
svn:r630
2003-10-19 01:15:36 +00:00
Roger Dingledine
efce1b8b3e
put small buffers back in place
...
svn:r629
2003-10-19 01:10:38 +00:00
Nick Mathewson
0142a568d3
Example code to get nickname from cert
...
svn:r628
2003-10-19 00:47:03 +00:00
Nick Mathewson
0ec2a34a1d
Code to get nicknames from peer certs
...
svn:r627
2003-10-19 00:46:51 +00:00
Roger Dingledine
ec96419109
let tls tolerate reallocing the buf
...
and also remember the params for ssl_write if it returns wantread.
svn:r626
2003-10-19 00:39:48 +00:00
Roger Dingledine
c627ba2632
first steps toward a WANTWRITE SSL_write tls bug fix
...
how exactly the same do the arguments need to be? :(
svn:r625
2003-10-18 08:00:19 +00:00
Roger Dingledine
9d3f2b232b
another minor memory leak
...
make dnsconn->address reflect what it's currently resolving
svn:r624
2003-10-18 07:09:09 +00:00
Roger Dingledine
61e180ceb1
start to track down the 'peer has invalid cert' bug
...
svn:r623
2003-10-18 06:48:46 +00:00
Roger Dingledine
a73a3a21f7
no more memory leaks
...
when you run it under normal operation
for as many as three minutes
svn:r622
2003-10-18 04:18:26 +00:00
Roger Dingledine
a3962bf6fc
fix two more memory problems
...
one remains :)
svn:r621
2003-10-18 03:23:26 +00:00
Roger Dingledine
af3fc006a5
clean up memory leaks, confusions
...
still one memory leak remaining here.
svn:r620
2003-10-18 02:18:22 +00:00
Roger Dingledine
2093f60760
we've been stomping on memory while reading config
...
doesn't seem to have bitten us yet, but let's fix that :)
svn:r619
2003-10-18 01:28:39 +00:00
Roger Dingledine
193383b70a
log to stdout while parsing config,
...
otherwise we log to nothing and give no feedback!
svn:r617
2003-10-18 00:13:08 +00:00
Roger Dingledine
82aa621b47
rewrite close_logs so it could possibly work
...
remove deadbeef memory-clobber testing (for now)
svn:r616
2003-10-18 00:07:58 +00:00
Roger Dingledine
35dcfcb145
put a blank line in the directory, before the first router
...
this makes it easier to read (at least for me)
svn:r613
2003-10-17 10:24:58 +00:00
Roger Dingledine
f96f964a19
try to make cvs more stable for now. need to test this more in a bit.
...
svn:r612
2003-10-17 10:00:01 +00:00
Roger Dingledine
0b1afa951e
reload the fingerprints file on HUP
...
svn:r611
2003-10-17 05:23:48 +00:00
Roger Dingledine
5c563939ef
catch misconfigured machines that return hostname as fqdn
...
svn:r610
2003-10-17 04:48:20 +00:00
Nick Mathewson
f32c1c3127
Log TLS errors even harder
...
svn:r604
2003-10-15 23:50:25 +00:00
Nick Mathewson
f81178a312
Add more logging on some ssl errors.
...
svn:r603
2003-10-15 23:42:44 +00:00
Roger Dingledine
b3471bbc55
closing stdout *should* be safe (we'll see)
...
svn:r601
2003-10-15 19:27:51 +00:00
Nick Mathewson
ba9b542e93
Report delivery cell fullness correctly
...
svn:r600
2003-10-15 19:25:28 +00:00
Roger Dingledine
afd8fa5a97
change buf->buf to buf->mem
...
maybe this will mean fewer dumb errors
svn:r599
2003-10-15 19:17:21 +00:00
Nick Mathewson
75170f052b
fix bug with overzealous shrinking; add more comments.
...
svn:r597
2003-10-15 19:07:07 +00:00
Roger Dingledine
11a23fc280
clean up logging, allow user to specify log files
...
If DebugLogFile is specified, log to it at -l debug
If LogFile is specified, log to it at the -l from the commandline
(default info)
If no LogFile *and* not a Daemon, then log to stdout.
Make conn->s = -1 by default (this might break things)
When kill -USR1, prefer to log at INFO, but make sure they always see it.
svn:r596
2003-10-15 18:50:16 +00:00
Nick Mathewson
695920d09f
Build without warnings on OS X.
...
svn:r595
2003-10-15 18:48:48 +00:00
Nick Mathewson
22ef733058
Make add_file_log return 0 on success.
...
svn:r594
2003-10-15 18:38:38 +00:00
Nick Mathewson
7432d97336
Make last commit build
...
svn:r593
2003-10-15 18:37:19 +00:00
Nick Mathewson
959b5585a5
Stop using stdout for non-debugging cases
...
svn:r592
2003-10-15 18:28:32 +00:00
Roger Dingledine
4f1a84b772
and in OP config files
...
svn:r589
2003-10-15 07:27:29 +00:00
Roger Dingledine
b24b846069
less confusing comments in config files
...
svn:r588
2003-10-15 07:26:39 +00:00
Steven Hazel
a54a65dfb6
- cause configure to create a tor.sh which will have directories set
...
correctly based on how configure was run
- cause tor to guess the location of torrc more intelligently
- cause cause src/config/torrc and src/conf/sample-server-torrc to be
generated with contents that are correct for the way configure was
run
- cause "make install" to put torrc, sample-server-torrc, and
dirservers somewhere intelligent
svn:r587
2003-10-15 07:19:38 +00:00
Roger Dingledine
f5cb7887d9
clean up the sample or rc
...
svn:r585
2003-10-14 03:21:39 +00:00
Roger Dingledine
58ec05877a
make the buffer resize stuff work
...
and make listener connections not have bufs
svn:r584
2003-10-14 03:06:48 +00:00
Nick Mathewson
ee9e54b434
Make buffers grow and shrink as needed.
...
svn:r583
2003-10-14 01:34:31 +00:00
Nick Mathewson
77be56fbdd
Add tor_realloc to mirror tor_malloc
...
svn:r582
2003-10-14 01:11:42 +00:00
Roger Dingledine
6115813de3
i'm a little teapot, short and stout
...
cvs compiles again
svn:r581
2003-10-14 01:10:22 +00:00
Roger Dingledine
737760f071
fix segfault (connecting to dirserver when network is down)
...
svn:r580
2003-10-13 19:58:21 +00:00
Roger Dingledine
411a18e34c
put out 0.0.2pre12
...
(mainly doc and log changes)
svn:r579
2003-10-12 07:19:10 +00:00
Roger Dingledine
4d0b8f00b1
clarify the warning for unrecognized socks version
...
(generally happens when people use tor as an httpd proxy)
svn:r576
2003-10-11 23:38:20 +00:00
Roger Dingledine
8df0eee16a
oops, bugfix
...
svn:r572
2003-10-10 01:50:20 +00:00
Roger Dingledine
b9628f266f
change WARNING to WARN
...
and fix a few typos
svn:r571
2003-10-10 01:48:32 +00:00
Roger Dingledine
36fb8e839d
change WARNING to WARN
...
svn:r570
2003-10-10 01:48:03 +00:00
Nick Mathewson
ecfb36823e
Refactor, rename, and clarify
...
svn:r569
2003-10-09 18:45:14 +00:00
Roger Dingledine
746d64e631
add in basic support for pidfiles
...
(patch courtesy aaron turner)
svn:r565
2003-10-08 08:54:52 +00:00
Roger Dingledine
8b80362c76
0.0.2pre11, new license
...
svn:r564
2003-10-08 04:10:59 +00:00
Nick Mathewson
36939303c9
Update LICENSE and copyright dates.
...
svn:r560
2003-10-08 02:04:08 +00:00
Roger Dingledine
543e4e8fd5
more details to track a warning in tls handshakes
...
plus make exit policy comparisons not always reject
svn:r559
2003-10-07 23:54:02 +00:00
Roger Dingledine
aca4bc5126
successfully parse exit policies on future attempts too
...
svn:r558
2003-10-07 23:25:10 +00:00
Roger Dingledine
c42d928b30
pull exit policies from config into desc_routerinfo
...
svn:r557
2003-10-07 23:04:31 +00:00
Nick Mathewson
3b2943d845
lowercase exit policies.
...
svn:r556
2003-10-07 23:02:37 +00:00
Roger Dingledine
9e30ac2870
obey exit policies for addresses too
...
svn:r555
2003-10-07 22:18:14 +00:00
Nick Mathewson
686fce453b
Stop requiring newline at end of exit policy.
...
svn:r554
2003-10-07 22:15:47 +00:00
Nick Mathewson
499bbe72d4
Add a "router_add_exit_policy_from_string" function.
...
svn:r553
2003-10-07 22:09:09 +00:00
Roger Dingledine
e6847c4420
add ExitPolicy line to config file
...
svn:r552
2003-10-07 22:04:17 +00:00
Roger Dingledine
16778795f3
minor fixes; bump to 0.0.2pre10
...
svn:r551
2003-10-07 21:27:33 +00:00
Nick Mathewson
3d7463d2b3
Clear revents even when no events are received. Also, since everyone gets in exceptions, everyone gets to increment maxfd.
...
svn:r550
2003-10-07 21:16:04 +00:00
Nick Mathewson
74e6c03cab
Hoping to find an fd larger than ((unsigned)-1) is probably a lost cause.
...
svn:r549
2003-10-07 20:45:16 +00:00
Roger Dingledine
f9f091eb0e
do not ask for whom there's an error, it polls for thee
...
svn:r548
2003-10-07 20:02:45 +00:00
Roger Dingledine
0b8a0c3720
give correct warning message when you're running an old version
...
svn:r546
2003-10-07 16:56:27 +00:00
Roger Dingledine
4039eccd6f
and a Makefile.am for src/config/
...
svn:r545
2003-10-07 16:30:38 +00:00
Roger Dingledine
de6cbe53c0
some early bugfixes
...
our log() conflicts with log(3)
distribute only the correct files from doc/ and src/config/
sometimes laptops go back in time. i guess that's ok for now.
and bump the version number because we're live.
svn:r544
2003-10-07 16:30:05 +00:00
Roger Dingledine
b51d2c05a0
no need to trigger an assert if socks handshake is malformed
...
svn:r542
2003-10-06 21:22:12 +00:00
Roger Dingledine
756619bfd2
refactor around connection_edge_send_command()
...
svn:r539
2003-10-04 08:19:23 +00:00
Roger Dingledine
be874358a4
wrap strdup; prefer time() to gettimeofday()
...
svn:r538
2003-10-04 03:29:09 +00:00
Roger Dingledine
f563bbd2f9
refactor so connection_write_to_buf() never fails
...
svn:r537
2003-10-04 02:38:18 +00:00
Roger Dingledine
a6bab569ab
socks5 now works
...
(or at least, we can talk to mozilla.)
svn:r536
2003-10-04 01:37:01 +00:00
Roger Dingledine
750b238aea
clean some includes
...
svn:r535
2003-10-04 01:36:11 +00:00
Nick Mathewson
985a3e1492
Add new cell fullness and bandwidth stats.
...
svn:r533
2003-10-02 20:00:38 +00:00
Nick Mathewson
6ac42f5ec0
Make testcases run again; more sanity checking to descriptor generation.
...
svn:r532
2003-10-01 22:31:13 +00:00
Roger Dingledine
efa8e288ef
my_routerinfo, router_is_me, and learn_my_address are obsolete
...
ACIs are decided now by strcmp'ing nicknames, rather than comparing addr:port
svn:r529
2003-10-01 01:49:53 +00:00
Nick Mathewson
91cf86d8da
rebuild directory before uploading
...
svn:r528
2003-10-01 01:08:20 +00:00
Nick Mathewson
df5c7534b1
Move dirserv/routers code out of main.c
...
svn:r527
2003-10-01 00:43:34 +00:00
Nick Mathewson
f694ab23f5
Flush after fputs
...
svn:r526
2003-10-01 00:42:24 +00:00
Roger Dingledine
01884951bc
updated dirservers file, new config files.
...
svn:r524
2003-09-30 23:25:30 +00:00
Roger Dingledine
2cfc6f0379
ORs post descriptors periodically too
...
svn:r523
2003-09-30 23:06:23 +00:00
Nick Mathewson
bd7db5bd87
Add "platform" to router descriptors.
...
svn:r522
2003-09-30 22:44:33 +00:00
Roger Dingledine
5c8fc2f705
mark all dirservers up at boot; mark a dirserver down if dir fetch fails
...
svn:r519
2003-09-30 21:27:16 +00:00
Roger Dingledine
dc8f40e4cb
fix the SSL_read() bug again. this time for sure!
...
svn:r518
2003-09-30 20:36:20 +00:00
Nick Mathewson
9f0c608b7e
Check router signatures again; debug signature checking
...
svn:r517
2003-09-30 20:05:45 +00:00
Nick Mathewson
1cd57b8466
make sure router descriptor doesnt eat the directory-signature
...
svn:r516
2003-09-30 20:04:40 +00:00
Roger Dingledine
f0e94dab86
make log use a larger buffer, for easier debugging
...
svn:r515
2003-09-30 19:53:25 +00:00
Nick Mathewson
01786266ca
Bugfixes in directory code:
...
Improve debugging output on fingerprint checking.
Make sure to add our own fingerprint to the fingerprint list _before_
adding our own descriptor, or else we'll reject ourself.
Don't call a directory invalid just because we have a newer descriptor
for some router.
Use router_get_dir_hash to generate hashes for signed directories.
Make sure we add our own descriptor successfully.
Don't fall-through on failed base64-endode.
svn:r514
2003-09-30 19:27:54 +00:00
Nick Mathewson
d0273ee135
We need to call get_connection_array before using its outputs
...
svn:r513
2003-09-30 19:25:16 +00:00
Roger Dingledine
2da3e4da0d
move connection_array accessors from main.c to connection.c
...
(leave poll_array accessors in main.c)
svn:r512
2003-09-30 19:06:22 +00:00
Roger Dingledine
e7e858d0d1
patch strptime warning -- reduce portability!
...
svn:r511
2003-09-30 18:47:29 +00:00
Roger Dingledine
013c4e1467
move the tls handshake stuff to connection_or
...
svn:r510
2003-09-30 18:45:55 +00:00
Roger Dingledine
4533da06c9
getting closer to having dirserv working
...
we now add our own descriptor to the descriptor list
and we rebuild the directory (and dump to disk) after receiving a POST
svn:r509
2003-09-30 08:18:10 +00:00
Roger Dingledine
3ed7aedc11
bugfixes and features: closer to making dirserv work
...
fix a variety of seg faults
don't try to list OPs in running-routers
write cached-directory to disk when rebuilding the dir
on boot, dirservers load approved-routers file
on boot, dirservers load cached directory file
svn:r508
2003-09-29 23:14:49 +00:00
Roger Dingledine
467d278b8b
more cleanup and rearranging
...
still not finished integrating new dirserv stuff
svn:r507
2003-09-29 07:50:08 +00:00
Roger Dingledine
5d31f71557
fix two new segfaults
...
svn:r506
2003-09-28 08:06:18 +00:00
Roger Dingledine
c4c66e2c7f
expand the scheduler to address SSL_read()'s pending bytes
...
svn:r505
2003-09-28 06:48:20 +00:00
Roger Dingledine
677707433e
shift read_file_to_str() into util.c
...
svn:r504
2003-09-28 06:47:29 +00:00
Nick Mathewson
0e0169d6fa
Write necessary backends for online directory generation. I think.
...
svn:r503
2003-09-27 21:30:10 +00:00
Roger Dingledine
cb8212bfcb
clean up receiver buckets; prepare for payloads in relay_end; note a few bugs
...
svn:r502
2003-09-27 21:09:56 +00:00
Nick Mathewson
798bb6ab3b
Add function to wrap SSL_pending
...
svn:r501
2003-09-27 20:07:40 +00:00
Roger Dingledine
e835122cc0
remove more pieces of orkeygen
...
svn:r499
2003-09-27 08:40:47 +00:00
Roger Dingledine
0f25887048
clean up connection_assert_ok compiler warnings
...
svn:r498
2003-09-27 07:33:07 +00:00
Roger Dingledine
deac704399
connection_new() can't ever fail
...
svn:r497
2003-09-27 07:28:44 +00:00
Roger Dingledine
9899e09b3b
add Address config element, use it in descriptor
...
svn:r496
2003-09-27 07:21:36 +00:00
Roger Dingledine
d27514b70a
orkeygen is obsolete
...
svn:r495
2003-09-27 05:35:18 +00:00
Roger Dingledine
bf10a3c0f1
finish enforcing the log convention
...
svn:r494
2003-09-26 22:27:24 +00:00
Roger Dingledine
ab8bceb27a
dirservers upload their descs now too
...
svn:r493
2003-09-26 22:02:02 +00:00
Roger Dingledine
d8f646c44f
make writing descs work
...
svn:r492
2003-09-26 21:26:25 +00:00
Roger Dingledine
a970cd7cfa
update the cvsignore
...
svn:r491
2003-09-26 21:16:57 +00:00
Nick Mathewson
febb2251ca
Add code to parse fingerprint files and compare routers against fingerprint files.
...
svn:r490
2003-09-26 20:41:23 +00:00
Nick Mathewson
a3e08a0119
Bugfixes in crypto_pk_write_private_key_to_filename
...
svn:r489
2003-09-26 18:44:20 +00:00
Nick Mathewson
92acbe12bc
Refactor common file code into util.c; add published to descriptors
...
svn:r487
2003-09-26 18:27:35 +00:00
Roger Dingledine
9e5cafc395
first pass: obey log convention
...
ERR is if something fatal just happened
WARNING is something bad happened, but we're still running. The bad thing
is either a bug in the code, an attack or buggy protocol/implementation
of the remote peer, etc. The operator should examine the bad thing and
try to correct it.
(No error or warning messages should be expected. I expect most people
to run on -l warning eventually.)
NOTICE is never ever used.
INFO means something happened (maybe bad, maybe ok), but there's nothing
you need to (or can) do about it.
DEBUG is for everything louder than INFO.
svn:r486
2003-09-26 10:03:50 +00:00
Roger Dingledine
3b5191d36d
various bugfixes and updates
...
redo all the config files for the new format (we'll redo them again soon)
fix (another! yuck) segfault in log_fn when input is too large
tor_tls_context_new() returns -1 for error, not NULL
fix segfault in check_conn_marked() on conn's that die during tls handshake
make ORs also initialize conn from router when we're the receiving node
make non-dirserver ORs upload descriptor to every dirserver on startup
add our local address to the descriptor
add Content-Length field to POST command
revert the Content-Length search in fetch_from_buf_http() to previous code
fix segfault in memmove in fetch_from_buf_http()
raise maximum allowed headers/body size in directory.c
svn:r484
2003-09-25 10:42:07 +00:00
Nick Mathewson
3d4ccb781a
Refactor buffers; implement descriptors.
...
'buf_t' is now an opaque type defined in buffers.c .
Router descriptors now include all keys; routers generate keys as
needed on startup (in a newly defined "data directory"), and generate
their own descriptors. Descriptors are now self-signed.
Implementation is not complete: descriptors are never published; and
upon receiving a descriptor, the directory doesn't do anything with
it.
At least "routers.or" and orkeygen are now obsolete, BTW.
svn:r483
2003-09-25 05:17:11 +00:00
Roger Dingledine
40d0fca63a
cleanups, bugfixes, more verbose logs
...
Fixed up the assert_*_ok funcs some (more work remains)
Changed config so it reads either /etc/torrc or the -f arg, never both
Finally tracked down a nasty bug with our use of tls:
It turns out that if you ask SSL_read() for no more than n bytes, it
will read the entire record from the network (and maybe part of the next
record, I'm not sure), give you n bytes of it, and keep the remaining
bytes internally. This is fine, except our poll-for-read looks at the
network, and there are no bytes pending on the network, so we never know
to ask SSL_read() for more bytes. Currently I've hacked it so if we ask
for n bytes and it returns n bytes, then it reads again right then. This
will interact poorly with our rate limiting; we need a cleaner solution.
svn:r481
2003-09-24 21:24:52 +00:00
Roger Dingledine
a93b44eb3b
integrate assert_connection_ok() checks
...
svn:r479
2003-09-23 19:47:41 +00:00
Roger Dingledine
9cb746ac2e
call it tor, not or
...
svn:r478
2003-09-22 06:22:08 +00:00
Roger Dingledine
39fd5dd405
it's safe to do parallel directory fetches/uploads
...
svn:r477
2003-09-22 06:22:00 +00:00
Roger Dingledine
9fe1ed26ff
get network/host order working right again for socks4
...
svn:r476
2003-09-21 06:44:53 +00:00
Roger Dingledine
ed51df7453
bugfixes and note missing features
...
deal with content-length headers better when reading http
don't assume struct socks4_info is a packed struct
fail the socks handshake if destip is zero
flesh out conn_state_to_string() for dir conn
fix typo (bug) in connection_handle_read()
directory get is now called fetch, post is now upload
reopen logs on sighup
svn:r475
2003-09-21 06:15:43 +00:00
Roger Dingledine
e514ac528c
fix a segfault on truncated log lines
...
svn:r473
2003-09-19 09:30:34 +00:00
Roger Dingledine
078c5ab617
leave the socks handshake on the inbuf until it's complete
...
this paves the way for supporting socks5 and other handshakes
it also removes those pesky AP-only variables from connection_t
also hacked a fix for a bug where some streams weren't ending properly --
maybe because marked connections weren't flushing properly?
svn:r472
2003-09-18 08:11:31 +00:00
Roger Dingledine
b97945e411
add in directory 'post' support
...
svn:r471
2003-09-17 20:09:06 +00:00
Roger Dingledine
a66669859e
phase out non-tls handshake, now that tls is stable.
...
svn:r470
2003-09-16 21:20:09 +00:00
Roger Dingledine
6f46316c31
bugfixes and refactorings
...
svn:r468
2003-09-16 20:57:09 +00:00
Nick Mathewson
5f9ac2bdfd
More fine-grained logging messages on ZeroReturn/Syscall error cases
...
svn:r467
2003-09-16 20:53:09 +00:00
Nick Mathewson
3f3f8921f6
Make sequential ACI selection logic handle HIGHER/LOWER
...
svn:r466
2003-09-16 20:13:43 +00:00
Nick Mathewson
4dddac706d
Use EXIT properly in assert_connection_ok
...
svn:r465
2003-09-16 19:51:09 +00:00
Nick Mathewson
1b9c2f35eb
Add first cut of assert_*_ok functions
...
svn:r464
2003-09-16 19:36:19 +00:00
Nick Mathewson
7711c2e745
Add backend support for multiple logfiles, including console logs.
...
Also optimize logging by formatting messages in memory before sending
them through stdio. (It turns out (according to gprof) that logging
performance matters.)
svn:r463
2003-09-16 17:58:36 +00:00
Nick Mathewson
c09de55fb8
Add #ifdef'd code (on by default) to allocate ACIs sequentially.
...
svn:r462
2003-09-16 17:17:39 +00:00
Roger Dingledine
8b71b7338f
clean up exported api's
...
svn:r461
2003-09-16 05:41:49 +00:00
Roger Dingledine
9c6343fdf8
refactor connects into connection_connect()
...
svn:r460
2003-09-16 01:58:46 +00:00
Nick Mathewson
e4dfc3c8fe
Cipher lists need to be colon separated. Also make initialization more bulletproof
...
svn:r459
2003-09-15 19:38:52 +00:00
Nick Mathewson
633a5ffc0b
Fix TLS error logging
...
svn:r458
2003-09-15 18:37:49 +00:00
Nick Mathewson
408bff4a23
Log protocol errors
...
svn:r457
2003-09-15 18:18:37 +00:00
Roger Dingledine
ebc23f690c
bugfix: onion pending queue now works
...
and fixed recent memory leak
svn:r456
2003-09-14 08:17:14 +00:00
Roger Dingledine
b63013e847
finally tracked down the seg fault
...
svn:r455
2003-09-14 06:43:18 +00:00
Roger Dingledine
e585dad887
fix the cpuworker circ-had-vanished bug (maybe)
...
still several (many) tls-related bugs outstanding.
svn:r454
2003-09-14 02:58:50 +00:00
Roger Dingledine
05612786e4
fix two more bugs
...
svn:r452
2003-09-13 21:53:38 +00:00
Roger Dingledine
31bf3ec420
reshuffle functions for cleaner organization
...
svn:r451
2003-09-12 22:45:31 +00:00
Roger Dingledine
1738af9620
tls works between routers now too
...
things are still a bit shaky
svn:r450
2003-09-12 06:50:21 +00:00
Roger Dingledine
b1078b7a3c
tls works with onion proxies now.
...
svn:r449
2003-09-12 06:20:36 +00:00
Roger Dingledine
556bea4b6d
serious bug in cpuworker. need to think about redesign or how to handle it.
...
svn:r448
2003-09-12 06:18:38 +00:00
Nick Mathewson
001cd08b2e
Fix bugs in certificate generation and SSL context creation. Both seem to work now.
...
svn:r447
2003-09-11 23:26:31 +00:00
Roger Dingledine
ec23ebc4e6
update onion router configs for tls
...
svn:r446
2003-09-11 22:20:16 +00:00
Roger Dingledine
fa1bfaa349
check for funny business from the remote peer
...
svn:r445
2003-09-11 22:19:48 +00:00
Nick Mathewson
5082ee8ae0
Non-debugging messages are nice to log too
...
svn:r444
2003-09-11 22:13:13 +00:00
Nick Mathewson
529d3bc56f
Resolve XXXXs in tortls.c
...
svn:r443
2003-09-11 21:38:57 +00:00
Nick Mathewson
f5b4ef1fa2
Simplify some code paths in TLS; cut down on memory leaks; use
...
reasonable ciphers if not everyone has OpenSSL 0.9.7.
svn:r442
2003-09-11 21:12:39 +00:00
Nick Mathewson
36a3086434
Add router_get_by_pk function; use in connection_tls_finish_handshake.
...
svn:r441
2003-09-11 20:32:15 +00:00
Roger Dingledine
0761bc7b83
fix typo that's been bugging me
...
svn:r440
2003-09-11 20:10:39 +00:00
Roger Dingledine
44c3a7c2d7
collect info from peer we just handshaked with
...
svn:r439
2003-09-11 20:06:55 +00:00
Nick Mathewson
e22b271895
Add certificate verification functions
...
svn:r438
2003-09-10 00:47:39 +00:00
Nick Mathewson
9955b265ab
Make crypto structures private to crypto.c
...
svn:r437
2003-09-10 00:47:24 +00:00
Nick Mathewson
67697d5ab1
Add prototypes for functions to check whether the peer certificate is
...
valid (if it is present); and to get a public key from a peer
certificate (in order to identify the peer).
svn:r436
2003-09-10 00:10:37 +00:00
Roger Dingledine
c0f5ddcf33
fix confirmed win32 bug
...
svn:r435
2003-09-08 23:10:24 +00:00
Roger Dingledine
0bac4247ca
tls infrastructure now in place, give or take
...
svn:r434
2003-09-08 10:59:00 +00:00
Roger Dingledine
1a9b5f9de9
another wishlist function for the tls interface
...
svn:r433
2003-09-08 10:46:19 +00:00
Roger Dingledine
a6a5784bca
add CertFile, Nickname
...
write new certfile if you don't have one already
set up a tls context on startup
svn:r432
2003-09-08 06:26:38 +00:00
Roger Dingledine
ace475f01c
hide the global tls context inside tortls.c
...
svn:r431
2003-09-08 06:22:19 +00:00
Roger Dingledine
413c7a19ed
clean up config.c so it doesn't expose as much
...
svn:r430
2003-09-08 05:16:18 +00:00
Roger Dingledine
3fa170e11f
more futzing towards tls
...
not there yet
svn:r429
2003-09-07 10:24:40 +00:00
Roger Dingledine
99035f3520
clean read_to_buf more
...
svn:r428
2003-09-05 11:25:24 +00:00
Roger Dingledine
7a34cdf5ee
general cleanup and reabstraction, to prepare for tls
...
svn:r426
2003-09-05 06:04:03 +00:00
Roger Dingledine
99d1e4931b
move variable declarations to top of function
...
svn:r425
2003-09-05 05:58:21 +00:00
Nick Mathewson
fd20011c26
Add initial interfaces and code for TLS support. Interfaces are right; code needs work and testing.
...
svn:r424
2003-09-04 16:05:08 +00:00
Roger Dingledine
e13d947986
point out why router_forget_router probably doesn't work
...
svn:r422
2003-08-29 21:50:53 +00:00
Nick Mathewson
e14aedaad0
Fix memory leaks in directory parsing
...
svn:r421
2003-08-28 04:21:57 +00:00
Roger Dingledine
7ae853b04c
router formats don't include op_port now either
...
svn:r419
2003-08-27 22:42:39 +00:00
Roger Dingledine
ce289f65f2
remove last vestiges of op_port
...
svn:r418
2003-08-27 22:42:10 +00:00
Roger Dingledine
4c7e936a3a
note an assert bug that's still around
...
svn:r417
2003-08-25 22:02:42 +00:00
Roger Dingledine
90f22933e7
make the conn->package_window bug go away.
...
not resolved, but at least the servers will stop crashing.
svn:r416
2003-08-25 21:43:51 +00:00
Nick Mathewson
14c8bc598b
Attempt to track down bug in conn->package_window
...
svn:r415
2003-08-25 20:57:23 +00:00
Roger Dingledine
0878ceb779
remove bandwidth negotation from the code
...
we still use bandwidth on a per-connection basis for rate
limiting. but it's unclear if we need this infrastructure in
addition to the total-bandwidth rate limiting that we also do.
i'll leave both infrastructures in, and we'll remove the
per-connection one if it starts rotting too much.
svn:r413
2003-08-25 08:28:34 +00:00
Roger Dingledine
58c5d5e918
fix formatting in crypto.c for my sanity
...
svn:r411
2003-08-25 07:06:12 +00:00
Roger Dingledine
215ca90c05
fix a mild memory leak (10 bytes each time an OR connected to an OR)
...
svn:r410
2003-08-25 06:24:17 +00:00
Roger Dingledine
36f055e7ee
start honoring the recommended_versions string
...
your client exits if you're running a version not in the
directory's list of acceptable versions (unless you have a
config variable set to override).
svn:r408
2003-08-23 10:09:25 +00:00
Roger Dingledine
33b0569fba
remove duplicate packagewindow-checking code,
...
see if we can induce that segfault i just saw more often
svn:r407
2003-08-23 10:06:46 +00:00
Roger Dingledine
2dda97e8fd
implemented cpuworkers
...
please poke at it and report bugs
still needs polishing, and only handles onions now (should handle
OR handshakes too)
svn:r402
2003-08-20 23:05:22 +00:00
Roger Dingledine
d43f145ddf
include torint.h in 'make dist'
...
svn:r401
2003-08-14 21:46:24 +00:00
Nick Mathewson
1777487f4e
Tor now builds on win32.
...
svn:r400
2003-08-14 17:51:36 +00:00
Nick Mathewson
adbc057772
Add empty statement to suppress gcc warning about label at end of compount statement
...
svn:r399
2003-08-14 17:16:05 +00:00
Nick Mathewson
cd3467bb01
Attempt to make sockets code work right on windows.
...
svn:r398
2003-08-14 17:13:52 +00:00
Roger Dingledine
88edae9407
start refactoring dnsworker so testing won't be so darn hard
...
add NumCpus config variable in preparation for cpuworkers
hardcode /etc/torrc path for config (simplifies win32 port)
improve exit policy debugging during router entry parsing
svn:r397
2003-08-14 03:52:51 +00:00
Roger Dingledine
e1f2693d05
bugfix: if a dnsworker dies, remember that.
...
svn:r396
2003-08-13 22:38:46 +00:00
Nick Mathewson
9cf01020cc
Misc patches to make windows build work. Now everything is done except the sockets stuff
...
svn:r393
2003-08-12 15:08:51 +00:00
Nick Mathewson
bbd4032fc1
Make windows happier still
...
svn:r392
2003-08-12 08:18:13 +00:00
Roger Dingledine
25c9c837eb
don't mess with signals on windows until we know how
...
svn:r391
2003-08-12 08:04:31 +00:00
Nick Mathewson
9b12a48428
Stop trying to #include the world in util.c
...
svn:r390
2003-08-12 07:49:29 +00:00
Nick Mathewson
2cb4f7a473
Adopt socketpair implementation from perl. For now, always use it.
...
svn:r389
2003-08-12 07:43:15 +00:00
Roger Dingledine
5d9cfb7164
use the spawn_func / spawn_exit abstraction for dnsworkers
...
svn:r388
2003-08-12 07:35:17 +00:00
Nick Mathewson
e4a6ea5c46
Add abstraction for fork vs thread.
...
svn:r387
2003-08-12 07:01:20 +00:00
Nick Mathewson
5c4255595d
Dont use explicit paths for orconfig.h -- it messes up the windows build
...
svn:r386
2003-08-12 06:45:03 +00:00
Roger Dingledine
c82e13f1f5
reap exited dns/cpuworkers
...
svn:r385
2003-08-12 06:41:53 +00:00
Nick Mathewson
2aff21f857
Reorder includes so that fakepoll.c gets built when it should
...
svn:r384
2003-08-12 06:41:40 +00:00
Roger Dingledine
33d484bf10
we must have openssl, so HAVE_OPENSSL is redundant
...
svn:r383
2003-08-12 05:48:26 +00:00
Nick Mathewson
b927c56144
unbork windows line endings
...
svn:r381
2003-08-12 03:16:15 +00:00
Nick Mathewson
c336c99e60
Start of port to win32. Missing are:
...
- signal support
- forking for DNS farm
- changes for async IO
- daemonizing
In other words, some files still don't build, and the ones that do build,
do nonblocking IO incorrectly.
I'm also not checking in the project files till I have a good place
for them.
svn:r380
2003-08-12 03:08:41 +00:00
Nick Mathewson
5126f203f2
Work on systems with broken AC_CHECK_TYPE
...
svn:r379
2003-08-11 23:21:51 +00:00
Nick Mathewson
58e2edfb24
Who would have thought that some systems define intfoo_t, but not uintfoo_t? Cygwin is such a system.
...
svn:r378
2003-08-11 21:16:13 +00:00
Nick Mathewson
7284c25b34
Cope better on platforms that define some of intFOO_t in sys/types.h or elsewhere
...
svn:r377
2003-08-11 20:50:30 +00:00
Nick Mathewson
5267518455
autoconf around missing stdint.h
...
svn:r376
2003-08-11 20:40:21 +00:00
Roger Dingledine
681c7539ef
better log output for debugging
...
svn:r375
2003-08-11 20:22:48 +00:00
Nick Mathewson
17a311d9a0
Fix typo: ports are 16 bits.
...
svn:r374
2003-08-11 19:48:22 +00:00
Roger Dingledine
60d52a7e08
patch to let poll() recognize eof on more architectures
...
svn:r372
2003-08-06 18:38:46 +00:00
Nick Mathewson
ac5893c626
src/or
...
svn:r371
2003-07-30 19:12:03 +00:00
Nick Mathewson
f12fdd62aa
Be smarter about getting key matter from DH.
...
Formerly, once we had g^xy, we took the last N bytes from g^xy.
Now, we take SHA(g^xy || [0]) || SHA1(g^xy || [1]) || ... , in order
to use all bits from g^xy equally, and generate as much key material
as we need.
svn:r370
2003-07-30 19:10:20 +00:00
Roger Dingledine
f8d7cff6ea
switch to aes
...
nick: is this all there is to it? :)
svn:r366
2003-07-08 08:38:24 +00:00
Roger Dingledine
c6f70e36e0
implemented total read rate limiting
...
svn:r365
2003-07-05 07:10:34 +00:00
Roger Dingledine
9f58a2ece4
clean up main.c a bit
...
svn:r364
2003-07-05 05:46:06 +00:00
Roger Dingledine
75440d08c2
fix many bugs in package_window handling
...
svn:r363
2003-07-03 03:40:47 +00:00
Nick Mathewson
300984c057
Add AES counter-mode support to the crypt library
...
svn:r362
2003-06-30 19:18:32 +00:00
Nick Mathewson
a0f1588318
Add a the public-domain AES implementation, with a minimal counter-mode wrapper.
...
svn:r361
2003-06-30 19:18:12 +00:00
Roger Dingledine
517b418b5c
bugfix: a connection-level sendme cell would cause a connection to start
...
packaging from its buffer, even if the circuit-level package-window was
still 0.
svn:r360
2003-06-28 06:17:01 +00:00
Roger Dingledine
f8203505e1
if stream ends before resolve finishes, inform resolver
...
svn:r359
2003-06-27 00:57:04 +00:00
Roger Dingledine
35a37ec3f5
fix memleak in dump_signed_directory_to_string
...
svn:r358
2003-06-26 23:38:21 +00:00
Roger Dingledine
5d13db862e
entries in the dns cache now expire
...
(expiry time set to 100 seconds so we can play with it)
exit connections are now informed when pending resolves fail
we kill off the oldest busy worker when we're under attack and need to
resolve something new
svn:r356
2003-06-25 07:19:30 +00:00
Roger Dingledine
6c9e3762b5
clean up sev_to_string hack in log.c
...
svn:r355
2003-06-25 04:47:54 +00:00
Roger Dingledine
dbf3435cde
simplify fetch_from_buf; cull idle dnsworkers.
...
svn:r354
2003-06-25 00:31:41 +00:00
Roger Dingledine
ad917e7788
non-buggy robustness, even
...
svn:r353
2003-06-24 23:14:39 +00:00
Roger Dingledine
dfdc93eccb
improve robustness: connection_get_by_* ignores conns marked for close
...
svn:r352
2003-06-24 23:09:21 +00:00
Roger Dingledine
23b1586c26
clean up a broken comment in crypto.c
...
svn:r351
2003-06-24 21:34:19 +00:00
Roger Dingledine
d8af672bb6
correct log()'s comment
...
svn:r350
2003-06-24 05:18:12 +00:00
Roger Dingledine
3dcc34491b
slightly happier on 64-bit archs
...
svn:r349
2003-06-24 05:17:48 +00:00
Roger Dingledine
a43c015838
clean out some old comments
...
svn:r348
2003-06-24 05:17:39 +00:00
Roger Dingledine
e061b70dbf
a pointer to async-dns alternatives.
...
apparently glibc 2.2.4 and windows both have async gethostbynames now.
we'll want to make use of them if they're available (via autoconf).
svn:r347
2003-06-24 05:17:09 +00:00
Nick Mathewson
e9254430e2
My copy of cpp is not DWIM-compliant; I guess, as a workaround, I should define constants before using them.
...
svn:r343
2003-06-21 21:46:17 +00:00
Nick Mathewson
04b871486c
Reorder connection_or and make unexported functions static. Partially convert to symbolic constants -- Roger, was this what you had in mind?
...
svn:r342
2003-06-21 19:29:32 +00:00
Nick Mathewson
03544caca7
Make cvsignores reflect build process
...
svn:r341
2003-06-21 19:09:09 +00:00
Nick Mathewson
efbcd71b9b
Remove false warnings from printf checks
...
svn:r340
2003-06-21 19:03:22 +00:00
Nick Mathewson
49f082fcee
Fix a bug where we'd sometimes run off the end of an array while
...
testing stream encryption.
svn:r339
2003-06-20 08:17:25 +00:00
Roger Dingledine
968d31162b
fix typos, streamline
...
svn:r337
2003-06-18 07:44:48 +00:00
Roger Dingledine
8d4cd5d604
remove obsolete ss.h
...
svn:r336
2003-06-18 07:42:13 +00:00
Roger Dingledine
a270a93da0
question for nick about daemonizing
...
svn:r334
2003-06-18 05:52:32 +00:00
Nick Mathewson
95e5384af3
Change many files to new log_fn format
...
svn:r333
2003-06-17 22:18:26 +00:00
Nick Mathewson
6965a4696c
Have GCC catch errors in format strings
...
svn:r332
2003-06-17 22:14:44 +00:00
Nick Mathewson
5fd033a8e8
Come up with a less macro-happy, even more portable log_fn implementation
...
svn:r331
2003-06-17 21:36:44 +00:00
Nick Mathewson
b9480620c6
Make log_fn work on apples with no workarounds needed in main code
...
svn:r330
2003-06-17 21:15:25 +00:00
Nick Mathewson
df2789c111
Make sure crypt_seed_rng succeeds
...
svn:r329
2003-06-17 20:19:54 +00:00
Nick Mathewson
769c78a395
Use fread instead of fgets for binary data
...
svn:r328
2003-06-17 20:19:41 +00:00
Roger Dingledine
05a8c264ff
overhaul the dns farm: cut its size in half
...
i've eliminated the master dns process, so now the workers just
act like regular connections and are handled by the normal pollarray.
everything seems to still work. ;)
svn:r327
2003-06-17 14:31:05 +00:00
Nick Mathewson
3b5dc72648
Dont test handshakes in an infinite loop
...
svn:r324
2003-06-14 01:39:23 +00:00
Nick Mathewson
debfe65faf
When debugging, dump key material
...
svn:r323
2003-06-14 01:34:39 +00:00
Nick Mathewson
9182537238
Fix the periodic bug that would make handshaking fail.
...
The culprit: sometimes DH_calculate_key returns less than DH_KEY_LEN bytes;
we needed to check the return value.
svn:r322
2003-06-14 01:30:53 +00:00
Nick Mathewson
9af577fee3
Do not use pseudorandom nonces
...
svn:r321
2003-06-14 01:29:16 +00:00
Nick Mathewson
71b158bf2f
Fix MacOS build
...
svn:r320
2003-06-14 01:28:25 +00:00
Nick Mathewson
6250b90ac2
Better test messages for onion skin bug
...
svn:r319
2003-06-13 21:23:14 +00:00
Nick Mathewson
d21c0feb5a
Add RNG seeding
...
svn:r318
2003-06-13 21:13:37 +00:00
Roger Dingledine
cbe7be1f78
remove on-the-fly compression feature
...
it wasn't working, and it was harder than we'd anticipated
not worth it.
svn:r316
2003-06-13 10:23:42 +00:00
Roger Dingledine
9a33b59ece
relay queues are obsolete (woo!)
...
they used to be used for
* queueing relay cells at the edge of the network, when windows are empty
* queueing relay cells that arrive after an onion but before the onion
has been processed.
both of these uses are gone. so out they go.
svn:r315
2003-06-13 09:59:33 +00:00
Roger Dingledine
1454f4aded
improve portability: inet_aton is missing on solaris
...
svn:r314
2003-06-13 09:25:55 +00:00
Roger Dingledine
030564e95d
send truncates AP-ward in a circuit, not destroys
...
svn:r313
2003-06-13 09:20:23 +00:00
Roger Dingledine
d3292e484a
implement truncate and truncated (untested)
...
clean up circuit_deliver_relay_cell convention
svn:r312
2003-06-12 10:16:33 +00:00
Roger Dingledine
e75dc941a7
don't complain as much when using openssl 0.9.7a
...
svn:r308
2003-06-10 20:50:56 +00:00
Nick Mathewson
d3592af042
Answer question about eliminating symmetric encryption from onion skins
...
svn:r304
2003-06-02 02:18:16 +00:00
Roger Dingledine
dfa64b61ed
bugfix: it was expiring circuits that still had active connections
...
svn:r303
2003-06-01 02:09:36 +00:00
Roger Dingledine
8e242d9b87
update config files to not use opport
...
svn:r300
2003-05-28 06:22:18 +00:00
Roger Dingledine
54c57def0b
fix (harmless) bug
...
svn:r299
2003-05-28 06:19:58 +00:00
Roger Dingledine
fa1d446440
OPport is gone. So is conn type OP.
...
svn:r298
2003-05-28 02:03:25 +00:00
Roger Dingledine
2d296afc42
bugfix
...
svn:r297
2003-05-28 00:13:42 +00:00
Roger Dingledine
091e1c0167
fix design bug: circ->n_conn is shared among circs, so it can't
...
point to the streams for this circ.
svn:r296
2003-05-27 23:39:04 +00:00
Roger Dingledine
aca6196da9
correct the comments, plus a question for nick
...
svn:r295
2003-05-26 06:03:16 +00:00
Roger Dingledine
1c6def292b
remove dead code
...
circuits no longer queue more cells when the windows are empty --
they simply don't package it from the buffer if they're not going to want it.
we can restore this code later if we need to resume queueing.
svn:r294
2003-05-20 06:53:10 +00:00
Roger Dingledine
39e9d79038
add circuit-level sendme relay cells
...
remove sendme cells
replace malloc with tor_malloc
patch (but not track down) bug in onion pending list
streamline connection_ap handshake
svn:r293
2003-05-20 06:41:23 +00:00
Roger Dingledine
59029a3eed
replace malloc with tor_malloc; remove broken/unused crypto_pk_set_key
...
svn:r292
2003-05-20 06:37:34 +00:00
Nick Mathewson
c94d42fa41
Fail less spectacularly on macos
...
svn:r291
2003-05-09 11:46:39 +00:00
Nick Mathewson
fb435daa28
Fix build on linux; macos is still messed up
...
svn:r290
2003-05-09 03:37:18 +00:00
Nick Mathewson
48b0c839b5
One is the language; the other is the compiler
...
svn:r289
2003-05-09 02:41:27 +00:00
Nick Mathewson
0957ffeb83
work on versioning; new log_fn function
...
svn:r288
2003-05-09 02:25:37 +00:00
Roger Dingledine
9f38ba196c
make router_dump_token only for debugging; clean backslashes
...
svn:r287
2003-05-09 02:20:16 +00:00
Roger Dingledine
6973ccb59b
still removing version.h
...
svn:r286
2003-05-09 02:14:01 +00:00
Roger Dingledine
649fbceaa1
removed obsolete version.h
...
svn:r285
2003-05-09 02:12:52 +00:00
Roger Dingledine
bf8ef8e597
obsolete, removed
...
svn:r284
2003-05-09 02:12:33 +00:00
Nick Mathewson
9ef930f21a
Routerinfos are no longer linked
...
svn:r283
2003-05-09 02:00:33 +00:00
Nick Mathewson
c2e7b5ec3f
We cant recognize ourself until we resolve all the routers.
...
svn:r282
2003-05-09 01:24:44 +00:00
Nick Mathewson
52604afd62
more debugging on build_directory
...
svn:r281
2003-05-09 01:11:56 +00:00
Nick Mathewson
54a58c897c
more debugging on build_directory
...
svn:r280
2003-05-09 01:10:57 +00:00
Nick Mathewson
39314a13b0
Thats the letter I and the number 2. (Apologies to Negativland)
...
svn:r279
2003-05-09 01:04:58 +00:00
Nick Mathewson
22df330f14
Get directories working.
...
Or at least, directories get generated, signed, download, and checked, with
nobody seeming to crash.
In config/*, added 'signing-key' blocks to dirservers and routers.or, so
that everyone will know about the directories' signing keys.
In or/directory.c, refrained from using a dirserver's signing key when
no such key is known; added more debugging output.
In or/main.c, added debugging output and fixed a few logic errors.
In or/routers.c, added debugging output and prevented a segfault on
routers_resolve_directory. The interleaving of arrays and lists on
routerinfo_t is still messy, but at least it seems to work again.
svn:r278
2003-05-08 21:35:11 +00:00
Nick Mathewson
1d1f46e40d
(possibly incorrect) code to make routers get resolved when they're
...
inserted into the directory.
Roger: If you can answer the question with your name on it, you may
prevent a segfault before it happens. :)
svn:r277
2003-05-08 12:32:30 +00:00
Nick Mathewson
c3998e94f9
Call the right signed-directory functions; try to describe the difference between everything; remove some unused interfaces
...
svn:r276
2003-05-08 03:36:53 +00:00
Roger Dingledine
bcfbccb056
cheap hack so the dirservers have a signing key
...
svn:r275
2003-05-07 22:41:12 +00:00
Roger Dingledine
2c7e660c62
sign directories with the signing key
...
svn:r274
2003-05-07 22:40:03 +00:00
Roger Dingledine
0f17d09066
hints for nick on where to integrate
...
svn:r273
2003-05-07 21:42:17 +00:00
Nick Mathewson
b58939745e
Do not replace old directory if new one is invalid
...
svn:r272
2003-05-07 18:39:44 +00:00
Nick Mathewson
afc0eb2c71
Tested backends for directory signing and checking. Directory parser completely refactored. Need documentation and integration. Explanitory mail forthcoming.
...
svn:r271
2003-05-07 18:30:46 +00:00
Roger Dingledine
bbddd50082
fix double-semicolon parse error
...
svn:r270
2003-05-07 03:32:18 +00:00
Nick Mathewson
445cd8f0f1
Decrease DH group length to 1024. (Roger, you may want to read section 1 of the IETF draft: a 1024-bit DH key probably reduces our cipher strength to ~80 bits.)
...
svn:r269
2003-05-07 02:28:42 +00:00
Nick Mathewson
d0ff485e1b
More work on directories. Signed directories not yet tested. No support for checking sigs yet
...
svn:r268
2003-05-07 02:13:23 +00:00
Nick Mathewson
fcf7bfe290
Refactor directories; add unit tests; add router keyword
...
svn:r266
2003-05-06 17:38:16 +00:00
Roger Dingledine
03ed54e920
put some symbolic constants to the onion skin lengths
...
svn:r265
2003-05-06 05:54:42 +00:00
Roger Dingledine
d7f50337c1
incremental path building in; uses ephemeral DH; onions are gone
...
still need to change circuit-level sendmes
svn:r264
2003-05-05 23:24:46 +00:00
Nick Mathewson
44b4efe34d
Tests, headers, and debugging for onion skin backend
...
svn:r263
2003-05-05 04:27:00 +00:00
Roger Dingledine
96759a609e
streams are now 8 bytes, and are recognized by intermediate hops
...
the OP only crypts the appropriate number of times depending on which
layer (hop on the path) it's for/from.
svn:r262
2003-05-02 21:29:25 +00:00
Roger Dingledine
bb75b14218
remove obsolete test code
...
svn:r261
2003-05-01 23:22:35 +00:00
Roger Dingledine
8a94dd60af
cpath is now a doubly linked list, not an array
...
svn:r260
2003-05-01 22:55:51 +00:00
Nick Mathewson
1eeb3f65fc
Implement core of onion-skin-based handshake
...
svn:r259
2003-05-01 19:42:51 +00:00
Roger Dingledine
0560008497
terminology shift: data->relay, topic->relay, topic->stream
...
svn:r258
2003-05-01 06:42:29 +00:00
Nick Mathewson
6af79f3a03
Basic diffie-helman wrappers with fixed modulus and tests
...
svn:r257
2003-05-01 00:53:46 +00:00
Roger Dingledine
59e70bcae6
bugfix: a circ can't be youngest if it's still connecting to the first hop
...
svn:r255
2003-04-20 21:56:44 +00:00
Roger Dingledine
f54186aa91
bugfix: refactor to always use circuit_remove
...
this way we can always check if a new circ needs to be launched
svn:r254
2003-04-20 19:47:33 +00:00
Roger Dingledine
ffae44aafd
bugfix: don't segfault if there's no valid circuit open
...
svn:r253
2003-04-19 00:24:17 +00:00
Roger Dingledine
10902028e0
bugfix: only close old circuits if they have no connections!
...
svn:r251
2003-04-18 18:47:49 +00:00
Nick Mathewson
5c514620fc
Adjust straggling users of payload field
...
svn:r250
2003-04-17 17:25:32 +00:00
Nick Mathewson
32a3e704b4
Choose correct abstraction for topic_foo. Abstract random-integer code
...
svn:r249
2003-04-17 17:10:41 +00:00
Nick Mathewson
fdf4d4aa85
Use cell.topic* fields in ap_handshake_send_begin
...
svn:r248
2003-04-17 16:46:44 +00:00
Nick Mathewson
6fd4f2a17f
Rebuild or and test binaries when a libor.a changes but or/*.c does not.
...
svn:r247
2003-04-17 02:24:55 +00:00
Nick Mathewson
598c3069e1
Apply algebra; remove a condition
...
svn:r246
2003-04-17 02:03:55 +00:00
Nick Mathewson
2da6482f63
tv_udiff: do not modify arguments, and compute results correctly.
...
svn:r245
2003-04-17 01:59:41 +00:00
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