Startup Obfsproxy via pre-connect.sh

This forum is for general conversation and user-user networking.
phlippes
OpenVpn Newbie
Posts: 1
Joined: Mon Jun 05, 2017 12:57 pm

Startup Obfsproxy via pre-connect.sh

Postby phlippes » Mon Jun 05, 2017 1:18 pm

Hello everyone,

I am quite new to OpenVPN and tunnelblick. So I hope I am not asking anything to stupid :?

Here is my setup/idea: I have an OpenVPN server running at home and I want to connect to from a client somewhere else. I want to do via traffic obfuscation (i.e. obfsproxy). For this to work I need to start obfsproxy on my client machine before tunnelblick tries to connect. As obfsproxy does not provide a daemonize option, I need to manually get obfsproxy to "kind-of-daemonize" otherwise the pre-connect.sh script would never exit. For this I am using screen with the -dmS option.
I have written a (one-line) "script", named it pre-connect.sh and placed it in my .tblk config. The script looks like this:

#!/bin/bash
sudo -u user /usr/bin/screen -dmS obfs /usr/local/bin/obfsproxy --log-min-severity info obfs3 socks 127.0.0.1:10194

When I execute this script from terminal, it does what it is supposed to: It start obfsproxy with the desired options neatly in the background. However, when it is run from tunnelblick I get an exit with Status 0, but no running obfsproxy. I have found a "dirty" workaround:

#!/bin/bash
open -a terminal /Users/user/Desktop/pre-connect.sh

I.e. having tunnelblick calling the exact same script via terminal. This works perfectly. But it feels ugly and wrong. And I feel it should be easy to do the same thing without having a script calling another script...

I would really appreciate some help with this, as I really don't know what I am doing wrong.

Best

Return to “Off Topic, Related”

Who is online

Users browsing this forum: No registered users and 4 guests