summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Replacing old TorCtl example with a BW listenerbug2065Damian Johnson2011-06-12
| | | | | Event listening, particularly BW events, is a common request on irc so using it as the TorCtl example. For more information see bug 2065.
* Shutting down sockets when closedDamian Johnson2011-06-12
| | | | | Each TorCtl instance spawned a socket that would continue to live for the life of the python process. For more information see ticket 2812.
* Removing indefinite blocking on socket recvbug2412Damian Johnson2011-06-12
| | | | | | When shutting down we can't join on _thread unless the socket receives data because we didn't have a timeout. This issues a 20 ms timeout on socket reads and cleans up _thread when we close.
* Fix some issues with SmartSocket.Mike Perry2011-03-07
| | | | Also remove some traceback debugging statements.
* Try to catch an AttributeError early..Mike Perry2011-03-03
| | | | It may be silently killing the bwauths on some platforms..
* Damnit all to hell.Mike Perry2011-02-25
|
* Use isinstance rather than "is type()" for type checks.Mike Perry2011-02-25
|
* Merge remote branch 'chiiph/master'Mike Perry2011-02-25
|\
| * logfile can be unicode tooTomas Touceda2011-02-25
| |
* | Fix a python 2.5 traceback in recent 'body' commit.Mike Perry2011-02-24
| |
* | Merge branch 'chiiph'Mike Perry2011-02-23
|\ \ | |/
| * Add gitignore and status returns set_option(s) and reset_optionsTomas Touceda2011-02-24
| |
* | Add a body field to all events.Mike Perry2011-02-23
|/ | | | Useful to grab the original raw event for debugging/logging.
* Allow outside access to loglevels map.Mike Perry2011-01-30
|
* Add some minimal support for extrainfo documents.Mike Perry2010-12-06
|
* Add LICENSE file and update copyrights.Mike Perry2010-11-18
|
* Demote nickname change log message.Mike Perry2010-11-09
|
* Kill some noisy debug logs.Mike Perry2010-10-05
|
* Only require sqlalchemy if we really need it.Mike Perry2010-10-03
|
* Alter ConsensusTracker to actually track the consensus.Mike Perry2010-09-27
| | | | | | | It was tracking the Tor client's notion of the consensus, in a poor way. It now can do one or the other, depending on constructor option. Also, add some APIs that are helpful for torperf.
* Merge branch 'atagar-connect'Mike Perry2010-08-26
|\
| * Convenience functions for creating and authenticating TorCtl connections.connectAdditionDamian Johnson2010-08-25
| |
* | Fix the Python 2.4 fix.Harry Bock2010-08-25
| | | | | | | | | | Oops - apparently I used a Python 2.5ism in trying to remove a Python 2.5ism :)
* | Fix Python 2.4 compatibility.Harry Bock2010-08-22
|/ | | | | Commit 33bf5a0a4a9 broke python 2.4 compat by using string.partition(), introduced in Python 2.5. Use string.split() instead.
* Obey some laws.Mike Perry2010-08-20
| | | | | Now that copyright infringement is the #1 priority of the FBI, we need to stop doing quite so much of it.
* Fix Tor version regular expression.Harry Bock2010-08-20
| | | | | Need to escape the dot character to get the intended behavior.
* Improve TorCtl descriptor processing speed.Harry Bock2010-08-20
| | | | | | By only running one regular expression per descriptor line and performing a slightly better way of checking which line type we're handling, we cut the run time of build_from_desc in half.
* Expose status code and message separately in ErrorReply.Harry Bock2010-08-20
| | | | | | | Allow callers to handle a specific status code as an integer as well as the associated message within an ErrorReply exception. Should be API-compatible as the associated keyword arguments are popped from the **kwarg dict before being passed to the parent exception class.
* Don't ignore unknown exceptions raised by get_router.Harry Bock2010-08-20
| | | | | | | | | If an unknown exception is raised on one NS document during read_routers, it's very likely it's going to be raised again on the next, and the next... (e.g., TorCtlClosed). Instead of printing out the traceback and continuing, allow it to unwind the stack and let the caller handle it.
* Implement Python logging support for plog().Harry Bock2010-08-20
| | | | | | | | | | | This patch converts plog() to map to Python's logging module without changing API compatibility. If an application wishes to integrate its own Python logger with TorCtl, it can call TorUtil.plog_use_logger with the name of the desired logger. Otherwise, TorUtil will create its own logger that retains its original log format and emission behavior. This patch retains the standard plog() loglevels and maps them to logging constants where appropriate.
* Fix a couple more exceptions.Mike Perry2010-08-10
|
* Spurious len() call..Mike Perry2010-08-10
|
* Add log message for arma's bug..Mike Perry2010-08-10
|
* Develop a better method to wait for consensus.Mike Perry2010-08-10
| | | | | | | Do not return from wait_for_consensus unless we have at least 95% of all of our router descriptors. Also, sanity check that we aren't storing waay too many router descriptors.
* Hrmm, this should have been DateTime all along..Mike Perry2010-07-14
|
* Add uptime restriction.Mike Perry2010-07-02
|
* Use labels for another Router query...Forgot to set2010-06-23
| | | | | | I should really figure out why this is happening, and which other queries might need this... SQLAlchemy said we needed it on this line (in some rare case - not always). Possible SQLAlchemy bug/corruption?
* Handle Tor bug #1525: allow new streams to have a non-zero circ id.Mike Perry2010-06-07
|
* Fix IP address regular expression in ExitPolicyLine.__init__Harry Bock2010-05-31
| | | | | | Previous expression "\d+.\d+.\d+.\d+" matches many many things which are probably not intended. Use "(\d{1,3}\.){3}\d{1,3}$" instead and compile it for efficiency.
* Fix determination of netmask from CIDR prefix length.Harry Bock2010-05-31
| | | | | | | | | ExitPolicyLine parses IP/netmask combinations and supports CIDR notation. The previous method for calculating an IPv4 netmask from a CIDR prefix length causes the result to exceed 32 bits, but the result is never truncated, causing a DeprecationWarning on 64-bit platforms when the integer is packed. Use a better method for the calculation that always fits in 32 bits.
* Update README with python TorCtl version.Mike Perry2010-05-30
|
* Update the __all__ list so that BaseSelectionManager shows up in pydoc.mikeperry2010-05-28
| | | | git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22439 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Patch from Harry Bock to eliminate deprecation warnings onmikeperry2010-05-23
| | | | | | | | Python 2.5+. git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22379 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Alter launch_thread() to return the EventHandler thread, asmikeperry2010-05-22
| | | | | | | | | | | | | | this provides a more reliable indication as to when we are done processing events on the connection. For some reason python's socket.close() does not cause a concurrent blocking readline() to return immediately.. This prevents the 'TorThread' (the _loop() thread) from terminating until more data arrives. git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22378 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Include queue delay in some of our log messages. Trying tomikeperry2010-05-21
| | | | | | | | | track down a rare bw authority stall bug that may be related to excessive server load/queue delay. git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22376 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Try to warn on missing descriptors, and also give Tor moremikeperry2010-03-02
| | | | | | | | time to fetch them. git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21779 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Handle the return of an empty network status doc.mikeperry2010-02-21
| | | | git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21710 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Stop recording OS. It can have junk in it that SQLAlchemymikeperry2010-02-18
| | | | | | | | | | | hates. Also wait a bit more for stray descriptors to arrive before deciding to update our consensus statistics. git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21685 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Add extra pareto info to BUILDTIMEOUT_SET events.mikeperry2010-01-13
| | | | git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21409 55e972cd-5a19-0410-ae62-a4d7a52db4cd
* Add support for GUARD event.mikeperry2010-01-11
| | | | git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21401 55e972cd-5a19-0410-ae62-a4d7a52db4cd