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

http proxy not working since 1.22.x #4811

Closed
steom opened this issue Jun 7, 2022 · 26 comments
Closed

http proxy not working since 1.22.x #4811

steom opened this issue Jun 7, 2022 · 26 comments

Comments

@steom
Copy link

steom commented Jun 7, 2022

just to inform that
Improved HTTPS proxy handling for windows client from 1.24.0, 124.2 and still today 1.26.0
broke support for http proxy.

version 1.22.2 works great instead!

control: control server key from https://controlplane.tailscale.com: ts2021=[fSeS+], legacy=[nlFWp]
control: RegisterReq: onode= node=[25gj+] fup=false
tshttpproxy: winhttp: GetProxyForURL("http://controlplane.tailscale.com:80/ts2021"): ERROR_INVALID_PARAMETER [unexpected]

logtail: dial "log.tailscale.io:443" failed: dial tcp 34.229.201.48:443:
Received error: PollNetMap: Post "https://controlplane.tailscale.com/machine/map": connection attempts aborted by context: context deadline exceeded
trying bootstrapDNS("derp9b.tailscale.com", "144.202.67.195") for "log.tailscal.io" ...
bootstrapDNS("derp9b.tailscale.com", "144.202.67.195") for "log.tailscale.io" eror: Get "https://derp9b.tailscale.com/bootstrap-dns?q=log.tailscale.io": dialcp 144.202.67.195:443:
trying bootstrapDNS("derp8b.tailscale.com", "2a03:b0c0:1:d0::ec1:e001") for "lo.tailscale.io" ...
bootstrapDNS("derp8b.tailscale.com", "2a03:b0c0:1:d0::ec1:e001") for "log.tailsale.io" error: Get "https://derp8b.tailscale.com/bootstrap-dns?q=log.tailscale.
o": dial tcp [2a03:b0c0:1:d0::ec1:e001]:443:
trying bootstrapDNS("derp8c.tailscale.com", "206.189.16.32") for "log.tailscaleio" ...

@bradfitz
Copy link
Member

bradfitz commented Jun 7, 2022

cc @sailorfrag @dblohm7

@DentonGentry DentonGentry changed the title http proxy http proxy not working since 1.22.x Jun 10, 2022
@DentonGentry DentonGentry added L2 Few Likelihood P3 Can't get started Priority level T5 Usability Issue type labels Jun 10, 2022
@steom
Copy link
Author

steom commented Jul 20, 2022

bug still present in 1.28.0
version 1.22.2 works great instead!

@dblohm7
Copy link
Member

dblohm7 commented Jul 26, 2022

@steom What do your logs look like in 1.28.0? Are there still proxy errors in them? Can you post a snippet or send a bug report ID?

@steom
Copy link
Author

steom commented Jul 27, 2022

