diff --git a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm index c81590ef690..0e196704467 100644 --- a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm +++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm @@ -259,11 +259,12 @@ if (ssm.net == "tcp") { if (ssm.type && ssm.type != "http") { ssm.type = "none" + } else { + document.getElementsByName('cbid.shadowsocksr.' + sid + '.http_host')[0].value = ssm.host; + document.getElementsByName('cbid.shadowsocksr.' + sid + '.http_path')[0].value = ssm.path; } document.getElementsByName('cbid.shadowsocksr.' + sid + '.tcp_guise')[0].value = ssm.type; document.getElementsByName('cbid.shadowsocksr.' + sid + '.tcp_guise')[0].dispatchEvent(event); - document.getElementsByName('cbid.shadowsocksr.' + sid + '.http_host')[0].value = ssm.host; - document.getElementsByName('cbid.shadowsocksr.' + sid + '.http_path')[0].value = ssm.path; } if (ssm.net == "ws") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_host')[0].value = ssm.host;