mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4469] [Feature Request] 如何设置frp让他能够代理在一台内网电脑中的多个http服务 #3532
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#3532
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 @ddyykk on GitHub (Oct 4, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4469
Describe the feature request
我知道可以用子域名的方式来解决, 但这样稍微有些麻烦, 如果能用IP地址就可以少一笔域名的费用了.
我看以前 ini 配置文件时, http代理可以设置多个, 每个使用不同的localPort和remotePort, 现在似乎不能这样做了, 在http代理中设置remotePort参数程序就会报错无法启动.
以下是我的代码实例:
frps.toml:
frpc.toml:
如何能增加多个http proxy
Describe alternatives you've considered
No response
Affected area
@superzjg commented on GitHub (Oct 5, 2024):
试试
type = "tcp"@ddyykk commented on GitHub (Oct 5, 2024):
在frpc.toml加入这一段:
然后还是启动不成功, 日志中的错误是:
frpc[27243]: unmarshal ProxyConfig error: json: unknown field "remotePort"似乎remotePort参数只能有一个, 或者tcp proxy只能有一个, ssh 有了就不能再有.
@superzjg commented on GitHub (Oct 5, 2024):
tcp 与 remotePort 相配,与 customDomains 不相容,删除。
直接使用 frps 所在服务器的其中一个域名即可,配上端口号使用。
@ddyykk commented on GitHub (Oct 5, 2024):
可以了, 多谢
@liu1015 commented on GitHub (Oct 8, 2024):
您好,可以看看你的配置吗?我也是没办法实现多个http配置
@ddyykk commented on GitHub (Oct 8, 2024):
要在frps部署的vps上的防火墙打开remote端口就可以
@wahahaer commented on GitHub (Dec 10, 2024):
在没办法使用多个端口来映射不同的http服务时,没办法将类型改为了tcp
但是返回的结果,偶尔会报错:
curl: (1) Received HTTP/0.9 when not allowed
2024/12/10 18:44:41 [error] 9226#9226: *14 upstream sent no valid HTTP/1.0 header while reading response header from upstream, client: 39.101.xx.xx, server: 39.101.xx.xx, request: "POST /v1/chat/completions HTTP/1.1", upstream: "http://39.101.xx.xx:9010/v1/chat/completions", host: "39.101.xx.xx"