mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #1910] error in proxy HTTPS #1514
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#1514
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 @MasamiYui on GitHub (Jul 20, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1910
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.
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)?
0.33.0
What operating system and processor architecture are you using (
go env)?Configures you used:
server:
[common]
bind_port = 7000
vhost_https_port = 442
vhost_http_port = 80
client:
[common]
server_addr = 10.44.239.60
server_port = 7000
[web]
type = https
local_port = 443
custom_domains = 10.44.239.60
Steps to reproduce the issue:
1.服务端和客户端都处于内网环境,其中客户端可以访问服务端,服务端不能访问客户端
2.配置完成,正常启动客户端,服务端未报错
Describe the results you received:
1.现在我正在使用服务端,并访问服务端的URL:https://10.44.239.60:442 服务端显示 :
2.当我试图进行调试,发现utils.vhost.https.go中的readHandshake总是不能匹配条件来找到host,io.Reader信息如下

Describe the results you expected:
https能够正常的实现转发
Additional information you deem important (e.g. issue happens only occasionally):
1.使用http正常
2.我尝试将utils.vhost.https.go中GetHttpsHostname方法里的reqInfoMap写死:reqInfoMap["Host"] = "10.44.239.60",此时能正常转发https
3.我使用的判断能否正常转发的依据是:我在客户端部署了一个nginx的https服务器,nginx仅仅当成一个简单的https服务器,并不进行反向代理等操作,如果能通过https://[server-ip]:442访问到客户端的nginx服务器即为成功
Can you point out what caused this issue (optional)
@fatedier commented on GitHub (Jul 20, 2020):
HTTPS 的转发依赖于 SNI,可以确认下发送的请求是否包含了 SNI 信息。
@MasamiYui commented on GitHub (Jul 20, 2020):
我尝试使用curl添加SNI,但是问题依旧,其中windows下出现了using IP address, SNI is not supported by OS,linux显示依旧,是不是我添加SNI的方法有问题?我该怎样发送包含SNI的信息

windows:
linux:

@MasamiYui commented on GitHub (Jul 20, 2020):
自行在/etc/host下添加host解析后解决,SNI hostname不支持IP地址
FC 3546 "Transport Layer Security (TLS) Extensions" section 3.1 spells it out quite clearly:
Literal IPv4 and IPv6 addresses are not permitted in "HostName".