Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/primamateria/ip-indicator_mint
IP indicator applet for Cinnamon desktop environment
https://github.com/primamateria/ip-indicator_mint
Last synced: 1 day ago
JSON representation
IP indicator applet for Cinnamon desktop environment
- Host: GitHub
- URL: https://github.com/primamateria/ip-indicator_mint
- Owner: PrimaMateria
- License: gpl-2.0
- Created: 2015-08-16T15:13:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-18T06:47:33.000Z (about 9 years ago)
- Last Synced: 2025-01-03T08:38:58.222Z (7 days ago)
- Language: JavaScript
- Homepage:
- Size: 155 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ip-indicator_mint
IP indicator applet for Cinnamon desktop environmentUseful in case when often switching VPNs. It shows flag of country of your public IP or customized icon when matching ISP (Internet Service Provider) is found. After opening menu additionally IP, ISP and the country name are visible.
Some ISPs have not very human friendly name, therefore there is options to set ISP nickname, which will be shown instead.
# How it works
After the reading about the reasons why previous IP service has shut down, I realized that spamming GET requests every few seconds to get the GEO IP, is not the most network traffic friendly solution. Therefore in this new version I introduced 2 layers of recognizing, when the public IP gets changed:1. periodically checking network interfaces via ifconfig command. When creating new VPN connection, usually new tun0 interface is created. This options generates no network traffic, therefore it can be repeated after X seconds.
2. periodically calling free IP Services. More IP services are defined, through which the applet cycles and figures out only public IP. As this method generates load on the servers, it should not be used as frequent, therefore interval could be set in minutes.After any of these layers recognized, that something has changed, another request is fired to http://ip-api.com/json. In the answer is provided full information that we need: IP, ISP, Country and CountryCode.
# Installation
Clone this repository to `.local/share/cinnamon/applets/`For parsing ifconfig output externall shell script is used: `getNetworkInterfaces.sh`. Make sure that this script has set permissions to be executable!
```
chmod 755 getNetworkInterfaces.sh
```# Troubleshooting
1. Go to applet's configuration and set debug level to 2.
2. Remove applet and add it again to the panel.
3. Try to reproduce the issue.
4. Open ticket on github and provide the logs from `.cinnamon/glass.log`.# Sources
Flag icons used from http://www.famfamfam.com/lab/icons/flags/.Following IP Services are called:
- https://api.ipify.org?format=json
- http://bot.whatismyipaddress.com/
- http://geoip.nekudo.com/api/
- http://ip-json.rhcloud.com/json
- http://ipinfo.io/json
- http://ip-api.com/json# Screenshots
![screenshot](http://i.imgur.com/2wXSV1v.png)
![settings](http://i.imgur.com/a3MlXg7.png)