mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
natmap: update to 20250924
Upstream changelog: https://github.com/heiher/natmap/releases/tag/20250924 Signed-off-by: Ray Wang <git@hev.cc>
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=natmap
|
PKG_NAME:=natmap
|
||||||
PKG_VERSION:=20250721
|
PKG_VERSION:=20250924
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://github.com/heiher/natmap/releases/download/$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://github.com/heiher/natmap/releases/download/$(PKG_VERSION)
|
||||||
PKG_HASH:=25d3288c1654191b7884d6c83b8f669ce788fbab95ebe26d84b65c63ceaa3094
|
PKG_HASH:=a86caa74266b62707bdcb9eef34910571061c206a5cd2d1eff694eae25ab5aaf
|
||||||
|
|
||||||
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>, Ray Wang <git@hev.cc>
|
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>, Ray Wang <git@hev.cc>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ config natmap
|
|||||||
option udp_mode '1'
|
option udp_mode '1'
|
||||||
option interface ''
|
option interface ''
|
||||||
option interval ''
|
option interval ''
|
||||||
|
option stun_cycle ''
|
||||||
option stun_server 'stunserver.stunprotocol.org'
|
option stun_server 'stunserver.stunprotocol.org'
|
||||||
option http_server 'example.com'
|
option http_server 'example.com'
|
||||||
|
option fwmark ''
|
||||||
option port '8080'
|
option port '8080'
|
||||||
option forward_target ''
|
option forward_target ''
|
||||||
option forward_port ''
|
option forward_port ''
|
||||||
|
option forward_timeout ''
|
||||||
|
option forward_congestion ''
|
||||||
option notify_script ''
|
option notify_script ''
|
||||||
option log_stdout '1'
|
option log_stdout '1'
|
||||||
option log_stderr '1'
|
option log_stderr '1'
|
||||||
|
|||||||
@@ -21,12 +21,17 @@ validate_section_natmap() {
|
|||||||
'family:string' \
|
'family:string' \
|
||||||
'udp_mode:bool:0' \
|
'udp_mode:bool:0' \
|
||||||
'interface:string' \
|
'interface:string' \
|
||||||
'interval:uinteger' \
|
'interval:and(uinteger, min(1))' \
|
||||||
'stun_server:host' \
|
'stun_cycle:uinteger' \
|
||||||
'http_server:host' \
|
'stun_server:string' \
|
||||||
|
'http_server:string' \
|
||||||
|
'fwmark:string' \
|
||||||
'port:or(port,portrange)' \
|
'port:or(port,portrange)' \
|
||||||
|
'port_random:bool:0' \
|
||||||
'forward_target:host' \
|
'forward_target:host' \
|
||||||
'forward_port:port' \
|
'forward_port:port' \
|
||||||
|
'forward_timeout:and(uinteger, min(1))' \
|
||||||
|
'forward_congestion:string' \
|
||||||
'notify_script:file' \
|
'notify_script:file' \
|
||||||
'log_stdout:bool:1' \
|
'log_stdout:bool:1' \
|
||||||
'log_stderr:bool:1'
|
'log_stderr:bool:1'
|
||||||
@@ -43,9 +48,11 @@ natmap_instance() {
|
|||||||
procd_open_instance "$1"
|
procd_open_instance "$1"
|
||||||
procd_set_param command "$PROG" \
|
procd_set_param command "$PROG" \
|
||||||
${interval:+-k "$interval"} \
|
${interval:+-k "$interval"} \
|
||||||
|
${stun_cycle:+-c "$stun_cycle"} \
|
||||||
${stun_server:+-s "$stun_server"} \
|
${stun_server:+-s "$stun_server"} \
|
||||||
${http_server:+-h "$http_server"} \
|
${http_server:+-h "$http_server"} \
|
||||||
${port:+-b "$port"} \
|
${fwmark:+-f "$fwmark"} \
|
||||||
|
${port:+-b "$([ "$port_random" = 1 ] && echo ${port/-/\~} || echo $port)"} \
|
||||||
|
|
||||||
[ "${family}" = ipv4 ] && procd_append_param command -4
|
[ "${family}" = ipv4 ] && procd_append_param command -4
|
||||||
[ "${family}" = ipv6 ] && procd_append_param command -6
|
[ "${family}" = ipv6 ] && procd_append_param command -6
|
||||||
@@ -60,6 +67,8 @@ natmap_instance() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ -n "${forward_target}" ] && procd_append_param command -t "$forward_target" -p "$forward_port"
|
[ -n "${forward_target}" ] && procd_append_param command -t "$forward_target" -p "$forward_port"
|
||||||
|
[ -n "${forward_timeout}" ] && procd_append_param command -T "$forward_timeout"
|
||||||
|
[ -n "${forward_congestion}" ] && procd_append_param command -C "$forward_congestion"
|
||||||
|
|
||||||
[ -n "${notify_script}" ] && procd_set_param env "NOTIFY_SCRIPT=${notify_script}"
|
[ -n "${notify_script}" ] && procd_set_param env "NOTIFY_SCRIPT=${notify_script}"
|
||||||
procd_append_param command -e /usr/lib/natmap/update.sh
|
procd_append_param command -e /usr/lib/natmap/update.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user