Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to GNOME 46, change to Async, use IP command, dynamically add interfaces, copy to clipboard feature #13

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# gnome-extension-all-ip-addresses

This is the code behind the GNOME Shell Extension called **ALL IP Addresses**, available in the GNOME Shell Extension store at https://extensions.gnome.org/extension/3994/all-ip-addresses/
This is the code behind the GNOME Shell Extension called **ALL IP Addresses** ~~, available in the GNOME Shell Extension store at https://extensions.gnome.org/extension/3994/all-ip-addresses/~~

## Introduction

This extention is based upon the lan-ip-address extention. I added the switch between LAN, WAN and IPv6 and VPN.
This extention will only show the IP-addresses your workstation will use to communicate to the internet (IPv4 and IPv6) or your LAN. Virtual host-only interfaces (like e.g. Docker or VirtualBox interfaces) will not show.
This extention is based upon the **ALL IP Addresses** extention.
I added the dynamic switch between Device interface IPs, and WAN public IPs for both IPv4 and IPv6.
This extention will only show the IP-addresses your workstation to per interface, and what is the public IP address that others can reach you from.

## How it works
To get the different IP addresses, internally this extension runs a shell command to find ikterface the workstation will use to reacht an adrress in the internet.
Uses `iproute2`'s `ip address -brief` command to get list of interfaces and their IP address.
Uses `curl --max-time 5 -4 icanhazip.com` and `curl --max-time 5 -6 icanhazip.com` to find WAN public IP.
Left-click will cycle through IP address and their associated interface.
Right-click will copy to clipboard the currently displayed IP address.(this will display a notification)

## Known limitations
In the atypical case that you are working on a LAN not connected to the Internet (such as an isolated lab), you have no route that could reach public ip-addresses, so things will not work the way this extension is currently designed.
In an environment where `icanhazip.com` is unreachable but internet connection is fine then WAN IP will not show. This is a minor limitation.
Requires `iproute2` package on linux to be installed, or any equivalent `ip` command.
Will only update every 5 seconds.
It is possible there can be race condition, so be patient and retry.

## Credits
This code is based upon a fork of https://github.com/Josholith/gnome-extension-lan-ip-address
This code is based upon a fork of [**ALL IP Addresses** extention by Peter Havekes](https://github.com/phavekes/gnome-extension-all-ip-addresses)
Binary file modified all-ip-addresses.zip
Binary file not shown.
Loading