From 8b3a04fb90a92e97e186187c580d7a0294daa085 Mon Sep 17 00:00:00 2001 From: agentcobra Date: Mon, 10 Sep 2018 21:50:47 +0200 Subject: [PATCH 1/7] emergency fix with - 5654b6d0b266b14a5432bcd2f3e8428ef0f53ac9 - 081447008c7854ac3a1ae84e4e33eb112572b783 - a642a010291a010ee6d88ee6473fc34d1654d5a2 --- conf/ynh-vpnclient | 6 +++++- scripts/install | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/ynh-vpnclient b/conf/ynh-vpnclient index 910e282..6c85fbd 100644 --- a/conf/ynh-vpnclient +++ b/conf/ynh-vpnclient @@ -129,6 +129,10 @@ start_openvpn() { [ "${ynh_server_proto}" == tcp ] && proto=tcp-client fi + # Unset firewall to let DNS and NTP resolution works + # Firewall is reset after vpn is mounted (more details on #1016) + unset_firewall + sync_time cp /etc/openvpn/client.conf{.tpl,} @@ -199,7 +203,7 @@ stop_openvpn() { sync_time() { systemctl stop ntp - ntpd -qg &> /dev/null + timeout 20 ntpd -qg &> /dev/null systemctl start ntp } diff --git a/scripts/install b/scripts/install index b7747be..1c49433 100644 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ fi ynh_webpath_register vpnclient $domain $url_path || exit 1 # Install packages -packages='php5-fpm sipcalc dnsutils openvpn curl' +packages='php5-fpm sipcalc dnsutils openvpn curl fake-hwclock' export DEBIAN_FRONTEND=noninteractive sudo apt-get --assume-yes --force-yes install ${packages} From 84a4e1a31903afbadc8d23d078fdbc2cb615a40b Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Wed, 13 Jun 2018 11:30:43 +0200 Subject: [PATCH 2/7] [fix] Sync the date with http if ntp can't (#37) * [fix] Sync the date with http if ntp can't --- conf/ynh-vpnclient | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/conf/ynh-vpnclient b/conf/ynh-vpnclient index 6c85fbd..a75823c 100644 --- a/conf/ynh-vpnclient +++ b/conf/ynh-vpnclient @@ -204,6 +204,20 @@ stop_openvpn() { sync_time() { systemctl stop ntp timeout 20 ntpd -qg &> /dev/null + + # Some networks drop ntp port (udp 123). + # Try to get the date with an http request on the internetcube web site + if [ $? -ne 0 ]; then + http_date=`curl -sD - labriqueinter.net | grep '^Date:' | cut -d' ' -f3-6` + http_date_seconds=`date -d "${http_date}" +%s` + curr_date_seconds=`date +%s` + + # Set the new date if it's greater than the current date + # So it does if 1970 year or if old fake-hwclock date is used + if [ $http_date_seconds -ge $curr_date_seconds ]; then + date -s "${http_date}" + fi + fi systemctl start ntp } From 033abdcb6907fe04eafd42b5fb8f3666a497e649 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 6 Apr 2018 12:49:22 +0200 Subject: [PATCH 3/7] [enh] Update version number --- manifest.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 902fa42..462555d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,9 @@ "fr": "Client VPN" }, "license": "AGPL-3", - "developer": { + "url": "https://github.com/labriqueinternet/vpnclient_ynh", + "version": "1.1.1", + "maintainer": { "name": "Julien Vaubourg", "email": "julien@vaubourg.com", "url": "http://julien.vaubourg.com" From 4aa70622131ecbf556f7cab5d744aab5f2e33675 Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Sun, 13 May 2018 11:22:56 +0200 Subject: [PATCH 4/7] doc: Added install badge --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9a668d7..a9d3c2a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # VPN Client + +[![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh) +[![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=vpnclient) + ## Overview VPN Client app for [YunoHost](http://yunohost.org/). From 2e0fbfddff4f93ec8ea308e629ea8f47ff3d5d86 Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Sun, 13 May 2018 11:25:37 +0200 Subject: [PATCH 5/7] doc: Update syntax (badges) --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a9d3c2a..0e66b13 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -# VPN Client +# VPN Client [![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh) -[![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh) [![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=vpnclient) ## Overview From 8f2ba6cdcd410c016c81cb3b84197d160465856d Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Sun, 13 May 2018 11:37:49 +0200 Subject: [PATCH 6/7] doc: s/NextCloud/LaBriqueInterNet VPNclient/ thx agentcorba --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e66b13..f26bc10 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # VPN Client [![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh) -[![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=vpnclient) +[![Install LaBriqueInterNet VPNclient with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=vpnclient) ## Overview From 4c00ff92eff5e021e65487a43ae4ddca6a314049 Mon Sep 17 00:00:00 2001 From: agentcobra Date: Sun, 13 May 2018 11:48:07 +0200 Subject: [PATCH 7/7] Update README.md add integration from jenkins --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index f26bc10..45c79cd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -# VPN Client [![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh) - +# VPN Client [![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh) [![Integration level](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/jenkins/job/vpnclient%20%28Community%29/lastBuild/consoleFull) [![Install LaBriqueInterNet VPNclient with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=vpnclient) ## Overview