Nodejs HTTP proxy server in Glitch possible?

I’ve seen a few posts about this that are quite old at this point so I want to revive this idea of creating a HTTP proxy server on Glitch.

I’m talking about a proxy that I can put in my browser or computer’s settings.

I have tried various implementations such as:


Live project: https://glitch.com/edit/#!/proxifly-proxy-0001?path=server.js%3A52%3A15

However I always have the same set of issues

  1. How do I know the IP of the glitch project that I am supposed to put into the browser proxy settings?
  2. After trying every IP I can get my hands on, it still fails to connect. So now Im wondering if this is even possible?

As a side note, what is the official name for the task I am trying to achieve? Is it just called a ‘proxy server’? Or is a ‘reverse proxy server’? Or a ‘forward proxy server’? I’m still unsure.

Thank you!

As long as it doesn’t violate this, it should be OK

Thank you @EddiesTech. I was not aware of this. But the issue is still that I cannot get anything up and running. I cannot connect to the proxy as I am intending to.

Here is the glitch project: https://glitch.com/edit/#!/proxifly-proxy-0001?path=server.js%3A52%3A15

Now that the code is deployed there, how do I connect to it?

I’m looking on Wikipedia https://en.wikipedia.org/wiki/Proxy_server#Web_proxy_servers, and it looks like requests sent to a proxy are a little different from plain old HTTP. On glitch, you don’t actually connect directly to your project over a TCP connection, and your project doesn’t get a dedicated IP address. Instead a reverse proxy looks at the incoming request, figures out based on the headers which project is meant for, and resends it to the project. So if you couldn’t get this to work, maybe it’s that this reverse proxy in between can’t handle the proxy request right.

Thanks, @wh0 that is an insightful answer. I guess that means Glitch is just not the right platform for this type of project yet. Shame because I was having so much fun exploring this idea!

I’ve have a proxy here: https://github.com/youngchief-btw/ProxyChief

Either you can run a node of it, or use it for some pointers on how to do a proxy

1 Like

You can run a proxy on glitch, but it will likely get taken down.

1 Like

@youngchief_btw Took a look at it that is pretty cool! I see you are connecting to it using a domain. If this were to be hosted on glitch for example, would it be able to be connected to using an IP? If so do you know how to obtain that IP?

It should work IP or domain but I haven’t tested it

1 Like

@youngchief_btw thanks Got it. Sorry to keep asking questions but do know how to get the IP? I have tried:

  1. Running curl ifconfig.co From the glitch console

  2. Sending a request like fetch(‘https://ifconfig.co’)

Both attempts give different IPs so I’m Not sure what the correct one to use is?

1st of all I don’t mind questions
2nd Are you trying to get IP of the user? or the current server the project is being run on? (whoops misread hold on)

1 Like

Maybe the 2nd is more reliable? Since it’s what is running your project it might be correct…

I’ll do some research and get back to you.

1 Like

@youngchief_btw yes the IP of the project or, in other words, what IP would be able to receive requests like proxy connections. Thanks looking forward to your findings :slight_smile:

You could just do ping [projectname].glitch.me (or maybe ping localhost might work, doubt it though)