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
81.42k stars 12.82k forks source link

Allow multiple HTTP proxies on different ports #2501

Open ravenclaw900 opened 2 years ago

ravenclaw900 commented 2 years ago

The solution you want

The ability to have multiple HTTP proxies on different remote ports.

Alternatives considered

Giving the HTTPS type proxy the same options as HTTP type proxies, but that would still only allow 2 remote ports.

How to implement this function

Remove vhost_http_port and replace it with remote_port on the client, like with TCP proxies.

Application scenarios of this function

Anything requiring multiple HTTP proxies on different ports, (e.g. a Synapse server)

blizard863 commented 2 years ago

I don't know this scenarios, maybe it's not a common feature.

github-actions[bot] commented 2 years ago

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

ravenclaw900 commented 2 years ago

bump

green-codes commented 2 years ago

I'm running many http proxies on the same host with no problem. Just use type=http(s) and different ports for each service. remember to set vhost in frps

github-actions[bot] commented 2 years ago

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

ravenclaw900 commented 2 years ago

bump

github-actions[bot] commented 2 years ago

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

ravenclaw900 commented 2 years ago

bump

github-actions[bot] commented 2 years ago

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

ravenclaw900 commented 2 years ago

bump

github-actions[bot] commented 2 years ago

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

ravenclaw900 commented 2 years ago

bump

ravenclaw900 commented 2 years ago

@green-codes, yes, but can't you only have one vhost? Doesn't that mean that all of the proxies would go to the same port?

fatedier commented 2 years ago

It's not necessary to always set type http for your service. Just use tcp instead.

ravenclaw900 commented 2 years ago

Yes, however you do need type http to set headers, right? My situation is that I have 2 http proxies that need to have different headers set on them.

fatedier commented 2 years ago

We want to support this scenario in frp v2 since it's very different with current architecture.