mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1647] http/https希望提供“无域名通过IP访问“的功能 #1304
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#1304
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 @mfkvfn on GitHub (Feb 13, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1647
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 将会直接关闭。)
(请不要在 issue 评论中出现无意义的 加1,我也是 等内容,将会被直接删除。)
(由于个人精力有限,和系统环境,网络环境等相关的求助问题请转至其他论坛或社交平台。)
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.31.2
What operating system and processor architecture are you using (
go env)?Windows Server 2012R2
Configures you used:
无关
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
目前http/https方式,要么服务器有域名设subdomain_host。要么客户端有域名设custom_domains。就是说任意一方必须有域名。现在申请域名很贵,而且备案很麻烦。
希望提供IP访问的方式。只要服务器端有公网IP,可以http://服务器公网IP/ 这样访问客户端网页。
Can you point out what caused this issue (optional)
@fatedier commented on GitHub (Feb 13, 2020):
IP 和域名等价。
@sanan2015 commented on GitHub (Feb 18, 2020):
fate大意思是填ip也可以?但我发现填ip确实无法使用http类型,配置如下:
[web01]
type = http
local_ip = 127.0.0.1
local_port = 80
use_encryption = false
use_compression = true
custom_domains = 34.x.x.x
本地127.0.0.1:80访问正常,其它通过ip+端口也能访问。
@sanan2015 commented on GitHub (Feb 18, 2020):
希望能解答下,感谢~
@fatedier commented on GitHub (Feb 19, 2020):
@sanan2015 建议学习下 HTTP 相关的知识,通过 vhost 路由转发,是根据 http 请求中的 Host header 字段,这个字段可以是任何内容。你只需要在你发送 HTTP 请求的时候能够指定这个字段即可。
在浏览器上,通常你请求的 url 中的 host 是什么就是什么,比如 http://127.0.0.1/xxx ,Host 就是 127.0.0.1。如果是你自己的程序发送的请求,那么可以任意修改成其他值。
@sanan2015 commented on GitHub (Feb 19, 2020):
感谢回复~
我研究下,其实原本希望使用http是因为可以增加账号密码保护,不会直接暴露服务,tcp转发的没有发现这个特性。类似文件插件的认证,觉得可以加在tcp上吗?
@fatedier commented on GitHub (Feb 19, 2020):
@sanan2015 tcp 是没有应用协议的,不方便做这些。如果是 web 服务的话,自己内部可以增加认证机制。