2021-06-08 20:45:26 +08:00
|
|
|
#!/bin/sh
|
|
|
|
var1=$1
|
|
|
|
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
case $var1 in
|
|
|
|
"bash" | "sh")
|
|
|
|
echo $var1
|
|
|
|
exec "$@"
|
|
|
|
;;
|
|
|
|
|
|
|
|
"tool")
|
|
|
|
/app/anylink "$@"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
sysctl -w net.ipv4.ip_forward=1
|
|
|
|
iptables -t nat -A POSTROUTING -s "${IPV4_CIDR}" -o eth0+ -j MASQUERADE
|
2021-07-05 18:23:27 +08:00
|
|
|
iptables -nL -t nat
|
2021-06-08 20:45:26 +08:00
|
|
|
|
2021-12-31 20:21:26 +08:00
|
|
|
exec /app/anylink "$@"
|
2021-06-08 20:45:26 +08:00
|
|
|
;;
|
|
|
|
esac
|