-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature request: Support for IP geolocation lookup #503
Comments
This is something I've been thinking about adding for a while @walle89, I agree it will be useful. What I have in mind is a new screen in Trippy (press The feature would be off by default and the user would need to provide either a MaxMind GeoIP DB-files or an MaxMind API key to use this feature (I wouldn't want to bundle the DB-files with Trippy as they will become out of date, and the API requires a user specific API key). Are there other similar services we should consider? Ideally a passive DNS approach similar to what Trippy does today for looking up AS data (using this, which also lists alternatives for GeoIP). Hi @schlunsen, do you intend to develop @walle89 As an aside, whilst not as useful as the above will be, you can display the country code of the AS of each hop using the new |
A map would be neat. For my part I think including the information in the hop list would be enough. Either in a separate column or included in the host column like this:
I think it's a good idea it should be off by default and can only be enabled if a flag or toggle it on (eg. press B for "show both IP and hostname") and if the user provides it own database or register its own API-key. Personally, I think the MaxMind DB-files is the best option. Even if an IP-lookup service is quite appealing sense it quite continent to only provide API text string in order to lookup up-to-date geo information. |
@fujiapple852, haha nice you found the project! I'm using it actually myself quite often and think it's pretty interesting. Could also be nice to have a good flow for updating the maxmind db. I did it as one of my first rust projects, so the code is probably horrible I imagine. A lot of copy pasting from the example project and basically just hooking it up with maxmind db. I have no current plans of developing it, but if I do find time and interest I would probably. And then I think I would use that time, trying to get it into trippy actually. Trippy is awesome and I would be honoured if you guys get this feature into trippy! |
@walle89 I've put up a WIP PR (#504) which adds GeoIp data to the hop table, both in the normal view and the new hop detail mode (that you can access by pressing To enable it, add
For now, the GeoIp will be displayed in normal hop display if in There are a few things to figure out: 1 - Should we add a new command line switch to display GeoIp or always do so if a db file is given? The MaxMind DB files contain a variety of fields (all optional) including (there are a bunch more):
For the normal hop view it is rendered in a short-ish form:
For the detailed hop view it is rendered in a longer form:
Between the Ip, the reverse DNS hostname, ASN details and now the various GeoIP details, the permutations of fields users may want to display in the hop table is exploding and the config flags may become unwieldily. I'm starting to think a format string approach is needed where you specify a string like (mockup) |
@schlunsen nice to hear from you and nice work on I've raised #505 to track adding a map view to the Tui. I did quickly try to add something similar to Trippy and was easy to show the map and add some points / labels using your repo as a guide, though I think some conversation is needed from GeoIp latitude/longitude to screen coordinates? |
I added a new flag for this for the moment, so as to be consistent and to allow displaying GeoIp information for all address modes (
|
Merged, will be in the |
@walle89 @schlunsen 0.8.0 has been released: https://github.com/fujiapple852/trippy/releases/tag/0.8.0 |
I think it would be nice see country and city information for each hop.
I find it quite useful if I want to get insight into how the traffic is being routed geographically.
The geo information could be either fetched form an web service or path to a offline database such as DB-files that is possible to download from MaxMind.
The text was updated successfully, but these errors were encountered: