Skip to content

feat: auto-detect public IP for geth P2P peer discovery#1066

Open
Kewe63 wants to merge 1 commit into
base:mainfrom
Kewe63:feat/geth-public-ip-autodetect
Open

feat: auto-detect public IP for geth P2P peer discovery#1066
Kewe63 wants to merge 1 commit into
base:mainfrom
Kewe63:feat/geth-public-ip-autodetect

Conversation

@Kewe63
Copy link
Copy Markdown

@Kewe63 Kewe63 commented May 11, 2026

Previously, HOST_IP was hardcoded to empty string and users had to manually edit the entrypoint to enable --nat=extip. This change:

  • Adds the same get_public_ip() function used by base-consensus-entrypoint and op-node-entrypoint (tries ifconfig.me, api.ipify.org, ipecho.net, v4.ident.me in sequence)
  • Auto-detects public IP if HOST_IP is not manually set
  • Falls back gracefully with a warning if detection fails
  • Respects manual HOST_IP override when set via environment

Previously, HOST_IP was hardcoded to empty string and users had to
manually edit the entrypoint to enable --nat=extip. This change:

- Adds the same get_public_ip() function used by base-consensus-entrypoint
  and op-node-entrypoint (tries ifconfig.me, api.ipify.org, ipecho.net,
  v4.ident.me in sequence)
- Auto-detects public IP if HOST_IP is not manually set
- Falls back gracefully with a warning if detection fails
- Respects manual HOST_IP override when set via environment
@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants