fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
86.43k stars 13.37k forks source link

客户端多个http服务代理到服务端不同端口中 #3854

Closed cccqcccq closed 10 months ago

cccqcccq commented 11 months ago

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

superzjg commented 11 months ago

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

cccqcccq commented 11 months ago

superzjg

感谢!我会尝试的