Skip to content

Feature: Add External / Internal IPs to UI#1069

Merged
hulto merged 8 commits intospellshift:mainfrom
bri5ee:feature/add-external-ip-display
Dec 17, 2025
Merged

Feature: Add External / Internal IPs to UI#1069
hulto merged 8 commits intospellshift:mainfrom
bri5ee:feature/add-external-ip-display

Conversation

@bri5ee
Copy link
Copy Markdown
Contributor

@bri5ee bri5ee commented Dec 1, 2025

Adds display of external IP addresses alongside internal IPs throughout the UI. This helps with competitions that utilize 1:1 NAT where beacons would all show the same IP address as they all have the same internal IP address and the external IP address would need to be identified to determine which team is which. For example, in the image below the internal IP address would be the same IP address for that host across every team. However, the external IP address would be something along the lines of 172.16.{team number}.{box number} where the {box number} would stay the same i.e. 106 but the {team number} would change i.e. 172.16.1.106, 172.16.2.106, 172.16.3.106, etc.

image ## Changes
  • Added externalIP field to GraphQL queries (GET_HOST_QUERY, GET_TASK_QUERY, GET_TAG_FILTERS)
  • Updated HostNode TypeScript interface to include externalIP
  • Updated UI components to display both internal and external IPs:
    • Host list table (HostTile)
    • Host details page (HostDetailsSection)
    • Beacon tiles (BeaconTile)
    • Task cards (TaskHostBeacon)

- Added externalIP to GraphQL queries (GET_HOST_QUERY, GET_TASK_QUERY, GET_TAG_FILTERS)
- Updated HostNode TypeScript interface to include externalIP
- Updated HostTile component to show both IPs in hosts list
- Updated HostDetailsSection to show both IPs in host details page
- Updated BeaconTile to show both IPs for beacons
- Updated TaskHostBeacon to show both IPs in task cards
- Rebuilt frontend assets
@KCarretto KCarretto requested a review from cmp5987 December 1, 2025 21:13
@KaliPatriot
Copy link
Copy Markdown
Collaborator

Right now, if an imix agent fails to determine the internal (primary) IP address, it returns an empty string "". If tavern fails to determine the external IP address, it returns "unknown". This becomes a bit of a mismatch on the frontend, and we should look into normalizing it. I believe it would be better for imix to also return "unknown" if it fails to get the primary IP.

Copy link
Copy Markdown
Collaborator

@cmp5987 cmp5987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Bri5ee, Thanks for contributing this.

I think as we start to add more tags to beacons, we are going to want to add icon symbols to represent the tag types rather than text labels like 'External/Internal'.

If you would like to take this next step,

  1. Install Lucid so we can have more expansive icons, we can slowly swap away from heroicons
  2. Modify badges to optionally display icons to the left of text.
  3. For 'External IP' display the globe icon
  4. For 'Internal IP' display the network icon

If not, we can merge this as is and add this tag iconography improvement to our backlog.

@bri5ee
Copy link
Copy Markdown
Contributor Author

bri5ee commented Dec 12, 2025

Hey @cmp5987! Got around to doing this. Would something like this be what you're looking for?
image

image image

Note the environment I'm deving this in does not have 1:1 NAT so the IPs internal/external are the same but the functionality works.

@cmp5987
Copy link
Copy Markdown
Collaborator

cmp5987 commented Dec 13, 2025

Thanks for making that change. I think we were looking to remove the 'internal' and external' as well and keep just the icon. Mind just pushing those changes so I can review them and give approval.

The issue KaliPatriot mentioned, we can tackle that in a different (backend) PR.
@hulto

@bri5ee
Copy link
Copy Markdown
Contributor Author

bri5ee commented Dec 13, 2025

Yep sounds good I'll get that pushed out by EOD =]

- Install lucide-react package for icon library
- Add Globe icon for External IP badges
- Add Network icon for Internal IP badges
- Update Badge component to properly render left icons with spacing
- Update HostTile, BeaconTile, TaskHostBeacon, and HostDetailsSection components
- Remove text labels, display only icons with IP addresses
- Build production bundle with updated changes
@bri5ee
Copy link
Copy Markdown
Contributor Author

bri5ee commented Dec 13, 2025

Alright should be good to go let me know if there's anything I need to change =]

cmp5987
cmp5987 previously approved these changes Dec 13, 2025
Copy link
Copy Markdown
Collaborator

@cmp5987 cmp5987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great job on this PR, Thanks for the contribution!

@hulto
Copy link
Copy Markdown
Collaborator

hulto commented Dec 16, 2025

@bri5ee can you re-run: go generate ./... looks like there was a merge conflict.

@hulto hulto merged commit 04c1e20 into spellshift:main Dec 17, 2025
5 checks passed
@bri5ee bri5ee deleted the feature/add-external-ip-display branch December 17, 2025 07:11
nullmonk pushed a commit that referenced this pull request Dec 21, 2025
* feat: display both internal and external IPs across all UI components

* Added externalIP to GraphQL queries (GET_HOST_QUERY, GET_TASK_QUERY, GET_TAG_FILTERS)

* Add Lucide icons to External/Internal IP badges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants