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

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.

2 participants