Live data from Hacker News

Ask HN: upd to http

news.ycombinator.com

1–5 of 5 posts

Ask HN: upd to http

#1
Google usually helps me find these types of questions, but nothing is turning up. So I thought I'd throw this question out.

I need to get a UDP packet to HTTP (on my shared webhost) UPD because a small microcontroller (low cost sensor) generates the packet. To HTTP because my webhost doesn't allow socket connections beside port 80.

I'm using a home server right now to catch the UDP packet and then pass along the data to the webhost over HTTP. But can't use that long term.. Any web service available for this, or some tips?

Trying to keep things cheap and simple for this side project.

Re: Ask HN: upd to http

#2
A shared hosting account might let you run a UDP listening process; a virtual host definitely would.

Really, anyplace you have a shell account can probably serve the same role as your home server.

Re: Ask HN: upd to http

#3
post #2

A shared hosting account might let you run a UDP listening process; a virtual host definitely would. Really, anyplace you have a shell account can probably serve the same role as your home server.

thanks you. I didn't think any shared hosts would allow UDP listening, I'll look around for that.

Re: Ask HN: upd to http

#4
post #3
post #2

A shared hosting account might let you run a UDP listening process; a virtual host definitely would. Really, anyplace you have a shell account can probably serve the same role as your home server.

thanks you. I didn't think any shared hosts would allow UDP listening, I'll look around for that.

I haven't read the fine print to see if it's allowed by their terms of service, but I just tried setting up a simple UDP-to-HTTP relay on Dreamhost:

  % nc -u -l -p 59595 | xargs -I UDP curl http://example.com/path?u=UDP
...and it worked just fine. I would think as long as the traffic is a tiny fraction of what web traffic would be -- and occasional UDP packets fit that bill -- they might either officially allow it or just not mind.

Re: Ask HN: upd to http

#5
post #4
post #3

Earlier quoted context omitted.

thanks you. I didn't think any shared hosts would allow UDP listening, I'll look around for that.

I haven't read the fine print to see if it's allowed by their terms of service, but I just tried setting up a simple UDP-to-HTTP relay on Dreamhost: % nc -u -l -p 59595 | xargs -I UDP curl http://example.com/path?u=UDP ...and it worked just fine. I would think as long as the traffic is a tiny fraction of what web traffic would be -- and occasional UDP packets fit that bill -- they might either officially allow it or…

Great, thanks. And thanks for the cli paste - I had not heard of 'nc'.