comparison mod_onions/mod_onions.lua @ 4908:44be2c6087f3

mod_onions: Add comment explaining s2s-check-certificate handler
author Matthew Wild <mwild1@gmail.com>
date Thu, 17 Mar 2022 20:24:43 +0000
parents 824b0d7fa883
children fa415cd9eeca
comparison
equal deleted inserted replaced
4907:4aecf78cc39d 4908:44be2c6087f3
266 module:hook("route/remote", route_to_onion, 200); 266 module:hook("route/remote", route_to_onion, 200);
267 267
268 module:hook_global("s2s-check-certificate", function (event) 268 module:hook_global("s2s-check-certificate", function (event)
269 local host = event.host; 269 local host = event.host;
270 if host and host:find("%.onion$") then 270 if host and host:find("%.onion$") then
271 -- This cancels the event chain without reporting any cert
272 -- validation results. The connection will typically proceed
273 -- to auth using dialback.
271 return true; 274 return true;
272 end 275 end
273 end); 276 end);
274 277