mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4358] 请问0.59版本怎么配置一台服务器对应多客户端(无域名) #3441
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#3441
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 @weishengbin on GitHub (Jul 30, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4358
Describe the feature request
我只有一台服务器来做内网穿透,运营一个frps,然后我本地有2台电脑,如何实现本地的两台电脑使用同一台服务器一起实现内网穿透呢?最新版本(0.59)
Describe alternatives you've considered
No response
Affected area
@dalaosec commented on GitHub (Jul 30, 2024):
每台机器部署一个frpc 就行了
@weishengbin commented on GitHub (Jul 30, 2024):
问题是服务端的配置vhostHTTPPort字段只能设置一个端口(我主要用来做http协议的内网穿透),搭建好之后访问方式是http://服务器ip:vhostHTTPPort,无法区分到达哪台本地机器,以下为我的服务端配置文件
`
bindPort = 7000 #{必选} 客户端与该端口建立连接
vhostHTTPPort = 8545
log.to = "console" #{可选} 日志配置, 通过打印的方式输出日志
#身份验证
auth.method = "token" #{可选}身份验证方式
auth.token = "123456" #token设置密码,用于通过身份验证创建连接
#frp服务仪表板配置
webServer.port = 7077 #{自行修改端口}
webServer.addr = "0.0.0.0" #公网ip或者0.0.0.0或者域名
webServer.user = "admin" #登录用户名{自行修改}
webServer.password = "admin" #登录密码{自行修改}
webServer.pprofEnable = false
transport.maxPoolCount = 50
transport.heartbeatTimeout = 90
transport.tcpMux = true
transport.tcpMuxKeepaliveInterval = 60
transport.tcpKeepalive = 120
`
@miws commented on GitHub (Jul 30, 2024):
每台frpc指定不同的remotePort, 可以不是vhostHTTPort
@weishengbin commented on GitHub (Jul 30, 2024):
请问有配置示例吗,最新版本0.59的,感谢
@miws commented on GitHub (Jul 31, 2024):
proxies
name = "plugin_http2http"
type = "tcp"
remotePort = 6007
[proxies.plugin]
type = "http2http"
localAddr = "127.0.0.1:80"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"
更多用法你参照 frpc_full_example.toml使用