mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-07-13 12:52:36 +08:00
Simplify the implementation of IPv6 data ingestion
This commit is contained in:
parent
c199bc906e
commit
d3cb50fa27
@ -28,10 +28,7 @@ prepare_data_v4(){
|
||||
log_info "finish bgpdump v4"
|
||||
}
|
||||
prepare_data_v6(){
|
||||
IP6UPSTREAM="http://archive.routeviews.org/route-views6/bgpdata"
|
||||
MONTH6=$(date -u +%Y.%m)
|
||||
LATEST6=$(lftp -e 'cls -1;exit' $IP6UPSTREAM/$MONTH6/RIBS/ 2>/dev/null | sort | tail -n 1)
|
||||
curl -sSLo rib6.bz2 "$IP6UPSTREAM/$MONTH6/RIBS/$LATEST6"
|
||||
bgpkit-broker latest -c route-views6 --json | jq -c '.[] | select( .data_type | contains("rib")) | .url' | head -n 1 | xargs curl -sSL -o rib6.bz2
|
||||
stat rib6.bz2
|
||||
log_info "runing bgpdump v6 ..."
|
||||
bgpdump -m -O rib6.txt rib6.bz2
|
||||
|
Loading…
Reference in New Issue
Block a user