luci-app-shadowsocks-libev: support ss_redir disable_sni option
authorYousong Zhou <yszhou4tech@gmail.com>
Fri, 4 Aug 2017 14:28:44 +0000 (22:28 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Fri, 4 Aug 2017 14:29:09 +0000 (22:29 +0800)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/instance-details.lua
applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua

index d9a61d0bf7708a3b46b63d6eae08cca8327de8f2..22f3106d031caac34f34404d6dd8c1560d4b68e7 100644 (file)
@@ -24,6 +24,7 @@ s:tab("general", translate("General Settings"))
 s:tab("advanced", translate("Advanced Settings"))
 s:taboption("general", Flag, "disabled", translate("Disable"))
 ss.option_install_package(s, "general")
+ss.options_common(s, "advanced")
 
 if stype == "ss_server" then
        ss.options_server(s, "general")
@@ -42,8 +43,11 @@ else
                        translate("Tunnel address"),
                        translate("The address ss-tunnel will forward traffic to"))
                o.datatype = "hostport"
+       elseif stype == "ss_redir" then
+               o = s:taboption("advanced", Flag, "disable_sni",
+                       translate("Disable SNI"),
+                       translate("Disable parsing HTTP/HTTPS payload to find then resolve hostname at remote server"))
        end
 end
-ss.options_common(s, "advanced")
 
 return m
index b11890f89d8b89dca99ec227f8c2bb0ced65f0ad..63f7ba3c25b6d6b30c18a1cc59a5bab1a34bd466 100644 (file)
@@ -132,6 +132,8 @@ function cfgvalue_overview(sdata)
                cfgvalue_overview_(sdata, lines, names_options_client)
                if stype == "ss_tunnel" then
                        cfgvalue_overview_(sdata, lines, {"tunnel_address"})
+               elseif stype == "ss_redir" then
+                       cfgvalue_overview_(sdata, lines, {"disable_sni"})
                end
                cfgvalue_overview_(sdata, lines, names_options_common)
        else