aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
Commit message (Collapse)AuthorAge
* Implement exit enclaves: if we know an IP address for the destination,Roger Dingledine2005-08-15
| | | | | | | | | and there's a running Tor server at that address which allows exit to the destination, then extend the circuit to that exit first. Also, if the user asks for a .exit node, cannibalize general circs for it. svn:r4779
* predict required circuits better, with an eye toward makingRoger Dingledine2005-08-13
| | | | | | | hidden services faster on the service end. svn:r4772
* We weren't cannibilizing circuits correctly forRoger Dingledine2005-08-12
| | | | | | | | | CIRCUIT_PURPOSE_C_ESTABLISH_REND and CIRCUIT_PURPOSE_S_ESTABLISH_INTRO so we were being forced to build those from scratch. This should save us a bit of time. Also fixes bug 173. svn:r4763
* trivial changes on nick's rendezvous commitRoger Dingledine2005-07-14
| | | | svn:r4553
* Logic to implement rendezvous/introduction via unknown servers.Nick Mathewson2005-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a new extend_info_t datatype to hold information needed to extend a circuit (addr,port,keyid,onion_key). Use it in cpath and build_state. Make appropriate functions take or return it instead of routerinfo_t or keyid. - #if 0 needless check in circuit_get_by_edge_conn; if nobody triggers this error in 0.1.0.10, nobody will trigger it. - Implement new hidden service descriptor format, which contains "extend info" for introduction points, along with protocol version list. - Parse new format. - Generate new format - Cache old and new formats alongside each other. - Directories serve "old" format if asked in old way, "newest available" format if asked in new way. - Use new format to find introduction points if possible; otherwise fall back. Keep nickname lists and extendinfo lists in sync. - Tests for new format. - Implement new "v2" INTRODUCE cell format. - Accept new format - Use new format if we have a versioned service descriptor that says the server accepts the new format. - Add documentation for functions and data types. svn:r4506
* Docment or add DOCDOC comments to undocumented functions in src/or. Make ↵Nick Mathewson2005-06-11
| | | | | | function definition format uniform. svn:r4411
* flesh out the source file descriptions for doxygenRoger Dingledine2005-06-11
| | | | svn:r4404
* Change end-of-file NLNL convention. It turns out arma I and I agree.Nick Mathewson2005-06-09
| | | | svn:r4382
* clean up some log entriesRoger Dingledine2005-05-15
| | | | svn:r4228
* first iteration of scrubbing sensitive strings from logs.Roger Dingledine2005-05-03
| | | | | | | also generally clean up log messages. svn:r4174
* clean up this TOR_FRAGILE businessRoger Dingledine2005-04-26
| | | | svn:r4116
* Improve conn_*_to_string; add circuit_state_to_string; make ↵Nick Mathewson2005-04-07
| | | | | | skewed-descriptor messages better. svn:r4047
* Rename circuit_get_by_stream to circuit_get_by_edge_conn, and actually start ↵Nick Mathewson2005-04-06
| | | | | | using it. Watch out, kids! svn:r4026
* Add a pointer from edge connections to their corresponding circuit (ulp!); ↵Nick Mathewson2005-04-06
| | | | | | add some debugging sanity-checking for cirid_orconn_map stuff svn:r4024
* Hopefully, this will make ORs much faster, and not break them: keep a big ↵Nick Mathewson2005-04-06
| | | | | | splay tree of (circid,orconn)->circuit mappings to make circuit_get_by_circid_conn much faster. svn:r4020
* update copyright notices.Nick Mathewson2005-04-01
| | | | svn:r3982
* when building testing circuits, always use middle hopsRoger Dingledine2005-04-01
| | | | | | | running at least 0.0.9.7 svn:r3966
* when the or-connect succeeded and the tls handshake succeededRoger Dingledine2005-04-01
| | | | | | | | | but we didn't like the result, we were closing the connection without sending any destroys back for the pending circuits. now send those destroys anyway; i hope this doesn't break too much. svn:r3951
* still publish your descriptor if orport is reachable but dirport isn'tRoger Dingledine2005-03-31
| | | | | | | | | when building testing circs for orport testing, require high-bandwidth nodes, so fewer circs fail. complain about unreachable orport separately from unreachable dirport. svn:r3935
* cleanup so connection_ap_handshake_attach_chosen_circuit() alwaysRoger Dingledine2005-03-24
| | | | | | | gets open circs. svn:r3856
* Bulletproof connection_ap_handshake_attach_chosen_circuitNick Mathewson2005-03-24
| | | | svn:r3855
* clean up and refactor some moreRoger Dingledine2005-03-22
| | | | svn:r3798
* Implement controller's "extendcircuit" directive.Roger Dingledine2005-03-22
| | | | | | | | Also refactor circuit building so we plan the whole path ahead of time. svn:r3797
* Turn addr_policy_compare from a tristate to a quadstate; this should help ↵Nick Mathewson2005-03-19
| | | | | | address our "Ah, you allow 1.2.3.4:80. You are a good choice for google.com" problem. svn:r3786
* make hidden services more likely to work from the server-sideRoger Dingledine2005-03-19
| | | | svn:r3781
* Commit fixes for several pending tor core tasks: document all DOCDOCed ↵Nick Mathewson2005-03-17
| | | | | | functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value. svn:r3769
* re-enable reachability testing stuff.Roger Dingledine2005-03-15
| | | | | | | | also, consider your ORPort reachable after you've processed a create cell from any non-local address. svn:r3763
* Renormalize whitespaceNick Mathewson2005-03-14
| | | | svn:r3757
* Implement the common case of ATTACHSTREAM.Nick Mathewson2005-03-12
| | | | svn:r3751
* Checkpoint in-progress fixes:Roger Dingledine2005-02-27
| | | | | | | | | | | | | Add 'testing' circuit purpose, for reachability testing. Notice when our IP changes, and reset stats. Try to pull down a directory via Tor to see if our DirPort is working. Try to extend a circuit back to us to see if our ORPort is working. Only publish a descriptor if they're both reachable. These mostly work, and I'd better get them in before I cause conflicts. svn:r3703
* Add a new AddressMap directive to rewrite incoming socks addresses.Roger Dingledine2005-02-22
| | | | | | | | | | Add a new TrackHostExits directive to trigger addressmaps for certain incoming socks addresses, for sites that break when your exit keeps changing. Redo the client-side dns cache so it's just an addressmap too. svn:r3641
* bugfix: tor-resolve requests were ignoring .exit if there wasRoger Dingledine2005-02-02
| | | | | | | a working circuit they could use instead. svn:r3502
* define TOR_FRAGILE if you want tor to give you a core whenRoger Dingledine2005-02-01
| | | | | | | | something goes wrong. this should only be used by people actively tracking bugs. svn:r3487
* The crowning hidden-service patch: prefer non-internal circuitsRoger Dingledine2005-01-20
| | | | | | | | for normal connections, so we don't spend our internal circs on other stuff and not have them when we need them. svn:r3380
* Handle unavailable hidden services better. We try each intro pointRoger Dingledine2005-01-19
| | | | | | | | | | until none are left, then we try to refetch the descriptor. If it's the same one we had before, then close streams right then. Whenever a new stream arrives, even if it's right after, optimistically try refetching the descriptor, just in case. svn:r3379
* bugfix for cvs: we were needing a rendezvous circ, so we cannibalizedRoger Dingledine2005-01-19
| | | | | | | | | a general circ, and called rend_client_rendcirc_has_opened(), which called connection_ap_attach_pending(), which was needing a rendezvous circ, so it cannibalized a general circuit, and called ... svn:r3370
* remove some extra-verbose logsRoger Dingledine2005-01-17
| | | | svn:r3361
* Introduce a notion of 'internal' circs, which are chosen without regardRoger Dingledine2005-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to the exit policy of the last hop. Intro and rendezvous circs must be internal circs, to avoid leaking information. Resolve and connect streams can use internal circs if they want. New circuit pooling algorithm: make sure to have enough circs around to satisfy any predicted ports, and also make sure to have 2 internal circs around if we've required internal circs lately (with high uptime if we've seen that lately). Split NewCircuitPeriod config option into NewCircuitPeriod (30 secs), which describes how often we retry making new circuits if current ones are dirty, and MaxCircuitDirtiness (10 mins), which describes how long we're willing to make use of an already-dirty circuit. Once rendezvous circuits are established, keep using the same circuit as long as you attach a new stream to it at least every 10 minutes. (So web browsing doesn't require you to build new rend circs every 30 seconds.) Cannibalize GENERAL circs to be C_REND, C_INTRO, S_INTRO, and S_REND circ as necessary, if there are any completed ones lying around when we try to launch one. Re-instate the ifdef's to use version-0 style introduce cells, since there was yet another bug in handling version-1 style. We'll try switching over again after 0.0.9 is obsolete. Bugfix: when choosing an exit node for a new non-internal circ, don't take into account whether it'll be useful for any pending x.onion addresses -- it won't. Bugfix: we weren't actually publishing the hidden service descriptor when it became dirty. So we only published it every 20 minutes or so, which means when you first start your Tor, the hidden service will seem broken. svn:r3360
* get rid of 0.0.8 backwards compatibilityRoger Dingledine2005-01-13
| | | | svn:r3353
* when deciding if a port is handled and the port demands uptime, don'tRoger Dingledine2005-01-13
| | | | | | | consider it handled if there's a circ that fits but isn't high-uptime. svn:r3349
* Annotate circuits w/ whether they aim to contain high uptime nodes and/orRoger Dingledine2005-01-12
| | | | | | | | | | | | | | | | | high capacity nodes. When building circuits, choose appropriate nodes. New config option LongLivedPorts to indicate application streams that will want high uptime circuits. When attaching a stream to a circuit, pay attention to its requirements. This means that every single node in an intro rend circuit, not just the last one, will have a minimum uptime. Boost the min uptime from an hour to 24 hours. svn:r3339
* when we haven't fetched a directory yet, or the last time weRoger Dingledine2005-01-07
| | | | | | | | | | | | tried they were all unreachable, assume we are not connected to the network. when an application request comes in during this state, be optimistic and assume we just reconnected. fetch a new directory and if it works, begin making circuits. svn:r3327
* clean up logging,Roger Dingledine2004-12-13
| | | | | | | | | make it clearer which warns are bugs, make the control log event match its specification, point out a bug in how we deal with failure when renewing the tls context. svn:r3138
* I'm a bad person.Roger Dingledine2004-12-07
| | | | | | | | | Stop treating the uint16_t's as null-terminated strings, and stop looking at the byte after them to see if it's null, because sometimes you're not allowed to look there. svn:r3108
* Renormalize whitespaceNick Mathewson2004-12-07
| | | | svn:r3095
* New circuit building strategy: keep a list of ports that we've used in ↵Roger Dingledine2004-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | the past 6 hours, and always try to have 2 circuits open or on the way that will handle each such port. (We can extend this to include addresses if exit policies shift to require that.) Seed us with port 80 so web browsers won't complain that Tor is "slow to start up". This was necessary because our old circuit building strategy just involved counting circuits, and as time went by we would build up a big pile of circuits that had peculiar exit policies (e.g. only exit to 9001-9100) which would take up space in the circuit pile but never get used. Fix router_compare_addr_to_addr_policy: it was not treating a port of * as always matching, so we were picking reject *:* nodes as exit nodes too. If you haven't used a clean circuit in an hour, throw it away, just to be on the safe side. This means after 6 hours a totally unused Tor client will have no circuits open. svn:r3078
* React to eof immediately on non-open edge connections.Roger Dingledine2004-12-04
| | | | | | | | | | | Stop keeping track of num_retries for apconns, since they expire after 60 seconds anyway. When warning about retrying or giving up, print the address, so the user knows which one it's talking about. svn:r3073
* bugfix: When we were checking to see if an ap_conn should time outRoger Dingledine2004-12-04
| | | | | | | | | | | | | waiting for its connected cell, we were calculating time from when the ap_conn was created. So if it waited say 20 seconds before being attached, then we would immediately decide that the circuit had timed out. Also, make circuit_dump_by_conn() display actual circuit progress, including circuits that haven't been attached to the conn yet but hope to when it finishes connecting. svn:r3072
* Spell-check strings and commentsNick Mathewson2004-12-01
| | | | svn:r3052
* Let resolve conns retry/expire also, rather than sticking around forever.Roger Dingledine2004-11-30
| | | | | | | | | | | Put the check-if-requested-exitrouter-will-reject-us code in the circuit_attach loop, so it gets checked periodically and not just once at the beginning. This is useful in case the routerlist changes, but also in case the address gets resolved into something that we learn we'll reject. svn:r3039