Skip to content

feat #3910: enhance IP detection method to prioritize local interface…#3911

Open
NabiKAZ wants to merge 1 commit intoMHSanaei:mainfrom
NabiKAZ:fix-ip-detect-proxy
Open

feat #3910: enhance IP detection method to prioritize local interface…#3911
NabiKAZ wants to merge 1 commit intoMHSanaei:mainfrom
NabiKAZ:fix-ip-detect-proxy

Conversation

@NabiKAZ
Copy link
Contributor

@NabiKAZ NabiKAZ commented Mar 10, 2026

What is the pull request?

Fix #3910 - Add local network interface IP detection to avoid proxy interference. Now detects IP via ip addr first, falls back to external services, and allows user to manually override the detected IP.
About get SSL certificate.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

[INF] Starting automatic SSL certificate generation for server IP...
[INF] Using Let's Encrypt shortlived profile (~6 days validity, auto-renews)
[INF] Server IP detected: 1.1.1.1
Press Enter to use this IP, or type a different IP:

Copilot AI review requested due to automatic review settings March 10, 2026 10:03

This comment was marked as outdated.

@cherts
Copy link
Contributor

cherts commented Mar 17, 2026

Hi

If the server has several network interfaces, then we must first find out through which interface the default route is set and only then take its IP address, something like this (debian/ubuntu/rhel/alpine is supported this method)

ip -o -4 addr list $(ip route show default 2>/dev/null | awk '/default/ {print $5}') 2>/dev/null | awk '{print $4}' | cut -d/ -f1 | head -1

@MHSanaei MHSanaei force-pushed the main branch 2 times, most recently from 0dc4df2 to f0f98c7 Compare March 17, 2026 22:01
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.

SSL Certificate for IP: Uses proxy IP instead of server IP when ALL_PROXY is set

4 participants