mirror of
https://github.com/lord-alfred/ipranges.git
synced 2026-01-25 02:08:20 +00:00
Add Oracle Cloud
This commit is contained in:
2
.github/workflows/update.yml
vendored
2
.github/workflows/update.yml
vendored
@@ -15,6 +15,7 @@ jobs:
|
||||
bash google/downloader.sh
|
||||
bash amazon/downloader.sh
|
||||
bash microsoft/downloader.sh
|
||||
bash oracle/downloader.sh
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
@@ -41,6 +42,7 @@ jobs:
|
||||
python utils/merge.py --source=google/ipv4.txt | sort -h > google/ipv4_merged.txt
|
||||
python utils/merge.py --source=amazon/ipv4.txt | sort -h > amazon/ipv4_merged.txt
|
||||
python utils/merge.py --source=microsoft/ipv4.txt | sort -h > microsoft/ipv4_merged.txt
|
||||
python utils/merge.py --source=oracle/ipv4.txt | sort -h > oracle/ipv4_merged.txt
|
||||
# ipv6
|
||||
python utils/merge.py --source=google/ipv6.txt | sort -h > google/ipv6_merged.txt
|
||||
python utils/merge.py --source=amazon/ipv6.txt | sort -h > amazon/ipv6_merged.txt
|
||||
|
||||
@@ -35,6 +35,11 @@ All addresses are stored in `.txt` files with CIDRs, where each range is on a ne
|
||||
- IPv6: https://raw.githubusercontent.com/lord-alfred/ipranges/main/microsoft/ipv6.txt
|
||||
- IPv6 (merged): https://raw.githubusercontent.com/lord-alfred/ipranges/main/microsoft/ipv6_merged.txt
|
||||
|
||||
### Oracle (Cloud)
|
||||
|
||||
- IPv4: https://raw.githubusercontent.com/lord-alfred/ipranges/main/oracle/ipv4.txt
|
||||
- IPv4 (merged): https://raw.githubusercontent.com/lord-alfred/ipranges/main/oracle/ipv4_merged.txt
|
||||
|
||||
## Author
|
||||
|
||||
Lord_Alfred
|
||||
|
||||
21
oracle/downloader.sh
Executable file
21
oracle/downloader.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://docs.oracle.com/en-us/iaas/Content/General/Concepts/addressranges.htm
|
||||
# From: https://github.com/nccgroup/cloud_ip_ranges
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
|
||||
# get from public ranges
|
||||
curl -s https://docs.oracle.com/en-us/iaas/tools/public_ip_ranges.json > /tmp/oracle.json
|
||||
|
||||
|
||||
# save ipv4
|
||||
jq '.regions[] | [.cidrs][] | .[].cidr | select(. != null)' -r /tmp/oracle.json > /tmp/oracle-ipv4.txt
|
||||
|
||||
# ipv6 not used
|
||||
|
||||
|
||||
# sort & uniq
|
||||
sort -h /tmp/oracle-ipv4.txt | uniq > oracle/ipv4.txt
|
||||
Reference in New Issue
Block a user