Nick Mathewson
6f5dbefa7e
Normalize space: add one between every control keyword and control clause.
...
svn:r3003
2004-11-28 09:05:49 +00:00
Roger Dingledine
7c9a707900
remove emacs droppings, since nick says he doesn't need them anymore
...
svn:r2989
2004-11-26 04:00:55 +00:00
Roger Dingledine
394554cfbf
Clean up copyrights.
...
Break connection_consider_empty_buckets() out of
connection_read_bucket_decrement().
svn:r2698
2004-11-07 01:33:06 +00:00
Roger Dingledine
6c61ed4fb5
Make options no longer a global variable.
...
Now we can try setting an option but back out if it fails to parse, or
if it's disallowed (e.g. changing RunAsDaemon from 1 to 0).
Use parse_line_from_str rather than parse_line_from_file.
svn:r2692
2004-11-06 05:18:11 +00:00
Roger Dingledine
85c79ffbc7
canonicalize "src" and "dest" arg order in crypto.c (and others)
...
svn:r2644
2004-11-02 02:28:51 +00:00
Nick Mathewson
a42adce362
fix memory leak in router.c; start relying on NULL==(zero bytes)
...
svn:r2538
2004-10-16 20:38:57 +00:00
Roger Dingledine
aebc3a03ba
more int to size_t conversions, fixing one or more amd64 bugs
...
plus a whitespace patch on config.c from vicman
svn:r2482
2004-10-14 02:47:09 +00:00
Roger Dingledine
136d4e5739
prefer tor_free to free
...
plus complain more loudly when we fail to parse a dir we just fetched
svn:r2401
2004-09-29 06:52:36 +00:00
Roger Dingledine
ef561c0e42
Break files apart into more modules
...
* \file circuitbuild.c
* \brief The actual details of building circuits.
* \file circuitlist.c
* \brief Manage the global circuit list.
* \file circuituse.c
* \brief Launch the right sort of circuits, attach streams to them.
* \file connection_edge.c
* \brief Handle edge streams.
* \file onion.c
* \brief Functions to queue create cells, and handle onionskin
* parsing and creation.
* \file relay.c
* \brief Handle relay cell encryption/decryption, plus packaging and
* receiving from circuits.
svn:r1863
2004-05-13 07:24:49 +00:00
Nick Mathewson
9c3fba5c3b
Not every RSA decrypt should warn on failure.
...
svn:r1853
2004-05-12 19:30:28 +00:00
Nick Mathewson
81922a125c
More doxygenation.
...
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
21e094a5d3
function header comments for onion.c, including doxygen markup
...
svn:r1826
2004-05-10 02:36:04 +00:00
Roger Dingledine
28f034e10a
now assume all routers support rendezvous cells
...
svn:r1699
2004-04-25 21:32:04 +00:00
Roger Dingledine
25d54257fb
use tor_assert
...
remove obsolete BUF_OK macro
svn:r1697
2004-04-25 20:37:37 +00:00
Nick Mathewson
0fca143ea1
Remove onion_pkey from connection, since onion keys can change more often than connections. Also add more log messages
...
svn:r1693
2004-04-25 19:04:11 +00:00
Nick Mathewson
c44016e86e
Merge flagday into main branch.
...
svn:r1683
2004-04-24 22:17:50 +00:00
Roger Dingledine
01e594e512
clean up some warnings
...
svn:r1651
2004-04-17 06:34:20 +00:00
Roger Dingledine
49f5e5b4ae
handle more purposes in new_route_len
...
svn:r1618
2004-04-14 05:06:08 +00:00
Roger Dingledine
c5052bec95
normal circs are 3 hops, but rend/intro circs are 4, because
...
the initiator doesn't get to choose the last hop
svn:r1595
2004-04-12 18:40:14 +00:00
Roger Dingledine
6cf584b765
clean up choose_good_exit_server()
...
svn:r1542
2004-04-07 23:31:29 +00:00
Nick Mathewson
10b48fee28
Generating data does no good if you make no use of it
...
svn:r1534
2004-04-07 21:44:24 +00:00
Nick Mathewson
8169da5c30
Don't use Tor version 0.0.5 for intro/rendezvous points. (We don't need
...
to worry about 0.0.4 or earlier, because nobody is running them any more.)
svn:r1533
2004-04-07 21:36:03 +00:00
Roger Dingledine
93801ac40d
don't pick myself or my twins as hops when building circuits
...
svn:r1531
2004-04-07 21:12:54 +00:00
Nick Mathewson
789df20e7d
There is no need to cast void* to other pointer types.
...
svn:r1524
2004-04-07 20:11:28 +00:00
Nick Mathewson
75c19716a8
Put ourself in router list; act accordingly.
...
svn:r1521
2004-04-07 19:46:27 +00:00
Nick Mathewson
2fc106d210
Force hybrid encryption on for key negotiation
...
svn:r1509
2004-04-06 20:55:46 +00:00
Nick Mathewson
40a5d6055e
Stupid sizeof operator!
...
svn:r1508
2004-04-06 20:45:44 +00:00
Nick Mathewson
2446996f97
Remove vestigial variable
...
svn:r1507
2004-04-06 20:42:25 +00:00
Nick Mathewson
6290d027c9
Continue attack on magic numbers; use new crypto wrappers where possible
...
svn:r1504
2004-04-06 20:16:12 +00:00
Nick Mathewson
137b577bbd
Refactor the heck out of crypto interface: admit that we will stick with one ciphersuite at a time, make const things const, and stop putting openssl in the headers.
...
svn:r1458
2004-04-03 02:40:30 +00:00
Roger Dingledine
8c19d6e3d7
alice can intercept y.onion requests, do a lookup on them via tor,
...
and receive a 404
svn:r1455
2004-04-03 01:59:53 +00:00
Nick Mathewson
fc4d15baf6
Hide smartlist internals
...
svn:r1451
2004-04-03 00:58:54 +00:00
Roger Dingledine
fc3d7383e7
router_choose_random_node can take a smartlist of nodes to exclude
...
svn:r1442
2004-04-02 22:30:39 +00:00
Roger Dingledine
f34e6da3e7
now circuit_get_newest returns an appropriate circ for your purpose
...
connection_ap_handshake_attach_circuit attaches to a circ of the
right purpose
add a skeletal rendclient.c
svn:r1441
2004-04-02 22:23:15 +00:00
Nick Mathewson
79fc52170e
For hidden services: handle INTRODUCE2, send ESTABLISH_INTRO, RENDEZVOUS1.
...
Also:
- Add a pending final cpath element to build_state
- Rename S_RENDEZVOUSING to S_CONNECT_REND
- Add [CS]_REND_JOINED
- Split out logic to initialize cpath crypto objects.
- Have circuits/cpaths remember the KH element from their handshake, so they
can use it for other authentication later. (As in ESTABLISH_INTRO)
svn:r1438
2004-04-01 22:21:01 +00:00
Roger Dingledine
05b99bcf7d
alice chooses her rendezvous node from all running routers
...
and she can set preferences in her options
svn:r1433
2004-04-01 20:33:29 +00:00
Roger Dingledine
cc3c4245cb
let the circuit-launcher choose the exit node (if he wants)
...
svn:r1428
2004-04-01 03:44:49 +00:00
Nick Mathewson
93ab51e9ac
Make smartlist Do What Arma Expects.
...
svn:r1401
2004-03-30 22:59:00 +00:00
Nick Mathewson
96a86ef14d
Remove maximum-size field from smartlists
...
svn:r1397
2004-03-30 20:05:52 +00:00
Roger Dingledine
45699bb5ee
clean up some 'warn' messages while i'm at it
...
svn:r1342
2004-03-26 22:28:16 +00:00
Roger Dingledine
c195f69058
isspace and friends take an int. solaris cares.
...
svn:r1303
2004-03-19 20:50:12 +00:00
Roger Dingledine
208625ae31
clean up some presentation and comments
...
svn:r1294
2004-03-18 19:22:56 +00:00
Roger Dingledine
de146de0c5
make circuit-building less noisy when a node in your exclude/exit/entrynodes is down
...
svn:r1206
2004-03-03 03:02:06 +00:00
Roger Dingledine
4716d4d871
bugfix: only warn about an unrouter router after we've fetched a directory
...
svn:r1178
2004-02-29 01:31:33 +00:00
Roger Dingledine
70c43e152a
note bug in assert_connection_ok
...
svn:r1159
2004-02-28 07:48:28 +00:00
Roger Dingledine
b354ecfecd
rename ExcludedNodes config option to ExcludeNodes
...
svn:r1155
2004-02-28 05:09:37 +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
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
Nick Mathewson
17adfa9dfd
log when exit situation is hopeless.
...
svn:r1057
2004-02-04 22:35:58 +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
Roger Dingledine
afdaff63ef
turn some knobs, add more debugging
...
svn:r1023
2004-01-30 19:31:39 +00:00
Roger Dingledine
61723a1f69
small default route when doing speed testing
...
svn:r1010
2004-01-20 03:12:46 +00:00
Roger Dingledine
db0c27b362
resolve cygwin warnings for pre19
...
svn:r981
2004-01-08 22:48:18 +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
6a19e64066
remove trailing whitespace
...
svn:r951
2003-12-17 21:09:31 +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
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
8f573c06c3
start to track the 'unexpected relay cell' warning
...
svn:r928
2003-12-14 06:50:44 +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
29adf04683
more general cleanup
...
svn:r915
2003-12-14 00:12:02 +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
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
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
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
8bd7c94bf6
general cleanups
...
svn:r889
2003-12-07 22:03:47 +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
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
975bb68010
simplify: options.OnionRouter==1 iff options.ORPort>0
...
svn:r857
2003-11-20 17:49:45 +00:00
Nick Mathewson
3d145769de
Patch last patch to last patch
...
svn:r845
2003-11-19 01:35:44 +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
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
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
Nick Mathewson
ac5fc456ee
comment choose_good_exit_server
...
svn:r822
2003-11-17 06:02:41 +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
5e81e4748e
bugfixes
...
svn:r818
2003-11-16 23:43:08 +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
c8639b2bbc
bump default pathlen to 3; clean up surrounding code
...
svn:r810
2003-11-13 23:01:56 +00:00
Roger Dingledine
f5829aa723
lay groundwork for EntryNodes and ExitNodes
...
svn:r805
2003-11-12 19:34:34 +00:00
Nick Mathewson
785f5cdac8
Make crypto_pseudo_rand* never fail.
...
svn:r797
2003-11-12 04:12:35 +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
Nick Mathewson
7bde42676b
Rename aci to circ_id throughout.
...
svn:r784
2003-11-11 03:01:48 +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
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
Nick Mathewson
36939303c9
Update LICENSE and copyright dates.
...
svn:r560
2003-10-08 02:04:08 +00:00