dumbproxy: `acme/autocert: missing server name` HTTPSRV error

Hey there!

Trying to set up HTTPS proxy under VSCode proxy settings but constantly receive errors during TLS handshake.

dumbproxy log:

Apr 21 10:48:25 proxy-srv-1 dumbproxy[4349]: PROXY   : 2023/04/21 10:48:25 handler.go:131: INFO     Request: 77.33.111.33:62189 "" HTTP/1.1 CONNECT //github.com:443
Apr 21 10:48:25 proxy-srv-1 dumbproxy[4349]: PROXY   : 2023/04/21 10:48:25 handler.go:131: INFO     Request: 77.33.111.33:62189 "johndoe" HTTP/1.1 CONNECT //github.com:443
Apr 21 10:48:25 proxy-srv-1 dumbproxy[4349]: HTTPSRV : 2023/04/21 10:48:25 server.go:3228: http: TLS handshake error from 77.33.111.33:62192: acme/autocert: missing server name

VSCode client log:

[ERROR] [default] [2023-04-21T18:10:27.709Z] GitHub Copilot could not connect to server. Extension activation failed: "tunneling socket could not be established, cause=connect ECONNREFUSED 33.77.11.66:80"

/etc/default/dumbproxy:

dumbproxy -auth "basicfile://?path=/etc/dumbproxy.htpasswd" -autocert -bind-address :443

VSCode settings.json:

{
  "http.proxy": "https://johndoe:12345qwert@proxy.example.org"
  "http.proxyStrictSSL": false,
  "http.proxySupport": "on"
}

But there are no issues using cURL❗️:

❯ curl -x 'https://johndoe:12345qwert@proxy.example.org' https://copilot-proxy.githubusercontent.com/_ping
{"now":1682100802,"status":"ok"}
Apr 21 18:13:22 proxy-hel1-1 dumbproxy[7176]: PROXY   : 2023/04/21 18:13:22 handler.go:131: INFO     Request: 77.37.131.83:57276 "atkrv" HTTP/1.1 CONNECT //copilot-proxy.githubusercontent.com:443

I’m actually confused and can’t get why I get cause=connect ECONNREFUSED 33.77.11.66:80 on port 80❗️and why there’s no server name 😕

Would be grateful for any assistance 🙏

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Well, I think I solved it: CleanShot 2023-04-22 at 01 38 02@2x

That pop-up auth window seems doesn’t work and do not pass any credentials to the server 🤷‍♂️

So, the last thing to do - add steady-tun to MacBook’s autostart 🙂

Thank you for your time and tools, @Snawoot 🙏

PS. I’ll consider donation if I ever will deal with c-currencies.

Ah, forgot to mention: it’s quite possible vscode itself can’t work with HTTPS proxies. Most programs support only plain HTTP proxies (without any TLS wrapping connection). In that case you’ll have to try either configure proxy system wide via PAC file returning HTTPS proxy or use wrapper on client side to connect to a HTTPS proxy like this one: steady-tun. By the way, this wrapper also saves time for TLS connection, doing connection pooling in advance.