Jigsaw-Code / outline-ss-server

Outline Shadowsocks server
https://getoutline.org
Apache License 2.0
742 stars 188 forks source link

Feature request: Using IPinfo IP to Country ASN database #215

Open abdullahdevrel opened 1 month ago

abdullahdevrel commented 1 month ago

I am requesting to add support for IPinfo's IP to Country database to the project. The database has the following features:

Database schema

Field Name Example Data Type Description
start_ip 1.0.16.0 TEXT Starting IP address of an IP address range
end_ip 1.0.31.255 TEXT Ending IP address of an IP address range
country JP TEXT ISO 3166 country code of the location
country_name Japan TEXT Name of the country
continent AS TEXT Continent code of the country
continent_name Asia TEXT Name of the continent
asn AS2519 TEXT Autonomous System Number
as_name ARTERIA Networks Corporation TEXT Name of the AS (Autonomous System) organization
as_domain arteria-net.com TEXT Official domain or website of the AS organization

Documentation: https://ipinfo.io/developers/ip-to-country-asn-database

Samples are available here: https://github.com/ipinfo/sample-database/tree/main/IP%20to%20Country%20ASN

The database can be downloaded simply by accessing the storage URI with an access token.

curl -L https://ipinfo.io/data/free/country_asn.mmdb?token=<YOUR_TOKEN> -o country_asn.mmdb

The project currently uses an IP to Country database and an ASN database separately. Additionally, the current databases have reduced accuracy, and their EULA terms make it impossible to distribute or package the database.

Let me know what you think. Thanks!

NikolaiT commented 1 month ago

Hi,

If you want a more accurate and much cheaper alternative to ipinfo.io, I highly suggest to use the IP to ASN database here: https://ipapi.is/asn.html

It includes the same data as the database from ipinfo.io but has more competitive pricing

abdullahdevrel commented 1 month ago

Hi @NikolaiT It is not our intention at all to advertise a paid service or advocate on basis of pricing to open source projects. The IPinfo service (API or database) I recommended is free. I am not sure what would be cheaper or competitively priced than free. Open source projects are built by a collective community effort of developers dedicating their valuable time that serves everyone. That is why we offer free data to them as a token of gratitude without a revenue motive.

In terms of accuracy claims, I will send you an email as I am not comfortable using spaces for Open Source projects to discuss claims made by business organizations.