Replies: 1 comment 8 replies
-
|
You have a decent outline of possible solutions, I would just add that there is a pure javascript lib for maxminddb format so wasm is not necessary (and in fact I wouldn't want to ship an opaque binary in web bundle). I looked into viability of this before and decided against it for following reasons:
So both options are horrible in my opinion. While seeing the countries in peers list is nice (thats why I implemented it in the app) I don't think it outweighs the need of the web ui to be light weight and fast. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The TrguiNG web interface (browser-based version) currently lacks the ability to display country flags for connected peers, unlike its desktop counterpart. This feature is useful for visualizing the geographic distribution of peers.
The desktop version uses a local
dbip.mmdbdatabase to resolve IP addresses to country codes and then maps them to flag icons.Proposed Solutions
1. Simple Solution – External API (like Transmissionic)
api.country.isor similar services to resolve IP to country code.2. Preferred Solution – Local MMDB with WASM (like Desktop)
dbip.mmdbwith a WebAssembly module likemaxminddb-wasmto read the database directly in the browser.Additional Considerations
dbip.mmdb) needs to be fetched and updated periodically. Could be bundled with the release or downloaded on run.References
api.country.is: Transmissionic Code Referencemaxminddb-wasmlibrary: maxminddb-wasm on GitHubBeta Was this translation helpful? Give feedback.
All reactions