From 631f172c5730bbc85fad516d0a664f65b68c3707 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Wed, 6 Jun 2018 17:52:22 +0200 Subject: [PATCH] Fix glorytun init --- glorytun-udp/Makefile | 2 +- glorytun-udp/init | 5 +++++ glorytun/Makefile | 2 +- glorytun/glorytun.config | 2 +- glorytun/init | 4 ++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glorytun-udp/Makefile b/glorytun-udp/Makefile index 945b7a873..9373cd93a 100644 --- a/glorytun-udp/Makefile +++ b/glorytun-udp/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glorytun-udp PKG_VERSION:=0.0.99-mud -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/angt/glorytun/releases/download/v$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/glorytun-$(PKG_VERSION) diff --git a/glorytun-udp/init b/glorytun-udp/init index 849a09860..8477bcebf 100755 --- a/glorytun-udp/init +++ b/glorytun-udp/init @@ -45,12 +45,17 @@ start_instance() { [ "${proto}" = "udp" ] || return 1 [ -n "${key}" ] || return 1 + [ "${key}" != "secretkey" ] || return 1 [ -n "${port}" ] || return 1 [ -n "${dev}" ] || return 1 echo "${key}" > /tmp/${PROG_NAME}-${1}.key key="" + if [ "$(uci -q get network.omrvpn)" != "" ]; then + uci -q set network.omrvpn.ifname=tun0 + fi + _log "starting ${PROG_NAME} ${1} instance $*" procd_open_instance diff --git a/glorytun/Makefile b/glorytun/Makefile index 872df496a..923258146 100644 --- a/glorytun/Makefile +++ b/glorytun/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glorytun PKG_VERSION:=0.0.35 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/angt/glorytun/releases/download/v$(PKG_VERSION) PKG_HASH:=49e4d8ea4ff2990300b37947b0bd0da3c8e0985bc6eddf29f4146306188fff64 diff --git a/glorytun/glorytun.config b/glorytun/glorytun.config index 96b8749d2..708dbea8f 100644 --- a/glorytun/glorytun.config +++ b/glorytun/glorytun.config @@ -3,7 +3,7 @@ config glorytun 'vpn' option host '127.0.0.1' option port '65001' option dev 'tun0' - option key 'secretkey' + option key '' option mptcp '1' option proto 'tcp' option chacha20 '1' diff --git a/glorytun/init b/glorytun/init index 25992020a..7ea1f7c20 100755 --- a/glorytun/init +++ b/glorytun/init @@ -42,12 +42,16 @@ start_instance() { [ "${enable}" = "1" ] || return 1 [ "${proto}" = "tcp" ] || return 1 [ -n "${key}" ] || return 1 + [ "${key}" != "secretkey" ] || return 1 [ -n "${port}" ] || return 1 [ -n "${dev}" ] || return 1 echo "${key}" > /tmp/${PROG_NAME}-${1}.key key="" + if [ "$(uci -q get network.omrvpn)" != "" ]; then + uci -q set network.omrvpn.ifname=tun0 + fi _log "starting ${PROG_NAME} ${1} instance $*" procd_open_instance