Add an enum to the configuration to switch between ip.sb and ipquery.io#211
Open
MikeChongCan wants to merge 1 commit intomainfrom
Open
Add an enum to the configuration to switch between ip.sb and ipquery.io#211MikeChongCan wants to merge 1 commit intomainfrom
MikeChongCan wants to merge 1 commit intomainfrom
Conversation
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.
Owner
Author
|
cc @ipqwery let me know if this looks good to you |
|
This looks great, up to you if you want to make IPQuery the default provider, might be worth considering all the datapoints. |
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an enum to the configuration to switch between ip.sb and ipquery.io for GeoIP data.
Configuration Changes
GeoIPAPIenum inscylla/config.pywith valuesIPSBandIPQUERY.get_configandset_configmethods to handle the new enum.--geoip-apiinscylla/cli.pyto select the GeoIP API.Validator Changes
validate_proxymethod inscylla/validator.pyto use the selected GeoIP API based on the configuration.Database Changes
scylla/database.pyto 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
frontend/src/utils.tsto include new fields in the GeoIP response interface.Documentation Changes
README.mdto reflect the new configuration option for selecting the GeoIP API.