femueller / cloud-ip-ranges

An up-to-date export of cloud provider IP address ranges
180 stars 30 forks source link

Have only JSON files #7

Open szepeviktor opened 1 year ago

szepeviktor commented 1 year ago

Would you merge a PR that adds a command (jq) that converts Linode text to JSON?

# prefix, country, subdivision, city, zipcode, allocation_size
2600:3c00::/32,US,US-TX,Richardson,,
{
    "prefixes": [
        {
            "prefix": "2600:3c00::/32",
            "country": "US",
            "subdivision": "US-TX",
            "city": "Richardson",
            "zipcode": "",
            "allocation_size": ""
        }
    ]
}
femueller commented 1 year ago

Hey @szepeviktor, I was thinking in general of having a directory, which includes a normalized format of all files.

How would you implement what you suggested? Maybe you could add your proposal as a PR and we could continue the conversation from there.

szepeviktor commented 1 year ago

@femueller When you say JSON I think of jq :) https://github.com/jqlang/jq/wiki/Cookbook#convert-a-csv-file-with-headers-to-json

femueller commented 1 year ago

@szepeviktor Maybe just having all available as a JSON would be a good, simple first step, so there is a common format available. Then maybe standardizing the content across all provider IP ranges could be another next step.

szepeviktor commented 1 year ago

would be a good, simple first step

I would skip the half-done step.

standardizing the content across all provider IP ranges

Organization levels

  1. Each provider in a separate JSON file with a uniform name
  2. Regions merged with availability zones
  3. Service names
  4. IP ranges properly sorted and other available attributes

This will make expert users happy. (they have jq and they are using it)

"Other" users may be interested in a flat array of IP ranges! (see low quality providers publishing CSV and text files)