Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #143

Open
wants to merge 52 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6c3488c
VPN Shortcut added to the Boxee Browse Menu
dmike3 Dec 4, 2012
39bd432
modified: hack/boxee/skin/boxee/720p/scripts/boxeehack_vpn.py
dmike3 Dec 4, 2012
c72c87c
modified: hack/boxee/skin/boxee/720p/scripts/boxeehack_vpn.py
dmike3 Dec 4, 2012
77cf725
Updated icon
dmike3 Dec 4, 2012
aaa2805
deleted: hack/boxee/skin/boxee/720p/resources/icons/graphic-vpn.png
dmike3 Dec 4, 2012
b662755
VPN shortcut now does checks to see if it's configured
dmike3 Dec 4, 2012
c02a285
modified: hack/boxee/skin/boxee/720p/scripts/boxeehack_vpn.py
dmike3 Dec 4, 2012
56c2188
deleted: vpn.sh
dmike3 Dec 4, 2012
4ca8d22
Some more fixes
dmike3 Dec 5, 2012
6729af2
deleted: hack/vpn/vpn_check.sh
dmike3 Dec 5, 2012
249fdc7
fixes
dmike3 Dec 5, 2012
15fec5c
modified: hack/vpn/vpn_chk.sh
dmike3 Dec 5, 2012
4ca2ecb
MTU fixes
dmike3 Dec 8, 2012
4b492c5
modified: vpn_con.sh
dmike3 Dec 8, 2012
3260fdd
Merge remote branch 'upstream/development' into development
dmike3 Dec 10, 2012
ea8bae2
modified: hack/vpn/vpn_con.sh
dmike3 Dec 10, 2012
e6a8c12
Enabling visiability of VPN Shortcut - TESTING
dmike3 Dec 10, 2012
c85c0e6
fixed broken script
dmike3 Dec 10, 2012
e3b0a63
Making changes
dmike3 Dec 10, 2012
88a9546
Merge branch 'master' of git://github.com/boxeehacks/boxeehack into d…
dmike3 Dec 10, 2012
0c8e43a
Fixed MTU - Was breaking stuff
dmike3 Dec 10, 2012
e54b7e8
Adjustment to placement of VPN Shortcut option
dmike3 Dec 11, 2012
9603adc
Merge branch 'master' of git://github.com/boxeehacks/boxeehack into d…
dmike3 Dec 11, 2012
901b731
Merge branch 'master' of git://github.com/boxeehacks/boxeehack into d…
dmike3 Dec 12, 2012
bb9e11b
Incorporating VPN scripts
dmike3 Dec 13, 2012
9d8c9d7
Reverted back to original for now
dmike3 Dec 13, 2012
be1c010
modified: vpn_con.sh
dmike3 Dec 13, 2012
8e9b317
Just small change
dmike3 Dec 13, 2012
681efd4
Some more small changes
dmike3 Dec 13, 2012
3476490
more fixes
dmike3 Dec 13, 2012
7c357ee
Revised scripts
dmike3 Dec 13, 2012
728f154
yet another fix
dmike3 Dec 13, 2012
7a4ca23
Merge remote branch 'upstream/development' into development
dmike3 Dec 18, 2012
32bee25
modified: hack/boxee/skin/boxee/720p/scripts/boxeehack_settings.py
dmike3 Dec 18, 2012
b102323
modified: hack/boxee/skin/boxee/720p/scripts/boxeehack_settings.py
dmike3 Dec 19, 2012
92ed565
Fixed VPN scripts to reflect changes
dmike3 Dec 19, 2012
d8d3897
Merge remote branch 'upstream/development' into development
dmike3 Dec 19, 2012
dc49c9c
Fixes
dmike3 Dec 20, 2012
6696bdd
Merge remote branch 'upstream/development' into development
dmike3 Dec 31, 2012
d0ebc90
Merge remote branch 'upstream/development' into development
dmike3 Dec 31, 2012
edb1a8e
modified: custom_BoxeeHack.xml
dmike3 Dec 31, 2012
942fe39
modified: custom_BoxeeHack.xml
dmike3 Dec 31, 2012
5966ed0
Merge remote branch 'upstream/development' into development
dmike3 Jan 2, 2013
5d68513
modified: vpn_con.sh
dmike3 Jan 3, 2013
85141b8
modified: hack/vpn/vpn_chk.sh
dmike3 Jan 3, 2013
29da152
modified: hack/vpn/vpn_chk.sh
dmike3 Jan 3, 2013
2da7ada
Small changes
dmike3 Jan 3, 2013
7f187fe
Merge remote branch 'upstream/development' into development
dmike3 Jan 11, 2013
faf382b
Merge remote branch 'upstream/development' into development
dmike3 Jan 29, 2013
7698fad
modified: hack/boxee/skin/boxee/720p/scripts/boxeehack_settings.py
dmike3 Jan 29, 2013
b2d6249
Merge remote branch 'upstream/development' into development
dmike3 Feb 11, 2013
5bfc6db
modified: hack/boxee/skin/boxee/720p/scripts/boxeehack_settings.py
dmike3 Feb 11, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified hack/boot.sh
100644 → 100755
Empty file.
11 changes: 8 additions & 3 deletions hack/boxee/skin/boxee/720p/boxee_browse_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@
</control>

