aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.h
Commit message (Collapse)AuthorAge
* New 'DisableNetwork' option to prevent Tor from using the networkNick Mathewson2011-11-28
| | | | | | | | | | | | | | | | | | Some controllers want this so they can mess with Tor's configuration for a while via the control port before actually letting Tor out of the house. We do this with a new DisableNetwork option, that prevents Tor from making any outbound connections or binding any non-control listeners. Additionally, it shuts down the same functionality as shuts down when we are hibernating, plus the code that launches directory downloads. To make sure I didn't miss anything, I added a clause straight to connection_connect, so that we won't even try to open an outbound socket when the network is disabled. In my testing, I made this an assert, but since I probably missed something, I've turned it into a BUG warning for testing.
* Add a new type entry_connection_t for entry connectionsNick Mathewson2011-07-21
| | | | No fields have moved there yet; for now, it's just a placeholder type.
* Refactor listener_connection_t into its own type.Nick Mathewson2011-07-19
| | | | | This will allow us to add more fields to listener_connection_t without bloating the other connection types.
* Merge remote-tracking branch 'public/bug2841'Nick Mathewson2011-07-11
|\ | | | | | | | | Conflicts: src/or/config.c
| * Refactor the interfaces of transport/proxy lookup fnsNick Mathewson2011-07-03
| | | | | | | | | | | | | | | | | | | | Returning a tristate is needless here; we can just use the yielded transport/proxy_type field to tell whether there's a proxy, and have the return indicate success/failure. Also, store the proxy_type in the or_connection_t rather than letting it get out of sync if a configuration reload happens between launching the or_connection and deciding what to say with it.
| * Revised how we handle ClientTransportPlugin and Bridge lines.George Kadianakis2011-06-22
| | | | | | | | | | | | | | | | Multiple Bridge lines can point to the same one ClientTransportPlugin line, and we can have multiple ClientTransportPlugin lines in our configuration file that don't match with a bridge. We also issue a warning when we have a Bridge line with a pluggable transport but we can't match it to a ClientTransportPlugin line.
| * Tweaked connection{.c,.h,_or.c} based on nick's comments.George Kadianakis2011-06-21
| | | | | | | | | | | | | | * Tweaked doxygen comments. * Changed returns of get_proxy_addrport(). * Ran make check-spaces. * Various small code tweaks.
| * This commit is an attempt to beautify the previous commit.George Kadianakis2011-06-14
| | | | | | | | It creates some helper functions that return the proxy type, proxy addr/port, etc.
| * Our warning now is much more specific, mentioning proxy type/addr/port.George Kadianakis2011-06-14
| | | | | | | | | | Not included in the previous commit, because the implementation is ugly; I see no other way of doing this though.
* | Add, use a bufferevent-safe connection_flush()Nick Mathewson2011-06-21
|/ | | | | | | | | | | | | A couple of places in control.c were using connection_handle_write() to flush important stuff (the response to a SIGNAL command, an ERR-level status event) before Tor went down. But connection_handle_write() isn't meaningful for bufferevents, so we'd crash. This patch adds a new connection_flush() that works for all connection backends, and makes control.c use that instead. Fix for bug 3367; bugfix on 0.2.3.1-alpha.
* Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\
| * Bump copyright statements to 2011 (0.2.2)Nick Mathewson2011-01-03
| |
* | Use connection_mark_and_flush consistently.Nick Mathewson2010-10-13
| |
* | New function to grab a directory connection fetching a resourceNick Mathewson2010-09-27
| | | | | | | | | | We need this to tell if a given consensus flavor is being downloaded or not.
* | Convert bufferevents to use rate-limiting.Nick Mathewson2010-09-27
| | | | | | | | | | | | | | | | | | | | | | This requires the latest Git version of Libevent as of 24 March 2010. In the future, we'll just say it requires Libevent 2.0.5-alpha or later. Since Libevent doesn't yet support hierarchical rate limit groups, there isn't yet support for tracking relayed-bytes separately when using the bufferevent system. If a future version does add support for hierarchical buckets, we can add that back in.
* | Get SSL connections and linked connections working with bufferevents.Nick Mathewson2010-09-27
| | | | | | | | | | Clients are now verified to work and build circuits correctly. There are still a few warnings given here and there that I need to look into.
* | Add support for linked connections with bufferevent_pair.Nick Mathewson2010-09-27
| | | | | | | | | | | | Also, set directory connections (linked and otherwise) to use bufferevents. Also, stop using outbuf_flushlen anywhere except for OR connections.
* | Fix more remaining users of inbuf/outbuf to handle bufferevents instead.Nick Mathewson2010-09-27
| |
* | Be a little more abstract about which connection type use buffereventsNick Mathewson2010-09-27
| |
* | Make a function to mark a connection and set hold_open_until_flushed.Nick Mathewson2010-09-27
| |
* | Basic bufferevent callbacksNick Mathewson2010-09-27
| | | | | | | | | | | | These are based strongly on connection_handle_read and connection_handle_write, but hopefully without so much mixture of IO logic and Tor logic.
* | Add a new connection_fetch_from_buf_line() that can handle buffereventsNick Mathewson2010-09-27
| |
* | Refactor users of buf_datalen to bufferevent-friendly version.Nick Mathewson2010-09-27
|/
* Create connection.hSebastian Hahn2010-07-27