| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
According to dererk the default control socket path is "/var/run/tor/control"
rather than "/var/lib/tor/control" (the path mentioned by Peter).
|
| |
|
|
|
| |
Adding support for unix domain control sockets via another connect method. This
is for 'https://trac.torproject.org/projects/tor/ticket/3638'.
|
| |
|
|
|
|
| |
The BUILD_FLAGS, which is for ticket 2411, isn't in tor yet so it shouldn't
yet be in torctl either. This looks like it will be a comma separated list,
but until it's added to the spec we shouldn't depend on that.
|
| |
|
|
|
| |
Avoids repetitive constructors among new style events and parsing the
positional/kw arguments if they won't be used.
|
| |
|
|
|
|
| |
Using the new style for GUARD events, also fixing a minor bug where the
nickname attribute might be left unset after init. Tested this by deleting the
state directory and restarting tor.
|
| |
|
|
|
|
|
|
|
| |
Using the new style for BUILDTIMEOUT_SET events, also adding support for its
TIMEOUT_RATE, CLOSE_MS, and CLOSE_RATE parameters.
*This is not tested* - I didn't figure out a method for triggering
BUILDTIMEOUT_SET events (tried client usage and removing the state
directory/reinitializing but no luck)
|
| |
|
|
|
|
|
|
|
| |
Using the new style for ADDRMAP events. These events have both quoted and
non-quoted values breaking positional and keyword parsing, so keeping the regex
parsing.
This expands the event to include the ERROR and GMTExpiry attributes. This was
tested by visiting sites with TBB and printing out the ADDRMAP results.
|
| |
|
|
|
|
| |
Using the new style for NEWDESC events. This isn't using the positional or kw
pattern so effectively this is just moving the body parsing into the event.
Tested by attaching to a new tor instance to get NEWDESC events.
|
| |
|
|
|
|
| |
This one isn't actually using the new style since the events aren't of the
positional or keyword pattern. I'm just adding the empty positional and kw
args so this doesn't need to become a special case later.
|
| |
|
|
|
| |
Using the new style for BW events. Tested by attaching to a TBB instance and
exercising the event.
|
| |
|
|
|
| |
Using the new style for STREAM_BW events. Tested by attaching to a TBB instance
and exercising the event.
|
| |
|
|
|
| |
If a colon was missing from the target field then the stream event would leave
its port unset. I'm not sure how to exercise this so this change is untested.
|
| |
|
|
|
|
| |
The AGE, READ, and WRITTEN attributes of ORCONN events were for a prospective
change, and never actually added to Tor. Dropping the parsing of these values
to cut down on confusion by torctl users.
|
| |
|
|
|
| |
Replacing event parsing for ORCONN events. Tested by listening for the events
and checking the parsed results.
|
| |
|
|
|
|
|
| |
Replacing the event parsing for CircuitEvent, and adding parsing for the
BUILD_FLAGS field being introduced in ticket 2411. This was tested by running
Robert's 'feature2411-v3' branch and printing the parsed results for CIRC
events.
|
| |
|
|
|
|
|
|
|
|
| |
Refactoring the parsing for STREAM events (other event types are to follow).
This is related to ticket 2411 [1] where a new field will cause breakage for
our parsing. Besides that, this is both a more generic and readable parsing
implementation. Testing was by connecting to a TBB instance and listening to
STREAM events. Thanks to nickm for a rough draft of the new implementation.
[1] https://trac.torproject.org/projects/tor/ticket/2411
|
| |\ |
|
| | | |
|
| |/
|
|
| |
Need to move it for that...
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SQLSupport.refresh_all() is required to keep Elixir and
tc_session in sync. Otherwise it is possible for
routers added by the consensus update to not show up
in queries using the Elixir model i.e. Router.query.all()
Also, warnings have been added to SQLSupport.reset_all() because
this does not work properly -- in some cases relation tables
were not being reset properly (this resulted in old bw measurements
being repeated in future output!).
Finally, even when reset_all() works properly, bwauthority memory
usage continues to grow.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
calls parent and SQLSupport reset functions
Tests show that SQLSupport.reset_all() may clear too much because
if BwAuthority calls Scansupport.reset_stats() after each speedrace()
run only the first slice is properly recorded; the rest are empty.
See: https://trac.torproject.org/projects/tor/ticket/2947
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Postgres doesn't ignore divide-by-zeros like MySQL
CASE statement added to set the result to NULL if
the denominator is zero
|
| | |
| |
| |
| | |
this actually appears to work
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
enabled elixir migration aid options.
renamed a few function calls, as per SQLAlchemy upgrade docs:
session.clear() is removed. use session.remove_all()
|
| | |
| |
| |
| | |
By fixing the miscount, of course.
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
| |
Also rename getIterator to get_iterator.
|
| |\ |
|
| | |\
| | |
| | |
| | |
| | | |
Conflicts:
TorUtil.py
|
| | | |
| | |
| | |
| | |
| | | |
When authentication failed in TorCtl.connect() the abandoned connection wasn't
being closed.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The connect method is a nice helper for cli initiation, but lacks sufficient
call visibility to help in more general use cases. In particular it...
- sends feedback to stdout
- prompts for the controller password on stdin
- suppresses exceptions
To get around this I'm adding a more generic 'connectionComp' that does the
icky bits of the connection negotiation I was trying to hide while still giving
the caller what it needs to handle the connection process however it'd like.
Tested by exercising the connect functionality with cookies, password, and
connection components to handle my TBB cookie auth renegotiation fix.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Setting the 'getIterator' argument drops the memory usage of calling
get_network_status by 71% (from 3.5 MB to 1 MB). This is still higher than what
I was expecting from a generator, though certainly much better.
Unfortunately this didn't have an impact on the ConsensusTracker. The memory
usage from its constructor dwarfs anything else I've looked at (18.8 MB) and
didn't drop like I'd expect when consensus_only was false. :(
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we attempt to initiate a control connection to a non-control port (for
instance tor's socks port instead)...
- the socket shutdown issues an error since it's not connected yet
- checking the authentication type fails with a TorCtlClosed rather than error
reply
For more information see bug 2580.
|
| | | |
| | |
| | |
| | |
| | | |
When the signal sent by _sendImpl causes the control connection to close we
block indefinitely waiting for a response. For more information see bug 1329.
|
| |\ \ \
| |/ /
| | /
| |/
|/| |
|
| | |
| |
| |
| |
| | |
The shutdown added in this branch wakes the socket so there's no need for the
loop we previously had.
|
| |/
|
|
|
| |
Event listening, particularly BW events, is a common request on irc so using it
as the TorCtl example. For more information see bug 2065.
|
| |
|
|
|
| |
Each TorCtl instance spawned a socket that would continue to live for the life
of the python process. For more information see ticket 2812.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
Also remove some traceback debugging statements.
|
| |
|
|
| |
It may be silently killing the bwauths on some platforms..
|