TorAS is an ActionScript implementation of the Tor control and communication (SOCKS5) protocols. The library comes bundled with the binary Tor client which can be launched by an AIR application as an invisible background process — no extra installation or setup required. Once connected, TorAS gives developers unprecedented control and insight over their Tor network connection, as well as providing simplified access to the secure, anonymous communication channels for which Tor is famous.

The library has a number of default settings and pre-configurations intended to start the services automatically. While this will probably be sufficient for most developers, at least initially. It’s possible to gain additional low-level control by issuing direct commands to the Tor control and communication sockets.


import import;
import import;
import org.torproject.SOCKS5Tunnel;

var request:URLRequest=new URLRequest("");
var variables=new URLVariables();


var tunnel:SOCK5Tunnel = new SOCKS5Tunnel();
tunnel.addEventListener(SOCKS5TunnelEvent.ONHTTPRESPONSE, onSOCKSTunnelResponse);

function onSOCKSTunnelResponse(eventObj:SOCKS5TunnelEvent):void {
   trace ("Got response: ");
   trace (eventObj.httpResponse.body);
Misc . URL.