|
From: | Julio C. Neves |
Subject: | Re: [shell-script] Client GUI VPN Gate [shell/yad] |
Date: | Wed, 30 Aug 2017 12:07:33 -0300 |
ifconfig | grep tunif [ $? -eq 0 ]; thenofffiPor:if ifconfig | grep tun; thenofffi
Parm=$(yad --entry --text "Informe o parâmetro" --button gtk-ok --button gtk-cancel)
Shell básico e Programação em Shell Julio Neves
Bacula Heitor Medrado
Zabbix Adail Host
Produção Gráfica e Videografismo Cadunico
Bom dia Senhores!
Enfim dei uma olhada no yad pra aprender um pouco, criei com shell e yad um client para o VPN GATE, nessa caminhada consultei materiais do Raimundo Alves Portela e Júlio Cezar Neves entre outros da gringa. A caminhada não para.Compartilhando...
https://github.com/m41k/clivgate
source:#!/bin/bash #---------------------------------------# # Created by: Maik Alberto # # address@hidden # # github.com/m41k # #----------------------------- ----------# on(){ rm -f /tmp/servers 2> /dev/null wget www.vpngate.net/api/iphone/ -O /tmp/servers 2>&1 | yad --progress \ --title="CliVGate" \ --width=200 \ --window-icon='network-vpn' \ --image='edit-find-symbolic' \ --text="<b>Loading server list...</b>" \ --progress-text="wait please" \ --no-buttons \ --pulsate \ --auto-close \ --auto-kill LISTA=( `tail -n +3 /tmp/servers | cut -s -d "," -f2,7 | while read LINHA; do echo "$LINHA"; done `) SEASE=$(yad --entry --width=200 --title="CliVGATE" \ --window-icon='network-vpn' \ --text="<b>Select a server:</b>" \ --entry-text \ ${LISTA[@]} \ --button="Connect" ) SERVER=( `echo $SEASE | cut -d"," -f1` ) cat /tmp/servers | grep $SERVER | cut -d"," -f15 | base64 -d > /tmp/cfov 2> /dev/null openvpn --config /tmp/cfov & tray } off(){ yad --width=200 --title="CliVGATE" \ --window-icon='network-vpn' \ --text-align='center' \ --text="<small>Created by: github.com/m41k</small>" \ --buttons-layout='center' \ --button="Disconnect" if [ $? -eq 0 ]; then killall openvpn & fi } tray(){ yad --width=200 --notification \ --image='network-vpn' \ --text "CliVGATE" off } ifconfig | grep tun if [ $? -eq 0 ]; then off fi case $1 in off)off ;; tray)tray ;; on)on ;; esac
[Prev in Thread] Current Thread [Next in Thread]
- Client GUI VPN Gate [shell/yad], maik . alberto, 2017/08/30
- Re: [shell-script] Client GUI VPN Gate [shell/yad], Julio C. Neves <=
- Re: [shell-script] Client GUI VPN Gate [shell/yad], maik alberto, 2017/08/31
- Prev by Date: Client GUI VPN Gate [shell/yad]
- Next by Date: Re: [shell-script] String exata
- Previous by thread: Client GUI VPN Gate [shell/yad]
- Next by thread: Re: [shell-script] Client GUI VPN Gate [shell/yad]
- Index(es):