소스 검색

Merge pull request #366 from Mattraks/dev

Fix the problem of empty items in tls and xtls configuration
coolsnowwolf 4 년 전
부모
커밋
c3055b7d38
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua

+ 2 - 2
luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua

@@ -118,13 +118,13 @@ local Xray = {
 		streamSettings = {
 			network = server.transport or "tcp",
 			security = (server.xtls == '1') and "xtls" or (server.tls == '1') and "tls" or nil,
-			tlsSettings = (server.tls == '1') and {
+			tlsSettings = (server.tls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
 				-- tls
 				fingerprint = server.fingerprint,
 				allowInsecure = (server.insecure == "1") and true or nil,
 				serverName = server.tls_host
 			} or nil,
-			xtlsSettings = (server.xtls == '1') and {
+			xtlsSettings = (server.xtls == '1' and (server.insecure == "1" or server.tls_host or server.fingerprint)) and {
 				-- xtls
 				allowInsecure = (server.insecure == "1") and true or nil,
 				serverName = server.tls_host