change
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
include "/etc/bird/vars.conf";
|
||||
include "/etc/bird/first/*.conf";
|
||||
include "/etc/bird/function/*.conf";
|
||||
include "/etc/bird/conf/*.conf";
|
||||
|
||||
@@ -8,7 +9,6 @@ protocol device {
|
||||
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
merge paths yes limit 4;
|
||||
ipv6 {
|
||||
import none;
|
||||
export filter {
|
||||
@@ -28,7 +28,6 @@ protocol kernel {
|
||||
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
merge paths yes limit 4;
|
||||
ipv4 {
|
||||
import none;
|
||||
export filter {
|
||||
|
||||
@@ -7,23 +7,15 @@ function unet_is_valid_network_v4() {
|
||||
];
|
||||
}
|
||||
|
||||
function unet_is_valid_network_v4_anynet() {
|
||||
return net ~ [
|
||||
44.32.191.0/24+,
|
||||
172.20.21.0/26+
|
||||
];
|
||||
}
|
||||
|
||||
function unet_is_valid_network_v4_allnet(){
|
||||
if !unet_is_valid_network_v4_anynet() && !unet_is_valid_network_v4() then return false;
|
||||
return true;
|
||||
if unet_is_valid_network_v4() then return true;
|
||||
if is_self_net() then return true;
|
||||
if dn42_is_self_net() then return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function unet_is_voalid_net_v6(){
|
||||
return net ~ [
|
||||
2406:840:e600::/44{44,64},
|
||||
2a0f:1cc5:0010::/44{44,64},
|
||||
fde8:936e:ee29::/48{44,64}
|
||||
];
|
||||
if is_self_net_v6() then return true;
|
||||
if dn42_is_self_net_v6() then return true;
|
||||
return false;
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
protocol kernel kernel_inet4_102 {
|
||||
scan time 20;
|
||||
kernel table 102;
|
||||
ipv4 {
|
||||
table inet4;
|
||||
import none;
|
||||
|
||||
23
update.sh
23
update.sh
@@ -2,25 +2,24 @@
|
||||
|
||||
cd
|
||||
git clone https://git.nia.ink/brnet/bird_config.git
|
||||
rm -rf /etc/bird/net/
|
||||
mv ./bird_config/bird/net /etc/bird/ -f
|
||||
|
||||
rm -rf /etc/bird/function/
|
||||
mv ./bird_config/bird/function /etc/bird/ -f
|
||||
mv ./bird_config/bird/first/ /etc/bird/ -f
|
||||
rm /etc/bird/first/ipconfig.conf
|
||||
mv ./bird_config/bird/conf/aaa_ipconfig.conf /etc/bird/conf/ipconfig.conf
|
||||
|
||||
rm -rf /etc/bird/template/
|
||||
mv ./bird_config/bird/template /etc/bird/ -f
|
||||
mv ./bird_config/bird/peers/dn42 /etc/bird/peers -f
|
||||
mv /etc/bird/function/unet.conf /etc/bird/function/unet.conf.bak
|
||||
mv ./bird_config/bird/function/unet.conf /etc/bird/function/unet.conf
|
||||
|
||||
rm /etc/bird/net/inet.conf
|
||||
mv ./bird_config/bird/net/inet.conf /etc/bird/net/inet.conf
|
||||
|
||||
rm /etc/bird/conf/inet_func.conf
|
||||
rm /etc/bird/bird.conf
|
||||
mv ./bird_config/bird/bird.conf /etc/bird/
|
||||
mv ./bird_config/bird/conf/dn42.conf /etc/bird/conf
|
||||
mv ./bird_config/bird/conf/aaa_ipconfig.conf /etc/bird/conf
|
||||
mv ./bird_config/bird/bird.conf /etc/bird/bird.conf
|
||||
|
||||
chmod -R 755 /etc/bird
|
||||
|
||||
echo "剩下的文件可能需要手动更新,请手动更新后再行birdc c"
|
||||
birdc c
|
||||
|
||||
cd
|
||||
rm -rf bird_config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user