diff --git a/glorytun-udp/init b/glorytun-udp/init index 5e50d59df..e9f7caf7c 100755 --- a/glorytun-udp/init +++ b/glorytun-udp/init @@ -56,11 +56,15 @@ start_instance() { _log "starting ${PROG_NAME} ${1} instance $*" + 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} \ - ${host:+bind ${mode} addr "$host"} \ - ${port:+port "$port"} \ + ${bind} \ ${dev:+dev "$dev"} \ keyfile /tmp/${PROG_NAME}-${1}.key \ persist