Please add support for any reputable vpn service!

Got a feature request? Great! Post your ideas here!
dhstsw
Posts: 154
youtube meble na wymiar Warszawa
Joined: Sat Aug 02, 2014 2:02 am

Re: Please add support for any reputable vpn service!

Post by dhstsw »

Nice work aenigmatic; this is basically amending the lack of fields in the Asustor App.

I went straight for a more traditional approach:

created a folder with to keep all the PureVPN files and calling at startup a start-stop.sh script that:

-stops transmission;
-launches openvpn:

Code: Select all

#!/bin/sh

case "$1" in
    start)
        echo "Starting $NAME"
	/etc/script/vpn.sh rmmod
	/usr/local/AppCentral/transmission/CONTROL/start-stop.sh stop
	/root/openvpn/start.sh &
	sleep 60
	/usr/local/AppCentral/transmission/CONTROL/start-stop.sh start
	;;
    stop)
        echo "Stopping $NAME"
	/usr/bin/killall start.sh
    	/usr/bin/killall openvpn
	/etc/script/vpn.sh rmmod
	/usr/local/AppCentral/transmission/CONTROL/start-stop.sh stop
	/usr/bin/killall openvpn
	sleep 10
	/etc/script/vpn.sh rmmod
        ;;

    reload)
        echo "Reloading $NAME"
        ;;
    restart|force-reload)
        echo "Restarting $NAME"
        ;;
    *)
        echo "Usage: $0 {start|stop|reload|force-reload|restart}"
        exit 2
        ;;
esac

exit 0
The start.sh script:

Code: Select all

#!/bin/sh
# filename: /root/openvpn/start.sh

SERVER=xxxyyy-UDP.ovpn
#SERVER=yyyzzz-UDP.ovpn

/etc/script/vpn.sh insmod

while true; do
    openvpn --config /root/openvpn/servers/$SERVER \
        --mute-replay-warnings \
        --script-security 2
    sleep 5
done
I have more (edited) server-udp.ovpn saved and referenced on the script, so when i need to switch to another server i just comment/uncomment the start.sh for the server I want and relaunch openvpn.
AS-304T
If you own a series 2/3/6 Asustor it's very likely you won't get XBMC 13.x/Kodi.
But easily you'll end buying a kitchen from UK.
aenigmainc
Posts: 38
Joined: Wed Jul 16, 2014 1:16 am

Re: Please add support for any reputable vpn service!

Post by aenigmainc »

very nice. I did almost the same. in my .crt file i put in a bunch of comment out "remote" options to different servers. when i want to switch country or "purpose" I just change the uncommented server. I didn't worry about the start at boot as there is already something that does that in the init.d. and I can use it to start/stop/restart openvpn.

/volume0/usr/builtin/etc/init.d/S83vpnconnect
dhstsw
Posts: 154
Joined: Sat Aug 02, 2014 2:02 am

Re: Please add support for any reputable vpn service!

Post by dhstsw »

What is incredible is that i tired your exact confing and it's not working:

Code: Select all

client
dev tun
proto udp
remote ro1-ovpn-udp.purevpn.net 53
persist-key
persist-tun
tls-auth /volume0/usr/builtin/etc/vpnclient/Wdc.key 1
cipher AES-256-CBC
comp-lzo
verb 1
mute 20
route-method exe
route-delay 2
route 0.0.0.0 0.0.0.0
float
auth-user-pass
auth-retry interact
ifconfig-nowarn
log-append /volume0/usr/builtin/etc/vpnclient/openvpn.log
ca /volume0/usr/builtin/etc/vpnclient/ca.crt
ping-restart 0
Let go the server or UDP (i tried with also with your exact NY TCP one) and it doesn't connect.
It doesn't even write the log :-/
AS-304T
If you own a series 2/3/6 Asustor it's very likely you won't get XBMC 13.x/Kodi.
But easily you'll end buying a kitchen from UK.
dhstsw
Posts: 154
Joined: Sat Aug 02, 2014 2:02 am

Re: Please add support for any reputable vpn service!

Post by dhstsw »

Don't worry, problem found and fixed :)
AS-304T
If you own a series 2/3/6 Asustor it's very likely you won't get XBMC 13.x/Kodi.
But easily you'll end buying a kitchen from UK.
aenigmainc
Posts: 38
Joined: Wed Jul 16, 2014 1:16 am

Re: Please add support for any reputable vpn service!

Post by aenigmainc »

Awesome. so you got it working. Thats fantastic.