could I use reverse-proxy to redirect cloundfoundry server to my local server?

I'm writing a nodejs web server which is published to cloudfoundry.

and a 3rd service will visit my web server.

now I want to debug at local but don't have a standalone ip.

so I wonder could I do this:

  1. set up a proxy web server at cloudfoundry, call A
  2. start a web server at local, call B
  3. start a net connection to A, then pipe them.
  4. when 3rd service visit A, the request will send to B , and response.
  5. then I can develop & debug at local machine , don't need to vmc push after every save.

can I do this by writing some nodejs code? how? thx.

Why cloudfoundry at all when you want to just tunnel web traffic to your localhost?

You can as well use other tunneling service. like localtunnel?

just do

gem install localtunnel
localtunnel <port>

you would be returned a unique url {uniq}.localtunnel.com - once you hit there, you will get it to your local.