Mercurial > prosody-modules
diff mod_onions/mod_onions.lua @ 2344:c928b7ac75b7
mod_onions: Use typed config API
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Nov 2016 22:33:31 +0100 |
parents | ad40c094e7d7 |
children | 2df32ac11b31 |
line wrap: on
line diff
--- a/mod_onions/mod_onions.lua Fri Nov 04 19:14:05 2016 +0100 +++ b/mod_onions/mod_onions.lua Fri Nov 04 22:33:31 2016 +0100 @@ -24,11 +24,11 @@ module:depends("s2s"); -local proxy_ip = module:get_option("onions_socks5_host") or "127.0.0.1"; -local proxy_port = module:get_option("onions_socks5_port") or 9050; -local forbid_else = module:get_option("onions_only") or false; -local torify_all = module:get_option("onions_tor_all") or false; -local onions_map = module:get_option("onions_map") or {}; +local proxy_ip = module:get_option_string("onions_socks5_host", "127.0.0.1"); +local proxy_port = module:get_option_number("onions_socks5_port", 9050); +local forbid_else = module:get_option_boolean("onions_only", false); +local torify_all = module:get_option_boolean("onions_tor_all", false); +local onions_map = module:get_option("onions_map", {}); local sessions = module:shared("sessions");