Posts: 57
Joined: Jan 2010
Reputation:
0
I did a script that could be run in linux, so I guess it could be converted to an XBMC script. I can post it here if you like.
If you can't fix it with a hammer you have an electrical problem.
Posts: 57
Joined: Jan 2010
Reputation:
0
Sorry missed your post until now.
Send me a pm with your email and I can send it to you. Can't seem to attach anything other than pictures.
I wrote a complete how to document which takes you step by step through the commands and finishes off with the script, and a few other things to make it run more smoothly.
If you can't fix it with a hammer you have an electrical problem.
Posts: 94
Joined: May 2008
Reputation:
0
did anything come of this?
Posts: 94
Joined: May 2008
Reputation:
0
in my post above I should say as I am using tunnelblick binary I am pretty sure the auth-user-pass will not work as it needs to be compiled with --enable-password-save - I guess tunnelblick is not. If someone could provide a complied binary of this for the mac with this that would cool too. I do not have a mac to do this.
Posts: 94
Joined: May 2008
Reputation:
0
I think I know how to do this now using the openvpn telnet interface and a bash script to spawn a telent session and 'expect' to send the username and password I will post it whne I get it workig!
Posts: 871
Joined: Jun 2009
Reputation:
0
2010-10-02, 23:54
(This post was last modified: 2010-10-03, 00:25 by linuxluemmel.)
Should be easy to make ....
I created a addon called swiss-army-knife.
Inside this addon the user can integrate up to 9 shell-scripts.
(EDIT : svn-version do support the user-shell functions sine a few hours)
If you have 2 scripts ....
one script do connect the vpn and the other do disconnect .....
you can save this 2 scripts inside this directory
~/swiss.army.knife
and name them user1.sh and user2.sh
You can make 2 description files that will be loaded into the menu ....
[email]user@xbmcdev:~/swiss.army.knife[/email]$ cat user1.desc
vpn connection on
[email]user@xbmcdev:~/swiss.army.knife[/email]$
[email]user@xbmcdev:~/swiss.army.knife[/email]$ cat user2.desc
vpn connection off
[email]user@xbmcdev:~/swiss.army.knife[/email]$
Posts: 871
Joined: Jun 2009
Reputation:
0
The solution than you place any shell-script or binary into a folder and create a description that appear inside the addon-menu is more valuable, than to write addon only for a specific kind of vpn.
For the addon it doesn't make a difference to build a openvpn connection or a pptp connection as long you have shell-scripts that do the job.
My solution has now one downside ....
In the moment I can not pass parameters but this could change soon.
I allready made a few openvpn shell-scripts for customers from spain ( to watch the BBC at UK) and that was easy ....(I was paid for this work and the code to call the shell-scripts from within xbmc was not puplished with a gpl-licence on request of the customer)
I used a few little tricks to make this working correctly ....
- set suid bit Zero for the executable openvpn / route / kill
With this little trick you can add a vpn connection as user / add a default route and
last bot not least kill the openvpn connection on request.
Posts: 358
Joined: Jun 2009
Reputation:
2
nice so is it possible to use this in conjunction with the iPlayer plugin that usually only works for UK users? (using a UK proxy of course thru open VPN)
Posts: 94
Joined: May 2008
Reputation:
0
I have actually got the vpn scripts working they are simple python scripts which I have added as favourites so I can run them from within xbmc. The biggest problem is that I am doing this on an appletv. I am sure it is a lot easier todo on a linux box!
I need to test them as I tried it this morning with hulu and it didn't work not sure whether this is the vpn not working or hulu not working. I will need to try it when I am logged in to make sure the vpn is starting up properly.
Once I get them working might try and make them a bit cleverer.