Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS Proxy -> Multiple External HTTP Server Instances #1210

Open
macharborguy opened this issue Oct 18, 2017 · 1 comment
Open

HTTPS Proxy -> Multiple External HTTP Server Instances #1210

macharborguy opened this issue Oct 18, 2017 · 1 comment

Comments

@macharborguy
Copy link

I am trying to figure out how to combine a few of the examples provided into a Proxy server that can route traffic based on the requested domain name.

Currently I am using Bouncy to bounce traffic based on the requested Domain name, and it works well, but I am looking to expand to proxy HTTPS secure traffic to the http server instances, each server instance is a separate NodeJS process running an ExpressJS-based server. Bouncy doesnt appear to be maintained anymore, and it was suggested in the Issues tracker there to check out node-http-proxy. (i need HTTPS and WSS traffic support due to Twitch.tv requiring HTTPS/WSS for their Extensions interface)

The HTTPS->HTTP example is quite straight forward, but when I started looking into incorporating the "custom server logic" example, since it is a "stand alone" example, it has the server internal to the proxy script, rather than the Proxy and the Web Server being separate instances.

Is there any way of combining HTTPS->HTTP server to proxy HTTPS traffic to a separate HTTP ExpressJS server instance (also run on the localhost), perhaps using the "custom server logic" or "proxy request header re-writing" examples to intercept the request, check the domain name information against a list of possible domain names, and then route the request accordingly?

Again, I am already doing this with Bouncy with zero issues (not only redirecting requests to the proper server instance, but also redirecting/forwarding requests to other websites, in the case of "ExampleDomain.com/twitter" which redirects to our twitter page. I would much rather, however, use a more maintained module that has good support for HTTPS/WSS.

@totoafrica
Copy link

for your question of how to proxy based on domain, u can look at my code at issue:
#1228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants