shfmt tunsocks.sh

This commit is contained in:
Balakrishnan Balasubramanian 2025-03-01 16:56:40 -05:00
parent 2b1095760f
commit ba4bbfa18c

View File

@ -15,8 +15,7 @@ else
proxy="socks5:///run/nnss-${nsname}/sock"
fi
setup()
{
setup() {
ip tuntap add mode tun dev "$device"
/usr/bin/tun2socks -device "$device" -proxy "$proxy" &
@ -34,8 +33,7 @@ setup()
wait
}
cleanup()
{
cleanup() {
ip tuntap del mode tun dev "$device" || true
kill "$(cat "$pidfile")"
ip -n "$ns" tuntap del mode tun dev "$device"