Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to build a reverse proxy. It needs to "rebroadcast" a specific SHOUTcast stream. I want to host this somewhere else.

  • What's the cheapest way to do this? A cheap VPS?
  • What's the simplest software solution for this? I have tried mitmproxy on my local machine but it doesn't seem to work:

 

mitmproxy -p 8010 -P http://[url]:8002

VLC fails...

VLC is unable to open the MRL 'http://localhost:8010/[stream]'.

And mitmproxy says:

>> GET http://[url]:8002/[stream]
   ← 502: Invalid server response.
share|improve this question

1 Answer 1

up vote 1 down vote accepted

The best tool for this that I know of is socat. An example of what you want would look like this:

socat TCP-LISTEN:8010,fork,reuseaddr TCP4:<server address>:8002

This would listen on port 8010 (on all interfaces) and then forward the traffic to server address on port 8002. Any responses would be forwarded back to the original sender.

Note that the server address should not contain the protocol or path but just the domain or IP address (e.g. www.google.com, NOT http://www.google.com/).

The fork parameter allows multiple connections and the reuseaddr keeps socat from needlessly tying up the address in case it crashes.

share|improve this answer
    
Wonderful, that's exactly the tool I needed. –  user252478 Sep 8 '13 at 23:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.