From 7b933cc469e1324e1c260f953ed12387c5398fbc Mon Sep 17 00:00:00 2001 From: Septs Date: Sat, 23 May 2020 19:00:02 +0800 Subject: [PATCH] Migrate to TOML format (#81) --- .editorconfig | 8 + .github/workflows/roa.yml | 102 +++--- .github/workflows/test-your-pr.yml | 63 ++-- .vscode/extensions.json | 3 + .vscode/settings.json | 4 + asn/AS134098 | 5 - asn/AS134098.toml | 4 + asn/AS4201270000 | 4 - asn/AS4201270000.toml | 2 + asn/AS4201270001 | 4 - asn/AS4201270001.toml | 2 + asn/AS4201270002 | 4 - asn/AS4201270002.toml | 2 + asn/AS4201270003 | 4 - asn/AS4201270003.toml | 2 + asn/AS4201270004 | 4 - asn/AS4201270004.toml | 2 + asn/AS4201270005 | 4 - asn/AS4201270005.toml | 3 + asn/AS4201270006 | 4 - asn/AS4201270006.toml | 2 + asn/AS4201270007 | 4 - asn/AS4201270007.toml | 2 + asn/AS4201270008 | 4 - asn/AS4201270008.toml | 3 + asn/AS4201270009 | 4 - asn/AS4201270009.toml | 2 + asn/AS4201270010 | 4 - asn/AS4201270010.toml | 2 + asn/AS4201270011 | 4 - asn/AS4201270011.toml | 2 + asn/AS4201270012 | 4 - asn/AS4201270012.toml | 2 + asn/AS4201270013 | 4 - asn/AS4201270013.toml | 3 + asn/AS4201270014 | 4 - asn/AS4201270014.toml | 2 + asn/AS4201270015 | 4 - asn/AS4201270015.toml | 2 + asn/AS4242420140 | 4 - asn/AS4242420140.toml | 2 + asn/AS4242420916 | 4 - asn/AS4242420916.toml | 3 + asn/AS4242421037 | 4 - asn/AS4242421037.toml | 2 + asn/AS4242423088 | 4 - asn/AS4242423088.toml | 2 + entity/Icecat | 13 - entity/Icecat.toml | 5 + entity/James58899 | 13 - entity/James58899.toml | 1 + entity/JerryXiao | 13 - entity/JerryXiao.toml | 10 + entity/Junde Yhi | 19 -- entity/Junde Yhi.toml | 20 ++ entity/LINE-NZ | 13 - entity/LINE-NZ.toml | 6 + entity/Lan Tian | 13 - entity/Lan Tian.toml | 1 + entity/LibreHouse | 17 - entity/LibreHouse.toml | 11 + entity/Ndoskrnl | 13 - entity/Ndoskrnl.toml | 7 + entity/Neo_Chen | 14 - entity/Neo_Chen.toml | 12 + entity/SUNNET | 13 - entity/SUNNET.toml | 1 + entity/Septs | 13 - entity/Staph | 17 - entity/Staph.toml | 9 + entity/Yangfl | 13 - entity/Yangfl.toml | 1 + entity/alanyhq | 14 - entity/alanyhq.toml | 5 + entity/chenx97 | 13 - entity/chenx97.toml | 5 + entity/frank | 13 - entity/frank.toml | 1 + entity/leedagee | 13 - entity/leedagee.toml | 8 + entity/licson | 13 - entity/licson.toml | 6 + entity/santost12 | 13 - entity/santost12.toml | 5 + entity/septs.toml | 6 + node/Icecat-GroupAccessNetwork | 6 - node/Icecat.toml | 3 + node/James58899 | 4 - node/James58899.toml | 2 + node/JerryXiao | 5 - node/JerryXiao-HK1 | 4 - node/JerryXiao-HK2 | 4 - node/JerryXiao-SH1 | 4 - node/JerryXiao.toml | 11 + node/LINE-NZ-AU01 | 5 - node/LINE-NZ-NZ01 | 5 - node/LINE-NZ.toml | 9 + node/LanTian | 4 - node/LanTian.toml | 2 + node/MagicNeko-HK01 | 6 - node/MagicNeko-JP03 | 6 - node/MagicNeko-RU01 | 6 - node/MagicNeko.toml | 14 + node/Ndoskrnl-CN01 | 5 - node/Ndoskrnl-US01 | 5 - node/Ndoskrnl.toml | 9 + node/NeoPDP-11 | 7 - node/NeoSystem | 6 - node/NeoVAX | 4 - node/Neo_Chen.toml | 17 + node/SUNNET | 4 - node/SUNNET.toml | 2 + node/caasih | 4 - node/caasih.toml | 2 + node/chenx97 | 4 - node/chenx97.toml | 2 + node/cklvax | 5 - node/cklvax.toml | 3 + node/dfceaef | 4 - node/dfceaef.toml | 2 + node/frank-hsinchu | 4 - node/frank.toml | 2 + node/leedagee | 4 - node/leedagee.toml | 2 + node/megumiLHS | 4 - node/megumiLHS.toml | 2 + node/pan | 5 - node/santost12 | 4 - node/santost12.toml | 2 + node/septs | 4 - node/septs.toml | 2 + node/staph | 5 - node/staph.toml | 4 + node/ucbvax | 4 - node/yhi-h | 4 - node/yhi-h.toml | 2 + peer/JerryXiao-HK1.toml | 1 + peer/JerryXiao-HK1~JerryXiao-HK2 | 1 - peer/JerryXiao-SH1.toml | 1 + peer/JerryXiao-SH1~JerryXiao-HK1 | 1 - peer/JerryXiao.toml | 1 + peer/JerryXiao~JerryXiao-HK1 | 1 - peer/JerryXiao~JerryXiao-SH1 | 1 - peer/JerryXiao~LanTian | 1 - peer/JerryXiao~dfceaef | 1 - peer/JerryXiao~ucbvax | 1 - peer/MagicNeko-HK01.toml | 1 + peer/MagicNeko-HK01~Icecat-GroupAccessNetwork | 1 - peer/MagicNeko-HK01~SUNNET | 1 - peer/MagicNeko-JP03.toml | 8 + peer/MagicNeko-JP03~JerryXiao | 1 - peer/MagicNeko-JP03~Ndoskrnl-US01 | 1 - peer/MagicNeko-JP03~chenx97 | 1 - peer/MagicNeko-JP03~frank-hsinchu | 1 - peer/MagicNeko-JP03~megumiLHS | 1 - peer/MagicNeko-JP03~santost12 | 1 - peer/Ndoskrnl-US01.toml | 1 + peer/Ndoskrnl-US01~Ndoskrnl-CN01 | 1 - peer/NeoSystem.toml | 1 + peer/NeoSystem~NeoVAX | 1 - peer/caasih.toml | 1 + peer/caasih~NeoPDP-11 | 1 - peer/caasih~staph | 1 - peer/caasih~ucbvax | 1 - peer/cklvax.toml | 1 + peer/cklvax~NeoSystem | 1 - peer/pan.toml | 1 + peer/pan~MagicNeko-JP03 | 1 - peer/pan~NeoPDP-11 | 1 - peer/pan~NeoSystem | 1 - peer/septs.toml | 10 + peer/septs~James58899 | 1 - peer/septs~JerryXiao | 1 - peer/septs~LanTian | 1 - peer/septs~MagicNeko-JP03 | 1 - peer/septs~MagicNeko-RU01 | 1 - peer/septs~frank-hsinchu | 1 - peer/septs~megumiLHS | 1 - peer/septs~ucbvax | 1 - peer/staph.toml | 1 + peer/staph~MagicNeko-RU01 | 1 - peer/staph~santost12 | 1 - peer/staph~septs | 1 - peer/ucbvax.toml | 9 + peer/ucbvax~MagicNeko-HK01 | 1 - peer/ucbvax~NeoPDP-11 | 1 - peer/ucbvax~NeoSystem | 1 - peer/ucbvax~chenx97 | 1 - peer/ucbvax~megumiLHS | 1 - peer/ucbvax~pan | 1 - peer/ucbvax~santost12 | 1 - pyproject.toml | 2 + route/10.127.0.0,24 | 4 - route/10.127.1.0,24 | 4 - route/10.127.10.0,24 | 4 - route/10.127.11.0,24 | 4 - route/10.127.12.0,24 | 4 - route/10.127.13.0,24 | 4 - route/10.127.14.0,23 | 4 - route/10.127.2.0,24 | 4 - route/10.127.22.0,29 | 4 - route/10.127.22.8,29 | 4 - route/10.127.23.0,29 | 4 - route/10.127.233.0,24 | 4 - route/10.127.255.1,32 | 4 - route/10.127.255.117,32 | 4 - route/10.127.255.2,32 | 4 - route/10.127.255.4,32 | 4 - route/10.127.255.53,32 | 4 - route/10.127.255.56,32 | 4 - route/10.127.255.80,32 | 4 - route/10.127.3.0,24 | 4 - route/10.127.4.0,24 | 4 - route/10.127.41.0,24 | 4 - route/10.127.5.0,28 | 4 - route/10.127.56.0,24 | 4 - route/10.127.69.0,29 | 4 - route/10.127.8.0,26 | 4 - route/10.127.8.184,29 | 4 - route/10.127.8.192,26 | 4 - route/10.127.9.0,24 | 4 - route/AS134098.toml | 3 + route/AS4201270000.toml | 43 +++ route/AS4201270001.toml | 7 + route/AS4201270004.toml | 9 + route/AS4201270005.toml | 10 + route/AS4201270006.toml | 19 ++ route/AS4201270007.toml | 9 + route/AS4201270008.toml | 14 + route/AS4201270009.toml | 4 + route/AS4201270010.toml | 9 + route/AS4201270011.toml | 9 + route/AS4201270012.toml | 4 + route/AS4201270013.toml | 9 + route/AS4201270014.toml | 9 + route/AS4242420140.toml | 4 + route/AS4242421037.toml | 4 + route/AS4242423088.toml | 4 + route6/fd10:127:0023::,48 | 4 - route6/fd10:127:0233:1c3c::,64 | 5 - route6/fd10:127:0233::,48 | 4 - route6/fd10:127:10::,48 | 4 - route6/fd10:127:13::,48 | 4 - route6/fd10:127:41::,48 | 4 - route6/fd10:127:53::,48 | 4 - route6/fd10:127:5f37:59df::,64 | 4 - route6/fd10:127:6969::,48 | 4 - route6/fd10:127:7::,48 | 4 - scripts/dns-reverse-generator.py | 36 ++ scripts/dns-reverse-generator.sh | 51 --- scripts/roa-ng.py | 316 ++++++++++++++++++ scripts/roa.sh | 33 -- 252 files changed, 922 insertions(+), 857 deletions(-) create mode 100644 .editorconfig create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json delete mode 100644 asn/AS134098 create mode 100644 asn/AS134098.toml delete mode 100644 asn/AS4201270000 create mode 100644 asn/AS4201270000.toml delete mode 100644 asn/AS4201270001 create mode 100644 asn/AS4201270001.toml delete mode 100644 asn/AS4201270002 create mode 100644 asn/AS4201270002.toml delete mode 100644 asn/AS4201270003 create mode 100644 asn/AS4201270003.toml delete mode 100644 asn/AS4201270004 create mode 100644 asn/AS4201270004.toml delete mode 100644 asn/AS4201270005 create mode 100644 asn/AS4201270005.toml delete mode 100644 asn/AS4201270006 create mode 100644 asn/AS4201270006.toml delete mode 100644 asn/AS4201270007 create mode 100644 asn/AS4201270007.toml delete mode 100644 asn/AS4201270008 create mode 100644 asn/AS4201270008.toml delete mode 100644 asn/AS4201270009 create mode 100644 asn/AS4201270009.toml delete mode 100644 asn/AS4201270010 create mode 100644 asn/AS4201270010.toml delete mode 100644 asn/AS4201270011 create mode 100644 asn/AS4201270011.toml delete mode 100644 asn/AS4201270012 create mode 100644 asn/AS4201270012.toml delete mode 100644 asn/AS4201270013 create mode 100644 asn/AS4201270013.toml delete mode 100644 asn/AS4201270014 create mode 100644 asn/AS4201270014.toml delete mode 100644 asn/AS4201270015 create mode 100644 asn/AS4201270015.toml delete mode 100644 asn/AS4242420140 create mode 100644 asn/AS4242420140.toml delete mode 100644 asn/AS4242420916 create mode 100644 asn/AS4242420916.toml delete mode 100644 asn/AS4242421037 create mode 100644 asn/AS4242421037.toml delete mode 100644 asn/AS4242423088 create mode 100644 asn/AS4242423088.toml delete mode 100644 entity/Icecat create mode 100644 entity/Icecat.toml delete mode 100644 entity/James58899 create mode 100644 entity/James58899.toml delete mode 100644 entity/JerryXiao create mode 100644 entity/JerryXiao.toml delete mode 100644 entity/Junde Yhi create mode 100644 entity/Junde Yhi.toml delete mode 100644 entity/LINE-NZ create mode 100644 entity/LINE-NZ.toml delete mode 100644 entity/Lan Tian create mode 100644 entity/Lan Tian.toml delete mode 100644 entity/LibreHouse create mode 100644 entity/LibreHouse.toml delete mode 100644 entity/Ndoskrnl create mode 100644 entity/Ndoskrnl.toml delete mode 100644 entity/Neo_Chen create mode 100644 entity/Neo_Chen.toml delete mode 100644 entity/SUNNET create mode 100644 entity/SUNNET.toml delete mode 100644 entity/Septs delete mode 100644 entity/Staph create mode 100644 entity/Staph.toml delete mode 100644 entity/Yangfl create mode 100644 entity/Yangfl.toml delete mode 100644 entity/alanyhq create mode 100644 entity/alanyhq.toml delete mode 100644 entity/chenx97 create mode 100644 entity/chenx97.toml delete mode 100644 entity/frank create mode 100644 entity/frank.toml delete mode 100644 entity/leedagee create mode 100644 entity/leedagee.toml delete mode 100644 entity/licson create mode 100644 entity/licson.toml delete mode 100644 entity/santost12 create mode 100644 entity/santost12.toml create mode 100644 entity/septs.toml delete mode 100644 node/Icecat-GroupAccessNetwork create mode 100644 node/Icecat.toml delete mode 100644 node/James58899 create mode 100644 node/James58899.toml delete mode 100644 node/JerryXiao delete mode 100644 node/JerryXiao-HK1 delete mode 100644 node/JerryXiao-HK2 delete mode 100644 node/JerryXiao-SH1 create mode 100644 node/JerryXiao.toml delete mode 100644 node/LINE-NZ-AU01 delete mode 100644 node/LINE-NZ-NZ01 create mode 100644 node/LINE-NZ.toml delete mode 100644 node/LanTian create mode 100644 node/LanTian.toml delete mode 100644 node/MagicNeko-HK01 delete mode 100644 node/MagicNeko-JP03 delete mode 100644 node/MagicNeko-RU01 create mode 100644 node/MagicNeko.toml delete mode 100644 node/Ndoskrnl-CN01 delete mode 100644 node/Ndoskrnl-US01 create mode 100644 node/Ndoskrnl.toml delete mode 100644 node/NeoPDP-11 delete mode 100644 node/NeoSystem delete mode 100644 node/NeoVAX create mode 100644 node/Neo_Chen.toml delete mode 100644 node/SUNNET create mode 100644 node/SUNNET.toml delete mode 100644 node/caasih create mode 100644 node/caasih.toml delete mode 100644 node/chenx97 create mode 100644 node/chenx97.toml delete mode 100644 node/cklvax create mode 100644 node/cklvax.toml delete mode 100644 node/dfceaef create mode 100644 node/dfceaef.toml delete mode 100644 node/frank-hsinchu create mode 100644 node/frank.toml delete mode 100644 node/leedagee create mode 100644 node/leedagee.toml delete mode 100644 node/megumiLHS create mode 100644 node/megumiLHS.toml delete mode 100644 node/pan delete mode 100644 node/santost12 create mode 100644 node/santost12.toml delete mode 100644 node/septs create mode 100644 node/septs.toml delete mode 100644 node/staph create mode 100644 node/staph.toml delete mode 100644 node/ucbvax delete mode 100644 node/yhi-h create mode 100644 node/yhi-h.toml create mode 100644 peer/JerryXiao-HK1.toml delete mode 100644 peer/JerryXiao-HK1~JerryXiao-HK2 create mode 100644 peer/JerryXiao-SH1.toml delete mode 100644 peer/JerryXiao-SH1~JerryXiao-HK1 create mode 100644 peer/JerryXiao.toml delete mode 100644 peer/JerryXiao~JerryXiao-HK1 delete mode 100644 peer/JerryXiao~JerryXiao-SH1 delete mode 100644 peer/JerryXiao~LanTian delete mode 100644 peer/JerryXiao~dfceaef delete mode 100644 peer/JerryXiao~ucbvax create mode 100644 peer/MagicNeko-HK01.toml delete mode 100644 peer/MagicNeko-HK01~Icecat-GroupAccessNetwork delete mode 100644 peer/MagicNeko-HK01~SUNNET create mode 100644 peer/MagicNeko-JP03.toml delete mode 100644 peer/MagicNeko-JP03~JerryXiao delete mode 100644 peer/MagicNeko-JP03~Ndoskrnl-US01 delete mode 100644 peer/MagicNeko-JP03~chenx97 delete mode 100644 peer/MagicNeko-JP03~frank-hsinchu delete mode 100644 peer/MagicNeko-JP03~megumiLHS delete mode 100644 peer/MagicNeko-JP03~santost12 create mode 100644 peer/Ndoskrnl-US01.toml delete mode 100644 peer/Ndoskrnl-US01~Ndoskrnl-CN01 create mode 100644 peer/NeoSystem.toml delete mode 100644 peer/NeoSystem~NeoVAX create mode 100644 peer/caasih.toml delete mode 100644 peer/caasih~NeoPDP-11 delete mode 100644 peer/caasih~staph delete mode 100644 peer/caasih~ucbvax create mode 100644 peer/cklvax.toml delete mode 100644 peer/cklvax~NeoSystem create mode 100644 peer/pan.toml delete mode 100644 peer/pan~MagicNeko-JP03 delete mode 100644 peer/pan~NeoPDP-11 delete mode 100644 peer/pan~NeoSystem create mode 100644 peer/septs.toml delete mode 100644 peer/septs~James58899 delete mode 100644 peer/septs~JerryXiao delete mode 100644 peer/septs~LanTian delete mode 100644 peer/septs~MagicNeko-JP03 delete mode 100644 peer/septs~MagicNeko-RU01 delete mode 100644 peer/septs~frank-hsinchu delete mode 100644 peer/septs~megumiLHS delete mode 100644 peer/septs~ucbvax create mode 100644 peer/staph.toml delete mode 100644 peer/staph~MagicNeko-RU01 delete mode 100644 peer/staph~santost12 delete mode 100644 peer/staph~septs create mode 100644 peer/ucbvax.toml delete mode 100644 peer/ucbvax~MagicNeko-HK01 delete mode 100644 peer/ucbvax~NeoPDP-11 delete mode 100644 peer/ucbvax~NeoSystem delete mode 100644 peer/ucbvax~chenx97 delete mode 100644 peer/ucbvax~megumiLHS delete mode 100644 peer/ucbvax~pan delete mode 100644 peer/ucbvax~santost12 create mode 100644 pyproject.toml delete mode 100644 route/10.127.0.0,24 delete mode 100644 route/10.127.1.0,24 delete mode 100644 route/10.127.10.0,24 delete mode 100644 route/10.127.11.0,24 delete mode 100644 route/10.127.12.0,24 delete mode 100644 route/10.127.13.0,24 delete mode 100644 route/10.127.14.0,23 delete mode 100644 route/10.127.2.0,24 delete mode 100644 route/10.127.22.0,29 delete mode 100644 route/10.127.22.8,29 delete mode 100644 route/10.127.23.0,29 delete mode 100644 route/10.127.233.0,24 delete mode 100644 route/10.127.255.1,32 delete mode 100644 route/10.127.255.117,32 delete mode 100644 route/10.127.255.2,32 delete mode 100644 route/10.127.255.4,32 delete mode 100644 route/10.127.255.53,32 delete mode 100644 route/10.127.255.56,32 delete mode 100644 route/10.127.255.80,32 delete mode 100644 route/10.127.3.0,24 delete mode 100644 route/10.127.4.0,24 delete mode 100644 route/10.127.41.0,24 delete mode 100644 route/10.127.5.0,28 delete mode 100644 route/10.127.56.0,24 delete mode 100644 route/10.127.69.0,29 delete mode 100644 route/10.127.8.0,26 delete mode 100644 route/10.127.8.184,29 delete mode 100644 route/10.127.8.192,26 delete mode 100644 route/10.127.9.0,24 create mode 100644 route/AS134098.toml create mode 100644 route/AS4201270000.toml create mode 100644 route/AS4201270001.toml create mode 100644 route/AS4201270004.toml create mode 100644 route/AS4201270005.toml create mode 100644 route/AS4201270006.toml create mode 100644 route/AS4201270007.toml create mode 100644 route/AS4201270008.toml create mode 100644 route/AS4201270009.toml create mode 100644 route/AS4201270010.toml create mode 100644 route/AS4201270011.toml create mode 100644 route/AS4201270012.toml create mode 100644 route/AS4201270013.toml create mode 100644 route/AS4201270014.toml create mode 100644 route/AS4242420140.toml create mode 100644 route/AS4242421037.toml create mode 100644 route/AS4242423088.toml delete mode 100644 route6/fd10:127:0023::,48 delete mode 100644 route6/fd10:127:0233:1c3c::,64 delete mode 100644 route6/fd10:127:0233::,48 delete mode 100644 route6/fd10:127:10::,48 delete mode 100644 route6/fd10:127:13::,48 delete mode 100644 route6/fd10:127:41::,48 delete mode 100644 route6/fd10:127:53::,48 delete mode 100644 route6/fd10:127:5f37:59df::,64 delete mode 100644 route6/fd10:127:6969::,48 delete mode 100644 route6/fd10:127:7::,48 create mode 100755 scripts/dns-reverse-generator.py delete mode 100755 scripts/dns-reverse-generator.sh create mode 100755 scripts/roa-ng.py delete mode 100755 scripts/roa.sh diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c9d49d6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*.toml] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false \ No newline at end of file diff --git a/.github/workflows/roa.yml b/.github/workflows/roa.yml index 731cc4a..f1a1e6c 100644 --- a/.github/workflows/roa.yml +++ b/.github/workflows/roa.yml @@ -4,9 +4,9 @@ name: roa_generator on: push: - branches: [ master ] + branches: [master] schedule: - - cron: '0 6 * * 1' + - cron: "0 6 * * 1" jobs: build: @@ -15,54 +15,56 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@master - - name: Install dependencies - shell: bash - run: | - sudo apt update -qq - sudo apt install -y python3 git openssh-client - sudo apt install -y curl - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - export PATH="$HOME/.pyenv/bin:$PATH" - eval "$(pyenv init -)" - eval "$(pyenv virtualenv-init -)" - pyenv install 3.8.2 - pyenv shell 3.8.2 + - name: Install dependencies + shell: bash + run: | + sudo apt update -qq + sudo apt install -y python3 git openssh-client + sudo apt install -y curl + curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash + export PATH="$HOME/.pyenv/bin:$PATH" + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init -)" + pyenv install 3.8.2 + pyenv shell 3.8.2 + pip install toml - - name: Run roa script - shell: bash - run: | - export PATH="$HOME/.pyenv/bin:$PATH" - eval "$(pyenv init -)" - eval "$(pyenv virtualenv-init -)" - pyenv shell 3.8.2 - maxlen4=29 - maxlen6=64 - mkdir -p roa_dir - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -o roa_dir/roa46_bird2.conf - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -4 -o roa_dir/roa4_bird2.conf - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -6 -o roa_dir/roa6_bird2.conf - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -j -o roa_dir/roa46.json - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -e -o roa_dir/neonetwork.json - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -r -o roa_dir/rfc8416.json + - name: Run roa script + shell: bash + run: | + export PATH="$HOME/.pyenv/bin:$PATH" + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init -)" + pyenv shell 3.8.2 + maxlen4=29 + maxlen6=64 + mkdir -p roa_dir + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -o roa_dir/roa46_bird2.conf + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -4 -o roa_dir/roa4_bird2.conf + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -6 -o roa_dir/roa6_bird2.conf + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -j -o roa_dir/roa46.json + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -e -o roa_dir/neonetwork.json + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -r -o roa_dir/rfc8416.json + pyenv exec python3 scripts/roa-ng.py --summary --output roa_dir/README.txt - - name: Upload files - env: - SSHPRIVKEY: ${{ secrets.KEY }} - shell: bash - run: | - cd roa_dir - [ -n "$SSHPRIVKEY" ] || (echo SSHPRIVKEY is not set; exit 1) - ( set -e; - mkdir -p ~/.ssh - echo "$SSHPRIVKEY" |base64 -d > ~/.ssh/id_ed25519 - chmod 0600 ~/.ssh/id_ed25519 - ssh -o StrictHostKeyChecking=no git@github.com || true - git init && git add . - git config user.name "neonet roa bot" - git config user.email "bot@github.com" - git commit -m "Generated at $(TZ='UTC' date +%Y%m%d-%H%M%S.%N)" - git push --force --quiet "git@github.com:NeoCloud/NeoNetwork-ROA.git" HEAD:master - ) || (shred ~/.ssh/id_ed25519; exit 1) - shred ~/.ssh/id_ed25519 + - name: Upload files + env: + SSHPRIVKEY: ${{ secrets.KEY }} + shell: bash + run: | + cd roa_dir + [ -n "$SSHPRIVKEY" ] || (echo SSHPRIVKEY is not set; exit 1) + ( set -e; + mkdir -p ~/.ssh + echo "$SSHPRIVKEY" | base64 -d > ~/.ssh/id_ed25519 + chmod 0600 ~/.ssh/id_ed25519 + ssh -o StrictHostKeyChecking=no git@github.com || true + git init && git add . + git config user.name "neonet roa bot" + git config user.email "bot@github.com" + git commit -m "Generated at $(TZ='UTC' date +%Y%m%d-%H%M%S.%N)" + git push --force --quiet "git@github.com:NeoCloud/NeoNetwork-ROA.git" HEAD:master + ) || (shred ~/.ssh/id_ed25519; exit 1) + shred ~/.ssh/id_ed25519 diff --git a/.github/workflows/test-your-pr.yml b/.github/workflows/test-your-pr.yml index 0f1ff26..de6fa4c 100644 --- a/.github/workflows/test-your-pr.yml +++ b/.github/workflows/test-your-pr.yml @@ -13,36 +13,37 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - with: - ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/checkout@master + with: + ref: ${{ github.event.pull_request.head.sha }} - - name: Install dependencies - shell: bash - run: | - sudo apt update -qq - sudo apt install -y python3 git openssh-client - sudo apt install -y curl - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - export PATH="$HOME/.pyenv/bin:$PATH" - eval "$(pyenv init -)" - eval "$(pyenv virtualenv-init -)" - pyenv install 3.8.2 - pyenv shell 3.8.2 + - name: Install dependencies + shell: bash + run: | + sudo apt update -qq + sudo apt install -y python3 git openssh-client + sudo apt install -y curl + curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash + export PATH="$HOME/.pyenv/bin:$PATH" + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init -)" + pyenv install 3.8.2 + pyenv shell 3.8.2 + pip install toml - - name: Run roa script - shell: bash - run: | - export PATH="$HOME/.pyenv/bin:$PATH" - eval "$(pyenv init -)" - eval "$(pyenv virtualenv-init -)" - pyenv shell 3.8.2 - maxlen4=29 - maxlen6=64 - mkdir -p roa_dir - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -o roa_dir/roa46_bird2.conf - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -4 -o roa_dir/roa4_bird2.conf - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -6 -o roa_dir/roa6_bird2.conf - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -j -o roa_dir/roa46.json - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -e -o roa_dir/neonetwork.json - pyenv exec python3 scripts/roa.py -m ${maxlen4} -M ${maxlen6} -r -o roa_dir/rfc8416.json + - name: Run roa script + shell: bash + run: | + export PATH="$HOME/.pyenv/bin:$PATH" + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init -)" + pyenv shell 3.8.2 + maxlen4=29 + maxlen6=64 + mkdir -p roa_dir + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -o roa_dir/roa46_bird2.conf + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -4 -o roa_dir/roa4_bird2.conf + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -6 -o roa_dir/roa6_bird2.conf + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -j -o roa_dir/roa46.json + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -e -o roa_dir/neonetwork.json + pyenv exec python3 scripts/roa-ng.py -m ${maxlen4} -M ${maxlen6} -r -o roa_dir/rfc8416.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..fc8a844 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["bungcip.better-toml", "bodil.prettier-toml"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3800c30 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.formatOnSave": true, + "python.formatting.provider": "black" +} diff --git a/asn/AS134098 b/asn/AS134098 deleted file mode 100644 index 0cca0ee..0000000 --- a/asn/AS134098 +++ /dev/null @@ -1,5 +0,0 @@ -NAME="Licson Internal Network" -OWNER="licson" -DESC="" -SOURCE="INET" -VALID="YES" diff --git a/asn/AS134098.toml b/asn/AS134098.toml new file mode 100644 index 0000000..e9ef3eb --- /dev/null +++ b/asn/AS134098.toml @@ -0,0 +1,4 @@ +name = "Licson Internal Network" +owner = "licson" +source = "Internet" +vaild = true diff --git a/asn/AS4201270000 b/asn/AS4201270000 deleted file mode 100644 index c3f437f..0000000 --- a/asn/AS4201270000 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="NeoNetwork Origin" -OWNER="Neo_Chen" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270000.toml b/asn/AS4201270000.toml new file mode 100644 index 0000000..3576d35 --- /dev/null +++ b/asn/AS4201270000.toml @@ -0,0 +1,2 @@ +name = "NeoNetwork Origin" +owner = "Neo_Chen" diff --git a/asn/AS4201270001 b/asn/AS4201270001 deleted file mode 100644 index 8ff9d3f..0000000 --- a/asn/AS4201270001 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Septs Inter-NeoNetwork Exchange" -OWNER="Septs" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270001.toml b/asn/AS4201270001.toml new file mode 100644 index 0000000..07ac282 --- /dev/null +++ b/asn/AS4201270001.toml @@ -0,0 +1,2 @@ +name = "Septs Inter-NeoNetwork Exchange" +owner = "septs" diff --git a/asn/AS4201270002 b/asn/AS4201270002 deleted file mode 100644 index e18d2dd..0000000 --- a/asn/AS4201270002 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Septs Home" -OWNER="Septs" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270002.toml b/asn/AS4201270002.toml new file mode 100644 index 0000000..8162c19 --- /dev/null +++ b/asn/AS4201270002.toml @@ -0,0 +1,2 @@ +name = "Septs HomeLabs" +owner = "septs" diff --git a/asn/AS4201270003 b/asn/AS4201270003 deleted file mode 100644 index 056da0c..0000000 --- a/asn/AS4201270003 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="chenx97" -OWNER="chenx97" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270003.toml b/asn/AS4201270003.toml new file mode 100644 index 0000000..5c6317e --- /dev/null +++ b/asn/AS4201270003.toml @@ -0,0 +1,2 @@ +name = "chenx97" +owner = "chenx97" diff --git a/asn/AS4201270004 b/asn/AS4201270004 deleted file mode 100644 index 1e9ce4b..0000000 --- a/asn/AS4201270004 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="frank" -OWNER="frank" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270004.toml b/asn/AS4201270004.toml new file mode 100644 index 0000000..ffd4c37 --- /dev/null +++ b/asn/AS4201270004.toml @@ -0,0 +1,2 @@ +name = "frank" +owner = "frank" diff --git a/asn/AS4201270005 b/asn/AS4201270005 deleted file mode 100644 index d00d7a7..0000000 --- a/asn/AS4201270005 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Icecat" -OWNER="Icecat" -DESC="NextMoe Group Access Network" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270005.toml b/asn/AS4201270005.toml new file mode 100644 index 0000000..0cc99d8 --- /dev/null +++ b/asn/AS4201270005.toml @@ -0,0 +1,3 @@ +name = "Icecat" +owner = "Icecat" +description = "NextMoe Group Access Network" diff --git a/asn/AS4201270006 b/asn/AS4201270006 deleted file mode 100644 index 22a0342..0000000 --- a/asn/AS4201270006 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Jerry Network" -OWNER="JerryXiao" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270006.toml b/asn/AS4201270006.toml new file mode 100644 index 0000000..3eecbdd --- /dev/null +++ b/asn/AS4201270006.toml @@ -0,0 +1,2 @@ +name = "Jerry Network" +owner = "JerryXiao" diff --git a/asn/AS4201270007 b/asn/AS4201270007 deleted file mode 100644 index 9b60ab1..0000000 --- a/asn/AS4201270007 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Staph" -OWNER="Staph" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270007.toml b/asn/AS4201270007.toml new file mode 100644 index 0000000..173d477 --- /dev/null +++ b/asn/AS4201270007.toml @@ -0,0 +1,2 @@ +name = "Staph" +owner = "Staph" diff --git a/asn/AS4201270008 b/asn/AS4201270008 deleted file mode 100644 index bd31f5f..0000000 --- a/asn/AS4201270008 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="MagicNeko" -OWNER="Icecat" -DESC="MagicNeko Network Internet exchange" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270008.toml b/asn/AS4201270008.toml new file mode 100644 index 0000000..ac74d13 --- /dev/null +++ b/asn/AS4201270008.toml @@ -0,0 +1,3 @@ +name = "MagicNeko" +owner = "Icecat" +description = "MagicNeko Network Internet exchange" diff --git a/asn/AS4201270009 b/asn/AS4201270009 deleted file mode 100644 index cbf9180..0000000 --- a/asn/AS4201270009 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="santost12" -OWNER="santost12" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270009.toml b/asn/AS4201270009.toml new file mode 100644 index 0000000..843338e --- /dev/null +++ b/asn/AS4201270009.toml @@ -0,0 +1,2 @@ +name = "santost12" +owner = "santost12" diff --git a/asn/AS4201270010 b/asn/AS4201270010 deleted file mode 100644 index ea9b4fb..0000000 --- a/asn/AS4201270010 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Lan Tian" -OWNER="Lan Tian" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270010.toml b/asn/AS4201270010.toml new file mode 100644 index 0000000..bc240bf --- /dev/null +++ b/asn/AS4201270010.toml @@ -0,0 +1,2 @@ +name = "Lan Tian" +owner = "Lan Tian" diff --git a/asn/AS4201270011 b/asn/AS4201270011 deleted file mode 100644 index 2494f33..0000000 --- a/asn/AS4201270011 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="LINE-NZ" -OWNER="LINE-NZ" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270011.toml b/asn/AS4201270011.toml new file mode 100644 index 0000000..acd8459 --- /dev/null +++ b/asn/AS4201270011.toml @@ -0,0 +1,2 @@ +name = "LINE-NZ" +owner = "LINE-NZ" diff --git a/asn/AS4201270012 b/asn/AS4201270012 deleted file mode 100644 index e96e0e4..0000000 --- a/asn/AS4201270012 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Yhi Interconnect" -OWNER="Junde Yhi" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270012.toml b/asn/AS4201270012.toml new file mode 100644 index 0000000..08eda8f --- /dev/null +++ b/asn/AS4201270012.toml @@ -0,0 +1,2 @@ +name = "Yhi Interconnect" +owner = "Junde Yhi" diff --git a/asn/AS4201270013 b/asn/AS4201270013 deleted file mode 100644 index 4d39b1d..0000000 --- a/asn/AS4201270013 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="NDOSKRNL" -OWNER="Ndoskrnl" -DESC="Ndoskrnl's Network" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270013.toml b/asn/AS4201270013.toml new file mode 100644 index 0000000..72c0e9c --- /dev/null +++ b/asn/AS4201270013.toml @@ -0,0 +1,3 @@ +name = "NDOSKRNL" +owner = "Ndoskrnl" +description = "Ndoskrnl's Network" diff --git a/asn/AS4201270014 b/asn/AS4201270014 deleted file mode 100644 index 1aebc98..0000000 --- a/asn/AS4201270014 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="leedagee" -OWNER="leedagee" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270014.toml b/asn/AS4201270014.toml new file mode 100644 index 0000000..c62a079 --- /dev/null +++ b/asn/AS4201270014.toml @@ -0,0 +1,2 @@ +name = "leedagee" +owner = "leedagee" diff --git a/asn/AS4201270015 b/asn/AS4201270015 deleted file mode 100644 index ccabbdf..0000000 --- a/asn/AS4201270015 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="James58899" -OWNER="James58899" -DESC="" -SOURCE="NeoNetwork" diff --git a/asn/AS4201270015.toml b/asn/AS4201270015.toml new file mode 100644 index 0000000..c16f8b2 --- /dev/null +++ b/asn/AS4201270015.toml @@ -0,0 +1,2 @@ +name = "James58899" +owner = "James58899" diff --git a/asn/AS4242420140 b/asn/AS4242420140 deleted file mode 100644 index be5d858..0000000 --- a/asn/AS4242420140 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="Yangfl Network" -OWNER="Yangfl" -DESC="" -SOURCE="DN42" diff --git a/asn/AS4242420140.toml b/asn/AS4242420140.toml new file mode 100644 index 0000000..c33f368 --- /dev/null +++ b/asn/AS4242420140.toml @@ -0,0 +1,2 @@ +name = "Yangfl Network" +owner = "Yangfl" diff --git a/asn/AS4242420916 b/asn/AS4242420916 deleted file mode 100644 index 947fe70..0000000 --- a/asn/AS4242420916 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="alanyhq" -OWNER="alanyhq" -DESC="alanyhq main" -SOURCE="DN42" diff --git a/asn/AS4242420916.toml b/asn/AS4242420916.toml new file mode 100644 index 0000000..c0c3477 --- /dev/null +++ b/asn/AS4242420916.toml @@ -0,0 +1,3 @@ +name = "alanyhq" +owner = "alanyhq" +description = "alanyhq main" diff --git a/asn/AS4242421037 b/asn/AS4242421037 deleted file mode 100644 index 49454e5..0000000 --- a/asn/AS4242421037 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="LibreHouse" -OWNER="LibreHouse" -DESC="" -SOURCE="DN42" diff --git a/asn/AS4242421037.toml b/asn/AS4242421037.toml new file mode 100644 index 0000000..d3e9af9 --- /dev/null +++ b/asn/AS4242421037.toml @@ -0,0 +1,2 @@ +name = "SUNNET" +owner = "SUNNET" diff --git a/asn/AS4242423088 b/asn/AS4242423088 deleted file mode 100644 index 0722e17..0000000 --- a/asn/AS4242423088 +++ /dev/null @@ -1,4 +0,0 @@ -NAME="SUNNET" -OWNER="SUNNET" -DESC="" -SOURCE="DN42" diff --git a/asn/AS4242423088.toml b/asn/AS4242423088.toml new file mode 100644 index 0000000..c33f368 --- /dev/null +++ b/asn/AS4242423088.toml @@ -0,0 +1,2 @@ +name = "Yangfl Network" +owner = "Yangfl" diff --git a/entity/Icecat b/entity/Icecat deleted file mode 100644 index f794757..0000000 --- a/entity/Icecat +++ /dev/null @@ -1,13 +0,0 @@ -NAME="Icecat" -DESC="" -CONTACT=( - "EMAIL:" - "TELEGRAM:@fakeicecat" - "IRC:" - "MASTODON:" - "GITHUB:Myer921" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/Icecat.toml b/entity/Icecat.toml new file mode 100644 index 0000000..25fe6c9 --- /dev/null +++ b/entity/Icecat.toml @@ -0,0 +1,5 @@ +name = "Icecat" + +[contact] +telegram = "fakeicecat" +github = "Myer921" diff --git a/entity/James58899 b/entity/James58899 deleted file mode 100644 index 7c6219c..0000000 --- a/entity/James58899 +++ /dev/null @@ -1,13 +0,0 @@ -NAME="James58899" -DESC="" -CONTACT=( - "EMAIL:" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/James58899.toml b/entity/James58899.toml new file mode 100644 index 0000000..8e6a0e3 --- /dev/null +++ b/entity/James58899.toml @@ -0,0 +1 @@ +name = "James58899" diff --git a/entity/JerryXiao b/entity/JerryXiao deleted file mode 100644 index 45cb524..0000000 --- a/entity/JerryXiao +++ /dev/null @@ -1,13 +0,0 @@ -NAME="JerryXiao" -DESC="" -CONTACT=( - "EMAIL:neonet@mail.jerryxiao.cc" - "TELEGRAM:@JerryXiao" - "IRC:JerryXiao@hackint" - "MASTODON:" - "GITHUB:isjerryxiao" -) -BABEL=( - "" -) -AUTH="PGP:186242204A2EC70438E9CE3B9D9CE43650FF2BAA" diff --git a/entity/JerryXiao.toml b/entity/JerryXiao.toml new file mode 100644 index 0000000..e926f0c --- /dev/null +++ b/entity/JerryXiao.toml @@ -0,0 +1,10 @@ +name = "JerryXiao" + +[contact] +email = "neonet@mail.jerryxiao.cc" +telegram = "JerryXiao" +irc = "JerryXiao@hackint" +github = "isjerryxiao" + +[persona] +pgp = "186242204A2EC70438E9CE3B9D9CE43650FF2BAA" diff --git a/entity/Junde Yhi b/entity/Junde Yhi deleted file mode 100644 index 5b94a98..0000000 --- a/entity/Junde Yhi +++ /dev/null @@ -1,19 +0,0 @@ -NAME="Junde Yhi" -DESC="" -CONTACT=( - "EMAIL:lmy441900@live.com" - "TELEGRAM:@lmy441900" - "MASTODON:@lmy441900@sn.angry.im" - "GITHUB:lmy441900" -) -BABEL=( - "zh-N" - "zh-hans-N" - "zh-hant-2" - "en-3" - "de-0" - "ru-0" - "jp-0" - "fi-0" -) -AUTH="PGP:E6C74782A1FBEE741D09885FD274286F672C800A" diff --git a/entity/Junde Yhi.toml b/entity/Junde Yhi.toml new file mode 100644 index 0000000..ec221d3 --- /dev/null +++ b/entity/Junde Yhi.toml @@ -0,0 +1,20 @@ +name = "Junde Yhi" +babel = [ + "zh-N", + "zh-hans-N", + "zh-hant-2", + "en-3", + "de-0", + "ru-0", + "jp-0", + "fi-0", +] + +[contact] +email = "lmy441900@live.com" +telegram = "lmy441900" +mastodon = "@lmy441900@sn.angry.im" +github = "lmy441900" + +[persona] +pgp = "E6C74782A1FBEE741D09885FD274286F672C800A" diff --git a/entity/LINE-NZ b/entity/LINE-NZ deleted file mode 100644 index 26eae7b..0000000 --- a/entity/LINE-NZ +++ /dev/null @@ -1,13 +0,0 @@ -NAME="LINE-NZ" -DESC="" -CONTACT=( - "EMAIL:dn42@line.co.nz" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:line-nz" -) -BABEL=( - "en" -) -AUTH="" diff --git a/entity/LINE-NZ.toml b/entity/LINE-NZ.toml new file mode 100644 index 0000000..eeab0fd --- /dev/null +++ b/entity/LINE-NZ.toml @@ -0,0 +1,6 @@ +name = "LINE-NZ" +babel = ["en"] + +[contact] +email = "dn42@line.co.nz" +github = "line-nz" diff --git a/entity/Lan Tian b/entity/Lan Tian deleted file mode 100644 index 690f116..0000000 --- a/entity/Lan Tian +++ /dev/null @@ -1,13 +0,0 @@ -NAME="Lan Tian" -DESC="" -CONTACT=( - "EMAIL:" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/Lan Tian.toml b/entity/Lan Tian.toml new file mode 100644 index 0000000..edd54c8 --- /dev/null +++ b/entity/Lan Tian.toml @@ -0,0 +1 @@ +name = "Lan Tian" diff --git a/entity/LibreHouse b/entity/LibreHouse deleted file mode 100644 index ccbb13b..0000000 --- a/entity/LibreHouse +++ /dev/null @@ -1,17 +0,0 @@ -NAME="LibreHouse" -DESC="" -CONTACT=( - "EMAIL:i+noc@outv.im" - "TELEGRAM:@outvi" - "IRC:" - "MASTODON:@outvi@moe.cat" - "GITHUB:@outloudvi" -) -BABEL=( - "zh-N" - "zh-hans-N" - "zh-hant-3" - "en-2" - "ja-0" -) -AUTH="" diff --git a/entity/LibreHouse.toml b/entity/LibreHouse.toml new file mode 100644 index 0000000..7b81796 --- /dev/null +++ b/entity/LibreHouse.toml @@ -0,0 +1,11 @@ +name = "LibreHouse" +babel = ["zh-N", "en-2"] + +[contact] +email = "i+noc@outv.im" +telegram = "outvi" +mastodon = "@outvi@moe.cat" +github = "outloudvi" + +[persona] +pgp = "47627D2288B20CC033C7B7D72D83E4E89C15DA36" diff --git a/entity/Ndoskrnl b/entity/Ndoskrnl deleted file mode 100644 index d178abe..0000000 --- a/entity/Ndoskrnl +++ /dev/null @@ -1,13 +0,0 @@ -NAME="Ndoskrnl" -DESC="We can start chat happily with Google Translate :)" -CONTACT=( - "EMAIL:lollipop.studio.cn@gmail.com" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:magic0whi" -) -BABEL=( - "zh|en-1" -) -AUTH="" diff --git a/entity/Ndoskrnl.toml b/entity/Ndoskrnl.toml new file mode 100644 index 0000000..578d76f --- /dev/null +++ b/entity/Ndoskrnl.toml @@ -0,0 +1,7 @@ +name = "Ndoskrnl" +description = "We can start chat happily with Google Translate :)" +babel = ["en-1", "zh-1"] + +[contact] +email = "lollipop.studio.cn@gmail.com" +github = "magic0whi" diff --git a/entity/Neo_Chen b/entity/Neo_Chen deleted file mode 100644 index 518e662..0000000 --- a/entity/Neo_Chen +++ /dev/null @@ -1,14 +0,0 @@ -NAME="Neo_Chen" -DESC="" -CONTACT=( - "EMAIL:chenkolei@gmail.com" - "TELEGRAM:@Neo_Chen" - "IRC:Neo_Chen" - "MASTODON:@Neo_Chen@mastodon.xyz" - "GITHUB:NeoChen1024" -) -BABEL=( - "zh-N" - "en-2" -) -AUTH="PGP:D306BB628837043150CD1E42CA0957540FD996CD" diff --git a/entity/Neo_Chen.toml b/entity/Neo_Chen.toml new file mode 100644 index 0000000..fedddd2 --- /dev/null +++ b/entity/Neo_Chen.toml @@ -0,0 +1,12 @@ +name = "Neo_Chen" +babel = ["zh-N", "en-2"] + +[contact] +email = "chenkolei@gmail.com" +telegram = "Neo_Chen" +irc = "Neo_Chen" +mastodon = "@Neo_Chen@mastodon.xyz" +github = "Neo_Chen" + +[persona] +pgp = "D306BB628837043150CD1E42CA0957540FD996CD" diff --git a/entity/SUNNET b/entity/SUNNET deleted file mode 100644 index df0d2d7..0000000 --- a/entity/SUNNET +++ /dev/null @@ -1,13 +0,0 @@ -NAME="SUNNET" -DESC="" -CONTACT=( - "EMAIL:" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/SUNNET.toml b/entity/SUNNET.toml new file mode 100644 index 0000000..79b3fc6 --- /dev/null +++ b/entity/SUNNET.toml @@ -0,0 +1 @@ +name = "SUNNET" diff --git a/entity/Septs b/entity/Septs deleted file mode 100644 index fa76f99..0000000 --- a/entity/Septs +++ /dev/null @@ -1,13 +0,0 @@ -NAME="Septs" -DESC="" -CONTACT=( - "EMAIL:bgp@septs.email" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/Staph b/entity/Staph deleted file mode 100644 index 5ef685a..0000000 --- a/entity/Staph +++ /dev/null @@ -1,17 +0,0 @@ -NAME="Staph" -DESC="A programming prokaryotic organism" -CONTACT=( - "EMAIL: staph@aosc.io" - "TELEGRAM: @Staph" - "IRC: Staph_aureus" - "MASTODON:" - "GITHUB: StephDC" -) -BABEL=( - "zh-N" - "en-4" - "ja-2" - "es-1" - "fr-1" -) -AUTH="" diff --git a/entity/Staph.toml b/entity/Staph.toml new file mode 100644 index 0000000..b6111f0 --- /dev/null +++ b/entity/Staph.toml @@ -0,0 +1,9 @@ +name = "Staph" +description = "A programming prokaryotic organism" +babel = ["zh-N", "en-4", "ja-2", "es-1", "fr-1"] + +[contact] +email = "staph@aosc.io" +telegram = "Staph" +irc = "Staph_aureus" +github = "StephDC" diff --git a/entity/Yangfl b/entity/Yangfl deleted file mode 100644 index 7d29678..0000000 --- a/entity/Yangfl +++ /dev/null @@ -1,13 +0,0 @@ -NAME="Yangfl Network" -DESC="" -CONTACT=( - "EMAIL:" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/Yangfl.toml b/entity/Yangfl.toml new file mode 100644 index 0000000..bfc05b1 --- /dev/null +++ b/entity/Yangfl.toml @@ -0,0 +1 @@ +name = "Yangfl Network" diff --git a/entity/alanyhq b/entity/alanyhq deleted file mode 100644 index ca1bf27..0000000 --- a/entity/alanyhq +++ /dev/null @@ -1,14 +0,0 @@ -NAME="alanyhq" -DESC="" -CONTACT=( - "EMAIL:" - "TELEGRAM:@alanyhq" - "IRC:alanyhq" - "MASTODON:" - "GITHUB:" -) -BABEL=( - "zh-N" - "en-2" -) -AUTH="" diff --git a/entity/alanyhq.toml b/entity/alanyhq.toml new file mode 100644 index 0000000..269f93f --- /dev/null +++ b/entity/alanyhq.toml @@ -0,0 +1,5 @@ +name = "alanyhq" +babel = ["zh-N", "en-2"] + +[contact] +telegram = "alanyhq" diff --git a/entity/chenx97 b/entity/chenx97 deleted file mode 100644 index e05de6d..0000000 --- a/entity/chenx97 +++ /dev/null @@ -1,13 +0,0 @@ -NAME="chenx97" -DESC="" -CONTACT=( - "EMAIL:chenx97@gmail.com" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:chenx97" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/chenx97.toml b/entity/chenx97.toml new file mode 100644 index 0000000..a1b534b --- /dev/null +++ b/entity/chenx97.toml @@ -0,0 +1,5 @@ +name = "chenx97" + +[contact] +email = "chenx97@gmail.com" +github = "chenx97" diff --git a/entity/frank b/entity/frank deleted file mode 100644 index 64d8408..0000000 --- a/entity/frank +++ /dev/null @@ -1,13 +0,0 @@ -NAME="frank" -DESC="" -CONTACT=( - "EMAIL:" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/frank.toml b/entity/frank.toml new file mode 100644 index 0000000..be67da4 --- /dev/null +++ b/entity/frank.toml @@ -0,0 +1 @@ +name = "frank" diff --git a/entity/leedagee b/entity/leedagee deleted file mode 100644 index 9f3b587..0000000 --- a/entity/leedagee +++ /dev/null @@ -1,13 +0,0 @@ -NAME="leedagee" -DESC="" -CONTACT=( - "EMAIL:leedageea@gmail.com" - "TELEGRAM:@leedagee" - "IRC:lizr" - "GITHUB:leedagee" -) -BABEL=( - "zh-N" - "en-2" -) -AUTH="PGP:47627D2288B20CC033C7B7D72D83E4E89C15DA36" diff --git a/entity/leedagee.toml b/entity/leedagee.toml new file mode 100644 index 0000000..a61df64 --- /dev/null +++ b/entity/leedagee.toml @@ -0,0 +1,8 @@ +name = "leedagee" +babel = ["zh-N", "zh-hans-N", "zh-hant-3", "en-2", "ja-0"] + +[contact] +email = "leedageea@gmail.com" +telegram = "leedagee" +irc = "lizr" +github = "leedagee" diff --git a/entity/licson b/entity/licson deleted file mode 100644 index 4d0806d..0000000 --- a/entity/licson +++ /dev/null @@ -1,13 +0,0 @@ -NAME="licson" -DESC="" -CONTACT=( - "EMAIL:admin@licson.net" - "TELEGRAM:licson" - "IRC:licson" - "MASTODON:" - "GITHUB:licson0729" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/licson.toml b/entity/licson.toml new file mode 100644 index 0000000..e0953cf --- /dev/null +++ b/entity/licson.toml @@ -0,0 +1,6 @@ +name = "licson" + +[contact] +email = "admin@licson.net" +telegram = "licson" +github = "licson0729" diff --git a/entity/santost12 b/entity/santost12 deleted file mode 100644 index e0a429a..0000000 --- a/entity/santost12 +++ /dev/null @@ -1,13 +0,0 @@ -NAME="santost12" -DESC="" -CONTACT=( - "EMAIL:tylersantos12@protonmail.com" - "TELEGRAM:" - "IRC:" - "MASTODON:" - "GITHUB:santost12" -) -BABEL=( - "" -) -AUTH="" diff --git a/entity/santost12.toml b/entity/santost12.toml new file mode 100644 index 0000000..1f4d2b5 --- /dev/null +++ b/entity/santost12.toml @@ -0,0 +1,5 @@ +name = "santost12" + +[contact] +email = "tylersantos12@protonmail.com" +github = "santost12" diff --git a/entity/septs.toml b/entity/septs.toml new file mode 100644 index 0000000..291935d --- /dev/null +++ b/entity/septs.toml @@ -0,0 +1,6 @@ +name = "septs" + +[contact] +email = "bgp@septs.email" +telegram = "septs" +github = "septs" diff --git a/node/Icecat-GroupAccessNetwork b/node/Icecat-GroupAccessNetwork deleted file mode 100644 index 32df470..0000000 --- a/node/Icecat-GroupAccessNetwork +++ /dev/null @@ -1,6 +0,0 @@ -ASN="4201270005" -DESC="" -IP=( - "10.127.233.1/24" - "fd10:127:233:1c3c::1/64" -) diff --git a/node/Icecat.toml b/node/Icecat.toml new file mode 100644 index 0000000..2847f79 --- /dev/null +++ b/node/Icecat.toml @@ -0,0 +1,3 @@ +[Icecat-GroupAccessNetwork] +asn = 4201270005 +cidr = ["10.127.233.1/24", "fd10:127:233:1c3c::1/64"] diff --git a/node/James58899 b/node/James58899 deleted file mode 100644 index 754ed68..0000000 --- a/node/James58899 +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270015" -DESC="" -IP=( -) diff --git a/node/James58899.toml b/node/James58899.toml new file mode 100644 index 0000000..c6f8254 --- /dev/null +++ b/node/James58899.toml @@ -0,0 +1,2 @@ +[James58899] +asn = 4201270015 diff --git a/node/JerryXiao b/node/JerryXiao deleted file mode 100644 index 43192a5..0000000 --- a/node/JerryXiao +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270006" -DESC="" -IP=( - "10.127.x.x/x" -) diff --git a/node/JerryXiao-HK1 b/node/JerryXiao-HK1 deleted file mode 100644 index 9db28da..0000000 --- a/node/JerryXiao-HK1 +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270006" -DESC="" -IP=( -) diff --git a/node/JerryXiao-HK2 b/node/JerryXiao-HK2 deleted file mode 100644 index 9db28da..0000000 --- a/node/JerryXiao-HK2 +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270006" -DESC="" -IP=( -) diff --git a/node/JerryXiao-SH1 b/node/JerryXiao-SH1 deleted file mode 100644 index 9db28da..0000000 --- a/node/JerryXiao-SH1 +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270006" -DESC="" -IP=( -) diff --git a/node/JerryXiao.toml b/node/JerryXiao.toml new file mode 100644 index 0000000..8483665 --- /dev/null +++ b/node/JerryXiao.toml @@ -0,0 +1,11 @@ +[JerryXiao] +asn = 4201270006 + +[JerryXiao-SH1] +asn = 4201270006 + +[JerryXiao-HK1] +asn = 4201270006 + +[JerryXiao-HK2] +asn = 4201270006 diff --git a/node/LINE-NZ-AU01 b/node/LINE-NZ-AU01 deleted file mode 100644 index aff1ee2..0000000 --- a/node/LINE-NZ-AU01 +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270011" -DESC="LINE-NZ Cloud" -IP=( - "10.127.22.9/29" -) diff --git a/node/LINE-NZ-NZ01 b/node/LINE-NZ-NZ01 deleted file mode 100644 index e1dbd5f..0000000 --- a/node/LINE-NZ-NZ01 +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270011" -DESC="LINE-NZ Home" -IP=( - "10.127.22.1/29" -) diff --git a/node/LINE-NZ.toml b/node/LINE-NZ.toml new file mode 100644 index 0000000..2b3b003 --- /dev/null +++ b/node/LINE-NZ.toml @@ -0,0 +1,9 @@ +[LINE-NZ-NZ01] +asn = 4201270011 +description = "LINE-NZ Home" +cidr = ["10.127.22.1/29"] + +[LINE-NZ-AU01] +asn = 4201270011 +description = "LINE-NZ Cloud" +cidr = ["10.127.22.9/29"] diff --git a/node/LanTian b/node/LanTian deleted file mode 100644 index c4b07a8..0000000 --- a/node/LanTian +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270010" -DESC="" -IP=( -) diff --git a/node/LanTian.toml b/node/LanTian.toml new file mode 100644 index 0000000..0c166a5 --- /dev/null +++ b/node/LanTian.toml @@ -0,0 +1,2 @@ +[LanTian] +asn = 4201270010 diff --git a/node/MagicNeko-HK01 b/node/MagicNeko-HK01 deleted file mode 100644 index 2eed6ac..0000000 --- a/node/MagicNeko-HK01 +++ /dev/null @@ -1,6 +0,0 @@ -ASN="4201270008" -DESC="Magicneko IX LAN interconnection" -IP=( - "10.127.4.10/24" - "fd10:127:0233:7170:2021::10.127.4.10/80" -) diff --git a/node/MagicNeko-JP03 b/node/MagicNeko-JP03 deleted file mode 100644 index d15a293..0000000 --- a/node/MagicNeko-JP03 +++ /dev/null @@ -1,6 +0,0 @@ -ASN="4201270008" -DESC="MagicNeko IX LAN interconnection" -IP=( - "10.127.4.15/24" - "fd10:127:0233:7170:2021::10.127.4.15/80" -) diff --git a/node/MagicNeko-RU01 b/node/MagicNeko-RU01 deleted file mode 100644 index f61598b..0000000 --- a/node/MagicNeko-RU01 +++ /dev/null @@ -1,6 +0,0 @@ -ASN="4201270008" -DESC="Magicneko IX LAN interconnection" -IP=( - "10.127.4.14/24" - "fd10:127:0233:7170:2021::10.127.4.14/80" -) diff --git a/node/MagicNeko.toml b/node/MagicNeko.toml new file mode 100644 index 0000000..99c616f --- /dev/null +++ b/node/MagicNeko.toml @@ -0,0 +1,14 @@ +[MagicNeko-HK01] +asn = 4201270008 +description = "Magicneko IX LAN interconnection" +cidr = ["10.127.4.10/24", "fd10:127:0233:7170:2021::10.127.4.10/80"] + +[MagicNeko-RU01] +asn = 4201270008 +description = "Magicneko IX LAN interconnection" +cidr = ["10.127.4.14/24", "fd10:127:0233:7170:2021::10.127.4.14/80"] + +[MagicNeko-JP03] +asn = 4201270008 +description = "MagicNeko IX LAN interconnection" +cidr = ["10.127.4.15/24", "fd10:127:0233:7170:2021::10.127.4.15/80"] diff --git a/node/Ndoskrnl-CN01 b/node/Ndoskrnl-CN01 deleted file mode 100644 index 2ab72ac..0000000 --- a/node/Ndoskrnl-CN01 +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270013" -DESC="Ndoskrnl's first node" -IP=( - "10.127.13.2/24" -) diff --git a/node/Ndoskrnl-US01 b/node/Ndoskrnl-US01 deleted file mode 100644 index b2d1b2c..0000000 --- a/node/Ndoskrnl-US01 +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270013" -DESC="Ndoskrnl's first node" -IP=( - "10.127.13.1/24" -) diff --git a/node/Ndoskrnl.toml b/node/Ndoskrnl.toml new file mode 100644 index 0000000..8268328 --- /dev/null +++ b/node/Ndoskrnl.toml @@ -0,0 +1,9 @@ +[Ndoskrnl-US01] +asn = 4201270013 +description = "Ndoskrnls first node" +cidr = ["10.127.13.1/24"] + +[Ndoskrnl-CN01] +asn = 4201270013 +description = "Ndoskrnls first node" +cidr = ["10.127.13.2/24"] diff --git a/node/NeoPDP-11 b/node/NeoPDP-11 deleted file mode 100644 index bc5e675..0000000 --- a/node/NeoPDP-11 +++ /dev/null @@ -1,7 +0,0 @@ -ASN="4201270000" -DESC="" -IP=( - "10.127.1.1/24" - "10.127.254.1/24" - "10.127.255.1/24" -) diff --git a/node/NeoSystem b/node/NeoSystem deleted file mode 100644 index 0f1cd75..0000000 --- a/node/NeoSystem +++ /dev/null @@ -1,6 +0,0 @@ -ASN="4201270000" -DESC="" -IP=( - "10.127.1.80/24" - "10.127.2.1/24" -) diff --git a/node/NeoVAX b/node/NeoVAX deleted file mode 100644 index 148e772..0000000 --- a/node/NeoVAX +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270000" -DESC="" -IP=( -) diff --git a/node/Neo_Chen.toml b/node/Neo_Chen.toml new file mode 100644 index 0000000..06fadbc --- /dev/null +++ b/node/Neo_Chen.toml @@ -0,0 +1,17 @@ +[NeoPDP-11] +asn = 4201270000 +cidr = ["10.127.1.1/24", "10.127.254.1/24", "10.127.255.1/24"] + +[NeoSystem] +asn = 4201270000 +cidr = ["10.127.1.80/24", "10.127.2.1/24"] + +[NeoVAX] +asn = 4201270000 + +[pan] +asn = 4201270000 +cidr = ["10.127.3.1/24"] + +[ucbvax] +asn = 4201270000 diff --git a/node/SUNNET b/node/SUNNET deleted file mode 100644 index 84e693c..0000000 --- a/node/SUNNET +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4242423088" -DESC="" -IP=( -) diff --git a/node/SUNNET.toml b/node/SUNNET.toml new file mode 100644 index 0000000..e0d41b1 --- /dev/null +++ b/node/SUNNET.toml @@ -0,0 +1,2 @@ +[SUNNET] +asn = 4242423088 diff --git a/node/caasih b/node/caasih deleted file mode 100644 index 148e772..0000000 --- a/node/caasih +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270000" -DESC="" -IP=( -) diff --git a/node/caasih.toml b/node/caasih.toml new file mode 100644 index 0000000..97a8596 --- /dev/null +++ b/node/caasih.toml @@ -0,0 +1,2 @@ +[caasih] +asn = 4201270000 diff --git a/node/chenx97 b/node/chenx97 deleted file mode 100644 index be88d85..0000000 --- a/node/chenx97 +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270003" -DESC="" -IP=( -) diff --git a/node/chenx97.toml b/node/chenx97.toml new file mode 100644 index 0000000..552390c --- /dev/null +++ b/node/chenx97.toml @@ -0,0 +1,2 @@ +[chenx97] +asn = 4201270003 diff --git a/node/cklvax b/node/cklvax deleted file mode 100644 index 7d06530..0000000 --- a/node/cklvax +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270000" -DESC="" -IP=( - "10.127.1.40/24" -) diff --git a/node/cklvax.toml b/node/cklvax.toml new file mode 100644 index 0000000..f4891ad --- /dev/null +++ b/node/cklvax.toml @@ -0,0 +1,3 @@ +[cklvax] +asn = 4201270000 +cidr = ["10.127.1.40/24"] diff --git a/node/dfceaef b/node/dfceaef deleted file mode 100644 index c9eb510..0000000 --- a/node/dfceaef +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4242420140" -DESC="" -IP=( -) diff --git a/node/dfceaef.toml b/node/dfceaef.toml new file mode 100644 index 0000000..c64b289 --- /dev/null +++ b/node/dfceaef.toml @@ -0,0 +1,2 @@ +[dfceaef] +asn = 4242420140 diff --git a/node/frank-hsinchu b/node/frank-hsinchu deleted file mode 100644 index 1432605..0000000 --- a/node/frank-hsinchu +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270004" -DESC="" -IP=( -) diff --git a/node/frank.toml b/node/frank.toml new file mode 100644 index 0000000..3f00853 --- /dev/null +++ b/node/frank.toml @@ -0,0 +1,2 @@ +[frank-hsinchu] +asn = 4201270004 diff --git a/node/leedagee b/node/leedagee deleted file mode 100644 index d478866..0000000 --- a/node/leedagee +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270014" -DESC="" -IP=( -) diff --git a/node/leedagee.toml b/node/leedagee.toml new file mode 100644 index 0000000..fc7ef48 --- /dev/null +++ b/node/leedagee.toml @@ -0,0 +1,2 @@ +[leedagee] +asn = 4201270014 diff --git a/node/megumiLHS b/node/megumiLHS deleted file mode 100644 index f40f182..0000000 --- a/node/megumiLHS +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4242421037" -DESC="" -IP=( -) diff --git a/node/megumiLHS.toml b/node/megumiLHS.toml new file mode 100644 index 0000000..b36ceb2 --- /dev/null +++ b/node/megumiLHS.toml @@ -0,0 +1,2 @@ +[megumiLHS] +asn = 4242421037 diff --git a/node/pan b/node/pan deleted file mode 100644 index 9ee2974..0000000 --- a/node/pan +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270000" -DESC="" -IP=( - "10.127.3.1/24" -) diff --git a/node/santost12 b/node/santost12 deleted file mode 100644 index 7cbbb67..0000000 --- a/node/santost12 +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270009" -DESC="" -IP=( -) diff --git a/node/santost12.toml b/node/santost12.toml new file mode 100644 index 0000000..2a7ce0e --- /dev/null +++ b/node/santost12.toml @@ -0,0 +1,2 @@ +[santost12] +asn = 4201270009 diff --git a/node/septs b/node/septs deleted file mode 100644 index ecfc372..0000000 --- a/node/septs +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270001" -DESC="" -IP=( -) diff --git a/node/septs.toml b/node/septs.toml new file mode 100644 index 0000000..d8c9966 --- /dev/null +++ b/node/septs.toml @@ -0,0 +1,2 @@ +[septs] +asn = 4201270001 diff --git a/node/staph b/node/staph deleted file mode 100644 index e5afb33..0000000 --- a/node/staph +++ /dev/null @@ -1,5 +0,0 @@ -ASN="4201270007" -DESC="Home of S. aureus in Amsterdam" -IP=( - "10.127.8.185/29" -) diff --git a/node/staph.toml b/node/staph.toml new file mode 100644 index 0000000..d96b3ec --- /dev/null +++ b/node/staph.toml @@ -0,0 +1,4 @@ +[staph] +asn = 4201270007 +description = "Home of S. aureus in Amsterdam" +cidr = ["10.127.8.185/29"] diff --git a/node/ucbvax b/node/ucbvax deleted file mode 100644 index 148e772..0000000 --- a/node/ucbvax +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270000" -DESC="" -IP=( -) diff --git a/node/yhi-h b/node/yhi-h deleted file mode 100644 index 5ed897e..0000000 --- a/node/yhi-h +++ /dev/null @@ -1,4 +0,0 @@ -ASN="4201270012" -DESC="" -IP=( -) diff --git a/node/yhi-h.toml b/node/yhi-h.toml new file mode 100644 index 0000000..77c68bd --- /dev/null +++ b/node/yhi-h.toml @@ -0,0 +1,2 @@ +[yhi-h] +asn = 4201270012 diff --git a/peer/JerryXiao-HK1.toml b/peer/JerryXiao-HK1.toml new file mode 100644 index 0000000..4b17104 --- /dev/null +++ b/peer/JerryXiao-HK1.toml @@ -0,0 +1 @@ +to-peer = ["JerryXiao-HK2"] diff --git a/peer/JerryXiao-HK1~JerryXiao-HK2 b/peer/JerryXiao-HK1~JerryXiao-HK2 deleted file mode 100644 index 3837914..0000000 --- a/peer/JerryXiao-HK1~JerryXiao-HK2 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/JerryXiao-SH1.toml b/peer/JerryXiao-SH1.toml new file mode 100644 index 0000000..b511eed --- /dev/null +++ b/peer/JerryXiao-SH1.toml @@ -0,0 +1 @@ +to-peer = ["JerryXiao-HK1"] diff --git a/peer/JerryXiao-SH1~JerryXiao-HK1 b/peer/JerryXiao-SH1~JerryXiao-HK1 deleted file mode 100644 index 3837914..0000000 --- a/peer/JerryXiao-SH1~JerryXiao-HK1 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/JerryXiao.toml b/peer/JerryXiao.toml new file mode 100644 index 0000000..2aa49ee --- /dev/null +++ b/peer/JerryXiao.toml @@ -0,0 +1 @@ +to-peer = ["JerryXiao-HK1", "JerryXiao-SH1", "LanTian", "dfceaef", "ucbvax"] diff --git a/peer/JerryXiao~JerryXiao-HK1 b/peer/JerryXiao~JerryXiao-HK1 deleted file mode 100644 index 3837914..0000000 --- a/peer/JerryXiao~JerryXiao-HK1 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/JerryXiao~JerryXiao-SH1 b/peer/JerryXiao~JerryXiao-SH1 deleted file mode 100644 index 3837914..0000000 --- a/peer/JerryXiao~JerryXiao-SH1 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/JerryXiao~LanTian b/peer/JerryXiao~LanTian deleted file mode 100644 index 3837914..0000000 --- a/peer/JerryXiao~LanTian +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/JerryXiao~dfceaef b/peer/JerryXiao~dfceaef deleted file mode 100644 index 3837914..0000000 --- a/peer/JerryXiao~dfceaef +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/JerryXiao~ucbvax b/peer/JerryXiao~ucbvax deleted file mode 100644 index 3837914..0000000 --- a/peer/JerryXiao~ucbvax +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-HK01.toml b/peer/MagicNeko-HK01.toml new file mode 100644 index 0000000..1a43d55 --- /dev/null +++ b/peer/MagicNeko-HK01.toml @@ -0,0 +1 @@ +to-peer = ["Icecat-GroupAccessNetwork", "SUNNET"] diff --git a/peer/MagicNeko-HK01~Icecat-GroupAccessNetwork b/peer/MagicNeko-HK01~Icecat-GroupAccessNetwork deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-HK01~Icecat-GroupAccessNetwork +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-HK01~SUNNET b/peer/MagicNeko-HK01~SUNNET deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-HK01~SUNNET +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-JP03.toml b/peer/MagicNeko-JP03.toml new file mode 100644 index 0000000..afb7e30 --- /dev/null +++ b/peer/MagicNeko-JP03.toml @@ -0,0 +1,8 @@ +to-peer = [ + "JerryXiao", + "Ndoskrnl-US01", + "chenx97", + "frank-hsinchu", + "megumiLHS", + "santost12", +] diff --git a/peer/MagicNeko-JP03~JerryXiao b/peer/MagicNeko-JP03~JerryXiao deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-JP03~JerryXiao +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-JP03~Ndoskrnl-US01 b/peer/MagicNeko-JP03~Ndoskrnl-US01 deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-JP03~Ndoskrnl-US01 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-JP03~chenx97 b/peer/MagicNeko-JP03~chenx97 deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-JP03~chenx97 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-JP03~frank-hsinchu b/peer/MagicNeko-JP03~frank-hsinchu deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-JP03~frank-hsinchu +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-JP03~megumiLHS b/peer/MagicNeko-JP03~megumiLHS deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-JP03~megumiLHS +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/MagicNeko-JP03~santost12 b/peer/MagicNeko-JP03~santost12 deleted file mode 100644 index 3837914..0000000 --- a/peer/MagicNeko-JP03~santost12 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/Ndoskrnl-US01.toml b/peer/Ndoskrnl-US01.toml new file mode 100644 index 0000000..b1fcabb --- /dev/null +++ b/peer/Ndoskrnl-US01.toml @@ -0,0 +1 @@ +to-peer = ["Ndoskrnl-CN01"] diff --git a/peer/Ndoskrnl-US01~Ndoskrnl-CN01 b/peer/Ndoskrnl-US01~Ndoskrnl-CN01 deleted file mode 100644 index 3837914..0000000 --- a/peer/Ndoskrnl-US01~Ndoskrnl-CN01 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/NeoSystem.toml b/peer/NeoSystem.toml new file mode 100644 index 0000000..ba7ae8c --- /dev/null +++ b/peer/NeoSystem.toml @@ -0,0 +1 @@ +to-peer = ["NeoVAX"] diff --git a/peer/NeoSystem~NeoVAX b/peer/NeoSystem~NeoVAX deleted file mode 100644 index 3837914..0000000 --- a/peer/NeoSystem~NeoVAX +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/caasih.toml b/peer/caasih.toml new file mode 100644 index 0000000..48c23d8 --- /dev/null +++ b/peer/caasih.toml @@ -0,0 +1 @@ +to-peer = ["NeoPDP-11", "staph", "ucbvax"] diff --git a/peer/caasih~NeoPDP-11 b/peer/caasih~NeoPDP-11 deleted file mode 100644 index 3837914..0000000 --- a/peer/caasih~NeoPDP-11 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/caasih~staph b/peer/caasih~staph deleted file mode 100644 index 3837914..0000000 --- a/peer/caasih~staph +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/caasih~ucbvax b/peer/caasih~ucbvax deleted file mode 100644 index 3837914..0000000 --- a/peer/caasih~ucbvax +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/cklvax.toml b/peer/cklvax.toml new file mode 100644 index 0000000..76bd223 --- /dev/null +++ b/peer/cklvax.toml @@ -0,0 +1 @@ +to-peer = ["NeoSystem"] diff --git a/peer/cklvax~NeoSystem b/peer/cklvax~NeoSystem deleted file mode 100644 index 3837914..0000000 --- a/peer/cklvax~NeoSystem +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/pan.toml b/peer/pan.toml new file mode 100644 index 0000000..1c8cacf --- /dev/null +++ b/peer/pan.toml @@ -0,0 +1 @@ +to-peer = ["MagicNeko-JP03", "NeoPDP-11", "NeoSystem"] diff --git a/peer/pan~MagicNeko-JP03 b/peer/pan~MagicNeko-JP03 deleted file mode 100644 index 3837914..0000000 --- a/peer/pan~MagicNeko-JP03 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/pan~NeoPDP-11 b/peer/pan~NeoPDP-11 deleted file mode 100644 index 3837914..0000000 --- a/peer/pan~NeoPDP-11 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/pan~NeoSystem b/peer/pan~NeoSystem deleted file mode 100644 index 3837914..0000000 --- a/peer/pan~NeoSystem +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs.toml b/peer/septs.toml new file mode 100644 index 0000000..5daafb7 --- /dev/null +++ b/peer/septs.toml @@ -0,0 +1,10 @@ +to-peer = [ + "James58899", + "JerryXiao", + "LanTian", + "MagicNeko-JP03", + "MagicNeko-RU01", + "frank-hsinchu", + "megumiLHS", + "ucbvax", +] diff --git a/peer/septs~James58899 b/peer/septs~James58899 deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~James58899 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs~JerryXiao b/peer/septs~JerryXiao deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~JerryXiao +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs~LanTian b/peer/septs~LanTian deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~LanTian +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs~MagicNeko-JP03 b/peer/septs~MagicNeko-JP03 deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~MagicNeko-JP03 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs~MagicNeko-RU01 b/peer/septs~MagicNeko-RU01 deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~MagicNeko-RU01 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs~frank-hsinchu b/peer/septs~frank-hsinchu deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~frank-hsinchu +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs~megumiLHS b/peer/septs~megumiLHS deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~megumiLHS +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/septs~ucbvax b/peer/septs~ucbvax deleted file mode 100644 index 3837914..0000000 --- a/peer/septs~ucbvax +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/staph.toml b/peer/staph.toml new file mode 100644 index 0000000..99bb6ec --- /dev/null +++ b/peer/staph.toml @@ -0,0 +1 @@ +to-peer = ["MagicNeko-RU01", "santost12", "septs"] diff --git a/peer/staph~MagicNeko-RU01 b/peer/staph~MagicNeko-RU01 deleted file mode 100644 index 3837914..0000000 --- a/peer/staph~MagicNeko-RU01 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/staph~santost12 b/peer/staph~santost12 deleted file mode 100644 index 3837914..0000000 --- a/peer/staph~santost12 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/staph~septs b/peer/staph~septs deleted file mode 100644 index 3837914..0000000 --- a/peer/staph~septs +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/ucbvax.toml b/peer/ucbvax.toml new file mode 100644 index 0000000..52130df --- /dev/null +++ b/peer/ucbvax.toml @@ -0,0 +1,9 @@ +to-peer = [ + "MagicNeko-HK01", + "NeoPDP-11", + "NeoSystem", + "chenx97", + "megumiLHS", + "pan", + "santost12", +] diff --git a/peer/ucbvax~MagicNeko-HK01 b/peer/ucbvax~MagicNeko-HK01 deleted file mode 100644 index 3837914..0000000 --- a/peer/ucbvax~MagicNeko-HK01 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/ucbvax~NeoPDP-11 b/peer/ucbvax~NeoPDP-11 deleted file mode 100644 index 3837914..0000000 --- a/peer/ucbvax~NeoPDP-11 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/ucbvax~NeoSystem b/peer/ucbvax~NeoSystem deleted file mode 100644 index 3837914..0000000 --- a/peer/ucbvax~NeoSystem +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/ucbvax~chenx97 b/peer/ucbvax~chenx97 deleted file mode 100644 index 3837914..0000000 --- a/peer/ucbvax~chenx97 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/ucbvax~megumiLHS b/peer/ucbvax~megumiLHS deleted file mode 100644 index 3837914..0000000 --- a/peer/ucbvax~megumiLHS +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/ucbvax~pan b/peer/ucbvax~pan deleted file mode 100644 index 3837914..0000000 --- a/peer/ucbvax~pan +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/peer/ucbvax~santost12 b/peer/ucbvax~santost12 deleted file mode 100644 index 3837914..0000000 --- a/peer/ucbvax~santost12 +++ /dev/null @@ -1 +0,0 @@ -DESC="" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8bb6ee5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.black] +line-length = 88 diff --git a/route/10.127.0.0,24 b/route/10.127.0.0,24 deleted file mode 100644 index 9b4afee..0000000 --- a/route/10.127.0.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="RESERVED" -DESC="Reserved" -ASN="4201270000" diff --git a/route/10.127.1.0,24 b/route/10.127.1.0,24 deleted file mode 100644 index e5cde16..0000000 --- a/route/10.127.1.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="CROOM" -DESC="LAN at school" -ASN="4201270000" diff --git a/route/10.127.10.0,24 b/route/10.127.10.0,24 deleted file mode 100644 index 2e9c465..0000000 --- a/route/10.127.10.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Lan Tian LAN" -DESC="For LAN" -ASN="4201270010" diff --git a/route/10.127.11.0,24 b/route/10.127.11.0,24 deleted file mode 100644 index 1500028..0000000 --- a/route/10.127.11.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="SUNNET" -DESC="For SUN" -ASN="4242423088" diff --git a/route/10.127.12.0,24 b/route/10.127.12.0,24 deleted file mode 100644 index dd0abaf..0000000 --- a/route/10.127.12.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="dfceaef NET" -DESC="For Yangfl Network" -ASN="4242420140" diff --git a/route/10.127.13.0,24 b/route/10.127.13.0,24 deleted file mode 100644 index 7e69f3e..0000000 --- a/route/10.127.13.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Ndoskrnl's LAN" -DESC="For devices which being connected locally to Ndoskrnl's Master Router" -ASN="4201270013" diff --git a/route/10.127.14.0,23 b/route/10.127.14.0,23 deleted file mode 100644 index 61095a7..0000000 --- a/route/10.127.14.0,23 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="LICSON-NET-SUBALLOC-1" -DESC="" -ASN="134098" diff --git a/route/10.127.2.0,24 b/route/10.127.2.0,24 deleted file mode 100644 index 9c9a288..0000000 --- a/route/10.127.2.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="NeoSystem" -DESC="" -ASN="4201270000" diff --git a/route/10.127.22.0,29 b/route/10.127.22.0,29 deleted file mode 100644 index c21f26f..0000000 --- a/route/10.127.22.0,29 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="LINE-NZ" -DESC="For home" -ASN="4201270011" diff --git a/route/10.127.22.8,29 b/route/10.127.22.8,29 deleted file mode 100644 index e41fc64..0000000 --- a/route/10.127.22.8,29 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="LINE-NZ" -DESC="For cloud" -ASN="4201270011" diff --git a/route/10.127.23.0,29 b/route/10.127.23.0,29 deleted file mode 100644 index d6dec21..0000000 --- a/route/10.127.23.0,29 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="leedagee" -DESC="leedagee" -ASN="4201270014" diff --git a/route/10.127.233.0,24 b/route/10.127.233.0,24 deleted file mode 100644 index bb3cc80..0000000 --- a/route/10.127.233.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Icecat-Mobile-devices" -DESC="For Mobile device internal network segment for testing connectivity quality, No SLA(=172.24.5.0/24)" -ASN="4201270005" diff --git a/route/10.127.255.1,32 b/route/10.127.255.1,32 deleted file mode 100644 index 8857ce3..0000000 --- a/route/10.127.255.1,32 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="LO" -NAME="NeoPDP-11" -DESC="FreeBSD/frr" -ASN="4201270000" diff --git a/route/10.127.255.117,32 b/route/10.127.255.117,32 deleted file mode 100644 index 61a704a..0000000 --- a/route/10.127.255.117,32 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="LO" -NAME="magicneko-tw" -DESC="magicneko-tw/frr" -ASN="4201270008" diff --git a/route/10.127.255.2,32 b/route/10.127.255.2,32 deleted file mode 100644 index d0d1864..0000000 --- a/route/10.127.255.2,32 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="LO" -NAME="ucbvax" -DESC="Arch Linux/frr" -ASN="4201270000" diff --git a/route/10.127.255.4,32 b/route/10.127.255.4,32 deleted file mode 100644 index 6c3b0f0..0000000 --- a/route/10.127.255.4,32 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="LO" -NAME="pan" -DESC="Arch Linux/frr" -ASN="4201270000" diff --git a/route/10.127.255.53,32 b/route/10.127.255.53,32 deleted file mode 100644 index 7d308e0..0000000 --- a/route/10.127.255.53,32 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="LO" -NAME="JerryXiao-Anycast" -DESC="Anycast Recursive DNS" -ASN="4201270006" diff --git a/route/10.127.255.56,32 b/route/10.127.255.56,32 deleted file mode 100644 index 710fdca..0000000 --- a/route/10.127.255.56,32 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="LO" -NAME="frank-hsinchu-1" -DESC="Ubuntu/bird" -ASN="4201270004" diff --git a/route/10.127.255.80,32 b/route/10.127.255.80,32 deleted file mode 100644 index 54e1819..0000000 --- a/route/10.127.255.80,32 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="LO" -NAME="NeoSystem" -DESC="Arch Linux/frr" -ASN="4201270000" diff --git a/route/10.127.3.0,24 b/route/10.127.3.0,24 deleted file mode 100644 index 89e0143..0000000 --- a/route/10.127.3.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="pan hub" -DESC="For non-multihome connection in Taiwan" -ASN="4201270000" diff --git a/route/10.127.4.0,24 b/route/10.127.4.0,24 deleted file mode 100644 index d9cd897..0000000 --- a/route/10.127.4.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Icecat-Explosion" -DESC="For Magicneko Explosion Network Interworking address, No SLA" -ASN="4201270008" diff --git a/route/10.127.41.0,24 b/route/10.127.41.0,24 deleted file mode 100644 index d21acec..0000000 --- a/route/10.127.41.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Septs IX IPv4 Pool" -DESC="" -ASN="4201270001" diff --git a/route/10.127.5.0,28 b/route/10.127.5.0,28 deleted file mode 100644 index b0bd832..0000000 --- a/route/10.127.5.0,28 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE=SUBNET -NAME="yhi-h" -DESC="Yhi Interconnect H" -ASN="4201270012" diff --git a/route/10.127.56.0,24 b/route/10.127.56.0,24 deleted file mode 100644 index b5ba205..0000000 --- a/route/10.127.56.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="frank-hsinchu" -DESC="For home" -ASN="4201270004" diff --git a/route/10.127.69.0,29 b/route/10.127.69.0,29 deleted file mode 100644 index da74626..0000000 --- a/route/10.127.69.0,29 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="santost12" -DESC="For home" -ASN="4201270009" diff --git a/route/10.127.8.0,26 b/route/10.127.8.0,26 deleted file mode 100644 index 04b603d..0000000 --- a/route/10.127.8.0,26 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="LibreHouse" -DESC="For infrastratures in our network" -ASN="4242421037" diff --git a/route/10.127.8.184,29 b/route/10.127.8.184,29 deleted file mode 100644 index 0ec7caa..0000000 --- a/route/10.127.8.184,29 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="StaphNet" -DESC="For Staph-infected equipments around the world" -ASN="4201270007" diff --git a/route/10.127.8.192,26 b/route/10.127.8.192,26 deleted file mode 100644 index 91d8989..0000000 --- a/route/10.127.8.192,26 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="JerryXiao-Infrastructure" -DESC="For cloud instances" -ASN="4201270006" diff --git a/route/10.127.9.0,24 b/route/10.127.9.0,24 deleted file mode 100644 index 3f3399b..0000000 --- a/route/10.127.9.0,24 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="JerryXiao-Home" -DESC="For home" -ASN="4201270006" diff --git a/route/AS134098.toml b/route/AS134098.toml new file mode 100644 index 0000000..352454f --- /dev/null +++ b/route/AS134098.toml @@ -0,0 +1,3 @@ +["10.127.14.0/23"] +type = "subnet" +name = "LICSON-NET-SUBALLOC-1" diff --git a/route/AS4201270000.toml b/route/AS4201270000.toml new file mode 100644 index 0000000..a1317d2 --- /dev/null +++ b/route/AS4201270000.toml @@ -0,0 +1,43 @@ +["10.127.0.0/24"] +type = "subnet" +name = "RESERVED" +description = "Reserved" + +["10.127.1.0/24"] +type = "subnet" +name = "CROOM" +description = "LAN at school" + +["10.127.2.0/24"] +type = "subnet" +name = "NeoSystem" + +["10.127.3.0/24"] +type = "subnet" +name = "pan hub" +description = "For non-multihome connection in Taiwan" + +["10.127.255.1/32"] +type = "loopback" +name = "NeoPDP-11" +description = "FreeBSD/frr" + +["10.127.255.2/32"] +type = "loopback" +name = "ucbvax" +description = "Arch Linux/frr" + +["10.127.255.4/32"] +type = "loopback" +name = "pan" +description = "Arch Linux/frr" + +["10.127.255.80/32"] +type = "loopback" +name = "NeoSystem" +description = "Arch Linux/frr" + +["fd10:127:5f37:59df::/64"] +type = "subnet" +name = "NeoNetwork Origin" +description = "Neo_Chens Network" diff --git a/route/AS4201270001.toml b/route/AS4201270001.toml new file mode 100644 index 0000000..9113cbe --- /dev/null +++ b/route/AS4201270001.toml @@ -0,0 +1,7 @@ +["10.127.41.0/24"] +type = "subnet" +name = "Septs IX IPv4 Pool" + +["fd10:127:41::/48"] +type = "subnet" +name = "Septs IX IPv6 Pool" diff --git a/route/AS4201270004.toml b/route/AS4201270004.toml new file mode 100644 index 0000000..d11dd71 --- /dev/null +++ b/route/AS4201270004.toml @@ -0,0 +1,9 @@ +["10.127.56.0/24"] +type = "subnet" +name = "frank-hsinchu" +description = "For home" + +["10.127.255.56/32"] +type = "loopback" +name = "frank-hsinchu-1" +description = "Ubuntu/bird" diff --git a/route/AS4201270005.toml b/route/AS4201270005.toml new file mode 100644 index 0000000..5f351cb --- /dev/null +++ b/route/AS4201270005.toml @@ -0,0 +1,10 @@ +["10.127.233.0/24"] +type = "subnet" +name = "Icecat-Mobile-devices" +description = "For Mobile device internal network segment for testing connectivity quality, No SLA(=172.24.5.0/24)" + +["fd10:127:0233:1c3c::/64"] +type = "subnet" +name = "icecat" +description = "NextMoe Radvd IPv6 Address" +supernet = "fd10:127:0233::/48" diff --git a/route/AS4201270006.toml b/route/AS4201270006.toml new file mode 100644 index 0000000..d018061 --- /dev/null +++ b/route/AS4201270006.toml @@ -0,0 +1,19 @@ +["10.127.8.192/26"] +type = "subnet" +name = "JerryXiao-Infrastructure" +description = "For cloud instances" + +["10.127.9.0/24"] +type = "subnet" +name = "JerryXiao-Home" +description = "For home" + +["10.127.255.53/32"] +type = "loopback" +name = "JerryXiao-Anycast" +description = "Anycast Recursive DNS" + +["fd10:127:53::/48"] +type = "subnet" +name = "JerryXiao6" +description = "JerryNet6" diff --git a/route/AS4201270007.toml b/route/AS4201270007.toml new file mode 100644 index 0000000..a950c03 --- /dev/null +++ b/route/AS4201270007.toml @@ -0,0 +1,9 @@ +["10.127.8.184/29"] +type = "subnet" +name = "StaphNet" +description = "For Staph-infected equipments around the world" + +["fd10:127:7::/48"] +type = "subnet" +name = "Staph_v6" +description = "Staph-infected IPv6 subnet - please do not disinfect" diff --git a/route/AS4201270008.toml b/route/AS4201270008.toml new file mode 100644 index 0000000..9c72457 --- /dev/null +++ b/route/AS4201270008.toml @@ -0,0 +1,14 @@ +["10.127.4.0/24"] +type = "subnet" +name = "Icecat-Explosion" +description = "For Magicneko Explosion Network Interworking address, No SLA" + +["10.127.255.117/32"] +type = "loopback" +name = "magicneko-tw" +description = "magicneko-tw/frr" + +["fd10:127:0233::/48"] +type = "subnet" +name = "icecat" +description = "Magicneko ipv6 reserved segment" diff --git a/route/AS4201270009.toml b/route/AS4201270009.toml new file mode 100644 index 0000000..7e086a7 --- /dev/null +++ b/route/AS4201270009.toml @@ -0,0 +1,4 @@ +["10.127.69.0/29"] +type = "subnet" +name = "santost12" +description = "For home" diff --git a/route/AS4201270010.toml b/route/AS4201270010.toml new file mode 100644 index 0000000..9aa7350 --- /dev/null +++ b/route/AS4201270010.toml @@ -0,0 +1,9 @@ +["10.127.10.0/24"] +type = "subnet" +name = "Lan Tian LAN" +description = "For LAN" + +["fd10:127:10::/48"] +type = "subnet" +name = "Lan Tian LAN6" +description = "For LAN IPv6" diff --git a/route/AS4201270011.toml b/route/AS4201270011.toml new file mode 100644 index 0000000..98a1f0f --- /dev/null +++ b/route/AS4201270011.toml @@ -0,0 +1,9 @@ +["10.127.22.0/29"] +type = "subnet" +name = "LINE-NZ" +description = "For home" + +["10.127.22.8/29"] +type = "subnet" +name = "LINE-NZ" +description = "For cloud" diff --git a/route/AS4201270012.toml b/route/AS4201270012.toml new file mode 100644 index 0000000..48f4f77 --- /dev/null +++ b/route/AS4201270012.toml @@ -0,0 +1,4 @@ +["10.127.5.0/28"] +type = "subnet" +name = "yhi-h" +description = "Yhi Interconnect H" diff --git a/route/AS4201270013.toml b/route/AS4201270013.toml new file mode 100644 index 0000000..c53f8de --- /dev/null +++ b/route/AS4201270013.toml @@ -0,0 +1,9 @@ +["10.127.13.0/24"] +type = "subnet" +name = "Ndoskrnls LAN" +description = "For devices which being connected locally to Ndoskrnls Master Router" + +["fd10:127:13::/48"] +type = "subnet" +name = "Ndoskrnls LAN (IPv6)" +description = "For devices which being connected locally to Ndoskrnls Master Router" diff --git a/route/AS4201270014.toml b/route/AS4201270014.toml new file mode 100644 index 0000000..a60a7ac --- /dev/null +++ b/route/AS4201270014.toml @@ -0,0 +1,9 @@ +["10.127.23.0/29"] +type = "subnet" +name = "leedagee" +description = "leedagee" + +["fd10:127:0023::/48"] +type = "subnet" +name = "leedagee" +description = "leedagee" diff --git a/route/AS4242420140.toml b/route/AS4242420140.toml new file mode 100644 index 0000000..0797d21 --- /dev/null +++ b/route/AS4242420140.toml @@ -0,0 +1,4 @@ +["10.127.12.0/24"] +type = "subnet" +name = "dfceaef NET" +description = "For Yangfl Network" diff --git a/route/AS4242421037.toml b/route/AS4242421037.toml new file mode 100644 index 0000000..2778e5d --- /dev/null +++ b/route/AS4242421037.toml @@ -0,0 +1,4 @@ +["10.127.8.0/26"] +type = "subnet" +name = "LibreHouse" +description = "For infrastratures in our network" diff --git a/route/AS4242423088.toml b/route/AS4242423088.toml new file mode 100644 index 0000000..73e2be5 --- /dev/null +++ b/route/AS4242423088.toml @@ -0,0 +1,4 @@ +["10.127.11.0/24"] +type = "subnet" +name = "SUNNET" +description = "For SUN" diff --git a/route6/fd10:127:0023::,48 b/route6/fd10:127:0023::,48 deleted file mode 100644 index d6dec21..0000000 --- a/route6/fd10:127:0023::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="leedagee" -DESC="leedagee" -ASN="4201270014" diff --git a/route6/fd10:127:0233:1c3c::,64 b/route6/fd10:127:0233:1c3c::,64 deleted file mode 100644 index a55331d..0000000 --- a/route6/fd10:127:0233:1c3c::,64 +++ /dev/null @@ -1,5 +0,0 @@ -TYPE="SUBNET" -NAME="icecat" -DESC="NextMoe Radvd IPv6 Address" -ASN="4201270005" -SUPERNET="fd10:127:0233::/48" diff --git a/route6/fd10:127:0233::,48 b/route6/fd10:127:0233::,48 deleted file mode 100644 index be361a8..0000000 --- a/route6/fd10:127:0233::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="icecat" -DESC="Magicneko ipv6 reserved segment" -ASN="4201270008" diff --git a/route6/fd10:127:10::,48 b/route6/fd10:127:10::,48 deleted file mode 100644 index 27d1e89..0000000 --- a/route6/fd10:127:10::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Lan Tian LAN6" -DESC="For LAN IPv6" -ASN="4201270010" diff --git a/route6/fd10:127:13::,48 b/route6/fd10:127:13::,48 deleted file mode 100644 index 25e7310..0000000 --- a/route6/fd10:127:13::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Ndoskrnl's LAN (IPv6)" -DESC="For devices which being connected locally to Ndoskrnl's Master Router" -ASN="4201270013" diff --git a/route6/fd10:127:41::,48 b/route6/fd10:127:41::,48 deleted file mode 100644 index 8769c80..0000000 --- a/route6/fd10:127:41::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Septs IX IPv6 Pool" -DESC="" -ASN="4201270001" diff --git a/route6/fd10:127:53::,48 b/route6/fd10:127:53::,48 deleted file mode 100644 index 2649988..0000000 --- a/route6/fd10:127:53::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="JerryXiao6" -DESC="JerryNet6" -ASN="4201270006" diff --git a/route6/fd10:127:5f37:59df::,64 b/route6/fd10:127:5f37:59df::,64 deleted file mode 100644 index 8f23768..0000000 --- a/route6/fd10:127:5f37:59df::,64 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE=SUBNET -NAME="NeoNetwork Origin" -DESC="Neo_Chen's Network" -ASN="4201270000" diff --git a/route6/fd10:127:6969::,48 b/route6/fd10:127:6969::,48 deleted file mode 100644 index da74626..0000000 --- a/route6/fd10:127:6969::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="santost12" -DESC="For home" -ASN="4201270009" diff --git a/route6/fd10:127:7::,48 b/route6/fd10:127:7::,48 deleted file mode 100644 index a80b01c..0000000 --- a/route6/fd10:127:7::,48 +++ /dev/null @@ -1,4 +0,0 @@ -TYPE="SUBNET" -NAME="Staph_v6" -DESC="Staph-infected IPv6 subnet - please do not disinfect" -ASN="4201270007" diff --git a/scripts/dns-reverse-generator.py b/scripts/dns-reverse-generator.py new file mode 100755 index 0000000..c84e827 --- /dev/null +++ b/scripts/dns-reverse-generator.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +import sys +from ipaddress import IPv4Address, ip_network +from pathlib import Path + +import toml + +RESOLVE_FILE = Path("dns", "db.10.127") +ROUTE_FILE = Path("route") + + +def iter_route(route_type: str): + items = [] + for f in ROUTE_FILE.iterdir(): + routes = toml.loads(f.read_text()) + items.extend( + (entity["name"], ip_network(route).network_address) + for route, entity in routes.items() + if entity["type"] == route_type + ) + return sorted(items, key=lambda item: item[1]) + + +def main(): + orignal = RESOLVE_FILE.read_text() + orignal = orignal[: orignal.find("\n; AUTOGENERATED")] + records = [orignal, "; AUTOGENERATED", "", "; Loopback Addresses"] + for name, address in iter_route("loopback"): + if isinstance(address, IPv4Address): + pointer = address.reverse_pointer.replace(".127.10.in-addr.arpa", "") + records.append("%s\tIN\tPTR\t%s.neo" % (pointer, name)) + RESOLVE_FILE.write_text("\n".join(records)) + + +if __name__ == "__main__": + main() diff --git a/scripts/dns-reverse-generator.sh b/scripts/dns-reverse-generator.sh deleted file mode 100755 index 9338540..0000000 --- a/scripts/dns-reverse-generator.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -set -e - -FILE="dns/db.10.127" -LO_TEMP="$(mktemp)" - -if [[ "$(uname)" = *BSD ]]; then - TAC=gtac -else - TAC=tac -fi - -print_record() -{ - printf "%s\tIN\tPTR\t%s\n" "$1" "$2" -} - -ipcalc() -{ - local subnet="$1" - local add="$2" - - REV="$(echo -n "${subnet%,*}." | "$TAC" -s .)" - REV="${REV%.*.*.}" - - echo "$[ ${REV%.*} + $add ].${REV#*.}" -} - -# PROGRAM BEGIN - -sed -i '/AUTOGENERATED/,$d' "$FILE" -echo '; AUTOGENERATED' >> "$FILE" - -( -cd route -for i in *; do - source "$i" - if [ "$TYPE" = "LO" ]; then - ip="${i/,32/}" - - print_record "$(ipcalc "$ip" 0)" "$NAME.neo." >> "$LO_TEMP" - fi -done -) - -{ - echo -e "\n; Loopback Addresses" - sort -n < "$LO_TEMP" -} >> "$FILE" - -rm -f "$LO_TEMP" diff --git a/scripts/roa-ng.py b/scripts/roa-ng.py new file mode 100755 index 0000000..43ead4e --- /dev/null +++ b/scripts/roa-ng.py @@ -0,0 +1,316 @@ +#!/usr/bin/env python3 +import argparse +import json +import time +from collections import defaultdict +from contextlib import redirect_stdout +from io import StringIO +from ipaddress import IPv4Network, IPv6Network, ip_network +from itertools import combinations +from pathlib import Path + +import toml + +NEO_NETWORK_POOL = [ip_network("10.127.0.0/16"), ip_network("fd10:127::/32")] + + +def pick(entity: dict, fields: [str], **kwargs: dict): + new_entity = {} + for field in fields: + new_entity[field] = entity.get(field) + for old_field, new_field in kwargs.items(): + new_entity[new_field] = entity.get(old_field) + return new_entity + + +def is_neo_network(address): + return any( + address.version == neo.version and address.subnet_of(neo) + for neo in NEO_NETWORK_POOL + ) + + +def is_neo_network_asn(asn: int): + return 4201270000 <= asn <= 4201279999 + + +def is_dn42_asn(asn: int): + return 4242420000 <= asn <= 4242429999 + + +def iter_toml_file(path: str): + for item in Path(path).iterdir(): + if not item.is_file() or item.suffix != ".toml": + continue + yield item, toml.loads(item.read_text()) + + +def load_entities(): + return {item.stem: entity for item, entity in iter_toml_file("entity")} + + +def load_asn(entities: dict): + def assert_entity(entity, asn): + owner = entity.get("owner") + source = entity.get("source") + if is_neo_network_asn(asn): + source = "NeoNetwork" + elif is_dn42_asn(asn): + source = "DN42" + entity["source"] = source + assert owner in entities + assert source in ["NeoNetwork", "DN42", "Internet"] + return entity + + mapping = { + int(item.stem.lstrip("AS")): entity for item, entity in iter_toml_file("asn") + } + return {asn: assert_entity(entity, asn) for asn, entity in mapping.items()} + + +def node_to_asn(orignal_asn_set: set): + node_table = dict() + for _, entities in iter_toml_file("node"): + mapping = {name: entity["asn"] for (name, entity) in entities.items()} + asn_set = set(mapping.values()) + assert orignal_asn_set & asn_set == asn_set + node_table.update(mapping) + return node_table + + +def assert_peer(nodes: set): + for item, entities in iter_toml_file("peer"): + peers = set(entities["to-peer"]) + assert item.stem in nodes + assert nodes & peers == peers + + +def route_to_roa(asn_table: dict): + def make_route(): + for item, entity in iter_toml_file("route"): + asn = int(item.stem.lstrip("AS")) + for prefix, fields in entity.items(): + if fields["type"] not in ("loopback", "subnet"): + continue + fields["asn"] = asn + fields["prefix"] = ip_network(prefix, strict=True) + supernet = fields.get("supernet") + fields["supernet"] = ( + ip_network(supernet, strict=True) if supernet else None + ) + assert fields["name"] + assert is_neo_network(fields["prefix"]) + assert not fields["supernet"] or is_neo_network(fields["supernet"]) + yield fields + + entities = ( + pick(route, ["asn", "name", "prefix", "supernet"]) for route in make_route() + ) + entities = sorted(entities, key=lambda item: item["asn"]) + prefixes = [item["prefix"] for item in entities] + for net1, net2 in combinations( + sorted(entities, key=lambda net: net["prefix"].prefixlen), 2 + ): + if not net1["prefix"].overlaps(net2["prefix"]): + continue + assert net1["prefix"] != net2["prefix"] + assert net1["prefix"].supernet_of(net2["prefix"]) + s1net, s2net = (net1["supernet"], net2["supernet"]) + assert s2net # please include supernet = in your route + # if net1(the bigger net) has a supernet s1net, then s1net and net1 + # will be checked or must have been checked, same for net2 + assert not s1net or s1net in prefixes # net1.supernet is garbage + assert s2net == net1["prefix"] or s2net in prefixes # net2.supernet is garbage + return entities + + +def prehandle_roa(asn_table: dict, args): + roa = route_to_roa(asn_table) + max_prefixlen = IPv4Network(0).max_prefixlen + roa4 = filter(lambda item: isinstance(item["prefix"], IPv4Network), roa) + roa6 = filter(lambda item: isinstance(item["prefix"], IPv6Network), roa) + if args.ipv4: + roa6 = [] + elif args.ipv6: + roa4 = [] + roa4 = [ + r + for r in roa4 + if r["prefix"].prefixlen <= args.max or r["prefix"].prefixlen == max_prefixlen + ] + roa6 = [r for r in roa6 if r["prefix"].prefixlen <= args.max6] + for r in roa4: + r["maxLength"] = args.max + if r["prefix"].prefixlen == max_prefixlen: + r["maxLength"] = max_prefixlen + for r in roa6: + r["maxLength"] = args.max6 + for r in (*roa4, *roa6): + r["prefix"] = r["prefix"].with_prefixlen + return roa4, roa6 + + +def make_export(roa4, roa6): + entities = load_entities() + asn_table = load_asn(entities) + current = int(time.time()) + output = { + "metadata": {"generated": current, "valid": current + 14 * 86400}, + "people": { + owner: {"info": entity, "asns": []} for owner, entity in entities.items() + }, + } + for asn, asn_info in asn_table.items(): + owner = asn_info["owner"] + asn_item = { + "asn": asn, + "name": asn_info["name"], + "source": asn_info["source"], + "routes": { + "ipv4": [ + pick(roa, ["prefix", "maxLength"]) + for roa in roa4 + if roa["asn"] == asn + ], + "ipv6": [ + pick(roa, ["prefix", "maxLength"]) + for roa in roa6 + if roa["asn"] == asn + ], + }, + } + output["people"][owner]["asns"].append(asn_item) + return json.dumps(output, indent=2) + + +def make_json(roa4, roa6): + current = int(time.time()) + output = { + "metadata": { + "counts": len(roa4) + len(roa6), + "generated": current, + "valid": current + 14 * 86400, + }, + "roas": [ + {"asn": "AS%d" % roa["asn"], **pick(roa, ["prefix", "maxLength"])} + for roa in (*roa4, *roa6) + ], + } + return json.dumps(output, indent=2) + + +def make_rfc8416(roa4, roa6): + output = { + "slurmVersion": 1, + "validationOutputFilters": {"prefixFilters": [], "bgpsecFilters": []}, + "locallyAddedAssertions": { + "bgpsecAssertions": [], + "prefixAssertions": [ + pick( + roa, ["asn", "prefix"], maxLength="maxPrefixLength", name="comment", + ) + for roa in (*roa4, *roa6) + ], + }, + } + return json.dumps(output, indent=2) + + +def make_roa_records(roa4, roa6): + records = [ + "route {asn} max {prefix} as {maxLength};".format_map(roa) + for roa in (*roa4, *roa6) + ] + return "\n".join(["# NeoNetwork ROA tool", "", *records]) + + +def make_summary(): + entities = load_entities() + asn_table = load_asn(entities) + node_table = node_to_asn(set(asn_table.keys())) + stream = StringIO() + with redirect_stdout(stream): + print("Entities:") + print("{:20}{:20}{}".format("Name", "Telegram", "Email")) + for entity in sorted( + entities.values(), key=lambda entity: entity["name"].lower(), + ): + contact = entity.get("contact", {}) + email = contact.get("email", "") + telegram = contact.get("telegram", "") + print("{:20}{:20}{}".format(entity["name"], telegram, email)) + print() + print("AS List:") + print("{:15}{:<17}{:20}{}".format("Source", "ASN", "Owner", "Name")) + for asn, entity in sorted(asn_table.items(), key=lambda item: item[0]): + print( + "{:15}AS{:<15}{:20}{}".format( + entity["source"], asn, entity["owner"], entity["name"] + ) + ) + print() + print("Node List:") + print("{:<17}{}".format("ASN", "Name")) + for name, asn in sorted(node_table.items(), key=lambda item: item[1]): + print("AS{:<15}{}".format(asn, name)) + print() + print("Peer List:") + peers = list(iter_toml_file("peer")) + maxUpstreamLength = max(map(lambda item: len(item[0].stem), peers)) + print("{:>{}} ~ {}".format("Upstream", maxUpstreamLength, "Downstream")) + for item, entities in peers: + upstream = item.stem + for downstream in sorted(entities["to-peer"], key=str.lower): + print("{:>{}} ~ {}".format(upstream, maxUpstreamLength, downstream)) + return stream.getvalue() + + +def main(args): + entities = load_entities() + asn_table = load_asn(entities) + node_table = node_to_asn(set(asn_table.keys())) + assert_peer(set(node_table.keys())) + roa4, roa6 = prehandle_roa(asn_table, args) + if args.export: + return make_export(roa4, roa6) + elif args.json: + return make_json(roa4, roa6) + elif args.rfc8416: + return make_rfc8416(roa4, roa6) + elif args.summary: + return make_summary() + else: + return make_roa_records(roa4, roa6) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="NeoNetwork ROA tool") + parser.add_argument( + "-m", "--max", type=int, default=29, help="set ipv4 max prefix length" + ) + parser.add_argument( + "-M", "--max6", type=int, default=64, help="set ipv6 max prefix length" + ) + parser.add_argument("-j", "--json", action="store_true", help="output json") + parser.add_argument("-r", "--rfc8416", action="store_true", help="output rfc8416") + parser.add_argument("-s", "--summary", action="store_true", help="output summary") + parser.add_argument("-o", "--output", default="", help="write output to file") + parser.add_argument("-4", "--ipv4", action="store_true", help="print ipv4 only") + parser.add_argument("-6", "--ipv6", action="store_true", help="print ipv6 only") + parser.add_argument( + "-e", "--export", action="store_true", help="export registry to json" + ) + args = parser.parse_args() + if ( + args.max < 0 + or args.max6 < 0 + or args.max > IPv4Network(0).max_prefixlen + or args.max6 > IPv6Network(0).max_prefixlen + ): + parser.error("check your max prefix length") + output = main(args) + if not args.output or args.output == "-": + print(output) + elif output: + Path(args.output).write_text(output) + print("written to", args.output) diff --git a/scripts/roa.sh b/scripts/roa.sh deleted file mode 100755 index 5e4997b..0000000 --- a/scripts/roa.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -set -e - -INET4PFXLEN="29" -INET6PFXLEN="64" - -print_record() -{ - printf "route %s max %d as %u;\n" "$1" "$2" "$3" -} - - -# PROGRAM BEGIN - -echo "# NeoNetwork ROA Tool" -( -for i in route*/* ; do - source "$i" - if [ "$TYPE" != PTP ]; then - prefix="${i#route*/}" - prefix="${prefix/,/\/}" - pfxlen="${i#*,}" - - if [ "$TYPE" = "SUBNET" ]; then - if [ "$pfxlen" -le "$INET4PFXLEN" ]||[ "$pfxlen" -ge 32 ]&&[ "$pfxlen" -le "$INET6PFXLEN" ]; then - print_record "$prefix" "$INET4PFXLEN" "$ASN" - fi - elif [ "$TYPE" = "LO" ]; then - print_record "$prefix" 32 "$ASN" - fi - fi -done -)