[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #15125 [meek]: meek-client-wrapper does not use signals well
#15125: meek-client-wrapper does not use signals well
---------------------------+-----------------
Reporter: infinity0 | Owner: dcf
Type: defect | Status: new
Priority: normal | Milestone:
Component: meek | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
---------------------------+-----------------
Comment (by infinity0):
So I tried another approach - turn `meek-browser-helper-windows.bat` into
a wrapper for `meek-browser-helper-windows.js` (I rewrote the `.vbs` in
`.js` which also works, and is probably better since VBS is dead):
meek-browser-helper-windows.bat
{{{
@echo off
REM meek-browser-helper program for Tor Browser on Windows
cscript //b TorBrowser\Tor\PluggableTransports\meek-browser-helper-
windows.js
}}}
meek-browser-helper-windows.js
{{{
// meek-browser-helper.js
var ChildProc = new ActiveXObject("WScript.Shell").Exec("./firefox.exe " +
"-no-remote -profile TorBrowser/Data/Browser/profile.meek-http-
helper")
WScript.StdOut.WriteLine(ChildProc.StdOut.ReadLine())
while (!WScript.StdIn.AtEndOfStream) {
WScript.StdIn.Skip(1)
}
WScript.StdErr.WriteLine("stdin closed")
ChildProc.Terminate()
}}}
This works when run from inside cmd:
{{{
C:\Users\gaol\Desktop\Tor
Browser\Browser>TorBrowser\Tor\PluggableTransports\meek-browser-helper-
windows.bat
meek-http-helper: listen 127.0.0.1:51437
^Z
stdin closed
}}}
(ctrl-Z,<enter> is the cmd.exe equivalent of ctrl-D)
However, it does not work when double-clicked or when run from Tor
Browser. Log output suggests that when a `.bat` file is executed directly
(i.e. as "`argv[0]`"), Windows automatically closes its stdin. So our
"terminate children on stdin close" behaviour doesn't work for this
case... I'll try to think of other ways.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15125#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs