Browse Source

Merge branch 'testing' of github.com:Yunohost-Apps/vpnclient_ynh into remove-dns-resolution-ipv6-route

HgO 5 months ago
parent
commit
f4441ae5c6
17 changed files with 158 additions and 32 deletions
  1. 2 0
      ALL_README.md
  2. 4 2
      README.md
  3. 5 3
      README_es.md
  4. 4 2
      README_eu.md
  5. 4 2
      README_fr.md
  6. 4 2
      README_gl.md
  7. 4 2
      README_id.md
  8. 54 0
      README_nl.md
  9. 54 0
      README_ru.md
  10. 4 2
      README_zh_Hans.md
  11. 3 3
      conf/scripts/route-down.d/20-vpnclient-unset-dns
  12. 1 8
      config_panel.toml
  13. 1 1
      manifest.toml
  14. 0 1
      scripts/_common.sh
  15. 0 1
      scripts/backup
  16. 0 1
      scripts/remove
  17. 14 2
      scripts/upgrade

+ 2 - 0
ALL_README.md

@@ -6,4 +6,6 @@
 - [Lire le README en français](README_fr.md)
 - [Le o README en galego](README_gl.md)
 - [Baca README dalam bahasa bahasa Indonesia](README_id.md)
+- [Lees de README in het Nederlands](README_nl.md)
+- [Прочитать README на русский](README_ru.md)
 - [阅读中文(简体)的 README](README_zh_Hans.md)

+ 4 - 2
README.md

@@ -5,7 +5,9 @@ It shall NOT be edited by hand.
 
 # VPN Client for YunoHost
 
