Software /
code /
prosody-modules
Diff
mod_onions/mod_onions.lua @ 2306:ad40c094e7d7
mod_onions: Prevent s2s_secure_auth policy enforcement from rejecting .onion connections
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 23 Sep 2016 13:20:49 +0200 |
parent | 2305:7db4d3f5fb73 |
child | 2344:c928b7ac75b7 |
line wrap: on
line diff
--- a/mod_onions/mod_onions.lua Fri Sep 23 13:18:14 2016 +0200 +++ b/mod_onions/mod_onions.lua Fri Sep 23 13:20:49 2016 +0200 @@ -273,3 +273,11 @@ module:log("debug", "Onions ready and loaded"); module:hook("route/remote", route_to_onion, 200); + +module:hook_global("s2s-check-certificate", function (event) + local host = event.host; + if host and host:find("%.onion$") then + return true; + end +end); +