Преглед на файлове

luci-app-ssr-plus: fix fingerprint settings

Fixes: #1107

Signed-off-by: Tianling Shen <[email protected]>
Tianling Shen преди 2 години
родител
ревизия
16021cbb9a

+ 1 - 1
luci-app-ssr-plus/Makefile

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-ssr-plus
 PKG_VERSION:=186
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_CONFIG_DEPENDS:= \
 	CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \

+ 10 - 4
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua

@@ -147,7 +147,7 @@ o.rawhtml = true
 o.template = "shadowsocksr/ssrurl"
 o.value = sid
 
-o = s:option(ListValue, "type", translate("Server Node Type"))
+o = s:option(Value, "type", translate("Server Node Type"))
 if is_finded("xray") or is_finded("v2ray") then
 	o:value("v2ray", translate("V2Ray/XRay"))
 end
@@ -715,14 +715,20 @@ o.default = "0"
 if is_finded("xray") then
 	-- [[ uTLS ]]--
 	o = s:option(ListValue, "fingerprint", translate("Finger Print"))
-	o:value("disable", translate("disable"))
-	o:value("firefox", translate("firefox"))
+	o:value("", translate("disable"))
 	o:value("chrome", translate("chrome"))
+	o:value("firefox", translate("firefox"))
 	o:value("safari", translate("safari"))
+	o:value("ios", translate("ios"))
+	o:value("android", translate("android"))
+	o:value("edge", translate("edge"))
+	o:value("360", translate("360"))
+	o:value("qq", translate("qq"))
+	o:value("random", translate("random"))
 	o:value("randomized", translate("randomized"))
 	o:depends({type = "v2ray", tls = true})
 	o:depends({type = "v2ray", xtls = true})
-	o.default = "disable"
+	o.default = ""
 end
 
 o = s:option(Value, "tls_host", translate("TLS Host"))

+ 1 - 0
luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm

@@ -315,6 +315,7 @@ function import_ssr_url(btn, urlname, sid) {
 					document.getElementsByName('cbid.shadowsocksr.' + sid + '.vless_flow')[0].value = params.get("flow") || "xtls-rprx-splice";
 					document.getElementsByName('cbid.shadowsocksr.' + sid + '.vless_flow')[0].dispatchEvent(event);
 				}
+				document.getElementsByName('cbid.shadowsocksr.' + sid + '.fingerprint')[0].value = params.get("fp") || "";
 				document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = params.get("sni") || "";
 			}
 			switch (params.get("type")) {

+ 1 - 0
luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus

@@ -32,6 +32,7 @@ sed -i "s/option pdnsd_enable '3'/option pdnsd_enable '1'/g" /etc/config/shadows
 sed -i "s/option type 'vmess'/option type 'v2ray'\n\toption v2ray_protocol 'vmess'/g" /etc/config/shadowsocksr
 sed -i "s/option type 'vless'/option type 'v2ray'\n\toption v2ray_protocol 'vless'/g" /etc/config/shadowsocksr
 sed -i "s/option encrypt_method_v2ray_ss/option encrypt_method_ss/g" /etc/config/shadowsocksr
+sed -i "/option fingerprint 'disable'/d" /etc/config/shadowsocksr
 
 if [ -s "/etc/uwsgi/vassals/luci-webui.ini" ];then
 	limit=$(cat /etc/uwsgi/vassals/luci-webui.ini  | grep -Eo "limit-as.*"|grep -Eo "[0-9]+")

+ 1 - 0
luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua

@@ -366,6 +366,7 @@ local function processData(szType, content)
 		result.tls_host = params.sni
 		result.xtls = params.security == "xtls" and "1" or nil
 		result.vless_flow = params.flow
+		result.fingerprint = params.fp
 		if result.transport == "ws" then
 			result.ws_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil
 			result.ws_path = params.path and UrlDecode(params.path) or "/"