Update to version 0.2.2
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
@@ -8,11 +8,6 @@ Add this line in your `feeds.conf.default`:
|
|||||||
|
|
||||||
src-git glorytun https://github.com/angt/glorytun-openwrt.git
|
src-git glorytun https://github.com/angt/glorytun-openwrt.git
|
||||||
|
|
||||||
Or install in `package`:
|
|
||||||
|
|
||||||
$ git clone https://github.com/angt/glorytun-openwrt.git
|
|
||||||
$ cp -rf glorytun-openwrt/glorytun package
|
|
||||||
|
|
||||||
Update and install your feeds:
|
Update and install your feeds:
|
||||||
|
|
||||||
$ ./scripts/feeds update -a
|
$ ./scripts/feeds update -a
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=glorytun
|
PKG_NAME:=glorytun
|
||||||
PKG_VERSION:=0.1.1
|
PKG_VERSION:=0.2.2
|
||||||
PKG_RELEASE:=0
|
PKG_RELEASE:=0
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/angt/$(PKG_NAME)/releases/download/v$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://github.com/angt/$(PKG_NAME)/releases/download/v$(PKG_VERSION)
|
||||||
PKG_HASH:=d67a5765fb4d6c43a2e0e3e83887cd036568bbf76f65df9f1561dc82a08800b9
|
PKG_HASH:=457552232c72d5fec7ba46382784685c2e8167d49d8182ab3afbfb2b0bce1b01
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/$(PKG_NAME)
|
define Package/$(PKG_NAME)
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
SUBMENU:=VPN
|
SUBMENU:=VPN
|
||||||
TITLE:=Glorytun
|
TITLE:=Glorytun
|
||||||
DEPENDS:=+kmod-tun +libsodium +librt
|
DEPENDS:=+kmod-tun +libsodium +librt
|
||||||
URL:=https://github.com/angt/glorytun
|
URL:=https://github.com/angt/glorytun
|
||||||
endef
|
endef
|
||||||
|
|
||||||
TARGET_CPPFLAGS += -DGT_RUNDIR=\\\"/var/run/$(PKG_NAME)\\\"
|
TARGET_CPPFLAGS += -DGT_RUNDIR=\\\"/var/run/$(PKG_NAME)\\\"
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/description
|
define Package/$(PKG_NAME)/description
|
||||||
Glorytun is a vpn designed to improve your internet connectivity:
|
Glorytun is a vpn designed to improve your internet connectivity:
|
||||||
- Fast and highly secure.
|
- Fast and highly secure.
|
||||||
- Multipath and active failover.
|
- Multipath and active failover.
|
||||||
- Traffic shaping.
|
- Traffic shaping.
|
||||||
- Path MTU discovery without ICMP.
|
- Path MTU discovery without ICMP.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/conffiles
|
define Package/$(PKG_NAME)/conffiles
|
||||||
|
|||||||
@@ -1,14 +1,27 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
|
# shellcheck disable=SC2039
|
||||||
|
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
||||||
|
|
||||||
START=90
|
# shellcheck disable=SC2034
|
||||||
STOP=10
|
{
|
||||||
USE_PROCD=1
|
START=90
|
||||||
|
STOP=10
|
||||||
|
USE_PROCD=1
|
||||||
|
}
|
||||||
|
|
||||||
PROG_NAME=glorytun
|
PROG_NAME=glorytun
|
||||||
PROG=/usr/sbin/$PROG_NAME
|
PROG=/usr/sbin/$PROG_NAME
|
||||||
|
|
||||||
|
_log() {
|
||||||
|
logger -p daemon.info -t $PROG_NAME "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_err() {
|
||||||
|
logger -p daemon.err -t $PROG_NAME "$@"
|
||||||
|
}
|
||||||
|
|
||||||
validate_section() {
|
validate_section() {
|
||||||
uci_validate_section $PROG_NAME $PROG_NAME "$1" \
|
uci_validate_section glorytun mud "$1" \
|
||||||
'enable:bool:0' \
|
'enable:bool:0' \
|
||||||
'key:string' \
|
'key:string' \
|
||||||
'server:host' \
|
'server:host' \
|
||||||
@@ -19,8 +32,12 @@ validate_section() {
|
|||||||
start_instance() {
|
start_instance() {
|
||||||
local enable key server port dev
|
local enable key server port dev
|
||||||
|
|
||||||
validate_section "$1" || return
|
validate_section "$1" || {
|
||||||
[ "$enable" = "1" ] || return 0
|
_err "validation failed"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$enable" = "1" ] || return
|
||||||
[ "$key" ] || return
|
[ "$key" ] || return
|
||||||
[ "$server" ] || return
|
[ "$server" ] || return
|
||||||
[ "$port" ] || return
|
[ "$port" ] || return
|
||||||
@@ -29,6 +46,8 @@ start_instance() {
|
|||||||
( umask 077; echo "$key" > "$keyfile" )
|
( umask 077; echo "$key" > "$keyfile" )
|
||||||
key=""
|
key=""
|
||||||
|
|
||||||
|
_log "starting $PROG_NAME instance $*"
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
|
|
||||||
procd_set_param command $PROG \
|
procd_set_param command $PROG \
|
||||||
|
|||||||
Reference in New Issue
Block a user