From 98689e0ebaa42159a72e932d7652899c9050bfd7 Mon Sep 17 00:00:00 2001 From: gaoyuheng Date: Thu, 18 Dec 2025 19:53:03 +0800 Subject: [PATCH] oc --- bird/first/inet.conf | 26 ++++++++++++++++++++++++++ bird/first/ipconfig.conf | 27 --------------------------- update.sh | 15 +-------------- 3 files changed, 27 insertions(+), 41 deletions(-) create mode 100644 bird/first/inet.conf diff --git a/bird/first/inet.conf b/bird/first/inet.conf new file mode 100644 index 0000000..cbed4fd --- /dev/null +++ b/bird/first/inet.conf @@ -0,0 +1,26 @@ +function is_self_net() { + return net ~ [ + 44.32.191.0/24+ + ]; +} + + +function is_self_net_v6() { + return net ~ [ + 2406:840:e600::/44+, + 2a0f:1cc5:10::/44+ + ]; +} + + +function dn42_is_self_net() { + return net ~ [ + 172.20.21.0/26+ + ]; +} + +function dn42_is_self_net_v6() { + return net ~ [ + fde8:936e:ee29::/48+ + ]; +} diff --git a/bird/first/ipconfig.conf b/bird/first/ipconfig.conf index 0d6c8a6..f053fce 100644 --- a/bird/first/ipconfig.conf +++ b/bird/first/ipconfig.conf @@ -1,18 +1,3 @@ -function is_self_net() { - return net ~ [ - 44.32.191.0/24 - ]; -} - - -function is_self_net_v6() { - return net ~ [ - 2406:840:e600::/44{44,48}, - 2a0f:1cc5:10::/44{44,48} - ]; -} - - function unet_is_self_net() { return net ~ [ 10.188.6.0/23+, @@ -28,15 +13,3 @@ function unet_is_self_net_v6() { 2406:840:e60e::/56 ]; } - -function dn42_is_self_net() { - return net ~ [ - 172.20.21.0/26+ - ]; -} - -function dn42_is_self_net_v6() { - return net ~ [ - fde8:936e:ee29::/48+ - ]; -} diff --git a/update.sh b/update.sh index 55daa8e..f4518cb 100644 --- a/update.sh +++ b/update.sh @@ -3,23 +3,10 @@ cd git clone https://git.nia.ink/brnet/bird_config.git -mv ./bird_config/bird/first/ /etc/bird/ -f -rm /etc/bird/first/ipconfig.conf -mv /etc/bird/conf/aaa_ipconfig.conf /etc/bird/first/ipconfig.conf - -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/bird.conf -mv ./bird_config/bird/bird.conf /etc/bird/bird.conf +mv /etc/bird/first/inet.conf /etc/bird/first/inet.conf chmod -R 755 /etc/bird -birdc c - cd rm -rf bird_config