⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ip-up.generic

📁 一个vpn源代码
💻 GENERIC
字号:
#!/bin/sh
# ip-up <interface> <myaddr> <daemon-pid> <local> <remote> <arg>
#
# This script is called whenever the CIPE interface comes up/is opened.
# Arguments:
#  $1 interface     the CIPE interface
#  $2 myaddr        our UDP address
#  $3 daemon-pid    the daemon's process ID
#  $4 local         IP address of our CIPE device
#  $5 remote        IP address of the remote CIPE device
#  $6 arg           argument supplied via options
#
# This script can: set up routes, set up proxy arp records,
# start daemons, perform logging.
umask 022
PATH=/sbin:/bin:/usr/sbin:/usr/bin

# add a route to the network passed in the arg (from the options file)
route add -net $6 gw $5 netmask 255.255.255.0

# just a logging example
now=`date "+%b %d %T"`
echo "$now - interface $1 is up. parameters: $*" >> /var/log/cipe.log

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -