Re: [tor-dev] Tor Browser Launcher

2013-02-19 Thread adrelanos
I followed the readme for dependency installing, building and installing
from the develop branch. Running into two issues trying this...

LC_ALL and LANG is not set on my system.

develop ~/torbrowser-launcher/dist/deb_dist $ torbrowser-launcher
Tor Browser Launcher
https://github.com/micahflee/torbrowser-launcher
Traceback (most recent call last):
  File /usr/bin/torbrowser-launcher, line 352, in module
app = TorBrowserLauncher(current_tbb_version)
  File /usr/bin/torbrowser-launcher, line 13, in __init__
self.discover_arch_lang();
  File /usr/bin/torbrowser-launcher, line 65, in discover_arch_lang
self.language = locale.getdefaultlocale()[0].replace('_', '-')
AttributeError: 'NoneType' object has no attribute 'replace'

Setting them, fixes this. I am not sure how many other people may not
have these values set, so I think this should be fixed.

Let's set them and try again.

develop ~/torbrowser-launcher/dist/deb_dist $ export LC_ALL=en_GB.UTF-8
develop ~/torbrowser-launcher/dist/deb_dist $ export LANG=en_GB.UTF-8

Running into another issue.

develop ~/torbrowser-launcher/dist/deb_dist $ torbrowser-launcher
Tor Browser Launcher
https://github.com/micahflee/torbrowser-launcher
Traceback (most recent call last):
  File /usr/bin/torbrowser-launcher, line 352, in module
app = TorBrowserLauncher(current_tbb_version)
  File /usr/bin/torbrowser-launcher, line 55, in __init__
self.build_ui()
  File /usr/bin/torbrowser-launcher, line 124, in build_ui
settings.props.gtk_button_images = True
AttributeError: 'gobject.GProps' object has no attribute 'gtk_button_images'
develop ~/torbrowser-launcher/dist/deb_dist $

Am I missing a dependency or?
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Proposal: Controller events to better understand connection/circuit usage

2013-02-19 Thread Karsten Loesing
On 2/12/13 4:54 PM, Damian Johnson wrote:
 AppWard and ExitWard indicate the direction of cell flow through the
 circuit. Previous cell events aggregated statistics for both directions and
 therefore did not capture information which I believe may be important.
 These are much more informative than N and P. Do you have suggestions for
 improving this further?
 
 Ahhh, gotcha. Personally I'd go for 'inbound' and 'outbound' since
 they better connotate directionality. AppWard and ExitWard sound
 weird, but they make sense now too and would be fine if CELL_STATS got
 a quick description saying what they mean.

Sure, I'm fine with calling it 'inbound' and 'outbound'.  Will change
that the next time I touch the proposal.  Thanks!


I also thought more about Rob's idea to link circuits from client to
exit in a testing network.  I think we should add two more fields
InboundName and OutboundName to CELL_STATS events.  These fields would
contain LongName ($CC88FB3B78599580F1EE4F6F73E26A7EC3DF2CA1~tokenconn)
or Target (like 60.1.0.0:10002) of the previous or next node in a
circuit.  While it may be possible to extract this information from
ORCONN events, that seems somewhat fragile to me.  (When testing this, I
had a case when we were missing ORCONN events, because the controller
was not yet connected, so it was unclear where the CELL_STATS events
belonged.)

Here's an example of the extended CELL_STATS event (still using
positional arguments, because I didn't change the code there yet):

CELL_STATS 48957 15 $9441269F5989487F07AE824063345A0A6BCAB279
created=1;relay=1 created=1;relay=1 created=0;relay=0 29201 16
$DC284D0012ECB812C0CA2DEB080CB2F839A77E1A create=1 create=1 create=0

And here's how we'd put together relevant CELL_STATS events to learn
what happened in a given circuit:

[fileclient-60.1.0.0]:[tokenconn-59.1.0.0]:34760
  00:23:16 [fileclient-60.1.0.0]  circ=34760 conn=12
create_fast=1;relay_early=2 create_fast=1;relay_early=2
  00:23:16 [tokenconn-59.1.0.0]  circ=34760 conn=31
relay=1;created_fast=1 relay=1;created_fast=1
  00:23:17 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=1 relay=1
  00:25:01 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=1 relay=1
  00:25:01 [fileclient-60.1.0.0]  circ=34760 conn=12 relay_early=1
relay_early=1
  00:25:02 [fileclient-60.1.0.0]  circ=34760 conn=12 relay_early=1
relay_early=1
  00:25:02 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=6 relay=6
  00:25:03 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=40 relay=40
  00:25:04 [fileclient-60.1.0.0]  circ=34760 conn=12 relay_early=1
relay_early=1
  00:25:04 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=61 relay=61
  00:25:05 [fileclient-60.1.0.0]  circ=34760 conn=12
relay=1;relay_early=3 relay=1;relay_early=3
  00:25:06 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=1 relay=1
  00:25:06 [fileclient-60.1.0.0]  circ=34760 conn=12 relay=1 relay=1
  00:25:07 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=44 relay=44
  00:25:08 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=63 relay=63
  00:25:08 [fileclient-60.1.0.0]  circ=34760 conn=12 relay=3 relay=3
  00:25:09 [fileclient-60.1.0.0]  circ=34760 conn=12 relay=2 relay=2
  00:25:10 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=1 relay=1
  00:25:10 [fileclient-60.1.0.0]  circ=34760 conn=12 relay=1 relay=1
  00:25:11 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=94 relay=94
  00:25:12 [fileclient-60.1.0.0]  circ=34760 conn=12 relay=4 relay=4
  00:25:12 [tokenconn-59.1.0.0]  circ=34760 conn=31 relay=12 relay=12
[tokenconn-59.1.0.0]:[tokenglobal-57.1.0.0]:9272
  00:23:16 [tokenconn-59.1.0.0]  circ=9272 conn=18
create=1;relay_early=1 create=1;relay_early=1
  00:23:16 [tokenglobal-57.1.0.0]  circ=9272 conn=15
created=1;relay=1 created=1;relay=1
  00:25:01 [tokenconn-59.1.0.0]  circ=9272 conn=18 relay_early=1
relay_early=1
  00:25:01 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=1 relay=1
  00:25:02 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=6 relay=6
  00:25:02 [tokenconn-59.1.0.0]  circ=9272 conn=18 relay_early=1
relay_early=1
  00:25:03 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=41 relay=41
  00:25:04 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=60 relay=60
  00:25:04 [tokenconn-59.1.0.0]  circ=9272 conn=18 relay_early=1
relay_early=1
  00:25:05 [tokenconn-59.1.0.0]  circ=9272 conn=18
relay=1;relay_early=3 relay=1;relay_early=3
  00:25:06 [tokenconn-59.1.0.0]  circ=9272 conn=18 relay=1 relay=1
  00:25:06 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=1 relay=1
  00:25:07 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=52 relay=52
  00:25:08 [tokenconn-59.1.0.0]  circ=9272 conn=18 relay=1 relay=1
  00:25:08 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=55 relay=55
  00:25:09 [tokenconn-59.1.0.0]  circ=9272 conn=18 relay=4 relay=4
  00:25:10 [tokenconn-59.1.0.0]  circ=9272 conn=18 relay=1 relay=1
  00:25:10 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=1 relay=1
  00:25:11 [tokenglobal-57.1.0.0]  circ=9272 conn=15 relay=98 relay=98
  00:25:12 

Re: [tor-dev] Proposal: Controller events to better understand connection/circuit usage

2013-02-19 Thread Damian Johnson
 I think we should add two more fields
 InboundName and OutboundName to CELL_STATS events.  These fields would
 contain LongName ($CC88FB3B78599580F1EE4F6F73E26A7EC3DF2CA1~tokenconn)
 or Target (like 60.1.0.0:10002) of the previous or next node in a
 circuit.

Maybe it would make more sense to have an InboundName/OutboundName
field for the LongName and InboundDestination/OutboundDestination for
the address/port? In general overloading the type that a field can
have isn't a good idea.
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] [Patch] or/onion_ntor.c

2013-02-19 Thread Nick Mathewson
On Tue, Feb 12, 2013 at 5:53 PM, Gisle Vanem gva...@broadpark.no wrote:
 I suggest that the whole body of this file gets included
 inside an #ifdef CURVE25519_ENABLED in-case someone
 (like me!) inadvertently tries to compile it w/o this define
 set. Patch:

NAK on this patch -- it doesn't make sense IMO to do this without
doing the same thing for the other dozen or so conditionally-compiled
files.

There *is* a reason to take a more general patch of this kind (that
is, one that would cover all of the conditionally-compiled files):  it
would let people who want to edit Tor with IDEs that like to compile
all the files they edit do so without having their IDEs complain about
files that can't build.  That's not how I work personally, but I've
got nothing against people who work that way, so I'd be happy to take
that kind of a patch in 0.2.5 or later.  Just opened a ticket as

