if [ "$ACTION" = "ifup" ] && [ "$INTERFACE" = "wan" ]; then /root/add.sh fi 当wan口拨号成功后自动添加分流 DNS设置 为了防止DNS污染,可以使用清华的无污染DNS,或者自建DNS,我这里使用后者,只需在Dnsmasq设置DNS转发为自己的DNS服务器即可。 总结 经过以上测试,速度基本能满足使用。有个缺点是教育...
if["$ACTION"="ifup"-a"$INTERFACE"="wan6"];thenip-6 routeadd`ip-6 route show default|sed-n -e's/default from //' -e 's/ via .*$//g' -e '/64$/p'`dev br-lan metric128#根据默认路由获取ipv6网段前缀,添加指向br-lan,metric(跃点数)128比原来256小,表示优先级更高logger -t IP...
/bin/sh["$ACTION"= ifup ] ||exit0 iface=SJTU6 [ -z"$iface"-o"$INTERFACE"="$iface"] ||exit0 ip -6 route add `ip -6 route show default|sed -e's/from [^ ]* //'` logger -t IPv6"Add IPv6 default route." 这里iface是LuCI里面Network->Interfaces里面看到的名 字,一般叫wan6。
/bin/sh [ "$ACTION" = ifup ] || exit 0 iface=wan6 [ -z "$iface" -o "$INTERFACE" = "$iface" ] || exit 0 ip -6 route add `ip -6 route | grep "default from"|sed -e 's/from [^ ]* //'` logger -t IPv6 "Add IPv6 default route." 2)方法二 在/etc/hotplug.d/ifa...
重启之后,需要重新添加网关,如果要做到路由器开机自动添加该网关,可以在/etc/hotplug.d/iface/下新建一个文件90-ipv6,给予可执行权限,内容为(注意替换为自己的网关地址) #!/bin/sh[ "$ACTION" = ifup ] || exit 0 route -A inet6 add default gw 2001:1234:1234:1234::1...
{"network.interface": {"action":"ifup","interface":"lan"} }[15650.421589] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready ubus call network.interface.lan status{"up":true,"pending":false,"available":true,"autostart":true,"dynamic":false,"uptime":4,"l3_device":"br-lan",...
/bin/sh[ "$ACTION" = ifup ] || exit 0[ "$INTERFACE" = wan ] || exit 0#sleep 18s 从我的粗略测试来看,有没有这一行都能正常获得我们想要的效果uci set network.globals.ula_prefix="$(ip -6 route show | grep default | sed -e 's/^.*from //g'...
if [ "$PRODUCT" = "【03f0/2c17/100】" -a "$ACTION" = "add" -a "$DEVTYPE" = "usb_interface" ]; then echo "$(date): STARTING" >> $LOGFILE for i in $(seq 30); do echo "$(date): Attempt number $i on $DEVICE" >> $LOGFILE ...
action.yml make README License 云编译OpenWrt 在线云编译,是github推出的一项服务,它提供了高性能的虚拟服务器环境,基于它可以进行构建、测试、打包、部署项目。利用它可以省去本地搭建或者购买服务器的时间成本,你只需要使用本仓库的代码,按照下方的使用方法,修改一些参数,即可开始编译openwrt,等待几个小时后,你就...
[ "$ACTION" = ifup ] && { if [ "$INTERFACE" = wan ]; then local ipv6_enabled=$(uci -q get network.wan6.web_enabled) local ipv6_proto=$(uci -q get network.wan6.proto) # 6to4 proto need ifup wan6 again if [ $ipv6_enabled == 1 -a x"$ipv6_proto" == x"6to4" ]; ...