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-udp PKG_NAME:=glorytun-udp
PKG_VERSION:=0.0.99-mud PKG_VERSION:=0.0.99-mud
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/angt/glorytun/releases/download/v$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/angt/glorytun/releases/download/v$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/glorytun-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/glorytun-$(PKG_VERSION)

View file

@ -45,12 +45,17 @@ start_instance() {
[ "${proto}" = "udp" ] || return 1 [ "${proto}" = "udp" ] || return 1
[ -n "${key}" ] || return 1 [ -n "${key}" ] || return 1
[ "${key}" != "secretkey" ] || return 1
[ -n "${port}" ] || return 1 [ -n "${port}" ] || return 1
[ -n "${dev}" ] || return 1 [ -n "${dev}" ] || return 1
echo "${key}" > /tmp/${PROG_NAME}-${1}.key echo "${key}" > /tmp/${PROG_NAME}-${1}.key
key="" key=""
if [ "$(uci -q get network.omrvpn)" != "" ]; then
uci -q set network.omrvpn.ifname=tun0
fi
_log "starting ${PROG_NAME} ${1} instance $*" _log "starting ${PROG_NAME} ${1} instance $*"
procd_open_instance procd_open_instance

View file

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=glorytun PKG_NAME:=glorytun
PKG_VERSION:=0.0.35 PKG_VERSION:=0.0.35
PKG_RELEASE:=5 PKG_RELEASE:=6
PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/angt/glorytun/releases/download/v$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/angt/glorytun/releases/download/v$(PKG_VERSION)
PKG_HASH:=49e4d8ea4ff2990300b37947b0bd0da3c8e0985bc6eddf29f4146306188fff64 PKG_HASH:=49e4d8ea4ff2990300b37947b0bd0da3c8e0985bc6eddf29f4146306188fff64

View file

@ -3,7 +3,7 @@ config glorytun 'vpn'
option host '127.0.0.1' option host '127.0.0.1'
option port '65001' option port '65001'
option dev 'tun0' option dev 'tun0'
option key 'secretkey' option key ''
option mptcp '1' option mptcp '1'
option proto 'tcp' option proto 'tcp'
option chacha20 '1' option chacha20 '1'

View file

@ -42,12 +42,16 @@ start_instance() {
[ "${enable}" = "1" ] || return 1 [ "${enable}" = "1" ] || return 1
[ "${proto}" = "tcp" ] || return 1 [ "${proto}" = "tcp" ] || return 1
[ -n "${key}" ] || return 1 [ -n "${key}" ] || return 1
[ "${key}" != "secretkey" ] || return 1
[ -n "${port}" ] || return 1 [ -n "${port}" ] || return 1
[ -n "${dev}" ] || return 1 [ -n "${dev}" ] || return 1
echo "${key}" > /tmp/${PROG_NAME}-${1}.key echo "${key}" > /tmp/${PROG_NAME}-${1}.key
key="" key=""
if [ "$(uci -q get network.omrvpn)" != "" ]; then
uci -q set network.omrvpn.ifname=tun0
fi
_log "starting ${PROG_NAME} ${1} instance $*" _log "starting ${PROG_NAME} ${1} instance $*"
procd_open_instance procd_open_instance