https://trac.torproject.org/projects/tor/ticket/8278

so we don't forget.


best wishes,
--
Nick
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Tor Browser Launcher

2013-02-19 Thread adrelanos
Micah Lee:
 On 02/19/2013 03:29 AM, adrelanos wrote:
 I followed the readme for dependency installing, building and installing
 from the develop branch. Running into two issues trying this...

 LC_ALL and LANG is not set on my system.

 develop ~/torbrowser-launcher/dist/deb_dist $ torbrowser-launcher
 Tor Browser Launcher
 https://github.com/micahflee/torbrowser-launcher
 Traceback (most recent call last):
   File /usr/bin/torbrowser-launcher, line 352, in module
 app = TorBrowserLauncher(current_tbb_version)
   File /usr/bin/torbrowser-launcher, line 13, in __init__
 self.discover_arch_lang();
   File /usr/bin/torbrowser-launcher, line 65, in discover_arch_lang
 self.language = locale.getdefaultlocale()[0].replace('_', '-')
 AttributeError: 'NoneType' object has no attribute 'replace'

 Setting them, fixes this. I am not sure how many other people may not
 have these values set, so I think this should be fixed.
 
 Strange. I thought that locale.getdefaultlocale() was supposed to be the
 cross-platform method for figuring out the default locale, without the
 LANG field.
 
 What operating system are you using?

Debian Wheezy.

 Maybe your getdefaultlocale()
 doesn't return a tuple or something. Here's what mine returns -- what
 about yours?

develop ~/torbrowser-launcher $ python
Python 2.7.3 (default, Jan  2 2013, 16:53:07)
[GCC 4.7.2] on linux2
Type help, copyright, credits or license for more information.
 import locale
 locale.getdefaultlocale()
(None, None)

 Let's set them and try again.

 develop ~/torbrowser-launcher/dist/deb_dist $ export LC_ALL=en_GB.UTF-8
 develop ~/torbrowser-launcher/dist/deb_dist $ export LANG=en_GB.UTF-8

 Running into another issue.

 develop ~/torbrowser-launcher/dist/deb_dist $ torbrowser-launcher
 Tor Browser Launcher
 https://github.com/micahflee/torbrowser-launcher
 Traceback (most recent call last):
   File /usr/bin/torbrowser-launcher, line 352, in module
 app = TorBrowserLauncher(current_tbb_version)
   File /usr/bin/torbrowser-launcher, line 55, in __init__
 self.build_ui()
   File /usr/bin/torbrowser-launcher, line 124, in build_ui
 settings.props.gtk_button_images = True
 AttributeError: 'gobject.GProps' object has no attribute 'gtk_button_images'
 develop ~/torbrowser-launcher/dist/deb_dist $

 Am I missing a dependency or?
 
 Yes, sorry I haven't added the dependencies to the debian package yet.
 You need python-gtk2.

It is installed.

develop ~/torbrowser-launcher $ sudo apt-get install python-gtk2
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-gtk2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
develop ~/torbrowser-launcher $ ./torbrowser-launcher
Tor Browser Launcher
https://github.com/micahflee/torbrowser-launcher
Traceback (most recent call last):
  File ./torbrowser-launcher, line 352, in module
app = TorBrowserLauncher(current_tbb_version)
  File ./torbrowser-launcher, line 55, in __init__
self.build_ui()
  File ./torbrowser-launcher, line 124, in build_ui
settings.props.gtk_button_images = True
AttributeError: 'gobject.GProps' object has no attribute 'gtk_button_images'
develop ~/torbrowser-launcher $


___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Tor Browser Launcher

2013-02-19 Thread k e bera
On Wed, 20 Feb 2013 02:39:10 +
adrelanos adrela...@riseup.net wrote:

 Micah Lee:
  On 02/19/2013 03:29 AM, adrelanos wrote:
  I followed the readme for dependency installing, building and installing
  from the develop branch. Running into two issues trying this...
 
  LC_ALL and LANG is not set on my system.
 
  develop ~/torbrowser-launcher/dist/deb_dist $ torbrowser-launcher
  Tor Browser Launcher
  https://github.com/micahflee/torbrowser-launcher
  Traceback (most recent call last):
File /usr/bin/torbrowser-launcher, line 352, in module
  app = TorBrowserLauncher(current_tbb_version)
File /usr/bin/torbrowser-launcher, line 13, in __init__
  self.discover_arch_lang();
File /usr/bin/torbrowser-launcher, line 65, in discover_arch_lang
  self.language = locale.getdefaultlocale()[0].replace('_', '-')
  AttributeError: 'NoneType' object has no attribute 'replace'
 
  Setting them, fixes this. I am not sure how many other people may not
  have these values set, so I think this should be fixed.
  
  Strange. I thought that locale.getdefaultlocale() was supposed to be the
  cross-platform method for figuring out the default locale, without the
  LANG field.
  
  What operating system are you using?
 
 Debian Wheezy.
 
  Maybe your getdefaultlocale()
  doesn't return a tuple or something. Here's what mine returns -- what
  about yours?
 
 develop ~/torbrowser-launcher $ python
 Python 2.7.3 (default, Jan  2 2013, 16:53:07)
 [GCC 4.7.2] on linux2
 Type help, copyright, credits or license for more information.
  import locale
  locale.getdefaultlocale()
 (None, None)
  Let's set them and try again.
 
  develop ~/torbrowser-launcher/dist/deb_dist $ export LC_ALL=en_GB.UTF-8
  develop ~/torbrowser-launcher/dist/deb_dist $ export LANG=en_GB.UTF-8

According to http://wiki.debian.org/Locale#Standard
they should return None but you can do some other steps to get useful values in 
there.

Another advice i've seen is just to run 
   dpkg-reconfigure locales



___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Tor Browser Launcher

2013-02-19 Thread Jacob Appelbaum
Micah Lee:
 On 02/18/2013 12:29 PM, Jacob Appelbaum wrote:
 I was assuming that making the launcher depend on a system Tor would be
 troublesome. However now that I'm looking at
 https://www.torproject.org/docs/debian again, it seems like it could
 totally work. What about for Ubuntu users?

 For normal Debian GNU/Linux users, I believe it will work. For recent
 versions of Ubuntu, I also believe it will work. I would also say that
 the launcher could prompt them to actually *add* the Tor repositories
 that fix the problems Ubuntu users may or may not face in the future.
 
 True. I'll start with just a normal Tor dependency, and if only add the
 deb.torproject.org repo if it becomes necessary.
 

That seems fine as a start.

 My workaround plan was to download TBB not over Tor the first time.
 After extracting it, copy a Firefox extension into the TBB profile, and
 then run it. From that point on, the extension would be in charge of
 checking for updates, downloading new updates, and telling the user when
 they should restart their browser.


 I'm not sure I follow? You want to extend TBB to check for updates
 itself? In the long term, I think that is a fine plan - though in the
 short term, I think a simple script can be safer, easier and generally
 better. Imagine for a moment that there was a system wide cache of TBB
 downloads? One TBB to rule them all, or something. Such a thing wouldn't
 be easy inside of Firefox.
 
 My plan was to make the Firefox extension, and then after extracting the
 TBB tarball copying the extension into
 ~/.torbrowser/tbb/x86_64/tor-browser_en-US/Data/profile/extensions and
 doing whatever you need to do to enable it that profile. However, since
 I'm going to make Tor a dependency, it's moot.
 

I think a Firefox extension is a fine idea generally but specifically,
an out of TBB solution seems most expedient.

 What do you think the report button should do? What information should
 it send back to us, and how should it send it? If there is a real attack
 and the user can't successfully download TBB, how can we make sure they
 can successfully report the attack? You can post comments on the bug.


 I'll add comments to the bug.
 
 Thanks!
 
 Do you pin SSL certs? Or fetch from known mirrors? Or...? :)

 No. I assumed that if someone successfully did a MITM attack on the
 https connection to torproject.org, they wouldn't get their malicious
 software installed because of the signature verification. Also, I didn't
 realize urllib2 doesn't check certs automatically. It's a good idea to
 implement anyway. Thanks for opening the bug about it.

 https://github.com/micahflee/torbrowser-launcher/issues/1


 Sure - I find it hard to believe that Python's development community
 actually settled on that as the default behavior. It bites nearly everyone.
 
 Python's development community also doesn't verifying anything
 downloaded by pip:
 http://www.reddit.com/r/Python/comments/17rfh7/warning_dont_use_pip_in_an_untrusted_network_a/
 
 Hopefully it will get better soon.
 

