mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1500] 局域网内机器自带https服务(非公开认证的ssl证书),frp该怎么配置? #1185
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1185
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @at2008 on GitHub (Nov 6, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1500
使用场景:
局域网电脑部署了Cockpit(一个基于WEB的Linux运维管理工具),在外网通过Cockpit管理局域网的电脑,Cockpit自带https协议,我该怎么配置 frp 才能正常打开Cockpit管理界面呢?
现在 frp 支持的 是https2http,我现在遇到的情况似乎是 http2https 或者 https2https。
现在的问题:
通过配置 frp ,可以在外网打开 Cockpit 登录页面,登陆后就变白屏了,没什么信息显示。
参考信息:
之前用过 花生壳 ,花生壳需要配置一个独立的端口,就通过https从公网访问局域网内https的web应用,不知道花生壳是怎么做的。
What version of frp are you using (./frpc -v or ./frps -v)?
v0.29.1
What operating system and processor architecture are you using (
go env)?ubuntu 18/16
Configures you used:
==============frps=============
frps.ini
[common]
bind_port = 11001
kcp_bind_port = 11001
vhost_http_port = 80
vhost_https_port = 443
==============frpc=============
frpc.ini
[common]
server_addr = x.x.x.x
server_port = 11001
protocol = kcp
[hos-http-m.mydomain.cn]
type = http
local_port = 9090
custom_domains = m.mydomain.cn
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
通过配置 frp ,可以在外网打开 Cockpit 登录页面,登陆后就变白屏了,没什么信息显示。
Describe the results you expected:
希望,通过 frp 能够连接内网已经是https的web应用。
Additional information you deem important (e.g. issue happens only occasionally):
之前用过 花生壳 ,花生壳需要配置一个独立的端口,就通过https从公网访问局域网内https的web应用,不知道花生壳是怎么做的。
Can you point out what caused this issue (optional)
@fatedier commented on GitHub (Nov 7, 2019):
type = http 改成 type = https。
@at2008 commented on GitHub (Nov 7, 2019):
大佬,问题依旧
我可能没说清楚,局域网电脑是 https ,公网是 http ,是不是这种方式不可以?
@fatedier commented on GitHub (Nov 7, 2019):
@at2008 目前不支持,可以考虑在你的 https 所在机器上再部署一个 nginx,通过配置 nginx 可以做这一层转换,再将转换过后的端口通过 http 暴露出来。
@fatedier commented on GitHub (Nov 7, 2019):
后面也可以考虑一下这个场景吧,可能对调试内部 https 服务有点帮助。
@at2008 commented on GitHub (Nov 7, 2019):
多谢回复。
@fatedier commented on GitHub (Nov 28, 2019):
v0.30.0 已新增 https2http plugin。
@at2008 commented on GitHub (Nov 28, 2019):
@fatedier 感谢!马上测试!
@at2008 commented on GitHub (Nov 29, 2019):
@fatedier 请问
是 https2http 还是 http2https?
具体如何配置呢?
@fatedier commented on GitHub (Nov 29, 2019):
https://github.com/fatedier/frp/blob/master/conf/frpc_full.ini#L210
参考这里的配置,上面说错了,是 http2https。
@at2008 commented on GitHub (Nov 29, 2019):
@fatedier 反馈一下,我用的一个开源运维管理软件 Cockpit,错误提示:
Nov 28 19:13:12 CHI-KVM cockpit-tls[1759]: cockpit-tls: gnutls_handshake failed: The TLS connection was non-properly terminated.
@fatedier commented on GitHub (Nov 29, 2019):
贴下 frpc 日志,另外确认下你的软件能够支持的 TLS 的 version。
@at2008 commented on GitHub (Nov 29, 2019):
@fatedier
Nov 29 03:32:19 CHI-KVM frpc[9845]: 2019/11/29 03:32:19 Unsolicited response received on idle HTTP channel starting with "0\r\n\r\n"; err=
Nov 29 03:47:15 CHI-KVM frpc[9845]: 2019/11/29 03:47:15 Unsolicited response received on idle HTTP channel starting with "0\r\n\r\n"; err=
@at2008 commented on GitHub (Nov 29, 2019):
@fatedier 支持的 TLS version
Cockpit supports TLS v. 1.1 and 1.2 by default
@fatedier commented on GitHub (Dec 1, 2019):
你用 curl 直接请求你的服务,可以得到正常的响应结果吗?
@at2008 commented on GitHub (Dec 1, 2019):
我不知道你指的是这个吗?
@fatedier commented on GitHub (Dec 1, 2019):
加上 -k , curl -k https://xxx
@at2008 commented on GitHub (Dec 1, 2019):
忘记报告一个要点了,通过 frp 登录页面时可以正常打开的,输入登录信息后不能正常进入系统,这个情况不知道怎么怎么测试。上面图时登录页信息,时正常的。
如果可以的的话,大佬自己装个 Cockpit 试试,如果不方便,这个需求应该不普遍的,可暂缓,不要影响主要功能进度。谢谢大佬回复!
@maxmib commented on GitHub (Feb 26, 2020):
反向https2http也有这个问题,内网是homeassistant http,用frp转换成https外网可以打开登陆页但是登陆不了,一直加载数据,用tcp模式则正常
@fatedier commented on GitHub (Feb 26, 2020):
有可能是你的网站页面内的链接地址的原因,比如都是 http 的,frp 并不会修改网站中的内容,所以可能的情况就是首页虽然以 https 暴露出去了,但是点击其他链接的时候,还是会访问到 http 的服务,导致访问失败。
@yzlnew commented on GitHub (Jun 14, 2022):
也遇到这个问题,最后有解决吗
@YumeAyai commented on GitHub (Aug 24, 2022):
解决了吗