<control type="list" id="1824">
<posx>534</posx>
<posx>518</posx>
<posy>396</posy>
<width>212</width>
<width>265</width>
<height>56</height>
<itemgap>12</itemgap>
<scrolltime tween="sine" easing="out">200</scrolltime>
Expand Down Expand Up @@ -533,10 +533,15 @@
<onclick>ActivateWindow(10493)</onclick>
</item>
<item id="3">
<visible>StringCompare(Skin.String(showvpn),1)</visible>
<thumb>../720p/resources/icons/icon_browse_menu_vpn.png</thumb>
<onclick>XBMC.RunScript("special://skin/720p/scripts/boxeehack_vpn.py", "vpn")</onclick>
</item>
<item id="4">
<thumb>mainmenu/graphic-icon-settings.png</thumb>
<onclick>ActivateWindow(Settings)</onclick>
</item>
<item id="4">
<item id="5">
<thumb>mainmenu/graphic-icon-exit.png</thumb>
<onclick>ActivateWindow(111)</onclick>
</item>
Expand Down
9 changes: 8 additions & 1 deletion hack/boxee/skin/boxee/720p/custom_BoxeeHack.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,19 @@
<selected>StringCompare(Skin.String(jump-to-unwatched),1)</selected>
<onclick>XBMC.RunScript("special://skin/720p/scripts/boxeehack_settings.py", "toggle-jump-to-last-unwatched")</onclick>
</control>
<control type="button" id="16">
<control type="radiobutton" id="16">
<include>SettingsRadioButton</include>
<label>VPN Shortcut</label>
<selected>StringCompare(Skin.String(showvpn),1)</selected>
<onclick>XBMC.RunScript("special://skin/720p/scripts/boxeehack_settings.py", "showvpn")</onclick>
</control>
<control type="button" id="17">
<include>SettingsButton</include>
<label>Check for new version...</label>
<label2>$INFO[Skin.String(boxeeplus-version)]</label2>
<onclick>XBMC.RunScript("special://skin/720p/scripts/boxeehack_settings.py", "version")</onclick>
</control>

</control>

<!-- HOME SCREEN -->
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion hack/boxee/skin/boxee/720p/scripts/boxeehack_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,18 @@ def get_featured_feed_value():
replace = "0"
return replace

# Hide / Show VPN Shortcut icon
def showvpn_function():
showvpn = common.file_get_contents("/data/etc/.showvpn_enabled")

if showvpn == "1":
showvpn = "0"
else:
showvpn = "1"

