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