Browse Source

Add OpenAI (GPTBot) ip ranges

pull/8/head
lord-alfred 2 years ago
parent
commit
3954b45881
  1. 5
      .github/workflows/update.yml
  2. 7
      README.md
  3. 20
      openai/downloader.sh

5
.github/workflows/update.yml

@ -29,10 +29,11 @@ jobs:
bash twitter/downloader.sh
bash linode/downloader.sh
bash telegram/downloader.sh
bash openai/downloader.sh
- name: Create All-In-One ranges
run: |
cat google/ipv4.txt amazon/ipv4.txt microsoft/ipv4.txt oracle/ipv4.txt digitalocean/ipv4.txt bing/ipv4.txt github/ipv4.txt facebook/ipv4.txt twitter/ipv4.txt linode/ipv4.txt telegram/ipv4.txt | sort -h | uniq > all/ipv4.txt
cat google/ipv4.txt amazon/ipv4.txt microsoft/ipv4.txt oracle/ipv4.txt digitalocean/ipv4.txt bing/ipv4.txt github/ipv4.txt facebook/ipv4.txt twitter/ipv4.txt linode/ipv4.txt telegram/ipv4.txt openai/ipv4.txt | sort -h | uniq > all/ipv4.txt
cat google/ipv6.txt amazon/ipv6.txt microsoft/ipv6.txt digitalocean/ipv6.txt github/ipv6.txt facebook/ipv6.txt twitter/ipv6.txt linode/ipv6.txt telegram/ipv6.txt | sort -h | uniq > all/ipv6.txt
- name: Set up Python 3.7
@ -69,6 +70,7 @@ jobs:
python utils/merge.py --source=twitter/ipv4.txt | sort -h > twitter/ipv4_merged.txt
python utils/merge.py --source=linode/ipv4.txt | sort -h > linode/ipv4_merged.txt
python utils/merge.py --source=telegram/ipv4.txt | sort -h > telegram/ipv4_merged.txt
python utils/merge.py --source=openai/ipv4.txt | sort -h > openai/ipv4_merged.txt
python utils/merge.py --source=all/ipv4.txt | sort -h > all/ipv4_merged.txt
# ipv6
python utils/merge.py --source=google/ipv6.txt | sort -h > google/ipv6_merged.txt
@ -83,6 +85,7 @@ jobs:
python utils/merge.py --source=linode/ipv6.txt | sort -h > linode/ipv6_merged.txt
python utils/merge.py --source=telegram/ipv6.txt | sort -h > telegram/ipv6_merged.txt
python utils/merge.py --source=all/ipv6.txt | sort -h > all/ipv6_merged.txt
# openai not provide ipv6
- name: Commit files
env:

7
README.md

@ -2,7 +2,7 @@
![IP Ranges](logo.png)
List all IP ranges from: Google (Cloud & GoogleBot), Bing (Bingbot), Amazon (AWS), Microsoft (Azure), Oracle (Cloud), DigitalOcean, GitHub, Facebook (Meta), Twitter, Linode and Telegram with daily updates.
List all IP ranges from: Google (Cloud & GoogleBot), Bing (Bingbot), Amazon (AWS), Microsoft (Azure), Oracle (Cloud), DigitalOcean, GitHub, Facebook (Meta), Twitter, Linode, Telegram and OpenAI (GPTBot) with daily updates.
All lists are obtained from public sources.
@ -88,6 +88,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/telegram/ipv6.txt
- IPv6 (merged): https://raw.githubusercontent.com/lord-alfred/ipranges/main/telegram/ipv6_merged.txt
### OpenAI (GPTBot)
- IPv4: https://raw.githubusercontent.com/lord-alfred/ipranges/main/openai/ipv4.txt
- IPv4 (merged): https://raw.githubusercontent.com/lord-alfred/ipranges/main/openai/ipv4_merged.txt
## All-In-One IPs
A list of IP addresses from all sources combined into one file.

20
openai/downloader.sh

@ -0,0 +1,20 @@
#!/bin/bash
# https://platform.openai.com/docs/gptbot
set -euo pipefail
set -x
# get from public ranges
curl -s https://openai.com/gptbot-ranges.txt > /tmp/openai.txt
# save ipv4
grep -v ':' /tmp/openai.txt > /tmp/openai-ipv4.txt
# ipv6 not provided
# sort & uniq
sort -h /tmp/openai-ipv4.txt | uniq > openai/ipv4.txt
Loading…
Cancel
Save