[GH-ISSUE #3854] 客户端多个http服务代理到服务端不同端口中 #3062

Closed
opened 2026-05-05 13:58:57 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @cccqcccq on GitHub (Dec 16, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3854

Describe the feature request

frpc

serverAddr = "1.1.1.1" #假设我的ip
serverPort = 7000

[[proxies]
name = "web"
type = "http" 
localPort = 3333
customDomains = ["1.1.1.1"] 

[[proxies]] 
name = "web2"
type = "http"
localPort = 5555

frps

bindPort = 7000
#vhostHTTPSPort = 443
vhostHTTPPort = 3333

我想实现将我本地两个http服务代理到公网中
我应该怎么实现访问1.1.1.1:3333时访问本地3333端口的服务
访问1.1.1.1:5555时访问本地5555端口的服务
目前3333端口可以使用,请教这有实现的可能吗,我尝试过在web2中添加以下方法
customDomains = ["1.1.1.1:5555"]
remotePort = 5555
但是都无法正常访问服务

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @cccqcccq on GitHub (Dec 16, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3854 ### Describe the feature request frpc ``` serverAddr = "1.1.1.1" #假设我的ip serverPort = 7000 [[proxies] name = "web" type = "http" localPort = 3333 customDomains = ["1.1.1.1"] [[proxies]] name = "web2" type = "http" localPort = 5555 ``` frps ``` bindPort = 7000 #vhostHTTPSPort = 443 vhostHTTPPort = 3333 ``` 我想实现将我本地两个http服务代理到公网中 我应该怎么实现访问**1.1.1.1:3333**时访问本地3333端口的服务 访问**1.1.1.1:5555**时访问本地5555端口的服务 目前3333端口可以使用,请教这有实现的可能吗,我尝试过在web2中添加以下方法 `customDomains = ["1.1.1.1:5555"] ` `remotePort = 5555` 但是都无法正常访问服务 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@superzjg commented on GitHub (Dec 16, 2023):

type = "http" 换成 type = "tcp", 删除 customDomains,分别配置不同的 remotePort,然后frps防火墙开启对应的端口。

<!-- gh-comment-id:1858749276 --> @superzjg commented on GitHub (Dec 16, 2023): 把 `type = "http"` 换成 `type = "tcp"`, 删除 `customDomains`,分别配置不同的 `remotePort`,然后frps防火墙开启对应的端口。
Author
Owner

@cccqcccq commented on GitHub (Dec 16, 2023):

superzjg

感谢!我会尝试的

<!-- gh-comment-id:1858751580 --> @cccqcccq commented on GitHub (Dec 16, 2023): > [superzjg](/superzjg) 感谢!我会尝试的
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3062
No description provided.