xbmc.executebuiltin("Skin.SetString(showvpn,%s)" % showvpn)
common.file_put_contents("/data/etc/.showvpn_enabled", showvpn)

# Enable/disable the subtitle functionality
def toggle_subtitles(mode, current):
if mode == "all":
Expand Down Expand Up @@ -404,5 +416,5 @@ def shutdown():

if command == "browser-homepage": set_browser_homepage()
if command == "toggle-jump-to-last-unwatched": toggle_jump_to_last_unwatched()

if command == "showvpn": showvpn_function()
if command == "shutdown": shutdown()
21 changes: 21 additions & 0 deletions hack/boxee/skin/boxee/720p/scripts/boxeehack_vpn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
import xbmc, xbmcgui

def vpn_function():
os.system("sh /data/hack/vpn/vpn_chk.sh")
xbmc.sleep(100)
if os.path.exists("/data/hack/vpn/vpn.enabled"):
dialog = xbmcgui.Dialog()
if dialog.yesno("VPN Connection", "Connect/Disconnect VPN?"):
xbmc.executebuiltin("Notification(,Initiating...,2000)")
os.system("sh /data/hack/vpn/vpn_con.sh")

else:
dialog = xbmcgui.Dialog()
ok = dialog.ok('VPN Connection', 'VPN has not been configured.')

if (__name__ == "__main__"):
section = sys.argv[1]

if section == "vpn": vpn_function()

Empty file modified hack/splash.sh
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions hack/vpn/vpn_chk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
#
# Author: n3!
#

host=`sed -n '/vpn*/,/<\/vpn>/p' /data/.boxee/UserData/guisettings.xml > /tmp/vpn_chk.tmp | grep server /tmp/vpn_chk.tmp | awk -F'>' '{print $2}' | awk -F'<' '{print $1}'`

if [ "$host" = "" ]; then
rm /data/hack/vpn/vpn.enabled
else
touch /data/hack/vpn/vpn.enabled
fi

rm /tmp/vpn_chk.tmp
37 changes: 37 additions & 0 deletions hack/vpn/vpn_con.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
#
# Author: n3!
#

# Extracts VPN details from the guisettings.xml file and stores them into the following variables below.

host=`sed -n '/vpn*/,/<\/vpn>/p' /data/.boxee/UserData/guisettings.xml > /tmp/vpn_con.tmp | grep server /tmp/vpn_con.tmp | awk -F'>' '{print $2}' | awk -F'<' '{print $1}'`
username=`sed -n '/vpn*/,/<\/vpn>/p' /data/.boxee/UserData/guisettings.xml > /tmp/vpn_con.tmp | grep account /tmp/vpn_con.tmp | awk -F'>' '{print $2}' | awk -F'<' '{print $1}'`
password=`sed -n '/vpn*/,/<\/vpn>/p' /data/.boxee/UserData/guisettings.xml > /tmp/vpn_con.tmp | grep password /tmp/vpn_con.tmp | awk -F'>' '{print $2}' | awk -F'<' '{print $1}'`

# Checks to see if there is a current VPN connection and if it finds one it disconnects you.

status=`ifconfig |grep ppp | busybox awk '{ print $1 }'`

if [ "$status" = "" ]; then
pppd pty "pptp $host --nolaunchpppd" file /etc/ppp/options.pptp user $username password $password
sleep 3
ppp=`ifconfig |grep -A 6 ppp[01] |grep addr: | cut -f 2 -d ":" | cut -f 1 -d " "`
if [ "$ppp" = "" ]; then
echo "Failed!"
else
ip route | grep default | grep "eth[01]" | cut -f 3 -d " " > /data/hack/vpn/.gw
route del default
route add default gw $ppp
ifconfig ppp0 mtu 1400
touch /tmp/vpn.up
fi

else
dgw=`cat /data/hack/vpn/.gw`
killall pptp > /dev/null 2>&1
route add default gw $dgw
rm /tmp/vpn.up

fi
rm /tmp/vpn_con.tmp