wiredfool

SOCKS Proxy for Radio Userland

I’ve put together basic support for SOCKS version 4 proxies in Radio Userland.

Radio Userland (and Frontier) have built-in support for HTTP proxies, but there are some cases where going through a more general proxy is useful. SOCKS 4 is an unauthenticated proxy specification that will transport any TCP stream, rather than just a single protocol. I’m finding this useful because SOCKS 4 is implemented by ssh’s dynamic port forwarding. SOCKS 5 is an authenticated system that can transport both TCP and UDP. I don’t have a version 5 server installed yet, so I haven’t completed support for it yet.

Download: Socks tcp.openStream

Installation: Download the file. Jump to tcp, and duplicate tcp.openStream. You might want this if things go bad, as it’s modifying some pretty core functionality. Double click the downloaded file, or choose it from the File-> Open… menu. It needds to live at tcp.openStream, and you do waht to replace the existing script.

Configuration: This code expects a table of settings at user.webbrowser.socksProxy with at least the following elements:

enabled: Boolean – true enables the socks proxy code. Missing or false disables.
domain: String – the hostname or ip of the proxy server
port: Number – the port the proxy listens on
version: Number – 4 and 5 are valid, only 4 is currently supported

This is the same set of configuration elements as are used in user.webbrowser.proxy, with the addition of version.

Known Limitations: It’s version 4 only, there’s no code to deal with do-not-proxy exceptions other than localhost. This has been tested on Radio verision 9.1b2/OSX connecting to the ssh SOCKS proxy (ssh -D port user\@host). I don’t expect that there would be any trouble on Frontier, I’m not so sure of other platforms.

Liscense: BSD – Go nuts, have fun, let me know if there are problems. There is no warranty, expressed or implied, unless you pay me lots of money.

No comments

No comments yet. Be the first.

Leave a reply

You must be logged in to post a comment.