fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
82.02k stars 12.89k forks source link

frp stcp bug #4243

Open wb1t opened 1 month ago

wb1t commented 1 month ago

Bug Description

通过STCP方式连接远程桌面,有几台服务器会报协议错误,start new visitor connection error: custom listener for [proxies-stcp-rdp-55F25A99-2B43-44A6-93E5-60223BF36941] doesn't exist 不知道这个serverName是不是有hash算法问题还是长度有限制

frpc Version

0.54.0

frps Version

0.54.0

System Architecture

Windows/amd64

Configurations

[[visitors]] name = "visitors-stcp-rdp-10116" type = "stcp" serverName = "proxies-stcp-rdp-55F25A99-2B43-44A6-93E5-60223BF36941" secretKey = "rdpad.baidu.comrdp" bindAddr = "127.0.0.1" bindPort = 10116 transport.useEncryption=true transport.useCompression=true

Logs

2024/05/27 22:32:11 [W] [stcp.go:114] [71ed92dfe93235ec] [visitors-stcp-rdp-10116] start new visitor connection error: custom listener for [proxies-stcp-rdp-55F25A99-2B43-44A6-93E5-60223BF36941] doesn't exist 2024/05/27 22:33:44 [W] [stcp.go:114] [71ed92dfe93235ec] [visitors-stcp-rdp-10116] start new visitor connection error: custom listener for [proxies-stcp-rdp-55F25A99-2B43-44A6-93E5-60223BF36941] doesn't exist 2024/05/27 22:33:47 [W] [stcp.go:114] [71ed92dfe93235ec] [visitors-stcp-rdp-10126] start new visitor connection error: custom listener for [proxies-stcp-rdp-DB9F75DA-74B4-41B6-B40F-B9DB2677E1DF] doesn't exist 2024/05/27 22:34:09 [W] [stcp.go:114] [71ed92dfe93235ec] [visitors-stcp-rdp-10104] start new visitor connection error: custom listener for [proxies-stcp-rdp-3BA1FA84-5B6F-4A28-B45A-F273890977A9] doesn't exist

Steps to reproduce

  1. 每次都能重现!
  2. ...

Affected area

fatedier commented 1 month ago

secretKey 不要贴出来,日志和配置无法看出问题,建议在本地环境用最小化的配置看是否能复现问题,如果可以,贴出完整的测试配置。

wuai1024 commented 4 weeks ago

serverName 太长了,我遇到过。

wb1t commented 3 weeks ago

我也在怀疑serverName太长或前面某些部分有重叠的可能性,看了一下frp只用到了比较短的ID做为唯一标识

wb1t commented 3 weeks ago

serverName 这个算法的确有问题 换个serverName名字就可以连接上了,目前接了100个左右的客户端,serverName是用的工具生成的guid做为的serverName,检查过了也没有重复 但就是连接不上 真是怪了

fatedier commented 3 weeks ago

@wb1t 尽量提供一个最简化的可复现的完整配置,否则很难测试。