Commit b4023b04 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent c4615b89
FROM debian:bullseye-slim
RUN apt update && apt -y --no-install-recommends install \
wget procps libxml2 libglib2.0-0 kmod ca-certificates && \
wget procps libxml2 libglib2.0-0 kmod ca-certificates iproute2 iptables ipset && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN wget http://dl1.technet24.ir/Downloads/Software/Cisco/AnyConnect/anyconnect-linux64-4.10.05111-predeploy-k9.tar.gz -O - | tar -xz && \
......
......@@ -7,4 +7,11 @@ cp /etc/resolv.conf.bak /etc/resolv.conf
./vpnagentd
echo -e "${username}\n${password}" | ./vpn -s connect ${host}
address=$(./vpn stats | grep "Client Address (IPv4)" | grep -Po '[0-9.]{7,15}')
interface=$(ip --brief address | grep ${address} | cut -d ' ' -f 1)
# 改名字再alias回去 ?
echo $interface up
#trap 等信号来了down
sleep infinity
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment