Opened 4 years ago

Closed 3 years ago

#13819 closed enhancement (fixed)

Provide Windows expert bundles with unhidden console

Reported by: Noino Owned by: gk
Priority: Medium Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Normal Keywords: GeorgKoppen201509, TorBrowserTeam201511R
Cc: gk, mcs, boklm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Under Windows (others?) Tor's console window is now, sadly, hidden.
Plz kindly provide ways NOT to hide it, through
a command line and/or "torrc" options ! And I do mean at launch time, not a compile-time selection !


Child Tickets

Attachments (4)

mkbundle.patch (2 bytes) - added by cypherpunks 4 years ago.
use tor-win32-expert.zip for expert zip
gitian-tor.patch (2 bytes) - added by cypherpunks 4 years ago.
build console version for expert bundle
console_win.c (3 bytes) - added by cypherpunks 4 years ago.
No console for GUI.
gitian-tor-exe-expert.patch (4.3 KB) - added by MakotoSnoezepoes 4 years ago.
Console tor.exe for expert bundle

Download all attachments as: .zip

Change History (53)

comment:1 Changed 4 years ago by dcf

I guess this is related to tor now being build with -mwindows: comment:30:ticket:9444. Tor Launcher doesn't have a way to create a subprocess without showing a window, so tor is compiled in a way that makes it not show a window. In the Vidalia days, tor was compiled without -mwindows, but Vidalia started the subprocess with the CREATE_NO_WINDOW flag.

Noino, can you provide some more information? How do you run Tor, using the browser bundle or the expert bundle or something else? Do you click on an icon, or run from the command line? Can you provide a screenshot attachment of what it used to look like?

comment:2 Changed 4 years ago by Noino

@dcf : I launch the standalone "tor.exe" from Windows "expert bundles". I don't use a separate or integrated "Tor controller". What I wish is access its console window from the desktop. I can mention at least 2 reasons why I find it useful :

  • be able to watch (without logging) the messages, warnings, errors including onion URLs, in real time. This is also the simplest way to assert Tor's exact version now ! / And,
  • signal Tor to shut itself down (by a contrl-C or control-break signal to the console window) rather than having to use TCP from a controller (or netcat) to send the appropriate message to Tor's "controller port" (which can even be disabled).

My suggestion is to have a command line (or/and Torrc) option to tell Tor to adopt the old behaviour and create an unhidden Tor console for the pleasure of "experts" users if none else...

comment:3 Changed 4 years ago by MichaelD76

I use also the tor.exe expert bundles for Windows.

In version prior to 0.2.5.10 the output was something like this in the console:

Dec 06 23:16:59.554 [notice] Tor v0.2.4.23 (git-598c61362f1b3d3e) running on Windows 8 with Libevent 2.0.21-stable and OpenSSL 1.0.1h.
Dec 06 12:16:59.571 [notice] Opening Socks listener on 127.0.0.1:9050
Dec 06 12:17:00.000 [notice] Bootstrapped 5%: Connecting to directory server.
Dec 06 12:17:00.000 [notice] We now have enough directory information to build circuits.
Dec 06 12:17:00.000 [notice] Bootstrapped 80%: Connecting to the Tor network.
Dec 06 12:17:00.000 [notice] Bootstrapped 85%: Finishing handshake with first hop.
Dec 06 12:17:03.000 [notice] Bootstrapped 90%: Establishing a Tor circuit.
................

And you can easily track if the connection was successful or not.

Now with 0.2.5.10 there is no console output. So like Noino said, it will be very good to add an option to have again the old console output behavior for Windows Tor.exe expert bundle.

Thanks!

comment:4 Changed 4 years ago by gk

Cc: gk added
Component: TorTor bundles/installation
Owner: set to erinn
Summary: option required NOT to hide consoleProvide Windows expert bundles with unhidden console
Type: defectenhancement
Version: Tor: 0.2.5.10

Might be something like "Please, compile tor in the Windows expert bundle without -mwindows." Moving to Tor bundles/installation.

comment:5 Changed 4 years ago by nickm

Is there any way to make the behavior of -mwindows selectable at runtime?

comment:7 Changed 4 years ago by MichaelD76

I found a workaround, but it's only for the output to console, can't use CTRL-C to kill the task.

Just create a batch file and add this line:
tor.exe 2>&1 | more

