Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We should not use example.com to check connectivity #4639

Closed
mook-as opened this issue May 9, 2023 · 5 comments · Fixed by #5972
Closed

We should not use example.com to check connectivity #4639

mook-as opened this issue May 9, 2023 · 5 comments · Fixed by #5972
Assignees
Labels
area/diagnostics good first issue Good for newcomers kind/quality quality improvements, refactoring, Automation via CI, E2E, Integration, CLI or REST API
Milestone

Comments

@mook-as
Copy link
Contributor

mook-as commented May 9, 2023

Actual Behavior

Currently, when we do the connectivity check, we contact example.com and expect a HTTP response. We should use something that's designed for this sort of workload, rather than spamming connections to a (itself ill-advised) page meant for an example.

Steps to Reproduce

  1. Set up a (HTTP) proxy for Rancher Desktop
  2. Check the proxy logs and notice a lot of connections for https://example.com.

Result

A connection to https://example.com every five seconds.

Expected Behavior

  • The host used should be something designed for a connectivity check
  • If the connection was up 5 seconds ago, we should consider slowing down the check frequency.

Additional Information

await fetch('https://example.com/', { signal: controller.signal });

Rancher Desktop Version

1.7.0-1270-g9b8bdee9

Rancher Desktop K8s Version

N/A

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

Windows

Operating System / Build Version

Windows 10 Pro 22H2 (Build 19045.2846)

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

N/A

@mook-as mook-as added good first issue Good for newcomers kind/quality quality improvements, refactoring, Automation via CI, E2E, Integration, CLI or REST API area/diagnostics labels May 9, 2023
@HillLiu
Copy link

HillLiu commented May 12, 2023

Yes, I found the same thing and I'm curious if there are any security issues with it?

@mook-as
Copy link
Contributor Author

mook-as commented May 12, 2023

Nah, we're using that to check if we're online (and discard the results), so even if you manage to intercept the traffic it won't do much. (And in that case you'd need to be able to generate a certificate that works, which implies you can intercept more interesting hosts…)

@flamein
Copy link

flamein commented Oct 7, 2023

This practice is triggering my Firewall because example.com is returning something unexpected from it's IP address which is on several blacklists. Is there really no other way to determine if the internet is reachable?

For instance, you could use the same address that is used to check for updates if you must... at least that would be something expected.

@jandubois jandubois added this to the 1.12 milestone Oct 8, 2023
@gunamata gunamata removed this from the 1.12 milestone Oct 30, 2023
@rkettelerij
Copy link

rkettelerij commented Nov 14, 2023

example.com might just be the worst host to check for internet connectivity. The whole point of example.com/net/org is to be used as an example host in documentation, without the need to resolve to anything! Currently it doesn't resolve and Rancher is spamming the logs. Also since its meant to be used for documentation purposes you could even consider it an error when requests are actually taking place to such a domain.

Why not change it to rancherdesktop.io or a file in a S3 bucket (the world has bigger problems when S3 goes down)? Happy to provide a PR if you wish.

@jandubois
Copy link
Member

I've decided to use http://docs.rancherdesktop.io/. The URL is already used by help menus and buttons, so should ideally be already allowed in firewall and proxy rules. I didn't want to use the update checker URL because somebody might want to block it, to be extra-sure that the app doesn't auto-update.

Also just pulling the HTTP redirect response and not the whole webpage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/diagnostics good first issue Good for newcomers kind/quality quality improvements, refactoring, Automation via CI, E2E, Integration, CLI or REST API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants