[GH-ISSUE #1161] protocol = websocket和tls_enable = true不能够同时开启吗?想通过CDN中转一下 #908

Closed
opened 2026-05-05 12:34:38 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @lonsx on GitHub (Mar 26, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1161

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
frps和frpc皆采用0.25.1版本

What operating system and processor architecture are you using (go env)?
frps是centos7,frpc是armbian-dibian9

Configures you used:
server_addr = 经cloudflare中转的域名
server_port = 2096,cloudflare支持的https port
protocol = websocket
tls_enable = true

Describe the results you received:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x36fc84]

goroutine 1 [running]:
github.com/fatedier/frp/utils/net.WrapTLSClientConn(0x0, 0x0, 0x400006a900, 0x0, 0x0)
/home/wcl/go_projects/src/github.com/fatedier/frp/utils/net/tls.go:29 +0x44
github.com/fatedier/frp/utils/net.ConnectServerByProxyWithTLS(0x0, 0x0, 0x400009e62b, 0x9, 0x400012cd60, 0x12, 0x400006a900, 0xfedadff7, 0x9473b5b55aff2947, 0x0, ...)
/home/wcl/go_projects/src/github.com/fatedier/frp/utils/net/conn.go:218 +0xa4
github.com/fatedier/frp/client.(*Service).login(0x40000f89a0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/wcl/go_projects/src/github.com/fatedier/frp/client/service.go:161 +0x130
github.com/fatedier/frp/client.(*Service).Run(0x40000f89a0, 0x4000130480, 0x40000f89a0)
/home/wcl/go_projects/src/github.com/fatedier/frp/client/service.go:80 +0x40
github.com/fatedier/frp/cmd/frpc/sub.startService(0x4000130450, 0x4000130480, 0x4000117500, 0x1393)
/home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:219 +0xe0
github.com/fatedier/frp/cmd/frpc/sub.runClient(0xffffd8338e2a, 0x17, 0x40000f2c00, 0x4b7f2c)
/home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:189 +0x100
github.com/fatedier/frp/cmd/frpc/sub.glob..func4(0x976160, 0x4000092820, 0x0, 0x2, 0x0, 0x0)
/home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:92 +0x50
github.com/fatedier/frp/vendor/github.com/spf13/cobra.(*Command).execute(0x976160, 0x400008a160, 0x2, 0x2, 0x976160, 0x400008a160)
/home/wcl/go_projects/src/github.com/fatedier/frp/vendor/github.com/spf13/cobra/command.go:762 +0x328
github.com/fatedier/frp/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x976160, 0x0, 0x400003c778, 0x3d004)
/home/wcl/go_projects/src/github.com/fatedier/frp/vendor/github.com/spf13/cobra/command.go:852 +0x1e8
github.com/fatedier/frp/vendor/github.com/spf13/cobra.(*Command).Execute(...)
/home/wcl/go_projects/src/github.com/fatedier/frp/vendor/github.com/spf13/cobra/command.go:800
github.com/fatedier/frp/cmd/frpc/sub.Execute()
/home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:102 +0x34
main.main()
/home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/main.go:27 +0x54

Describe the results you expected:
protocol = websocket和tls_enable = true不能够同时开启吗?想通过CDN中转一下,因为我运行frps的服务器ip被put in the wall了,kcp也经常连不上,想使frpc通过https和frps之间通信,可行吗?参考v2ray通过 websocket和TLS经过CDN中转,复活the ip in the wall

Originally created by @lonsx on GitHub (Mar 26, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1161 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** frps和frpc皆采用0.25.1版本 **What operating system and processor architecture are you using (`go env`)?** frps是centos7,frpc是armbian-dibian9 **Configures you used:** server_addr = 经cloudflare中转的域名 server_port = 2096,cloudflare支持的https port protocol = websocket tls_enable = true **Describe the results you received:** panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x36fc84] goroutine 1 [running]: github.com/fatedier/frp/utils/net.WrapTLSClientConn(0x0, 0x0, 0x400006a900, 0x0, 0x0) /home/wcl/go_projects/src/github.com/fatedier/frp/utils/net/tls.go:29 +0x44 github.com/fatedier/frp/utils/net.ConnectServerByProxyWithTLS(0x0, 0x0, 0x400009e62b, 0x9, 0x400012cd60, 0x12, 0x400006a900, 0xfedadff7, 0x9473b5b55aff2947, 0x0, ...) /home/wcl/go_projects/src/github.com/fatedier/frp/utils/net/conn.go:218 +0xa4 github.com/fatedier/frp/client.(*Service).login(0x40000f89a0, 0x0, 0x0, 0x0, 0x0, 0x0) /home/wcl/go_projects/src/github.com/fatedier/frp/client/service.go:161 +0x130 github.com/fatedier/frp/client.(*Service).Run(0x40000f89a0, 0x4000130480, 0x40000f89a0) /home/wcl/go_projects/src/github.com/fatedier/frp/client/service.go:80 +0x40 github.com/fatedier/frp/cmd/frpc/sub.startService(0x4000130450, 0x4000130480, 0x4000117500, 0x1393) /home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:219 +0xe0 github.com/fatedier/frp/cmd/frpc/sub.runClient(0xffffd8338e2a, 0x17, 0x40000f2c00, 0x4b7f2c) /home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:189 +0x100 github.com/fatedier/frp/cmd/frpc/sub.glob..func4(0x976160, 0x4000092820, 0x0, 0x2, 0x0, 0x0) /home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:92 +0x50 github.com/fatedier/frp/vendor/github.com/spf13/cobra.(*Command).execute(0x976160, 0x400008a160, 0x2, 0x2, 0x976160, 0x400008a160) /home/wcl/go_projects/src/github.com/fatedier/frp/vendor/github.com/spf13/cobra/command.go:762 +0x328 github.com/fatedier/frp/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x976160, 0x0, 0x400003c778, 0x3d004) /home/wcl/go_projects/src/github.com/fatedier/frp/vendor/github.com/spf13/cobra/command.go:852 +0x1e8 github.com/fatedier/frp/vendor/github.com/spf13/cobra.(*Command).Execute(...) /home/wcl/go_projects/src/github.com/fatedier/frp/vendor/github.com/spf13/cobra/command.go:800 github.com/fatedier/frp/cmd/frpc/sub.Execute() /home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/sub/root.go:102 +0x34 main.main() /home/wcl/go_projects/src/github.com/fatedier/frp/cmd/frpc/main.go:27 +0x54 **Describe the results you expected:** protocol = websocket和tls_enable = true不能够同时开启吗?想通过CDN中转一下,因为我运行frps的服务器ip被put in the wall了,kcp也经常连不上,想使frpc通过https和frps之间通信,可行吗?参考v2ray通过 websocket和TLS经过CDN中转,复活the ip in the wall
Author
Owner

@fatedier commented on GitHub (Mar 26, 2019):

试一下最新的 0.25.3 的版本。

<!-- gh-comment-id:476633576 --> @fatedier commented on GitHub (Mar 26, 2019): 试一下最新的 0.25.3 的版本。
Author
Owner

@lonsx commented on GitHub (Mar 26, 2019):

试一下最新的 0.25.3 的版本。

刚试了最新版,倒是不再报错panic了,但是还是连不上服务器,看来是不支持了
[W] [service.go:82] login to server failed: websocket.Dial ws://域名:2096/~!frp: bad status

又换了个端口,cloudflare支持的http port,使用websocket,关闭TLS,可以连上服务端,但是好像不支持远程访问https流量。

好吧,只开websocket能连上服务器是0.25.1,0.25.3只开websocket反而连不上了

<!-- gh-comment-id:476651110 --> @lonsx commented on GitHub (Mar 26, 2019): > 试一下最新的 0.25.3 的版本。 刚试了最新版,倒是不再报错panic了,但是还是连不上服务器,看来是不支持了 [W] [service.go:82] login to server failed: websocket.Dial ws://域名:2096/~!frp: bad status 又换了个端口,cloudflare支持的http port,使用websocket,关闭TLS,可以连上服务端,但是好像不支持远程访问https流量。 好吧,只开websocket能连上服务器是0.25.1,0.25.3只开websocket反而连不上了
Author
Owner

@fatedier commented on GitHub (Mar 26, 2019):

这里 frp 的 TLS 并不等同于 https,不一样的。你的需求我不是很清楚如何实现。

<!-- gh-comment-id:476657328 --> @fatedier commented on GitHub (Mar 26, 2019): 这里 frp 的 TLS 并不等同于 https,不一样的。你的需求我不是很清楚如何实现。
Author
Owner

@lonsx commented on GitHub (Mar 26, 2019):

了解,我还是想办法换服务器ip吧,谢谢啦!

<!-- gh-comment-id:476662346 --> @lonsx commented on GitHub (Mar 26, 2019): 了解,我还是想办法换服务器ip吧,谢谢啦!
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#908
No description provided.