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
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
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
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
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
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
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
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
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
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
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
4ba8bc0a73
make dir parsing robust to invalid but well-formed descriptors
...
svn:r800
2003-11-12 05:12:51 +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
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
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
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
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
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
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
b4117d2a37
move to 0.0.2pre13
...
svn:r631
2003-10-19 05:45:22 +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
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
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
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
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
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
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
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
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
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
b9628f266f
change WARNING to WARN
...
and fix a few typos
svn:r571
2003-10-10 01:48:32 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Roger Dingledine
fa1bfaa349
check for funny business from the remote peer
...
svn:r445
2003-09-11 22:19:48 +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
44c3a7c2d7
collect info from peer we just handshaked with
...
svn:r439
2003-09-11 20:06:55 +00:00
Nick Mathewson
9955b265ab
Make crypto structures private to crypto.c
...
svn:r437
2003-09-10 00:47:24 +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
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
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
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
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
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
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
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
Roger Dingledine
c82e13f1f5
reap exited dns/cpuworkers
...
svn:r385
2003-08-12 06:41:53 +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
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
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
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
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
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
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
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
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
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
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
649fbceaa1
removed obsolete version.h
...
svn:r285
2003-05-09 02:12:52 +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
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
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
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
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
96e5f776d6
move cell size to 256. seems to work (?)
...
svn:r218
2003-03-24 04:02:24 +00:00