dotnet / dotnet/vscode-dotnet-runtime

Question about isOnline() DNS check behavior when using HTTP proxy

Open
#2,594 1 comment 1 reaction 0 assignees View on GitHub
bug P1
Dominant language
TypeScript
Stars
209
Forks
455
PR merge metrics
No merged PRs in 30d

Description

Hi,

First of all, thank you for maintaining this extension.

I have a question about the implementation of `isOnline()` in
WebRequestWorkerSingleton.

As far as I understand, `isOnline()` performs a DNS lookup against
`www.microsoft.com` to determine whether the machine is online.

I was wondering how this is expected to behave in environments where
an HTTP proxy is configured.

In many enterprise networks:

- The client machine does not resolve external DNS directly
- DNS resolution is performed by the proxy server
- HTTP/HTTPS traffic works correctly via the proxy
- But direct DNS lookups from the client may fail

In such a setup, DNS resolution failure does not necessarily mean
that the machine is offline.

So I was curious:

- Is the DNS lookup intentionally used as a simplified connectivity check?
- Is proxy-based DNS resolution considered out of scope?
- Would it make sense to instead attempt a lightweight HTTP request
using the configured proxy settings?

I may be misunderstanding the design intention, so I would appreciate
any clarification on this.

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.