Yeah, I'm unimpressed to say the least. I know it has been that way for
a while. I'm pretty amazed that someone hasn't just tossed up an SSL
mirror with some look-aside code.

 I'd thought about this, but I wasn't sure if this is a reliable way to
 know which version to download. For example, when I go to
 https://www.torproject.org/dist/torbrowser/linux/?C=M;O=D now, the first
 file is:

 tor-browser-gnu-linux-x86_64-2.4.10-alpha-1-dev-en-US.tar.gz.asc

 But when I go to the TBB download page, the version I'm presented with
 is 2.3.25-2, not 2.4.10-alpha-1. Maybe TBB's built-in version check will
 shed some light onto the best way to know what the latest stable version is.


 Well, which should your users be using? From my perspective, I think you
 should give them the alpha and help them report bugs! :-)
 
 Interesting idea. Anyone else have opinions on this? I think I'd be fine
 giving people the alpha, but I also don't want to annoy people with too
 many bugs.
 

I don't think there are too many bugs - I use the alpha all the time and
it seems fine.

 Right now it would be easiest to just make it get the alpha.
 
 Or, alternatively, I could download
 https://www.torproject.org/download/download.html.en and parse it for
 the current version. However, this will break as soon as torproject.org
 updates it's web design.
 

Well, we have wml files as well - so you can just look at those rather
than the published site.

 I pushed a code audit first pass to the git repo, did you see the
 branches that I added?
 
 Yup. I merged in your doc-formatting, gpg-keys, and image-fixups
 branches into my develop branch.

Cool, thanks!

 
 https://github.com/micahflee/torbrowser-launcher/tree/develop
 
 And I opened issues for most of things you brought up in the code review
 branch: https://github.com/micahflee/torbrowser-launcher/issues
 

Great - I'll comment on each respective bug.

 For the things I didn't open issues on, here 

Re: [tor-dev] Proposal: Controller events to better understand connection/circuit usage

2013-02-19 Thread Karsten Loesing
On 2/19/13 5:45 PM, Damian Johnson wrote:
 I think we should add two more fields
 InboundName and OutboundName to CELL_STATS events.  These fields would
 contain LongName ($CC88FB3B78599580F1EE4F6F73E26A7EC3DF2CA1~tokenconn)
 or Target (like 60.1.0.0:10002) of the previous or next node in a
 circuit.
 
 Maybe it would make more sense to have an InboundName/OutboundName
 field for the LongName and InboundDestination/OutboundDestination for
 the address/port? In general overloading the type that a field can
 have isn't a good idea.

In general, I agree.  Here, I re-used the code that adds a LongName or
Target to CIRC events.  It's a single function call that returns the
best information tor has about the remote end of a connection.  My idea
was that controllers that can parse CIRC events can re-use that code to
parse these fields in CELL_STATS events.  Does that make sense?

Best,
Karsten

___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Tor Browser Launcher

2013-02-19 Thread Micah Lee
On 02/19/2013 06:39 PM, adrelanos wrote:
 What operating system are you using?
 
 Debian Wheezy.

Weird, that's what I'm running Wheezy too. But just to be safe, I
decided I'd make a new Debian Squeeze vm and try to build it and run it
in there. I found several small problems and fixed them.

 develop ~/torbrowser-launcher $ python
 Python 2.7.3 (default, Jan  2 2013, 16:53:07)
 [GCC 4.7.2] on linux2
 Type help, copyright, credits or license for more information.
 import locale
 locale.getdefaultlocale()
 (None, None)

I haven't fixed this yet. But I did just open a bug for it:

https://github.com/micahflee/torbrowser-launcher/issues/12

 develop ~/torbrowser-launcher $ sudo apt-get install python-gtk2
 [sudo] password for user:
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 python-gtk2 is already the newest version.
 0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
 develop ~/torbrowser-launcher $ ./torbrowser-launcher
 Tor Browser Launcher
 https://github.com/micahflee/torbrowser-launcher
 Traceback (most recent call last):
   File ./torbrowser-launcher, line 352, in module
 app = TorBrowserLauncher(current_tbb_version)
   File ./torbrowser-launcher, line 55, in __init__
 self.build_ui()
   File ./torbrowser-launcher, line 124, in build_ui
 settings.props.gtk_button_images = True
 AttributeError: 'gobject.GProps' object has no attribute 'gtk_button_images'
 develop ~/torbrowser-launcher $

I'm not sure why you're getting this error, but it's on the line that
allows icons for buttons. Since it's not critical, I placed in a try
block, so if it fails on your computer it shouldn't crash the program,
the buttons just won't have icons.

git pull origin master and try again, and let me know if you run into
any other problems.

-- 
Micah Lee
https://twitter.com/micahflee



signature.asc
Description: OpenPGP digital signature
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev