Home

Awesome

lua-resty-socks5

Lua SOCKS5 client for the ngx_lua based on the cosocket API

Related project: onion2web.

Paper (in Russian).

Installation

$ sudo luarocks install socks5

Reference

This module contains the following functions:

How to use this module to proxy all requests through Tor:

server {
    listen 80;
    server_name ip4.me; # must be in request header
    location / {
        default_type text/html;
        content_by_lua '
        require("socks5").handle_request("127.0.0.1", 9050)
        ';
    }
}