fix: Detect interfaces without external connectivity probe#1577
Open
paulb-firebolt wants to merge 1 commit into
Open
fix: Detect interfaces without external connectivity probe#1577paulb-firebolt wants to merge 1 commit into
paulb-firebolt wants to merge 1 commit into
Conversation
Interface detection previously bound an HTTPS request to speed.cloudflare.com per interface and only listed interfaces where that request succeeded. In many valid Docker setups (custom bridge networks, ipvlan, restrictive DNS) that probe fails even though the interface itself is fine, so it gets reported as "not found" and the saved config is silently overwritten. Since requestInterfaces() reruns hourly, a transient probe failure could keep resetting the user's chosen interface. List interfaces directly from os.networkInterfaces() instead, and only fall back/reset the config when the interface has actually disappeared from that list. Fixes gnmyt#806
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
speed.cloudflare.comper interface and only listed an interface if that probe succeeded.eth0,eno1,enp1s0) gets reported as "not found" and the saved config silently overwritten.requestInterfaces()reruns every hour, a transient probe failure could keep resetting the user's chosen interface indefinitely.os.networkInterfaces(), only falling back/resetting the config when the interface has genuinely disappeared from that list.Fixes #806
Test plan
os.networkInterfaces()-based detection lists all non-internal interfaces immediately on startup (Found interface ... with IP ...)eth0inside the container) is detected and saved on first boot, and persists correctly across a container restart with no fallback warninghttps.Agent/localAddressconnectivity probe is what caused interfaces to be dropped in environments without a working Cloudflare route (matches multiple reports on [Bug] Interface eth0 not found. Falling back to default. #806, including custom bridge/ipvlan networks and DNS failures)