1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix glorytun init

This commit is contained in:
Ycarus 2018-06-06 17:52:22 +02:00
parent c29b7ff14b
commit 631f172c57
5 changed files with 12 additions and 3 deletions

View file

@ -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

View file

@ -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'

View file

@ -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