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:
Ray Wang
2025-08-23 11:33:16 +08:00
committed by Hannu Nyman
parent 3331690791
commit c16fdd7e2b
3 changed files with 19 additions and 6 deletions

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=natmap
PKG_VERSION:=20250721
PKG_VERSION:=20250924
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
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_LICENSE:=MIT

View File

@@ -4,11 +4,15 @@ config natmap
option udp_mode '1'
option interface ''
option interval ''
option stun_cycle ''
option stun_server 'stunserver.stunprotocol.org'
option http_server 'example.com'
option fwmark ''
option port '8080'
option forward_target ''
option forward_port ''
option forward_timeout ''
option forward_congestion ''
option notify_script ''
option log_stdout '1'
option log_stderr '1'

View File

@@ -21,12 +21,17 @@ validate_section_natmap() {
'family:string' \
'udp_mode:bool:0' \
'interface:string' \
'interval:uinteger' \
'stun_server:host' \
'http_server:host' \
'interval:and(uinteger, min(1))' \
'stun_cycle:uinteger' \
'stun_server:string' \
'http_server:string' \
'fwmark:string' \
'port:or(port,portrange)' \
'port_random:bool:0' \
'forward_target:host' \
'forward_port:port' \
'forward_timeout:and(uinteger, min(1))' \
'forward_congestion:string' \
'notify_script:file' \
'log_stdout:bool:1' \
'log_stderr:bool:1'
@@ -43,9 +48,11 @@ natmap_instance() {
procd_open_instance "$1"
procd_set_param command "$PROG" \
${interval:+-k "$interval"} \
${stun_cycle:+-c "$stun_cycle"} \
${stun_server:+-s "$stun_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}" = 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_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}"
procd_append_param command -e /usr/lib/natmap/update.sh