Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

onion2web

Access .onion sites without Tor Browser

Homepage.

Dependency: lua-resty-socks5.

Paper (in Russian).

Installation

$ sudo luarocks install onion2web

Reference

This module contains the following functions:

  • onion2web.handle_onion2web(onion_replacement, torhost='127.0.0.1', torport=9050, confirmation=true) - accept request to onion2web site. onion_replacement is part of gateway domain name, which replaces .onion (e.g., .onion.gq). torhost and torport are Tor address and SocksPort. If confirmation is true (the default), then the confirmation page is shown instead of contents of a hidden service until a user accepts the terms.

How to use this module to forward requests from xxx.onion.gq to xxx.onion:

server {
    listen 80;
    server_name *.onion.gq;
    location / {
        default_type text/html;
        content_by_lua '
            require("onion2web").handle_onion2web(".onion.gq");
        ';
    }
}

To blacklist some .onion sites:

server {
        listen   80;
        server_name
.badonion12345678.onion.gq
.anotherbadonion1.onion.gq
;
        return 403;
}

About

Access .onion sites without Tor Browser

Resources

License

Packages

No packages published
You can’t perform that action at this time.