mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Fix init and makefile for glorytun-udp
This commit is contained in:
parent
02cc4c3c20
commit
a3e445b728
2 changed files with 18 additions and 20 deletions
|
@ -26,7 +26,7 @@ URL:=https://github.com/angt/glorytun
|
||||||
SUBMENU:=VPN
|
SUBMENU:=VPN
|
||||||
endef
|
endef
|
||||||
|
|
||||||
TARGET_CFLAGS += -std=c99 -D_GNU_SOURCE
|
TARGET_CFLAGS += -std=c99 -D_GNU_SOURCE -DGT_RUNDIR=\"\\\"/tmp\"\\\"
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/conffiles
|
define Package/$(PKG_NAME)/conffiles
|
||||||
/etc/config/glorytun
|
/etc/config/glorytun
|
||||||
|
|
|
@ -20,16 +20,16 @@ _err() {
|
||||||
|
|
||||||
validate_section() {
|
validate_section() {
|
||||||
uci_validate_section glorytun glorytun "${1}" \
|
uci_validate_section glorytun glorytun "${1}" \
|
||||||
'enable:bool:0' \
|
'enable:bool:0' \
|
||||||
'key:string' \
|
'key:string' \
|
||||||
'host:host' \
|
'host:host' \
|
||||||
'port:port' \
|
'port:port' \
|
||||||
'proto:string' \
|
'proto:string' \
|
||||||
'bind:string' \
|
'bind:string:0.0.0.0' \
|
||||||
'bindport:port' \
|
'bindport:port' \
|
||||||
'mtu:uinteger:1450' \
|
'mtu:uinteger:1450' \
|
||||||
'mtuauto:bool:0' \
|
'mtuauto:bool:0' \
|
||||||
'chacha20:bool:0' \
|
'chacha20:bool:0' \
|
||||||
'dev:string'
|
'dev:string'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,17 +56,15 @@ start_instance() {
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
|
|
||||||
procd_set_param command ${PROG} \
|
procd_set_param command ${PROG} \
|
||||||
keyfile /tmp/${PROG_NAME}-${1}.key \
|
|
||||||
${port:+port "$port"} \
|
|
||||||
${host:+host "$host"} \
|
|
||||||
${dev:+dev "$dev"} \
|
|
||||||
${mtu:+mtu "$mtu"} \
|
|
||||||
${bind:+bind "$bind"} \
|
${bind:+bind "$bind"} \
|
||||||
${bindport:+bind-port "$port"} \
|
${bindport:+ "$port"} \
|
||||||
v4only
|
${host:+to "$host"} \
|
||||||
|
${port:+ "$port"} \
|
||||||
|
${dev:+dev "$dev"} \
|
||||||
|
keyfile /tmp/${PROG_NAME}-${1}.key \
|
||||||
|
${mtu:+mtu "$mtu"}
|
||||||
|
|
||||||
[ "${mtuauto}" = "1" ] && procd_append_param command mtu-auto
|
[ "${chacha20}" = "1" ] && procd_append_param command chacha
|
||||||
[ "${chacha20}" = "1" ] && procd_append_param command chacha20
|
|
||||||
|
|
||||||
procd_set_param respawn 0 30 0
|
procd_set_param respawn 0 30 0
|
||||||
procd_set_param file /tmp/${PROG_NAME}-${1}.key
|
procd_set_param file /tmp/${PROG_NAME}-${1}.key
|
||||||
|
|
Loading…
Reference in a new issue