Skip to content

Add an enum to the configuration to switch between ip.sb and ipquery.io#211

Open
MikeChongCan wants to merge 1 commit intomainfrom
add-geoip-api-switch
Open

Add an enum to the configuration to switch between ip.sb and ipquery.io#211
MikeChongCan wants to merge 1 commit intomainfrom
add-geoip-api-switch

Conversation

@MikeChongCan
Copy link
Owner

Add an enum to the configuration to switch between ip.sb and ipquery.io for GeoIP data.

  • Configuration Changes

    • Add GeoIPAPI enum in scylla/config.py with values IPSB and IPQUERY.
    • Update get_config and set_config methods to handle the new enum.
    • Add a new argument --geoip-api in scylla/cli.py to select the GeoIP API.
  • Validator Changes

    • Modify validate_proxy method in scylla/validator.py to use the selected GeoIP API based on the configuration.
  • Database Changes

    • Add new fields in scylla/database.py to store additional GeoIP data such as ASN, ISP, state, zipcode, latitude, longitude, timezone, localtime, is_mobile, is_vpn, is_tor, is_proxy, is_datacenter, and risk_score.
  • Frontend Changes

    • Update frontend/src/utils.ts to include new fields in the GeoIP response interface.
  • Documentation Changes

    • Update README.md to reflect the new configuration option for selecting the GeoIP API.

Add an enum to the configuration to switch between ip.sb and ipquery.io for GeoIP data.

* **Configuration Changes**
  - Add `GeoIPAPI` enum in `scylla/config.py` with values `IPSB` and `IPQUERY`.
  - Update `get_config` and `set_config` methods to handle the new enum.
  - Add a new argument `--geoip-api` in `scylla/cli.py` to select the GeoIP API.

* **Validator Changes**
  - Modify `validate_proxy` method in `scylla/validator.py` to use the selected GeoIP API based on the configuration.

* **Database Changes**
  - Add new fields in `scylla/database.py` to store additional GeoIP data such as ASN, ISP, state, zipcode, latitude, longitude, timezone, localtime, is_mobile, is_vpn, is_tor, is_proxy, is_datacenter, and risk_score.

* **Frontend Changes**
  - Update `frontend/src/utils.ts` to include new fields in the GeoIP response interface.

* **Documentation Changes**
  - Update `README.md` to reflect the new configuration option for selecting the GeoIP API.
@MikeChongCan
Copy link
Owner Author

cc @ipqwery let me know if this looks good to you

@ipqwery
Copy link

ipqwery commented Feb 20, 2025

This looks great, up to you if you want to make IPQuery the default provider, might be worth considering all the datapoints.

@ipqwery
Copy link

ipqwery commented Feb 20, 2025

You could even just resolve the IP by using it as a proxy when calling the service, if the proxy ip is chained it might not be the dest ip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants