Beispiel #1
0
def off():
    import vpn
    vpn.KillVPN()
Beispiel #2
0
if mode == _COUNTRY:
    label = urllib.unquote_plus(params['label'])
    abrv = urllib.unquote_plus(params['abrv'])

    Country(label, abrv)

elif mode == _VPN:
    label = urllib.unquote_plus(params['label'])
    abrv = urllib.unquote_plus(params['abrv'])
    server = urllib.unquote_plus(params['server'])

    vpn.VPN(label, abrv, server)

elif mode == _SETTINGS:
    vpn.ShowSettings()

elif mode == _KILL:
    vpn.KillVPN()
    doRefresh = True

elif mode == _SEPARATOR:
    pass

else:
    cacheToDisc = False
    Main()

if doRefresh:
    refresh()

xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=cacheToDisc)
 def disable(self):
     try:
         import vpn
         vpn.KillVPN()
     except:
         pass