comment:9 Changed 4 years ago by D4ToR

Please restore this feature, I use this a lot and thought the zip file on the site was just a bad upload or something.

We are starting to become increasingly oppressed in the UK, many members of the public with no criminal intentions, are wanting to use TOR.

Please don't cut back on the release types for TOR, the "Expert Bundle" was great to be able to add to portable tools.

Thanks to MichaelD76 for the temporary fix, but please TOR developers, restore the "Expert Bundle".

Thanks for all your work on TOR, a wonderful tool :)

https://www.eff.org//deeplinks/2015/01/britons-you-have-72-hours-stop-snoopers-charter

https://www.liberty-human-rights.org.uk/campaigning/no-snoopers-charter

comment:10 Changed 4 years ago by arma

I just closed #14782 as a duplicate of this ticket.

comment:11 Changed 4 years ago by D4ToR

Still not fixed in 0.2.5.11 :(

comment:12 Changed 4 years ago by badon

I just tested this, and I can't do further bug testing without more information. For example, Tor is occasionally not running at all when invoked, and I don't know why. Also, I have been unable to get Tor to produce any kind of log output, so I don't have any way to move forward with further testing to figure out if it's a new bug, or just a misconfiguration. I have returned to using 0.2.4.23. I have not yet tested 0.2.4.12, but the changes described in the blog post about it did not mention anything that would affect this bug report.

comment:13 in reply to:  5 Changed 4 years ago by cypherpunks

Replying to nickm:

Is there any way to make the behavior of -mwindows selectable at runtime?

Attached console_win.c example of what is allowed to choose during runtime. Most annoying thing is destroyed console on exit, it's possible to attach to console of cmd.exe process (if need and parent, or launch new one for this purpose) but result could be messy.

Is it worth to test with Tor, and what exactly way, or it's better to compile the code as console and gui versions and to ship different one for expert and general bundles?

comment:14 Changed 4 years ago by cypherpunks

Status: newneeds_review

build console version for expert bundle

comment:15 in reply to:  14 ; Changed 4 years ago by gk

Status: needs_reviewneeds_revision

Replying to cypherpunks:

build console version for expert bundle

This is not working as you would create a console version for the Tor Browser as well if all is working out as you wish. But we don't want that. Rather only the expert bundles should ship with an unhidden console.

comment:16 in reply to:  15 ; Changed 4 years ago by cypherpunks

Status: needs_revisionneeds_information

Replying to gk:

Replying to cypherpunks:

build console version for expert bundle

This is not working as you would create a console version for the Tor Browser as well if all is working out as you wish. But we don't want that. Rather only the expert bundles should ship with an unhidden console.

Patch keeping gbuild.zip used for TorBrowser bundle unchanged. You still need to extract expert zip by hands from gitian VM, like it already happens today, but instead of gbuild you can to use expert.zip.

comment:17 Changed 4 years ago by cypherpunks

And yes, create repository for expert builds, instead of hands made.

comment:18 Changed 4 years ago by cypherpunks

Or drop support to expert builds for windows

comment:19 Changed 4 years ago by cypherpunks

Or better windows support.

comment:20 Changed 4 years ago by cypherpunks

No need false sense of security, please.

comment:21 Changed 4 years ago by cypherpunks

I can't get what you need then if title says Provide Windows expert bundles with unhidden console while no such bundles exists because it's only intermediate zip file generated by gitian-tor.yml. This patch generates yet one extra zip that can be used instead for "expert bundles" while keeping TorBrowser unchanged. What you want? What you need?

comment:22 in reply to:  16 ; Changed 4 years ago by gk

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

build console version for expert bundle

This is not working as you would create a console version for the Tor Browser as well if all is working out as you wish. But we don't want that. Rather only the expert bundles should ship with an unhidden console.

Patch keeping gbuild.zip used for TorBrowser bundle unchanged. You still need to extract expert zip by hands from gitian VM, like it already happens today, but instead of gbuild you can to use expert.zip.

Ah, I misread what you wanted. The expert zip is not created by hand today, see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/gitian/mkbundle-windows.sh#n230. Your patch would just build an expert zip which would not get used by the Gitian setup to create the expert bundle.

comment:23 Changed 4 years ago by gk

Status: needs_informationnew

comment:24 in reply to:  22 ; Changed 4 years ago by cypherpunks

Replying to gk:

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

build console version for expert bundle

This is not working as you would create a console version for the Tor Browser as well if all is working out as you wish. But we don't want that. Rather only the expert bundles should ship with an unhidden console.

Patch keeping gbuild.zip used for TorBrowser bundle unchanged. You still need to extract expert zip by hands from gitian VM, like it already happens today, but instead of gbuild you can to use expert.zip.

Ah, I misread what you wanted. The expert zip is not created by hand today, see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/gitian/mkbundle-windows.sh#n230. Your patch would just build an expert zip which would not get used by the Gitian setup to create the expert bundle.

Ok then.
use tor-win32-expert.zip for expert zip

comment:25 in reply to:  24 ; Changed 4 years ago by cypherpunks

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

build console version for expert bundle

This is not working as you would create a console version for the Tor Browser as well if all is working out as you wish. But we don't want that. Rather only the expert bundles should ship with an unhidden console.

Patch keeping gbuild.zip used for TorBrowser bundle unchanged. You still need to extract expert zip by hands from gitian VM, like it already happens today, but instead of gbuild you can to use expert.zip.

Ah, I misread what you wanted. The expert zip is not created by hand today, see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/gitian/mkbundle-windows.sh#n230. Your patch would just build an expert zip which would not get used by the Gitian setup to create the expert bundle.

Ok then.
use tor-win32-expert.zip for expert zip

No, it's wrong

Changed 4 years ago by cypherpunks

Attachment: mkbundle.patch added

use tor-win32-expert.zip for expert zip

comment:26 in reply to:  25 ; Changed 4 years ago by cypherpunks

Replying to cypherpunks:

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

build console version for expert bundle

This is not working as you would create a console version for the Tor Browser as well if all is working out as you wish. But we don't want that. Rather only the expert bundles should ship with an unhidden console.

Patch keeping gbuild.zip used for TorBrowser bundle unchanged. You still need to extract expert zip by hands from gitian VM, like it already happens today, but instead of gbuild you can to use expert.zip.

Ah, I misread what you wanted. The expert zip is not created by hand today, see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/gitian/mkbundle-windows.sh#n230. Your patch would just build an expert zip which would not get used by the Gitian setup to create the expert bundle.

Ok then.
use tor-win32-expert.zip for expert zip

No, it's wrong

Everything wrong

Changed 4 years ago by cypherpunks

Attachment: gitian-tor.patch added

build console version for expert bundle

comment:27 in reply to:  26 Changed 4 years ago by cypherpunks

Replying to cypherpunks:

Replying to cypherpunks:

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

Replying to gk:

Replying to cypherpunks:

build console version for expert bundle

This is not working as you would create a console version for the Tor Browser as well if all is working out as you wish. But we don't want that. Rather only the expert bundles should ship with an unhidden console.

Patch keeping gbuild.zip used for TorBrowser bundle unchanged. You still need to extract expert zip by hands from gitian VM, like it already happens today, but instead of gbuild you can to use expert.zip.

Ah, I misread what you wanted. The expert zip is not created by hand today, see: https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/gitian/mkbundle-windows.sh#n230. Your patch would just build an expert zip which would not get used by the Gitian setup to create the expert bundle.

Ok then.
use tor-win32-expert.zip for expert zip

No, it's wrong

Everything wrong

Unrepairable bug.

Changed 4 years ago by cypherpunks

Attachment: console_win.c added

No console for GUI.

Changed 4 years ago by MakotoSnoezepoes

Attachment: gitian-tor-exe-expert.patch added

Console tor.exe for expert bundle

comment:28 Changed 4 years ago by cypherpunks

Status: newneeds_review

Someone attached patch to create tor.exe by gitian, console + unpatched version for expert bundle.

comment:29 Changed 4 years ago by gk

Keywords: TorBrowserTeam201504R GeorgKoppen201504R added

comment:30 Changed 4 years ago by gk

Keywords: TorBrowserTeam201505R GeorgKoppen201505R added; TorBrowserTeam201504R GeorgKoppen201504R removed

comment:31 Changed 4 years ago by gk

Keywords: TorBrowserTeam201506R GeorgKoppen201506R added; TorBrowserTeam201505R GeorgKoppen201505R removed

comment:32 Changed 4 years ago by gk

Keywords: TorBrowserTeam201507R GeorgKoppen201507R added; TorBrowserTeam201506R GeorgKoppen201506R removed

comment:33 Changed 4 years ago by Alan

Under Windows, you can easily modify the existing tor.exe to display a console without rebuilding. Open tor.exe in CFF Explorer, click on "Optional Header", change the Subsystem to "Windows Console" then File->Save. I use CFF Explorer to edit the .exe file, although I'm sure other .exe/.dll/PE format editors would work.

comment:34 Changed 4 years ago by mcs

Cc: mcs added

comment:35 Changed 4 years ago by gk

Keywords: TorBrowserTeam201508R GeorgKoppen201508R added; TorBrowserTeam201507R GeorgKoppen201507R removed

comment:36 Changed 3 years ago by mikeperry

Keywords: TorBrowserTeam201509R added; TorBrowserTeam201508R removed

Transfer review tickets to Sept.

comment:37 Changed 3 years ago by gk

Keywords: GeorgKoppen201509R added; GeorgKoppen201508R removed

comment:38 Changed 3 years ago by gk

Status: needs_reviewneeds_revision

Having an own .yml file is overkill, I think.

comment:39 Changed 3 years ago by gk

Keywords: GeorgKoppen201509 added; GeorgKoppen201509R removed
Owner: changed from erinn to gk
Status: needs_revisionassigned

comment:40 Changed 3 years ago by gk

Status: assignedneeds_review

comment:41 Changed 3 years ago by gk

Moving needs_review tickets to October 2015.

comment:42 Changed 3 years ago by gk

Keywords: TorBrowserTeam201510R added; TorBrowserTeam201509R removed

Batch modification for realz now.

comment:43 Changed 3 years ago by TheNain38

Severity: Normal

You can use this script:

@echo off
tasklist /nh /fi "imagename eq tor.exe" | find /i "tor.exe" >nul && (
taskkill /t /f /im tor.exe >nul
) || (
Tor\tor.exe 2>&1 | more
)

When you launch it it will display output and if you launch it again it will kill tor.exe

Last edited 3 years ago by TheNain38 (previous) (diff)

comment:44 Changed 3 years ago by gk

Keywords: TorBrowserTeam201511R added; TorBrowserTeam201510R removed

comment:45 Changed 3 years ago by gk

Cc: boklm added

boklm: Do you have time to give my patch some review?

comment:46 Changed 3 years ago by mcs

r=mcs (but I did not test it, and it would still be good for boklm to take a look)

comment:47 Changed 3 years ago by boklm

This looks good to me too.

I was going to test it, but I currently have a probably unrelated problem while trying to build:

****** Starting Utilities Component of Linux Bundle (1/5 for Linux) ******

--- Building utils-linux for lucid i386 ---
Stopping target if it is up
Making a new image copy
Formatting 'target-lucid-i386.qcow2', fmt=qcow2 size=17179869184 backing_file='base-lucid-i386.qcow2' encryption=off cluster_size=65536 lazy_refcounts=off 
Starting target
Checking if target is up
Preparing build environment
Updating apt-get repository (log in var/install.log)
./bin/gbuild:21:in `system!': failed to run on-target -u root apt-get update > var/install.log 2>&1 (RuntimeError)
        from ./bin/gbuild:90:in `build_one_configuration'
        from ./bin/gbuild:224:in `block (2 levels) in <main>'
        from ./bin/gbuild:219:in `each'
        from ./bin/gbuild:219:in `block in <main>'
        from ./bin/gbuild:217:in `each'
        from ./bin/gbuild:217:in `<main>'
Makefile:27: recipe for target 'build-alpha' failed
make: *** [build-alpha] Error 1
$ cat ../../gitian-builder/var/install.log 
bash: /usr/bin/apt-get: cannot execute binary file

comment:48 in reply to:  47 Changed 3 years ago by boklm

Replying to boklm:

This looks good to me too.

I was going to test it, but I currently have a probably unrelated problem while trying to build:

After solving this (caused by a corrupt VM that was still running), the build produced a tor-win32-0.2.7.4-rc.zip file. Running this build on Windows, it shows a console window, so everything looks good.

comment:49 Changed 3 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

Thanks, I cherry-picked it (eaec9e80ac9a2a490456b4d6d3805f66dfa0a627 on master) and the next alpha will be testing the patch. If all goes well, the stable after the next one will ship with this fix.

Note: See TracTickets for help on using tickets.