Repository: fatedier/frp (language: go)

Issue:
使用tcpmux时 customDomains 参数大写导致 kex_exchange_identification connection closed by remote host 
### Bug Description

我使用ubuntu 20.04 作为服务器和客户端。在配置 customDomains  参数时，我发现其中含有大写字母会导致使用ssh 连接时报错。
报错信息：
2023/XX/XX XXXXXX socat[5317] E CONNECT XXXXX: Not Found
ssh_exchange_identification: Connection closed by remote host

在删去参数中所有的大写字母，问题不再出现。
如果你也遇到同样的问题，可以尝试一下。

### frpc Version

0.52.3

### frps Version

0.52.3

### System Architecture

linux/amd64

### Configurations

serverAddr = "x.x.x.x"
serverPort = 7000

[[proxies]]
name = "ssh1"
type = "tcpmux"
multiplexer = "httpconnect"
customDomains = ["machine-a.example.com"] //这里的参数含有大写字母会出现问题
localIP = "127.0.0.1"
localPort = 22


### Logs

_No response_

### Steps to reproduce

1. 
2. 
3. 
...


### Affected area

- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [X] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others


Discussion / hints:
一般对于 host 来说，可能可以考虑代码中忽略大小写
请教一下，这里的"machine-a.example.com"]是要真实存在的域名，还是可以随便写，如果要真实存在的，那么域名解析应该怎么设置，谢谢您。我按照教程示例使用ssh复用同一个端口始终不成功，不知道问题出在哪个环节。
any updates on this? have same problem

Fix patch:
diff --git a/Release.md b/Release.md
index 5d050f4d786..38e7cb30f41 100644
--- a/Release.md
+++ b/Release.md
@@ -5,3 +5,7 @@
 ### Features
 
 * The `Refresh` and `ClearOfflineProxies` buttons have been added to the Dashboard of frps.
+
+### Fixes
+
+* The host/domain matching in the routing rules has been changed to be case-insensitive.
diff --git a/pkg/util/vhost/router.go b/pkg/util/vhost/router.go
index 281e164bdf9..e8e5a53fccc 100644
--- a/pkg/util/vhost/router.go
+++ b/pkg/util/vhost/router.go
@@ -33,6 +33,8 @@ func NewRouters() *Routers {
 }
 
 func (r *Routers) Add(domain, location, httpUser string, payload interface{}) error {
+	domain = strings.ToLower(domain)
+
 	r.mutex.Lock()
 	defer r.mutex.Unlock()
 
@@ -64,6 +66,8 @@ func (r *Routers) Add(domain, location, httpUser string, payload interface{}) er
 }
 
 func (r *Routers) Del(domain, location, httpUser string) {
+	domain = strings.ToLower(domain)
+
 	r.mutex.Lock()
 	defer r.mutex.Unlock()
 
@@ -86,6 +90,8 @@ func (r *Routers) Del(domain, location, httpUser string) {
 }
 
 func (r *Routers) Get(host, path, httpUser string) (vr *Router, exist bool) {
+	host = strings.ToLower(host)
+
 	r.mutex.RLock()
 	defer r.mutex.RUnlock()
 


Test patch: