# HG changeset patch # User Kim Alvefur # Date 1478295211 -3600 # Node ID c928b7ac75b73769df19a8b8ea85a79f782111e3 # Parent f4ab0966ba89c0f23dfaae2b6bc21c7ac2266ede mod_onions: Use typed config API diff -r f4ab0966ba89 -r c928b7ac75b7 mod_onions/mod_onions.lua --- 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");