tshttpproxy: CONNECT response from http://proxy.lan.org:80 for target "controlplane.tailscale.com:443" (auth "Basic xxxxxxxxxxxxxxxxxx...
(34 total bytes)"): 200 Connection established
control: control server key from https://controlplane.tailscale.com: ts2021=[fSe
S+], legacy=[nlFWp]
control: RegisterReq: onode= node=[WRyC8] fup=false
tshttpproxy: winhttp: GetProxyForURL("http://controlplane.tailscale.com:80/ts202
1"): ERROR_INVALID_PARAMETER [unexpected]
LinkChange: major, rebinding. New state: interfaces.State{defaultRoute=Ethernet (LAN) (Realtek PCIe GBE Family Controller) ifs={Ethernet (LAN):[192.168.1.190/24]} v4=true v6=false}
Start: Prefs{ra=true dns=false want=true server=true Persist{lm=, o=, n=[WRyC8]
u="12345"}}
control: client.Shutdown()
control: client.Shutdown: inSendStatus=0
Rebind; defIf="Ethernet (LAN)", ips=[192.168.1.190/24 fe80::8
4:d67b:e681:340d/64]
magicsock: 0 active derp conns
setPrivateNetwork(try=1): not found
LinkChange: major, rebinding. New state: interfaces.State{defaultRoute=Ethernet (LAN) (Realtek PCIe GBE Family Controller) ifs={Ethernet (LAN):[192.168.1.190/24]} httpproxy=http://proxy.lan.org:80 v4=true v6=false}
Rebind; defIf="Ethernet (LAN)", ips=[192.168.1.190/24 fe80::8
4:d67b:e681:340d/64]
magicsock: 0 active derp conns
tshttpproxy: CONNECT response from http://proxy.lan.org:80 for target "controlplane.tailscale.com:443" (auth "Basic xxxxxxxxxxxxxxxxxx...
(34 total bytes)"): 200 Connection established
control: mapRoutine: quit
control: Client.Shutdown done.
using frontend prefs: Prefs{ra=true dns=false want=true server=true Persist{lm=,
o=, n=[WRyC8] u="12345"}}
Start: serverMode=true
Backend: logs: be:befcc69f0e1b61e51bc34f73847a92f12c44e24f967df65d4e348e0aaf26ec
1e fe:6e8abdd8b6e588d56c3cc8c73519d88764e49545bf71b445e2526d2b9e977b73
control: client.Login(false, 0)
control: doLogin(regen=false, hasUrl=false)
tshttpproxy: CONNECT response from http://proxy.lan.org:80 for target "controlplane.tailscale.com:443" (auth "Basic xxxxxxxxxxxxxxxxxx...
(34 total bytes)"): 200 Connection established
control: control server key from https://controlplane.tailscale.com: ts2021=[fSe
S+], legacy=[nlFWp]
control: RegisterReq: onode= node=[WRyC8] fup=false
tshttpproxy: winhttp: GetProxyForURL("http://controlplane.tailscale.com:80/ts202
1"): ERROR_INVALID_PARAMETER [unexpected]
[RATELIMIT] format("tshttpproxy: winhttp: GetProxyForURL(%q): ERROR_INVALID_PARA
METER [unexpected]")
setPrivateNetwork(try=2): not found
setPrivateNetwork(try=3): not found
setPrivateNetwork(try=4): not found
setPrivateNetwork(try=5): success
LinkChange: major, rebinding. New state: interfaces.State{defaultRoute=Ethernet (LAN) (Realtek PCIe GBE Family Controller) ifs={Ethernet (LAN):[192.168.1.190/24]} v4=true v6=false}
Rebind; defIf="Ethernet (LAN)", ips=[192.168.1.190/24 fe80::8
4:d67b:e681:340d/64]
magicsock: 0 active derp conns
LinkChange: major, rebinding. New state: interfaces.State{defaultRoute=Ethernet (LAN) (Realtek PCIe GBE Family Controller) ifs={Ethernet (LAN):[192.168.1.190/24]} httpproxy=http://proxy.lan.org:80 v4=true v6=false}
Rebind; defIf="Ethernet (LAN)", ips=[192.168.1.190/24 fe80::8
4:d67b:e681:340d/64]
magicsock: 0 active derp conns
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[WRyC8] fup=false
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[WRyC8] fup=false
logtail: dial "log.tailscale.io:443" failed: dial tcp 34.229.201.48:443: connect
ex: Unable to establish connection. Incorrect answer from connected host (in
21.057s), trying bootstrap...
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[WRyC8] fup=false
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[WRyC8] fup=false
trying bootstrapDNS("derp4c.tailscale.com", "134.122.77.138") for "log.tailscale
.io" ...
bootstrapDNS("derp4c.tailscale.com", "134.122.77.138") for "log.tailscale.io" er
ror: Get "https://derp4c.tailscale.com/bootstrap-dns?q=log.tailscale.io": contex
t deadline exceeded
logtail: upload: log upload of 331 bytes compressed failed: Post "https://log.ta
ilscale.io/c/tailnode.log.tailscale.io/c073923eaf4eb578bfa5291f0e85ae182d7554b78
9b5588ec394ead86a2e4f4c": context deadline exceeded
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded

@steom
Copy link
Author

steom commented Jul 27, 2022

control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[ke2Jh] fup=false
trying bootstrapDNS("derp10.tailscale.com", "137.220.36.168") for "log.tailscale
.io" ...
bootstrapDNS("derp10.tailscale.com", "137.220.36.168") for "log.tailscale.io" er
ror: Get "https://derp10.tailscale.com/bootstrap-dns?q=log.tailscale.io": contex
t deadline exceeded
logtail: upload: log upload of 331 bytes compressed failed: Post "https://log.ta
ilscale.io/c/tailnode.log.tailscale.io/08f5711d02619a9a3f6987d7f800d08c485843f0b
e36da419d9562b939408666": context deadline exceeded
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[ke2Jh] fup=false
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[ke2Jh] fup=false
logtail: dial "log.tailscale.io:443" failed: dial tcp 34.229.201.48:443: connect
ex: Unable to establish connection. Incorrect response from the connected
side after the time interval or no response from the connected host.. (in
21.014s), trying bootstrap...
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[ke2Jh] fup=false
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded
control: doLogin(regen=false, hasUrl=false)
control: RegisterReq: onode= node=[ke2Jh] fup=false
trying bootstrapDNS("derp1c.tailscale.com", "104.248.8.210") for "log.tailscale.
io" ...
bootstrapDNS("derp1c.tailscale.com", "104.248.8.210") for "log.tailscale.io" err
or: Get "https://derp1c.tailscale.com/bootstrap-dns?q=log.tailscale.io": context
deadline exceeded
logtail: upload: log upload of 331 bytes compressed failed: Post "https://log.ta
ilscale.io/c/tailnode.log.tailscale.io/08f5711d02619a9a3f6987d7f800d08c485843f0b
e36da419d9562b939408666": context deadline exceeded
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded

@dblohm7
Copy link
Member

dblohm7 commented Jul 27, 2022

@steom Which version of Windows are you running?

@steom
Copy link
Author

steom commented Jul 27, 2022

any,
i made test with win7 x86, win 8.1 x64, win 10 21h2 x64

tailscale 1.22.2 works flawlessy with any win os

the "Improved HTTPS proxy handling for windows client" introduced in 1.24.0 broke the use of http proxy with any win os, socks5 works always fine instead, (indeed in changelog of 1.24.0 there is no modify for it)

in 1.28.0 it's still present the missing services message from the gui when http proxy is set.
image

dblohm7 added a commit that referenced this issue Jul 27, 2022
… to mkwinsyscall, fix memory leak

The definition of winHTTPProxyInfo was using the wrong type (uint16 vs uint32)
for its first field. I fixed that type.

Furthermore, any UTF16 strings returned in that structure must be explicitly
freed. I added code to do this.

Finally, since this is the second time I've seen type safety errors in this code,
I switched the native API calls over to use wrappers generated by mkwinsyscall.
I know that would not have helped prevent the previous two problems, but every
bit helps IMHO.

Updates #4811

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
dblohm7 added a commit that referenced this issue Jul 27, 2022
… to mkwinsyscall, fix memory leak

The definition of winHTTPProxyInfo was using the wrong type (uint16 vs uint32)
for its first field. I fixed that type.

Furthermore, any UTF16 strings returned in that structure must be explicitly
freed. I added code to do this.

Finally, since this is the second time I've seen type safety errors in this code,
I switched the native API calls over to use wrappers generated by mkwinsyscall.
I know that would not have helped prevent the previous two problems, but every
bit helps IMHO.

Updates #4811

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
dblohm7 added a commit that referenced this issue Jul 27, 2022
… to mkwinsyscall, fix memory leak

The definition of winHTTPProxyInfo was using the wrong type (uint16 vs uint32)
for its first field. I fixed that type.

Furthermore, any UTF16 strings returned in that structure must be explicitly
freed. I added code to do this.

Finally, since this is the second time I've seen type safety errors in this code,
I switched the native API calls over to use wrappers generated by mkwinsyscall.
I know that would not have helped prevent the previous two problems, but every
bit helps IMHO.

Updates #4811

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
dblohm7 added a commit that referenced this issue Jul 27, 2022
… to mkwinsyscall, fix memory leak

The definition of winHTTPProxyInfo was using the wrong type (uint16 vs uint32)
for its first field. I fixed that type.

Furthermore, any UTF16 strings returned in that structure must be explicitly
freed. I added code to do this.

Finally, since this is the second time I've seen type safety errors in this code,
I switched the native API calls over to use wrappers generated by mkwinsyscall.
I know that would not have helped prevent the previous two problems, but every
bit helps IMHO.

Updates #4811

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
dblohm7 added a commit that referenced this issue Jul 27, 2022
… to mkwinsyscall, fix memory leak

The definition of winHTTPProxyInfo was using the wrong type (uint16 vs uint32)
for its first field. I fixed that type.

Furthermore, any UTF16 strings returned in that structure must be explicitly
freed. I added code to do this.

Finally, since this is the second time I've seen type safety errors in this code,
I switched the native API calls over to use wrappers generated by mkwinsyscall.
I know that would not have helped prevent the previous two problems, but every
bit helps IMHO.

Updates #4811

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
@DentonGentry
Copy link
Contributor

4dbdb19 is an attempt to fix this, which will be in the 1.30 client to be released next week.

@steom
Copy link
Author

steom commented Aug 31, 2022

1.30 the same, don't connect. 1.22.2 still works okay.

@dblohm7
Copy link
Member

dblohm7 commented Sep 23, 2022

@steom can you tell me a bit more about your environment? Are your machines members of a domain?

@steom
Copy link
Author

steom commented Sep 23, 2022

It's indifferent, also happens in workgroups pc.
I need to revert to 1.22.2 to be able to connect with http proxy.
Socks5 connections instead still works always fine with any version.

The culprint are the changes introduced with 1.24.0.

Maybe "Improved HTTPS proxy handling" for windows client or something related to:
#4544
#4538
#4557

@steom
Copy link
Author

steom commented Oct 12, 2022

1.32.0 the same, don't connect. 1.22.2 still works okay.

@steom
Copy link
Author

steom commented Oct 28, 2022

1.32.2 the same, don't connect. 1.22.2 still works okay.

bootstrapDNS("derp5.tailscale.com", "103.43.75.49") for "log.tailscale.io" error
: Get "https://derp5.tailscale.com/bootstrap-dns?q=log.tailscale.io": context de
adline exceeded
logtail: upload: log upload of 355 bytes compressed failed: Post "https://log.ta
ilscale.io/c/tailnode.log.tailscale.io/": context deadline exceeded
logtail: [v1] backoff: 7955 msec
control: doLogin(regen=false, hasUrl=false)

trying bootstrapDNS("derp2e.tailscale.com", "192.73.252.134") for "controlplane.
tailscale.com" ...
bootstrapDNS("derp2e.tailscale.com", "192.73.252.134") for "controlplane.tailsca
le.com" error: Get "https://derp2e.tailscale.com/bootstrap-dns?q=controlplane.ta
ilscale.com": context deadline exceeded
Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded

bootstrapDNS("derp4e.tailscale.com", "134.122.74.153") for "log.tailscale.io" er
ror: Get "https://derp4e.tailscale.com/bootstrap-dns?q=log.tailscale.io": dial t
cp 134.122.74.153:443: i/o timeout

logtail: upload: log upload of 355 bytes compressed failed: Post "https://log.ta
ilscale.io/c/tailnode.log.tailscale.io/": context deadline exceeded
logtail: [v1] backoff: 10914 msec

Received error: register request: Post "https://controlplane.tailscale.com/machi
ne/register": connection attempts aborted by context: context deadline exceeded

@DentonGentry
Copy link
Contributor

Possibly related: #4394

bradfitz added a commit that referenced this issue Nov 3, 2022
To collect some data on how widespread this is and whether there's
any correlation between different versions of Windows, etc.

Updates #4811

Change-Id: I003041d0d7e61d2482acd8155c1a4ed413a2c5c4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
bradfitz added a commit that referenced this issue Nov 3, 2022
To collect some data on how widespread this is and whether there's
any correlation between different versions of Windows, etc.

Updates #4811

Change-Id: I003041d0d7e61d2482acd8155c1a4ed413a2c5c4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
bradfitz added a commit that referenced this issue Nov 3, 2022
To collect some data on how widespread this is and whether there's
any correlation between different versions of Windows, etc.

Updates #4811

Change-Id: I003041d0d7e61d2482acd8155c1a4ed413a2c5c4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
@bradfitz
Copy link
Member

bradfitz commented Nov 6, 2022

I can reproduce this.

I put a Windows VM on a VLAN without internet access and ran a little CONNECT proxy on the LAN that Windows could reach and configured Windows to use it:

Screen Shot 2022-11-06 at 3 44 07 PM

Browsing the web in Edge/etc works fine through it, but Tailscale doesn't start:

Screen Shot 2022-11-06 at 3 48 15 PM

Screen Shot 2022-11-06 at 3 47 05 PM

@bradfitz
Copy link
Member

bradfitz commented Nov 7, 2022

Debugging.

The path I'm hitting is:

		if err == syscall.Errno(ERROR_WINHTTP_AUTODETECTION_FAILED) {
			metricErrDetectionFailed.Add(1)
			setNoProxyUntil(10 * time.Second)
			return nil, nil
		}

@bradfitz
Copy link
Member

bradfitz commented Nov 7, 2022

Hah, of course. We're dealing with two (at least) different Window proxying settings/layers.

The one I set in settings (which works in Edge, etc) isn't apparently winhttp (per netsh winhttp show proxy) nor the WinHttpGetProxyForUrl call we're using.

So, uh, I guess there are different APIs we need to get the Proxy as set by Settings > Network & Internet > Proxy?

Screen Shot 2022-11-06 at 8 46 01 PM

@bradfitz
Copy link
Member

bradfitz commented Nov 7, 2022

WinHttpGetIEProxyConfigForCurrentUser maybe?
https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpgetieproxyconfigforcurrentuser

If a PAC file is not available, then the WinHttpGetProxyForUrl function fails. The WinHttpGetIEProxyConfigForCurrentUser function can be used as a fall-back mechanism to discover a workable proxy configuration by retrieving the user's proxy configuration in Internet Explorer.

But, uh, ... current user? The tailscaled.exe service runs as a system-ish user. Is that 10.2.0.1 I configured above a user-specific setting?

@bradfitz
Copy link
Member

bradfitz commented Nov 7, 2022

Okay, I confirmed that WinHttpGetIEProxyConfigForCurrentUser returns "http://10.2.0.1:8123" matching my screenshot above, using the following code. And it works for both an admin user & regular user. But I only checked running in the foreground, not as a service yet.

var kernel32 = windows.NewLazySystemDLL("kernel32.dll")
var globalFree = kernel32.NewProc("GlobalFree")

func globalFreeMaybe(ptr *uint16) {
	if ptr != nil {
		_, _, _ = globalFree.Call(uintptr(unsafe.Pointer(ptr)))
	}
}

var winHttp = windows.NewLazySystemDLL("winhttp.dll")
var winHttpGetIEProxyConfigForCurrentUser = winHttp.NewProc("WinHttpGetIEProxyConfigForCurrentUser")

type tWINHTTP_CURRENT_USER_IE_PROXY_CONFIG struct {
	fAutoDetect       int32 // BOOL
	lpszAutoConfigUrl *uint16
	lpszProxy         *uint16
	lpszProxyBypass   *uint16
}

func WinHttpGetIEProxyConfigForCurrentUser() (string, error) {
	if err := winHttpGetIEProxyConfigForCurrentUser.Find(); err != nil {
		return "", err
	}
	p := new(tWINHTTP_CURRENT_USER_IE_PROXY_CONFIG)
	r, _, err := winHttpGetIEProxyConfigForCurrentUser.Call(uintptr(unsafe.Pointer(p)))
	if r == 1 {
		defer globalFreeMaybe(p.lpszProxy)
		defer globalFreeMaybe(p.lpszProxyBypass)
		return windows.UTF16PtrToString(p.lpszProxy), nil
	}
	return "", err
}

@bradfitz
Copy link
Member

bradfitz commented Nov 7, 2022

But @steom, where in Windows do you configure your proxy? And what type?

I don't yet understand how it ever worked for you, assuming you're setting the proxy in the same place I just found that doesn't work.

So I suspect you're setting it elsewhere.

@sailorfrag
Copy link
Member

sailorfrag commented Nov 7, 2022

Environment variables were working at some point, sort of (logs didn't use the proxy, and it could make the GUI unable to talk to the service)

Edit: that was my vague recollection, actual details in #4394

@steom
Copy link
Author

steom commented Nov 7, 2022

But @steom, where in Windows do you configure your proxy? And what type?

I don't yet understand how it ever worked for you, assuming you're setting the proxy in the same place I just found that doesn't work.

So I suspect you're setting it elsewhere.

image

@bradfitz
Copy link
Member

bradfitz commented Nov 7, 2022

@steom, can you answer my question?

Where are you configuring your proxy, and how?

@steom
Copy link
Author

steom commented Nov 7, 2022

From the GUI - Control Panel | System | Environment | System/User Variables
Or it's the same from cmd set/setx https_proxy=http://10.2.0.1:8123

bradfitz added a commit that referenced this issue Nov 13, 2022
…kups fail

There was a mechanism in tshttpproxy to note that a Windows proxy
lookup failed and to stop hitting it so often. But that turns out to
fire a lot (no PAC file configured at all results in a proxy lookup),
so after the first proxy lookup, we were enabling the "omg something's
wrong, stop looking up proxies" bit for awhile, which was then also
preventing the normal Go environment-based proxy lookups from working.

This at least fixes environment-based proxies.

Plenty of other Windows-specific proxy work remains (using
WinHttpGetIEProxyConfigForCurrentUser instead of just PAC files,
ignoring certain types of errors, etc), but this should fix
the regression reported in #4811.

Updates #4811

Change-Id: I665e1891897d58e290163bda5ca51a22a017c5f9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
bradfitz added a commit that referenced this issue Nov 13, 2022
…kups fail

There was a mechanism in tshttpproxy to note that a Windows proxy
lookup failed and to stop hitting it so often. But that turns out to
fire a lot (no PAC file configured at all results in a proxy lookup),
so after the first proxy lookup, we were enabling the "omg something's
wrong, stop looking up proxies" bit for awhile, which was then also
preventing the normal Go environment-based proxy lookups from working.

This at least fixes environment-based proxies.

Plenty of other Windows-specific proxy work remains (using
WinHttpGetIEProxyConfigForCurrentUser instead of just PAC files,
ignoring certain types of errors, etc), but this should fix
the regression reported in #4811.

Updates #4811

Change-Id: I665e1891897d58e290163bda5ca51a22a017c5f9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
bradfitz added a commit that referenced this issue Nov 13, 2022
…kups fail

There was a mechanism in tshttpproxy to note that a Windows proxy
lookup failed and to stop hitting it so often. But that turns out to
fire a lot (no PAC file configured at all results in a proxy lookup),
so after the first proxy lookup, we were enabling the "omg something's
wrong, stop looking up proxies" bit for awhile, which was then also
preventing the normal Go environment-based proxy lookups from working.

This at least fixes environment-based proxies.

Plenty of other Windows-specific proxy work remains (using
WinHttpGetIEProxyConfigForCurrentUser instead of just PAC files,
ignoring certain types of errors, etc), but this should fix
the regression reported in #4811.

Updates #4811

Change-Id: I665e1891897d58e290163bda5ca51a22a017c5f9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
bradfitz added a commit that referenced this issue Nov 13, 2022
…kups fail

There was a mechanism in tshttpproxy to note that a Windows proxy
lookup failed and to stop hitting it so often. But that turns out to
fire a lot (no PAC file configured at all results in a proxy lookup),
so after the first proxy lookup, we were enabling the "omg something's
wrong, stop looking up proxies" bit for awhile, which was then also
preventing the normal Go environment-based proxy lookups from working.

This at least fixes environment-based proxies.

Plenty of other Windows-specific proxy work remains (using
WinHttpGetIEProxyConfigForCurrentUser instead of just PAC files,
ignoring certain types of errors, etc), but this should fix
the regression reported in #4811.

Updates #4811

Change-Id: I665e1891897d58e290163bda5ca51a22a017c5f9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
bradfitz added a commit that referenced this issue Nov 14, 2022
…kups fail

There was a mechanism in tshttpproxy to note that a Windows proxy
lookup failed and to stop hitting it so often. But that turns out to
fire a lot (no PAC file configured at all results in a proxy lookup),
so after the first proxy lookup, we were enabling the "omg something's
wrong, stop looking up proxies" bit for awhile, which was then also
preventing the normal Go environment-based proxy lookups from working.

This at least fixes environment-based proxies.

Plenty of other Windows-specific proxy work remains (using
WinHttpGetIEProxyConfigForCurrentUser instead of just PAC files,
ignoring certain types of errors, etc), but this should fix
the regression reported in #4811.

Updates #4811

Change-Id: I665e1891897d58e290163bda5ca51a22a017c5f9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
@steom
Copy link
Author

steom commented Dec 5, 2022

1.34.0 finally re-works.

I've notice that the last seen information from the website it's not update in "realtime" anymore, like in 1.22.2

Screenshot_20221205_225346

@bradfitz
Copy link
Member

bradfitz commented Dec 5, 2022

Good to hear! Closing this.

@steom, can you file a separate bug about the "Last seen"? That "Last seen" value is only relevant when the node is offline. While the node is actively connected, we account for it differently. The UI should probably just say "Now" or something when it's already connected. (cc @tailscale/frontend)

@bradfitz bradfitz closed this as completed Dec 5, 2022
coadler pushed a commit to coder/tailscale that referenced this issue Feb 2, 2023
…kups fail

There was a mechanism in tshttpproxy to note that a Windows proxy
lookup failed and to stop hitting it so often. But that turns out to
fire a lot (no PAC file configured at all results in a proxy lookup),
so after the first proxy lookup, we were enabling the "omg something's
wrong, stop looking up proxies" bit for awhile, which was then also
preventing the normal Go environment-based proxy lookups from working.

This at least fixes environment-based proxies.

Plenty of other Windows-specific proxy work remains (using
WinHttpGetIEProxyConfigForCurrentUser instead of just PAC files,
ignoring certain types of errors, etc), but this should fix
the regression reported in tailscale#4811.

Updates tailscale#4811

Change-Id: I665e1891897d58e290163bda5ca51a22a017c5f9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants