[GH-ISSUE #4670] wildcard dns first record does not look like a TLS handshake #3687

Closed
opened 2026-05-05 14:21:54 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @jaimeph on GitHub (Feb 13, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4670

Bug Description

I have configured:

  1. DNS *.test.com, test.com.
  2. Same certificate with both DNS.
  3. A Load Balancer that loads the certificate.
  4. An IP associated to the Load Balancer which in turn goes to frps, under port 443.
  5. When I launch a request to https://abc.test.com, frps returns this error: get hostname from http/https request error: tls: first record does not look like a TLS handshake

What could be happening?

frpc Version

0.61.1

frps Version

0.61.1

System Architecture

linux/amd64

Configurations

bindPort = 7000

# vhostHTTPPort = 80
vhostHTTPSPort = 443

transport.tls.force = false

auth.method = "token"
auth.token = "*****"

maxPortsPerClient = 1

subDomainHost = "test.com"

log.level = "trace"

# custom404Page = "/config/404.html"

webServer.addr = "127.0.0.1"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin"

Logs

Waiting for the file /config/frps.toml...
File found!
2025-02-13 20:40:54.331 [I] [frps/root.go:105] frps uses config file: /config/frps.toml
2025-02-13 20:40:54.685 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000
2025-02-13 20:40:54.685 [I] [server/service.go:319] https service listen on 0.0.0.0:443
2025-02-13 20:40:54.685 [I] [frps/root.go:114] frps started successfully
2025-02-13 20:40:54.685 [I] [server/service.go:351] dashboard listen on 127.0.0.1:7500
2025-02-13 20:41:02.433 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake
2025-02-13 20:41:02.460 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake
2025-02-13 20:41:02.521 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake
2025-02-13 20:41:02.549 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @jaimeph on GitHub (Feb 13, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4670 ### Bug Description I have configured: 1. DNS *.test.com, test.com. 2. Same certificate with both DNS. 3. A Load Balancer that loads the certificate. 4. An IP associated to the Load Balancer which in turn goes to frps, under port 443. 5. When I launch a request to https://abc.test.com, frps returns this error: `get hostname from http/https request error: tls: first record does not look like a TLS handshake` What could be happening? ### frpc Version 0.61.1 ### frps Version 0.61.1 ### System Architecture linux/amd64 ### Configurations ``` bindPort = 7000 # vhostHTTPPort = 80 vhostHTTPSPort = 443 transport.tls.force = false auth.method = "token" auth.token = "*****" maxPortsPerClient = 1 subDomainHost = "test.com" log.level = "trace" # custom404Page = "/config/404.html" webServer.addr = "127.0.0.1" webServer.port = 7500 webServer.user = "admin" webServer.password = "admin" ``` ### Logs Waiting for the file /config/frps.toml... File found! 2025-02-13 20:40:54.331 [I] [frps/root.go:105] frps uses config file: /config/frps.toml 2025-02-13 20:40:54.685 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000 2025-02-13 20:40:54.685 [I] [server/service.go:319] https service listen on 0.0.0.0:443 2025-02-13 20:40:54.685 [I] [frps/root.go:114] frps started successfully 2025-02-13 20:40:54.685 [I] [server/service.go:351] dashboard listen on 127.0.0.1:7500 2025-02-13 20:41:02.433 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake 2025-02-13 20:41:02.460 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake 2025-02-13 20:41:02.521 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake 2025-02-13 20:41:02.549 [D] [vhost/vhost.go:208] get hostname from http/https request error: tls: first record does not look like a TLS handshake ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [x] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:21:54 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 28, 2025):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:2689424590 --> @github-actions[bot] commented on GitHub (Feb 28, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
Author
Owner

@dishpzga commented on GitHub (Apr 21, 2025):

遇到了同样的问题,兄弟解决了吗

<!-- gh-comment-id:2817976556 --> @dishpzga commented on GitHub (Apr 21, 2025): 遇到了同样的问题,兄弟解决了吗
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3687
No description provided.