mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 10:23:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# Copyright (C) 2015 OVH
|
||||
# Copyright (C) 2018-2025 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/ysurac/glorytun.git
|
||||
PKG_SOURCE_VERSION:=203c5f2223d7d5146d659b51159b2f02c2480d15
|
||||
PKG_NAME:=glorytun-udp
|
||||
PKG_VERSION:=0.3.4
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=BSD-2-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
#PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+kmod-tun +libsodium +librt
|
||||
TITLE:=Glorytun
|
||||
URL:=https://github.com/angt/glorytun
|
||||
SUBMENU:=VPN
|
||||
endef
|
||||
|
||||
#TARGET_CFLAGS += -std=c99 -D_GNU_SOURCE -DGT_RUNDIR=\"\\\"/tmp\"\\\"
|
||||
TARGET_CFLAGS += -DGT_RUNDIR=\"\\\"/tmp\"\\\"
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/config/glorytun
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
echo "$(PKG_VERSION)" > $(PKG_BUILD_DIR)/VERSION
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
cd $(PKG_BUILD_DIR); \
|
||||
$(AM_TOOL_PATHS) ./bootstrap.sh
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
#define Build/Configure
|
||||
# ( cd $(PKG_BUILD_DIR); autoupdate; aclocal; libtoolize; autoreconf; );
|
||||
# $(call Build/Configure/Default)
|
||||
#endef
|
||||
|
||||
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/glorytun $(1)/usr/sbin/$(PKG_NAME)
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) init $(1)/etc/init.d/$(PKG_NAME)
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DATA) glorytun-udp.config $(1)/etc/config/glorytun-udp
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
config glorytun-udp 'vpn'
|
||||
option enable '0'
|
||||
option host '127.0.0.1'
|
||||
option port '65001'
|
||||
option dev 'tun0'
|
||||
option key ''
|
||||
option chacha '1'
|
||||
option localip '10.255.254.2'
|
||||
option remoteip '10.255.254.1'
|
||||
option mode 'to'
|
||||
option kxtimeout '7d'
|
||||
option timetolerance '10m'
|
||||
option keepalive '25s'
|
||||
option rateauto '0'
|
||||
Executable
+120
@@ -0,0 +1,120 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
||||
# Copyright (C) 2015 ovh.com
|
||||
# Copyright (C) 2017-2020 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||
|
||||
START=90
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG_NAME=glorytun-udp
|
||||
PROG=/usr/sbin/${PROG_NAME}
|
||||
|
||||
_log() {
|
||||
logger -p daemon.info -t ${PROG_NAME} "$@"
|
||||
}
|
||||
|
||||
_err() {
|
||||
logger -p daemon.err -t ${PROG_NAME} "$@"
|
||||
}
|
||||
|
||||
validate_section() {
|
||||
uci_validate_section glorytun-udp glorytun-udp "${1}" \
|
||||
'enable:bool:0' \
|
||||
'mode:string' \
|
||||
'key:string' \
|
||||
'host:host' \
|
||||
'port:port' \
|
||||
'mtuauto:bool:0' \
|
||||
'chacha:bool:0' \
|
||||
'dev:string'
|
||||
}
|
||||
|
||||
start_instance() {
|
||||
local enable key host port listener proto mtuauto chacha dev mode
|
||||
|
||||
validate_section "${1}" || {
|
||||
_err "validation failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ "${enable}" = "1" ] || return 1
|
||||
|
||||
[ -n "${key}" ] || return 1
|
||||
[ "${key}" != "secretkey" ] || return 1
|
||||
[ -n "${port}" ] || return 1
|
||||
[ -n "${dev}" ] || return 1
|
||||
[ -n "${mode}" ] || return 1
|
||||
|
||||
echo "${key}" > /tmp/${PROG_NAME}-${1}.key
|
||||
key=""
|
||||
|
||||
if [ "$(uci -q get network.omrvpn)" != "" ]; then
|
||||
uci -q set network.omrvpn.device=$dev
|
||||
uci -q commit
|
||||
fi
|
||||
|
||||
_log "starting ${PROG_NAME} ${1} instance $*"
|
||||
|
||||
host=$(resolveip $host)
|
||||
|
||||
if [ "$mode" = "to" ]; then
|
||||
bind="bind from addr :: port 5000 to addr $host port $port"
|
||||
else
|
||||
bind="bind from addr $host port $port to addr :: port 5000"
|
||||
fi
|
||||
procd_open_instance
|
||||
|
||||
procd_set_param command ${PROG} \
|
||||
${bind} \
|
||||
${dev:+dev "$dev"} \
|
||||
keyfile /tmp/${PROG_NAME}-${1}.key \
|
||||
persist
|
||||
|
||||
[ "${chacha}" = "1" ] && procd_append_param command chacha
|
||||
|
||||
procd_set_param respawn 0 30 0
|
||||
procd_set_param nice 10
|
||||
procd_set_param file /tmp/${PROG_NAME}-${1}.key
|
||||
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
procd_close_instance
|
||||
|
||||
#tc qdisc replace dev ${dev} root cake
|
||||
|
||||
#ip link set $dev txqlen 100
|
||||
#config_load network
|
||||
#config_foreach add_glorytun_path interface
|
||||
|
||||
}
|
||||
|
||||
add_glorytun_path() {
|
||||
case "$1" in
|
||||
loopback|lan|if0|*tun*|ifb*) return ;;
|
||||
esac
|
||||
local multipath
|
||||
network_get_ipaddr ipaddr "$1"
|
||||
config_get multipath "$1" multipath "off"
|
||||
case "$multipath" in
|
||||
master|on) glorytun-udp path "$ipaddr" dev $dev up ;;
|
||||
backup) glorytun-udp path "$ipaddr" dev $dev backup ;;
|
||||
*) glorytun-udp path "$ipaddr" dev $dev down ;;
|
||||
esac
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local dev
|
||||
config_load glorytun-udp
|
||||
config_foreach start_instance glorytun-udp
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger glorytun-udp network
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/mud/aegis256/aegis256.c 2019-11-06 21:17:20.945036771 +0100
|
||||
+++ b/mud/aegis256/aegis256.c 2019-11-06 21:21:18.728943139 +0100
|
||||
@@ -43,7 +43,7 @@
|
||||
#ifndef __ARM_FEATURE_CRYPTO
|
||||
#define __ARM_FEATURE_CRYPTO 1
|
||||
#endif
|
||||
-#else
|
||||
+#elifdef __ARM_FEATURE_CRYPTO
|
||||
#pragma GCC target("+crypto")
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user