mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1774] 【建议】客户端 增加 计算机名 访问 #1404
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#1404
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 @Nieg on GitHub (Apr 22, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1774
内网不一定会有固定IP。我们经常都是通过计算机名访问。。。
例如从:
[ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000变为:
[ssh] type = tcp #local_ip = 127.0.0.1 local_addr= PC-XXXXXX local_port = 22 remote_port = 6000虽然可以在本地再弄个nigix 转发解决问题,但感觉功能改动不大,效果良好。
@glzjin commented on GitHub (Apr 29, 2020):
其实是支持的,目前我这里的用法都是用主机名进行通讯。
直接把主机名写在 local_ip 处即可。
@Nieg commented on GitHub (Apr 29, 2020):
请问是先把 主机名转成 IP 后再 转发吗?
能加个选项,转发时,“是否把主机名转换为IP” 吗?
微信开发的时候,需要连接外网,而且是80端口。因为win10非管理员用户,用vs调试,设置 IIS express 允许0.0.0.0:port 端口访问太麻烦了。(要设置防火墙,用管理员模式打开VS,还要设置一个系统设置)我本身在用内网穿透,我有点希望可以一步到位。
我现在的解决方案是 先在外网 用frp把 80转进来 127.0.0.1:3179 然后用ngnix 监听3179端口,再转一次到 localhost:3178 。
如果直接用frp转到 3178端口 会报:
Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid.
我还没看代码,就猜测是直接转成 IP访问了。。。
@fatedier commented on GitHub (Apr 30, 2020):
@Nieg https://github.com/fatedier/frp/blob/master/README_zh.md#%E4%BF%AE%E6%94%B9-host-header