-[![Integration level](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/ci/apps/vpnclient/) ![Working status](https://ci-apps.yunohost.org/ci/badges/vpnclient.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/vpnclient.maintain.svg)
+[![Integration level](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Working status](https://apps.yunohost.org/badge/state/vpnclient)
+![Maintenance status](https://apps.yunohost.org/badge/maintained/vpnclient)
 
 [![Install VPN Client with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
 
@@ -25,7 +27,7 @@ Install a VPN connection on your self-hosted server.
 
 
 
-**Shipped version:** 2.2~ynh4
+**Shipped version:** 2.2~ynh6
 
 ## Screenshots
 

+ 5 - 3
README_es.md

@@ -5,7 +5,9 @@ No se debe editar a mano.
 
 # VPN Client para Yunohost
 
-[![Nivel de integración](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/ci/apps/vpnclient/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/vpnclient.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/vpnclient.maintain.svg)
+[![Nivel de integración](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Estado funcional](https://apps.yunohost.org/badge/state/vpnclient)
+![Estado En Mantención](https://apps.yunohost.org/badge/maintained/vpnclient)
 
 [![Instalar VPN Client con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
 
@@ -25,7 +27,7 @@ Install a VPN connection on your self-hosted server.
 
 
 
-**Versión actual:** 2.2~ynh4
+**Versión actual:** 2.2~ynh6
 
 ## Capturas
 
@@ -39,7 +41,7 @@ Install a VPN connection on your self-hosted server.
 
 ## Información para desarrolladores
 
-Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing
+Por favor enviar sus correcciones a la [rama `testing`](https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing).
 
 Para probar la rama `testing`, sigue asÍ:
 

+ 4 - 2
README_eu.md

@@ -5,7 +5,9 @@ EZ editatu eskuz.
 
 # VPN Client YunoHost-erako
 
-[![Integrazio maila](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/ci/apps/vpnclient/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/vpnclient.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/vpnclient.maintain.svg)
+[![Integrazio maila](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Funtzionamendu egoera](https://apps.yunohost.org/badge/state/vpnclient)
+![Mantentze egoera](https://apps.yunohost.org/badge/maintained/vpnclient)
 
 [![Instalatu VPN Client YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
 
@@ -25,7 +27,7 @@ Install a VPN connection on your self-hosted server.
 
 
 
-**Paketatutako bertsioa:** 2.2~ynh4
+**Paketatutako bertsioa:** 2.2~ynh6
 
 ## Pantaila-argazkiak
 

+ 4 - 2
README_fr.md

@@ -5,7 +5,9 @@ Il NE doit PAS être modifié à la main.
 
 # VPN Client pour YunoHost
 
-[![Niveau d’intégration](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/ci/apps/vpnclient/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/vpnclient.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/vpnclient.maintain.svg)
+[![Niveau d’intégration](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Statut du fonctionnement](https://apps.yunohost.org/badge/state/vpnclient)
+![Statut de maintenance](https://apps.yunohost.org/badge/maintained/vpnclient)
 
 [![Installer VPN Client avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
 
@@ -25,7 +27,7 @@ Installez une connexion VPN sur votre serveur auto-hébergé
 
 
 
-**Version incluse :** 2.2~ynh4
+**Version incluse :** 2.2~ynh6
 
 ## Captures d’écran
 

+ 4 - 2
README_gl.md

@@ -5,7 +5,9 @@ NON debe editarse manualmente.
 
 # VPN Client para YunoHost
 
-[![Nivel de integración](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/ci/apps/vpnclient/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/vpnclient.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/vpnclient.maintain.svg)
+[![Nivel de integración](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Estado de funcionamento](https://apps.yunohost.org/badge/state/vpnclient)
+![Estado de mantemento](https://apps.yunohost.org/badge/maintained/vpnclient)
 
 [![Instalar VPN Client con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
 
@@ -25,7 +27,7 @@ Install a VPN connection on your self-hosted server.
 
 
 
-**Versión proporcionada:** 2.2~ynh4
+**Versión proporcionada:** 2.2~ynh6
 
 ## Capturas de pantalla
 

+ 4 - 2
README_id.md

@@ -5,7 +5,9 @@ Ini TIDAK boleh diedit dengan tangan.
 
 # VPN Client untuk YunoHost
 
-[![Tingkat integrasi](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/ci/apps/vpnclient/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/vpnclient.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/vpnclient.maintain.svg)
+[![Tingkat integrasi](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Status kerja](https://apps.yunohost.org/badge/state/vpnclient)
+![Status pemeliharaan](https://apps.yunohost.org/badge/maintained/vpnclient)
 
 [![Pasang VPN Client dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
 
@@ -25,7 +27,7 @@ Install a VPN connection on your self-hosted server.
 
 
 
-**Versi terkirim:** 2.2~ynh4
+**Versi terkirim:** 2.2~ynh6
 
 ## Tangkapan Layar
 

+ 54 - 0
README_nl.md

@@ -0,0 +1,54 @@
+<!--
+NB: Deze README is automatisch gegenereerd door <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
+Hij mag NIET handmatig aangepast worden.
+-->
+
+# VPN Client voor Yunohost
+
+[![Integratieniveau](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Mate van functioneren](https://apps.yunohost.org/badge/state/vpnclient)
+![Onderhoudsstatus](https://apps.yunohost.org/badge/maintained/vpnclient)
+
+[![VPN Client met Yunohost installeren](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
+
+*[Deze README in een andere taal lezen.](./ALL_README.md)*
+
+> *Met dit pakket kun je VPN Client snel en eenvoudig op een YunoHost-server installeren.*  
+> *Als je nog geen YunoHost hebt, lees dan [de installatiehandleiding](https://yunohost.org/install), om te zien hoe je 'm installeert.*
+
+## Overzicht
+
+Install a VPN connection on your self-hosted server.
+* Useful for hosting your server behind a filtered (and/or non-neutral) internet access.
+* Useful to have static IP addresses (IPv6 and IPv4).
+* Useful to easily move your server anywhere.
+* Strong firewalling (internet access and self-hosted services only available through the VPN, not leaking to your commercial ISP)
+* Combine with the [Hotspot app](https://github.com/YunoHost-Apps/hotspot_ynh) to broadcast VPN-protected WiFi to other laptops without any further technical configuration needed.
+
+
+
+**Geleverde versie:** 2.2~ynh6
+
+## Schermafdrukken
+
+![Schermafdrukken van VPN Client](./doc/screenshots/vpnclient.png)
+
+## Documentatie en bronnen
+
+- Officiele website van de app: <https://labriqueinter.net>
+- YunoHost-store: <https://apps.yunohost.org/app/vpnclient>
+- Meld een bug: <https://github.com/YunoHost-Apps/vpnclient_ynh/issues>
+
+## Ontwikkelaarsinformatie
+
+Stuur je pull request alsjeblieft naar de [`testing`-branch](https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing).
+
+Om de `testing`-branch uit te proberen, ga als volgt te werk:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing --debug
+of
+sudo yunohost app upgrade vpnclient -u https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing --debug
+```
+
+**Verdere informatie over app-packaging:** <https://yunohost.org/packaging_apps>

+ 54 - 0
README_ru.md

@@ -0,0 +1,54 @@
+<!--
+Важно: этот README был автоматически сгенерирован <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
+Он НЕ ДОЛЖЕН редактироваться вручную.
+-->
+
+# VPN Client для YunoHost
+
+[![Уровень интеграции](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![Состояние работы](https://apps.yunohost.org/badge/state/vpnclient)
+![Состояние сопровождения](https://apps.yunohost.org/badge/maintained/vpnclient)
+
+[![Установите VPN Client с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
+
+*[Прочтите этот README на других языках.](./ALL_README.md)*
+
+> *Этот пакет позволяет Вам установить VPN Client быстро и просто на YunoHost-сервер.*  
+> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
+
+## Обзор
+
+Install a VPN connection on your self-hosted server.
+* Useful for hosting your server behind a filtered (and/or non-neutral) internet access.
+* Useful to have static IP addresses (IPv6 and IPv4).
+* Useful to easily move your server anywhere.
+* Strong firewalling (internet access and self-hosted services only available through the VPN, not leaking to your commercial ISP)
+* Combine with the [Hotspot app](https://github.com/YunoHost-Apps/hotspot_ynh) to broadcast VPN-protected WiFi to other laptops without any further technical configuration needed.
+
+
+
+**Поставляемая версия:** 2.2~ynh6
+
+## Снимки экрана
+
+![Снимок экрана VPN Client](./doc/screenshots/vpnclient.png)
+
+## Документация и ресурсы
+
+- Официальный веб-сайт приложения: <https://labriqueinter.net>
+- Магазин YunoHost: <https://apps.yunohost.org/app/vpnclient>
+- Сообщите об ошибке: <https://github.com/YunoHost-Apps/vpnclient_ynh/issues>
+
+## Информация для разработчиков
+
+Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing).
+
+Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing --debug
+или
+sudo yunohost app upgrade vpnclient -u https://github.com/YunoHost-Apps/vpnclient_ynh/tree/testing --debug
+```
+
+**Больше информации о пакетировании приложений:** <https://yunohost.org/packaging_apps>

+ 4 - 2
README_zh_Hans.md

@@ -5,7 +5,9 @@
 
 # YunoHost 上的 VPN Client
 
-[![集成程度](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/ci/apps/vpnclient/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/vpnclient.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/vpnclient.maintain.svg)
+[![集成程度](https://apps.yunohost.org/badge/integration/vpnclient)](https://ci-apps.yunohost.org/ci/apps/vpnclient/)
+![工作状态](https://apps.yunohost.org/badge/state/vpnclient)
+![维护状态](https://apps.yunohost.org/badge/maintained/vpnclient)
 
 [![使用 YunoHost 安装 VPN Client](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vpnclient)
 
@@ -25,7 +27,7 @@ Install a VPN connection on your self-hosted server.
 
 
 
-**分发版本:** 2.2~ynh4
+**分发版本:** 2.2~ynh6
 
 ## 截图
 

+ 3 - 3
conf/scripts/route-down.d/20-vpnclient-unset-dns

@@ -20,9 +20,9 @@ if is_dns_set; then
   fi
 
   # FIXME : this situation happened to a user ...
-  # We could try to force regen the dns conf 
-  # (though for now it's tightly coupled to dnsmasq)
   if ! grep -q "^nameserver\s" "${resolvconf}"; then
-    echo "${resolvconf} does not have any nameserver line !?" >&2
+    echo "${resolvconf} does not have any nameserver line !? Regenerating ..." >&2
+    # This is the main line from yunohost's dnsmasq hook generating the resolv.dnsmasq.conf
+    cat /usr/share/yunohost/conf/dnsmasq/plain/resolv.dnsmasq.conf | grep "^nameserver" | shuf >${resolvconf}
   fi
 fi

+ 1 - 8
config_panel.toml

@@ -26,18 +26,11 @@ name = "Auto-configuration"
         [main.vpn.config_file]
         ask = "Configuration file"
         type = "file"
-        accept = [ ".cube", ".ovpn", ".conf" ]
+        accept = [".cube", ".ovpn", ".conf", "application/json", "text/plain"]
         help = ".cube file recommended, .ovpn file accepted"
         bind = "/etc/openvpn/client.conf"
         redact = true
 
-        [main.vpn.config_template]
-        type = "file"
-        bind = "/etc/openvpn/client.conf.tpl"
-        redact = true
-        optional = true
-        visible = false
-
         [main.vpn.cube_file]
         type = "file"
         bind = "/etc/openvpn/client.cube"

+ 1 - 1
manifest.toml

@@ -7,7 +7,7 @@ name = "VPN Client"
 description.en = "Tunnel the internet traffic through a VPN"
 description.fr = "Fait passer le trafic internet à travers un VPN"
 
-version = "2.2~ynh4"
+version = "2.2~ynh6"
 
 maintainers = []
 

+ 0 - 1
scripts/_common.sh

@@ -17,7 +17,6 @@ function vpnclient_deploy_files_and_services()
   mkdir -pm 0755 /etc/yunohost/hooks.d/post_iptable_rules/
   mkdir -pm 0755 /etc/systemd/system/openvpn@.service.d/
 
-  install -b -o root -g ${app} -m 0644 ../conf/openvpn_client.conf.tpl /etc/openvpn/client.conf.tpl
   install -b -o root -g root -m 0644 ../conf/openvpn@.service /etc/systemd/system/openvpn@.service.d/override.conf
 
   # Create certificates directory

+ 0 - 1
scripts/backup

@@ -10,7 +10,6 @@ ynh_print_info "Backing up the main app directory..."
 
 ynh_backup --src_path="/usr/local/bin/$service_name-loadcubefile.sh"
 
-ynh_backup --src_path="/etc/openvpn/client.conf.tpl"
 ynh_backup --src_path="/etc/openvpn/client.conf" --not_mandatory
 ynh_backup --src_path="/etc/openvpn/client.cube" --not_mandatory
 ynh_backup --src_path="/etc/openvpn/client.ovpn" --not_mandatory

+ 0 - 1
scripts/remove

@@ -30,7 +30,6 @@ ynh_print_info "Removing openvpn configuration"
 
 # Remove openvpn configurations
 ynh_secure_remove /etc/openvpn/client.conf
-ynh_secure_remove /etc/openvpn/client.conf.tpl
 ynh_secure_remove /etc/openvpn/client.cube
 ynh_secure_remove /etc/openvpn/client.ovpn
 

+ 14 - 2
scripts/upgrade

@@ -40,6 +40,10 @@ if [ -e "/etc/yunohost/hooks.d/90-vpnclient.tpl" ]; then
   ynh_secure_remove "/etc/yunohost/hooks.d/90-vpnclient.tpl"
 fi
 
+if [ -e "/etc/openvpn/client.conf.tpl" ]; then
+  ynh_secure_remove "/etc/openvpn/client.conf.tpl"
+fi
+
 # New stuff
 
 if [ -z "${dns_method:-}" ]; then
@@ -78,7 +82,11 @@ yunohost service stop $service_name
 
 # Keep a copy of existing config files before overwriting them
 tmp_dir=$(mktemp -d /tmp/vpnclient-upgrade-XXX)
-cp -r /etc/openvpn/client* ${tmp_dir}
+for config_file in /etc/openvpn/client.{conf,cube,ovpn}; do
+  if [[ -f "${config_file}" ]]; then
+    cp "${config_file}" "${tmp_dir}/"
+  fi
+done
 
 # Deploy files from package
 vpnclient_deploy_files_and_services
@@ -100,7 +108,11 @@ then
 fi
 
 # Restore previously existing config files
-cp -r ${tmp_dir}/client* /etc/openvpn/
+for config_file in ${tmp_dir}/client.{conf,cube,ovpn}; do
+  if [[ -f "${config_file}" ]]; then
+    cp "${config_file}" /etc/openvpn/
+  fi
+done
 ynh_secure_remove ${tmp_dir}
 
 #=================================================