Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Proxies POST requests to a local (firewalled) server

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README
Octocat-spinner-32 proxy_check.rb
Octocat-spinner-32 proxy_listen.rb
README
== POST Proxy

At work my machine is protected by a firewall. I was working on some payment processing scripts and wanted the payment gateways to be able to send my app IPNs in development mode and this is how I accomplished it.

Important: you'll need a machine with outside access no matter what.

1. Run *proxy_listen.rb* on the "host" machine.

You can use the *-p XXXX* flag to get it to run on an alternate port. It's a tiny Sinatra app and this is where you'll want to point other services to. The app remembers only the last request it received and displays it when it receives a GET request.

2. Run *proxy_check.rb* on a machine that is able to access your "target" machine.

  ./proxy_check.rb host.com target.org

This Ruby script checks the host every 5 seconds for new POST data and then posts it to the target URL.

3. Enjoy!
Something went wrong with that request. Please try again.