Skip to content

fix: Detect interfaces without external connectivity probe#1577

Open
paulb-firebolt wants to merge 1 commit into
gnmyt:developmentfrom
paulb-firebolt:fix/interface-detection-connectivity-probe
Open

fix: Detect interfaces without external connectivity probe#1577
paulb-firebolt wants to merge 1 commit into
gnmyt:developmentfrom
paulb-firebolt:fix/interface-detection-connectivity-probe

Conversation

@paulb-firebolt

Copy link
Copy Markdown

Summary

  • Interface detection previously bound an HTTPS request to speed.cloudflare.com per interface and only listed an interface if that probe succeeded.
  • In many valid Docker network setups (custom bridge networks, ipvlan, restrictive DNS), that probe fails even though the interface itself is perfectly usable — so the real interface (e.g. eth0, eno1, enp1s0) gets reported as "not found" and the saved config silently overwritten.
  • Since requestInterfaces() reruns every hour, a transient probe failure could keep resetting the user's chosen interface indefinitely.
  • This removes the connectivity probe and lists interfaces directly from os.networkInterfaces(), only falling back/resetting the config when the interface has genuinely disappeared from that list.

Fixes #806

Test plan

  • Verified locally that os.networkInterfaces()-based detection lists all non-internal interfaces immediately on startup (Found interface ... with IP ...)
  • Deployed to a remote Docker host and confirmed the interface (eth0 inside the container) is detected and saved on first boot, and persists correctly across a container restart with no fallback warning
  • Confirmed the previous implementation's https.Agent/localAddress connectivity 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)

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
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.

[Bug] Interface eth0 not found. Falling back to default.

1 participant