NATMap is a program for opening port behind full cone NAT (NAT-1), without the need for using UPnP or another port forward settings. More details can be found at original repo: https://github.com/heiher/natmap Signed-off-by: Richard Yu <yurichard3839@gmail.com>
17 lines
295 B
Bash
17 lines
295 B
Bash
#!/bin/sh
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
|
|
(
|
|
json_init
|
|
json_add_string ip "$1"
|
|
json_add_int port "$2"
|
|
json_add_int inner_port "$4"
|
|
json_add_string protocol "$5"
|
|
json_dump > /var/run/natmap/$PPID.json
|
|
)
|
|
|
|
[ -n "${NOTIFY_SCRIPT}" ] && {
|
|
export -n NOTIFY_SCRIPT
|
|
exec "${NOTIFY_SCRIPT}" "$@"
|
|
}
|