repo_id
stringlengths
6
101
size
int64
367
5.14M
file_path
stringlengths
2
269
content
stringlengths
367
5.14M
281677160/openwrt-package
43,757
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm
<%+cbi/valueheader%> <% local map = self.map local ss_type = map:get("@server_subscribe[0]", "ss_type") -%> <script type="text/javascript"> //<![CDATA[ let ss_type = "<%=ss_type%>" function padright(str, cnt, pad) { return str + Array(cnt + 1).join(pad); } function b64EncodeUnicode(str) { return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) { return String.fromCharCode('0x' + p1); })); } function b64encutf8safe(str) { return b64EncodeUnicode(str).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, ''); } function b64DecodeUnicode(str) { return decodeURIComponent(Array.prototype.map.call(atob(str), function (c) { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); } function b64decutf8safe(str) { var l; str = str.replace(/-/g, "+").replace(/_/g, "/"); l = str.length; l = (4 - l % 4) % 4; if (l) str = padright(str, l, "="); return b64DecodeUnicode(str); } function b64encsafe(str) { return btoa(str).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, '') } function b64decsafe(str) { var l; str = str.replace(/-/g, "+").replace(/_/g, "/"); l = str.length; l = (4 - l % 4) % 4; if (l) str = padright(str, l, "="); return atob(str); } function dictvalue(d, key) { var v = d[key]; if (typeof (v) == 'undefined' || v == '') return ''; return b64decsafe(v); } function export_ssr_url(btn, urlname, sid) { var s = document.getElementById(urlname + '-status'); if (!s) return false; var v_server = document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0]; var v_port = document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0]; var v_protocol = document.getElementsByName('cbid.shadowsocksr.' + sid + '.protocol')[0]; var v_method = document.getElementsByName('cbid.shadowsocksr.' + sid + '.encrypt_method')[0]; var v_obfs = document.getElementsByName('cbid.shadowsocksr.' + sid + '.obfs')[0]; var v_password = document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0]; var v_obfs_param = document.getElementsByName('cbid.shadowsocksr.' + sid + '.obfs_param')[0]; var v_protocol_param = document.getElementsByName('cbid.shadowsocksr.' + sid + '.protocol_param')[0]; var v_alias = document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0]; var ssr_str = v_server.value + ":" + v_port.value + ":" + v_protocol.value + ":" + v_method.value + ":" + v_obfs.value + ":" + b64encsafe(v_password.value) + "/?obfsparam=" + b64encsafe(v_obfs_param.value) + "&protoparam=" + b64encsafe(v_protocol_param.value) + "&remarks=" + b64encutf8safe(v_alias.value); var textarea = document.createElement("textarea"); textarea.textContent = "ssr://" + b64encsafe(ssr_str); textarea.style.position = "fixed"; document.body.appendChild(textarea); textarea.select(); try { document.execCommand("copy"); // Security exception may be thrown by some browsers. s.innerHTML = "<font style=\'color:green\'><%:Copy SSR to clipboard successfully.%></font>"; } catch (ex) { s.innerHTML = "<font style=\'color:red\'><%:Unable to copy SSR to clipboard.%></font>"; } finally { document.body.removeChild(textarea); } return false; } function import_ssr_url(btn, urlname, sid) { var s = document.getElementById(urlname + '-status'); if (!s) return false; var ssrurl = prompt("<%:Paste sharing link here%>", ""); if (ssrurl == null || ssrurl == "") { s.innerHTML = "<font style=\'color:red\'><%:User cancelled.%></font>"; return false; } s.innerHTML = ""; //var ssu = ssrurl.match(/ssr:\/\/([A-Za-z0-9_-]+)/i); ssrurl = ssrurl.replace(/&([a-zA-Z]+);/g, '&').replace(/\s*#\s*/, '#').trim(); //一些奇葩的链接用"&amp;"当做"&","#"前后带空格 var ssu = ssrurl.split('://'); //console.log(ssu.length); var event = document.createEvent("HTMLEvents"); event.initEvent("change", true, true); switch (ssu[0]) { case "hysteria2": case "hy2": try { var url = new URL("http://" + ssu[1]); var params = url.searchParams; } catch(e) { alert(e); return false; } document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = (ssu[0] === "hy2") ? "hysteria2" : ssu[0]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = url.hostname; document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = url.port || "443"; if (params.get("lazy") === "1") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.lazy_mode')[0].checked = true; document.getElementsByName('cbid.shadowsocksr.' + sid + '.lazy_mode')[0].dispatchEvent(event); } if (params.get("mport")) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.flag_port_hopping')[0].checked = true; // 设置 flag_port_hopping 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.flag_port_hopping')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.port_range')[0].value = params.get("mport") || ""; } if (params.get("protocol")) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.flag_transport')[0].checked = true; // 设置 flag_transport 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.flag_transport')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport_protocol')[0].value = params.get("protocol") || "udp"; } document.getElementsByName('cbid.shadowsocksr.' + sid + '.hy2_auth')[0].value = decodeURIComponent(url.username); document.getElementsByName('cbid.shadowsocksr.' + sid + '.hy2_auth')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.uplink_capacity')[0].value = (params.get("upmbps") && params.get("upmbps").match(/\d+/)) ? params.get("upmbps").match(/\d+/)[0] : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.downlink_capacity')[0].value = (params.get("downmbps") && params.get("downmbps").match(/\d+/)) ? params.get("downmbps").match(/\d+/)[0] : ""; if (params.get("obfs") && params.get("obfs") !== "none") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.flag_obfs')[0].checked = true; // 设置 flag_obfs 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.flag_obfs')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.obfs_type')[0].value = params.get("obfs"); document.getElementsByName('cbid.shadowsocksr.' + sid + '.salamander')[0].value = params.get("obfs-password") || params.get("obfs_password"); } if (params.get("sni") || params.get("alpn")) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true; // 设置 flag_obfs 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].dispatchEvent(event); // 触发事件 if (params.get("sni")) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = params.get("sni") || ""; } if (params.get("alpn")) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_alpn')[0].value = params.get("alpn") || ""; } } if (params.get("insecure") === "1") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = true; document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].dispatchEvent(event); } if (params.get("pinSHA256")) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.pinsha256')[0].value = params.get("pinSHA256") || ""; } document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = url.hash ? decodeURIComponent(url.hash.slice(1)) : ""; s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; case "ss": var url0 = (ssu[1] || ""); var param = ""; // 先分离 #(alias) var hashIndex = url0.indexOf("#"); if (hashIndex >= 0) { param = url0.substring(hashIndex + 1); url0 = url0.substring(0, hashIndex); } // 再分离 ? 或 /?(参数) var queryIndex = (url0 = url0.replace('/?', '?')).indexOf("?"); var queryStr = ""; if (queryIndex >= 0) { queryStr = url0.substring(queryIndex + 1); url0 = url0.substring(0, queryIndex); } var params = Object.fromEntries(new URLSearchParams(queryStr)); if ( ! params.type) { // 普通 SS 导入逻辑 // 判断是否 SIP002 格式(即含 @) if (url0.indexOf("@") !== -1) { // === SIP002 格式 === var sipIndex = url0.indexOf("@"); // 先 URL 解码 base64 再解码 var userInfoB64 = decodeURIComponent(url0.substring(0, sipIndex)); var userInfo = b64decsafe(userInfoB64); var userInfoSplitIndex = userInfo.indexOf(":"); if(userInfoSplitIndex < 0) { // 格式错误 s.innerHTML = "<font style='color:red'><%:Userinfo format error.%></font>"; break; } var method = userInfo.substring(0, userInfoSplitIndex); var password = userInfo.substring(userInfoSplitIndex + 1); var serverPart = url0.substring(sipIndex + 1); var serverInfo = serverPart.split(":"); var server = serverInfo[0]; var port = serverInfo[1]; var plugin = "", pluginOpts = ""; if (params.plugin) { var pluginParams = decodeURIComponent(params.plugin).split(";"); plugin = pluginParams.shift(); pluginOpts = pluginParams.join(";"); } } else { // === Base64 SS2022 / 普通格式 的整体编码格式 === // 先 URL 解码整个字符串 var decodedUrl0 = decodeURIComponent(url0); var sstr = b64decsafe(decodedUrl0); if (!sstr) { s.innerHTML = "<font style='color:red'><%:Base64 sstr failed.%></font>"; break; } // 支持 SS2022 / 普通格式 var regex2022 = /^([^:]+):([^:]+):([^@]+)@([^:]+):(\d+)$/; var regexNormal = /^([^:]+):([^@]+)@([^:]+):(\d+)$/; var m2022 = sstr.match(regex2022); var mNormal = sstr.match(regexNormal); if (m2022) { var method = m2022[1]; var password = m2022[2] + ":" + m2022[3]; var server = m2022[4]; var port = m2022[5]; } else if (mNormal) { var method = mNormal[1]; var password = mNormal[2]; var server = mNormal[3]; var port = mNormal[4]; } else { s.innerHTML = "<font style='color:red'><%:SS URL base64 sstr format not recognized.%></font>"; break; } var plugin = "", pluginOpts = ""; if (params["shadow-tls"]) { try { var decoded_tls = JSON.parse(atob(decodeURIComponent(params["shadow-tls"]))); plugin = "shadow-tls"; var versionFlag = ""; if (decoded_tls.version && !isNaN(decoded_tls.version)) { versionFlag = "v" + decoded_tls.version + "=1;"; } pluginOpts = versionFlag + "host=" + (decoded_tls.host || "") + ";passwd=" + (decoded_tls.password || ""); } catch (e) { console.log("shadow-tls decode failed:", e); } } } // 判断密码是否经过url编码 const isURLEncodedPassword = function(pwd) { if (!/%[0-9A-Fa-f]{2}/.test(pwd)) return false; try { const decoded = decodeURIComponent(pwd.replace(/\+/g, "%20")); const reencoded = encodeURIComponent(decoded); return reencoded === pwd; } catch (e) { return false; } } if (isURLEncodedPassword(password)) { password = decodeURIComponent(password); // 解码URL编码 } else { password = password; // 保持原始值 } // === 填充配置项 === var has_ss_type = (ss_type === "ss-rust") ? "ss-rust" : "ss-libev"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = ssu[0]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.has_ss_type')[0].value = has_ss_type; document.getElementsByName('cbid.shadowsocksr.' + sid + '.has_ss_type')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = server; document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = port; document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0].value = password || ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.encrypt_method_ss')[0].value = method; document.getElementsByName('cbid.shadowsocksr.' + sid + '.encrypt_method_ss')[0].dispatchEvent(event); if (plugin && plugin !== "none") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_plugin')[0].checked = true; // 设置 enable_plugin 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_plugin')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.plugin')[0].value = plugin; document.getElementsByName('cbid.shadowsocksr.' + sid + '.plugin')[0].dispatchEvent(event); if (plugin !== undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.plugin_opts')[0].value = pluginOpts || ""; } } else { document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_plugin')[0].checked = false; } if (param != undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = decodeURIComponent(param); } s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; } else { try { // Xray SS 导入逻辑 // 拆分 @,判断是否是 base64 userinfo 的格式 var parts = url0.split("@"); if (parts.length > 1) { // @ 前是 base64(method:password),后面是 server:port?params var userinfo = b64decsafe(parts[0]); var sepIndex = userinfo.indexOf(":"); if (sepIndex > -1) { method = userinfo.slice(0, sepIndex); password = userinfo.slice(sepIndex + 1); //一些链接用明文uuid做密码 } } var url = new URL("http://" + url0 + (param ? "#" + encodeURIComponent(param) : "")); } catch(e) { alert(e); return false; } // Check if the elements exist before trying to modify them function setElementValue(name, value) { const element = document.getElementsByName(name)[0]; if (element) { if (typeof value === 'boolean') { element.checked = value; } else { element.value = value; } } } function dispatchEventIfExists(name, event) { const element = document.getElementsByName(name)[0]; if (element) { element.dispatchEvent(event); } } setElementValue('cbid.shadowsocksr.' + sid + '.alias', url.hash ? decodeURIComponent(url.hash.slice(1)) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.type', "v2ray"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.type', event); setElementValue('cbid.shadowsocksr.' + sid + '.v2ray_protocol', "shadowsocks"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.v2ray_protocol', event); setElementValue('cbid.shadowsocksr.' + sid + '.server', url.hostname); setElementValue('cbid.shadowsocksr.' + sid + '.server_port', url.port || "80"); setElementValue('cbid.shadowsocksr.' + sid + '.password', password || url.username); setElementValue('cbid.shadowsocksr.' + sid + '.transport', params.type === "http" ? "h2" : (["xhttp", "splithttp"].includes(params.type) ? "xhttp" : (["tcp", "raw"].includes(params.type) ? "raw" : (params.type || "raw"))) ); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.transport', event); setElementValue('cbid.shadowsocksr.' + sid + '.encrypt_method_ss', method || params.encryption || "none"); if ([ "tls", "xtls", "reality" ].includes(params.security)) { setElementValue('cbid.shadowsocksr.' + sid + '.' + params.security, true); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.' + params.security, event); if (params.security === "tls") { if (params.ech && params.ech.trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_ech', true); // 设置 enable_ech 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_ech', event); // 触发事件 setElementValue('cbid.shadowsocksr.' + sid + '.ech_config', params.ech || ""); } if (params.allowInsecure === "1") { setElementValue('cbid.shadowsocksr.' + sid + '.insecure', true); // 设置 insecure 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.insecure', event); // 触发事件 } } if (params.security === "reality") { setElementValue('cbid.shadowsocksr.' + sid + '.reality_publickey', params.pbk ? decodeURIComponent(params.pbk) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.reality_shortid', params.sid || ""); setElementValue('cbid.shadowsocksr.' + sid + '.reality_spiderx', params.spx ? decodeURIComponent(params.spx) : ""); if (params.pqv && params.pqv.trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_mldsa65verify', true); // 设置 enable_mldsa65verify 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_mldsa65verify', event); // 触发事件 setElementValue('cbid.shadowsocksr.' + sid + '.reality_mldsa65verify', params.pqv || ""); } } setElementValue('cbid.shadowsocksr.' + sid + '.tls_flow', params.flow || "none"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.tls_flow', event); setElementValue('cbid.shadowsocksr.' + sid + '.tls_alpn', params.alpn || ""); setElementValue('cbid.shadowsocksr.' + sid + '.fingerprint', params.fp || ""); setElementValue('cbid.shadowsocksr.' + sid + '.tls_host', params.sni || ""); } switch (params.type) { case "ws": if (params.security !== "tls") { setElementValue('cbid.shadowsocksr.' + sid + '.ws_host', params.host ? decodeURIComponent(params.host) : ""); } setElementValue('cbid.shadowsocksr.' + sid + '.ws_path', params.path ? decodeURIComponent(params.path) : "/"); break; case "httpupgrade": if (params.security !== "tls") { setElementValue('cbid.shadowsocksr.' + sid + '.httpupgrade_host', params.host ? decodeURIComponent(params.host) : ""); } setElementValue('cbid.shadowsocksr.' + sid + '.httpupgrade_path', params.path ? decodeURIComponent(params.path) : "/"); break; case "xhttp": case "splithttp": if (params.security !== "tls") { setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_host', params.host ? decodeURIComponent(params.host) : ""); } setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_mode', params.mode || "auto"); setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_path', params.path ? decodeURIComponent(params.path) : "/"); if (params.extra && params.extra.trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra', true); // 设置 enable_xhttp_extra 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra', event); // 触发事件 setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_extra', params.extra || ""); } break; case "kcp": setElementValue('cbid.shadowsocksr.' + sid + '.kcp_guise', params.headerType || "none"); setElementValue('cbid.shadowsocksr.' + sid + '.seed', params.seed || ""); break; case "http": /* this is non-standard, bullshit */ case "h2": setElementValue('cbid.shadowsocksr.' + sid + '.h2_host', params.host ? decodeURIComponent(params.host) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.h2_path', params.path ? decodeURIComponent(params.path) : ""); break; case "quic": setElementValue('cbid.shadowsocksr.' + sid + '.quic_guise', params.headerType || "none"); setElementValue('cbid.shadowsocksr.' + sid + '.quic_security', params.quicSecurity || "none"); setElementValue('cbid.shadowsocksr.' + sid + '.quic_key', params.key || ""); break; case "grpc": setElementValue('cbid.shadowsocksr.' + sid + '.serviceName', params.serviceName || ""); setElementValue('cbid.shadowsocksr.' + sid + '.grpc_mode', params.mode || "gun"); break; case "tcp": case "raw": setElementValue('cbid.shadowsocksr.' + sid + '.tcp_guise', params.headerType || "none"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.tcp_guise', event); if (params.headerType === "http") { setElementValue('cbid.shadowsocksr.' + sid + '.http_host', params.host ? decodeURIComponent(params.host) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.http_path', params.path ? decodeURIComponent(params.path) : ""); } break; } s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; } case "ssr": var sstr = b64decsafe((ssu[1] || "").replace(/#.*/, "").trim()); var ploc = sstr.indexOf("/?"); document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = ssu[0]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event); var url0, param = ""; if (ploc > 0) { url0 = sstr.substr(0, ploc); param = sstr.substr(ploc + 2); } var ssm = url0.match(/^(.+):([^:]+):([^:]*):([^:]+):([^:]*):([^:]+)/); if (!ssm || ssm.length < 7) return false; var pdict = {}; if (param.length > 2) { var a = param.split('&'); for (var i = 0; i < a.length; i++) { var b = a[i].split('='); pdict[decodeURIComponent(b[0])] = decodeURIComponent(b[1] || ''); } } document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = ssm[1]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = ssm[2]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.protocol')[0].value = ssm[3]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.encrypt_method')[0].value = ssm[4]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.obfs')[0].value = ssm[5]; document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0].value = b64decsafe(ssm[6]); document.getElementsByName('cbid.shadowsocksr.' + sid + '.obfs_param')[0].value = dictvalue(pdict, 'obfsparam'); document.getElementsByName('cbid.shadowsocksr.' + sid + '.protocol_param')[0].value = dictvalue(pdict, 'protoparam'); var rem = pdict['remarks']; if (typeof (rem) != 'undefined' && rem != '' && rem.length > 0) document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = b64decutf8safe(rem); s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; case "trojan": try { var url = new URL("http://" + ssu[1]); var params = url.searchParams; } catch(e) { alert(e); return false; } if (!params.get("type")) { // 普通 Trojan 导入逻辑 document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = url.hash ? decodeURIComponent(url.hash.slice(1)) : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = "trojan"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = url.hostname; document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = url.port || "80"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0].value = decodeURIComponent(url.username); document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true; document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = params.get("sni"); if (params.get("allowInsecure") === "1") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = true; // 设置 insecure 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].dispatchEvent(event); // 触发事件 } if (params.get("tfo") === "1") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.fast_open')[0].checked = true; // 设置 fast_open 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.fast_open')[0].dispatchEvent(event); // 触发事件 } s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; } else { // Xray Trojan 导入逻辑 document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = url.hash ? decodeURIComponent(url.hash.slice(1)) : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = "v2ray"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.v2ray_protocol')[0].value = "trojan"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.v2ray_protocol')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = url.hostname; document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = url.port || "80"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0].value = decodeURIComponent(url.username); document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true; document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = params.get("sni"); if (params.get("allowInsecure") === "1") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = true; // 设置 insecure 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].dispatchEvent(event); // 触发事件 } if (params.get("ech") && params.get("ech").trim() !== "") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_ech')[0].checked = true; // 设置 enable_ech 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_ech')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.ech_config')[0].value = params.get("ech"); } document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].value = params.get("type") == "http" ? "h2" : (["xhttp", "splithttp"].includes(params.get("type")) ? "xhttp" : (["tcp", "raw"].includes(params.get("type")) ? "raw" : (params.get("type") || "raw"))); document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].dispatchEvent(event); if (params.get("security") === "tls") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_alpn')[0].value = params.get("alpn") || ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.fingerprint')[0].value = params.get("fp") || ""; } switch (params.get("type")) { case "ws": if (params.get("security") !== "tls") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : ""; } document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_path')[0].value = params.get("path") ? decodeURIComponent(params.get("path")) : "/"; break; case "httpupgrade": if (params.get("security") !== "tls") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.httpupgrade_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : ""; } document.getElementsByName('cbid.shadowsocksr.' + sid + '.httpupgrade_path')[0].value = params.get("path") ? decodeURIComponent(params.get("path")) : "/"; break; case "xhttp": case "splithttp": document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_mode')[0].value = params.get("mode") || "auto"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_path')[0].value = params.get("path") ? decodeURIComponent(params.get("path")) : "/"; if (params.get("extra") && params.get("extra").trim() !== "") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra')[0].checked = true; // 设置 enable_xhttp_extra 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_extra')[0].value = params.get("extra") || ""; } break; case "kcp": document.getElementsByName('cbid.shadowsocksr.' + sid + '.kcp_guise')[0].value = params.get("headerType") || "none"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.seed')[0].value = params.get("seed") || ""; break; case "http": /* this is non-standard, bullshit */ case "h2": document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_path')[0].value = params.get("path") ? decodeURIComponent(params.get("path")) : ""; break; case "quic": document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_guise')[0].value = params.get("headerType") || "none"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_security')[0].value = params.get("quicSecurity") || "none"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_key')[0].value = params.get("key") || ""; break; case "grpc": document.getElementsByName('cbid.shadowsocksr.' + sid + '.serviceName')[0].value = params.get("serviceName") || ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.grpc_mode')[0].value = params.get("mode") || "gun"; break; case "raw": case "tcp": document.getElementsByName('cbid.shadowsocksr.' + sid + '.tcp_guise')[0].value = params.get("headerType") || "none"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.tcp_guise')[0].dispatchEvent(event); if (params.get("headerType") === "http") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.http_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : ""; document.getElementsByName('cbid.shadowsocksr.' + sid + '.http_path')[0].value = params.get("path") ? decodeURIComponent(params.get("path")) : ""; } break; } s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; } case "vmess": var sstr = b64DecodeUnicode((ssu[1] || "").replace(/#.*/, "").trim()); var ploc = sstr.indexOf("/?"); document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].value = "v2ray"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.type')[0].dispatchEvent(event); document.getElementsByName('cbid.shadowsocksr.' + sid + '.v2ray_protocol')[0].value = "vmess"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.v2ray_protocol')[0].dispatchEvent(event); var url0, param = ""; if (ploc > 0) { url0 = sstr.substr(0, ploc); param = sstr.substr(ploc + 2); } var ssm = JSON.parse(sstr); document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = ssm.ps; document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = ssm.add; document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = ssm.port; document.getElementsByName('cbid.shadowsocksr.' + sid + '.alter_id')[0].value = ssm.aid; document.getElementsByName('cbid.shadowsocksr.' + sid + '.vmess_id')[0].value = ssm.id; document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].value = (["xhttp", "splithttp"].includes(ssm.net) ? "xhttp" : (["tcp", "raw"].includes(ssm.net) ? "raw" : (ssm.net || "raw"))); document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].dispatchEvent(event); if (ssm.net === "raw" || ssm.net === "tcp") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tcp_guise')[0].value = ssm.type; document.getElementsByName('cbid.shadowsocksr.' + sid + '.tcp_guise')[0].dispatchEvent(event); if (ssm.type === "http") { 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; document.getElementsByName('cbid.shadowsocksr.' + sid + '.ws_path')[0].value = ssm.path; } if (ssm.net == "httpupgrade") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.httpupgrade_host')[0].value = ssm.host; document.getElementsByName('cbid.shadowsocksr.' + sid + '.httpupgrade_path')[0].value = ssm.path; } if (ssm.net == "xhttp" || ssm.net == "splithttp") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_mode')[0].value = ssm.mode || "auto"; document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_host')[0].value = ssm.host; document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_path')[0].value = ssm.path; if (ssm.extra !== "" && ssm.extra !== undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra')[0].checked = true; // 设置 enable_xhttp_extra 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.xhttp_extra')[0].value = ssm.extra; } } if (ssm.net == "h2") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_host')[0].value = ssm.host; document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_path')[0].value = ssm.path; } if (ssm.net == "quic") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_security')[0].value = ssm.securty; document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_key')[0].value = ssm.key; } if (ssm.net == "kcp") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.kcp_guise')[0].value = ssm.type; } if (ssm.tls == "tls") { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true; document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].dispatchEvent(event); if (ssm.fp !== "" && ssm.fp !== undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.fingerprint')[0].value = ssm.fp; } if (ssm.alpn !== "" && ssm.alpn !== undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_alpn')[0].value = ssm.alpn; } if (ssm.host !== "" && ssm.host !== undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = ssm.sni || ssm.host; } if (ssm.ech !== "" && ssm.ech !== undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_ech')[0].checked = true; // 设置 enable_ech 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.enable_ech')[0].dispatchEvent(event); // 触发事件 document.getElementsByName('cbid.shadowsocksr.' + sid + '.ech_config')[0].value = ssm.ech; } document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].checked = !!(ssm.allowInsecure ?? ssm.allowlnsecure ?? ssm['skip-cert-verify']); // 设置 insecure 为 true document.getElementsByName('cbid.shadowsocksr.' + sid + '.insecure')[0].dispatchEvent(event); // 触发事件 } if (ssm.mux !== undefined) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.mux')[0].checked = true; document.getElementsByName('cbid.shadowsocksr.' + sid + '.mux')[0].dispatchEvent(event); } s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; case "vless": try { var url = new URL("http://" + ssu[1]); var params = url.searchParams; } catch(e) { alert(e); return false; } // Check if the elements exist before trying to modify them function setElementValue(name, value) { const element = document.getElementsByName(name)[0]; if (element) { if (element.type === "checkbox" || element.type === "radio") { element.checked = value === true; } else { element.value = value; } } } function dispatchEventIfExists(name, event) { const element = document.getElementsByName(name)[0]; if (element) { element.dispatchEvent(event); } } setElementValue('cbid.shadowsocksr.' + sid + '.alias', url.hash ? decodeURIComponent(url.hash.slice(1)) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.type', "v2ray"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.type', event); setElementValue('cbid.shadowsocksr.' + sid + '.v2ray_protocol', "vless"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.v2ray_protocol', event); setElementValue('cbid.shadowsocksr.' + sid + '.server', url.hostname); setElementValue('cbid.shadowsocksr.' + sid + '.server_port', url.port || "80"); setElementValue('cbid.shadowsocksr.' + sid + '.vmess_id', url.username); setElementValue('cbid.shadowsocksr.' + sid + '.transport', params.get("type") === "http" ? "h2" : (["xhttp", "splithttp"].includes(params.get("type")) ? "xhttp" : (["tcp", "raw"].includes(params.get("type")) ? "raw" : (params.get("type") || "raw"))) ); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.transport', event); setElementValue('cbid.shadowsocksr.' + sid + '.vless_encryption', params.get("encryption") || "none"); if ([ "tls", "xtls", "reality" ].includes(params.get("security"))) { setElementValue('cbid.shadowsocksr.' + sid + '.' + params.get("security"), true); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.' + params.get("security"), event); if (params.get("security") === "tls") { if (params.get("ech") && params.get("ech").trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_ech', true); // 设置 enable_ech 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_ech', event); // 触发事件 setElementValue('cbid.shadowsocksr.' + sid + '.ech_config', params.get("ech") || ""); } if (params.get("allowInsecure") === "1") { setElementValue('cbid.shadowsocksr.' + sid + '.insecure', true); // 设置 insecure 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.insecure', event); // 触发事件 } } if (params.get("security") === "reality") { setElementValue('cbid.shadowsocksr.' + sid + '.reality_publickey', params.get("pbk") ? decodeURIComponent(params.get("pbk")) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.reality_shortid', params.get("sid") || ""); setElementValue('cbid.shadowsocksr.' + sid + '.reality_spiderx', params.get("spx") ? decodeURIComponent(params.get("spx")) : ""); if (params.get("pqv") && params.get("pqv").trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_mldsa65verify', true); // 设置 enable_mldsa65verify 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_mldsa65verify', event); // 触发事件 setElementValue('cbid.shadowsocksr.' + sid + '.reality_mldsa65verify', params.get("pqv") || ""); } } setElementValue('cbid.shadowsocksr.' + sid + '.tls_flow', params.get("flow") || "none"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.tls_flow', event); setElementValue('cbid.shadowsocksr.' + sid + '.tls_alpn', params.get("alpn") || ""); setElementValue('cbid.shadowsocksr.' + sid + '.fingerprint', params.get("fp") || ""); setElementValue('cbid.shadowsocksr.' + sid + '.tls_host', params.get("sni") || ""); } switch (params.get("type")) { case "ws": if (params.get("security") !== "tls") { setElementValue('cbid.shadowsocksr.' + sid + '.ws_host', params.get("host") ? decodeURIComponent(params.get("host")) : ""); } setElementValue('cbid.shadowsocksr.' + sid + '.ws_path', params.get("path") ? decodeURIComponent(params.get("path")) : "/"); break; case "httpupgrade": if (params.get("security") !== "tls") { setElementValue('cbid.shadowsocksr.' + sid + '.httpupgrade_host', params.get("host") ? decodeURIComponent(params.get("host")) : ""); } setElementValue('cbid.shadowsocksr.' + sid + '.httpupgrade_path', params.get("path") ? decodeURIComponent(params.get("path")) : "/"); break; case "xhttp": case "splithttp": if (params.get("security") !== "tls") { setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_host', params.get("host") ? decodeURIComponent(params.get("host")) : ""); } setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_mode', params.get("mode") || "auto"); setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_path', params.get("path") ? decodeURIComponent(params.get("path")) : "/"); if (params.get("extra") && params.get("extra").trim() !== "") { setElementValue('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra', true); // 设置 enable_xhttp_extra 为 true dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_xhttp_extra', event); // 触发事件 setElementValue('cbid.shadowsocksr.' + sid + '.xhttp_extra', params.get("extra") || ""); } break; case "kcp": setElementValue('cbid.shadowsocksr.' + sid + '.kcp_guise', params.get("headerType") || "none"); setElementValue('cbid.shadowsocksr.' + sid + '.seed', params.get("seed") || ""); break; case "http": /* this is non-standard, bullshit */ case "h2": setElementValue('cbid.shadowsocksr.' + sid + '.h2_host', params.get("host") ? decodeURIComponent(params.get("host")) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.h2_path', params.get("path") ? decodeURIComponent(params.get("path")) : ""); break; case "quic": setElementValue('cbid.shadowsocksr.' + sid + '.quic_guise', params.get("headerType") || "none"); setElementValue('cbid.shadowsocksr.' + sid + '.quic_security', params.get("quicSecurity") || "none"); setElementValue('cbid.shadowsocksr.' + sid + '.quic_key', params.get("key") || ""); break; case "grpc": setElementValue('cbid.shadowsocksr.' + sid + '.serviceName', params.get("serviceName") || ""); setElementValue('cbid.shadowsocksr.' + sid + '.grpc_mode', params.get("mode") || "gun"); break; case "tcp": case "raw": setElementValue('cbid.shadowsocksr.' + sid + '.tcp_guise', params.get("headerType") || "none"); dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.tcp_guise', event); if (params.get("headerType") === "http") { setElementValue('cbid.shadowsocksr.' + sid + '.http_host', params.get("host") ? decodeURIComponent(params.get("host")) : ""); setElementValue('cbid.shadowsocksr.' + sid + '.http_path', params.get("path") ? decodeURIComponent(params.get("path")) : ""); } break; } s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>"; return false; default: s.innerHTML = "<font style=\'color:red\'><%:Invalid format.%></font>"; return false; } } //]]> </script> <input type="button" class="btn cbi-button cbi-button-apply" value="<%:Import%>" onclick="return import_ssr_url(this, '<%=self.option%>', '<%=self.value%>')" /> <span id="<%=self.option%>-status"></span> <%+cbi/valuefooter%>
28harishkumar/blog
3,800
public/js/tinymce/plugins/textcolor/plugin.min.js
tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(){var b,c,d=[];for(c=a.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],b=0;b<c.length;b+=2)d.push({text:c[b+1],color:"#"+c[b]});return d}function d(){function b(a,b){var c="transparent"==a;return'<td class="mce-grid-cell'+(c?" mce-colorbtn-trans":"")+'"><div id="'+n+"-"+o++ +'" data-mce-color="'+(a?a:"")+'" role="option" tabIndex="-1" style="'+(a?"background-color: "+a:"")+'" title="'+tinymce.translate(b)+'">'+(c?"&#215;":"")+"</div></td>"}var d,e,f,g,h,k,l,m=this,n=m._id,o=0;for(d=c(),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',g=d.length-1,k=0;j>k;k++){for(f+="<tr>",h=0;i>h;h++)l=k*i+h,l>g?f+="<td></td>":(e=d[l],f+=b(e.color,e.text));f+="</tr>"}if(a.settings.color_picker_callback){for(f+='<tr><td colspan="'+i+'" class="mce-custom-color-btn"><div id="'+n+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+n+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+tinymce.translate("Custom...")+"</button></div></td></tr>",f+="<tr>",h=0;i>h;h++)f+=b("","Custom color");f+="</tr>"}return f+="</tbody></table>"}function e(b,c){a.undoManager.transact(function(){a.focus(),a.formatter.apply(b,{value:c}),a.nodeChanged()})}function f(b){a.undoManager.transact(function(){a.focus(),a.formatter.remove(b,{value:null},null,!0),a.nodeChanged()})}function g(c){function d(a){k.hidePanel(),k.color(a),e(k.settings.format,a)}function g(){k.hidePanel(),k.resetColor(),f(k.settings.format)}function h(a,b){a.style.background=b,a.setAttribute("data-mce-color",b)}var j,k=this.parent();tinymce.DOM.getParent(c.target,".mce-custom-color-btn")&&(k.hidePanel(),a.settings.color_picker_callback.call(a,function(a){var b,c,e,f=k.panel.getEl().getElementsByTagName("table")[0];for(b=tinymce.map(f.rows[f.rows.length-1].childNodes,function(a){return a.firstChild}),e=0;e<b.length&&(c=b[e],c.getAttribute("data-mce-color"));e++);if(e==i)for(e=0;i-1>e;e++)h(b[e],b[e+1].getAttribute("data-mce-color"));h(c,a),d(a)},b(k.settings.format))),j=c.target.getAttribute("data-mce-color"),j?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),c.target.setAttribute("aria-selected",!0),this.lastId=c.target.id,"transparent"==j?g():d(j)):null!==j&&k.hidePanel()}function h(){var a=this;a._color?e(a.settings.format,a._color):f(a.settings.format)}var i,j;j=a.settings.textcolor_rows||5,i=a.settings.textcolor_cols||8,a.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h}),a.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h})});
281677160/openwrt-package
4,672
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm
<div class="cbi-value" id="_backup_div"> <label class="cbi-value-title"><%:Create Backup File%></label> <div class="cbi-value-field"> <input class="btn cbi-button cbi-button-save" type="button" onclick="dl_backup()" value="<%:DL Backup%>" /> </div> </div> <div class="cbi-value" id="_upload_div"> <label class="cbi-value-title"><%:Restore Backup File%></label> <div class="cbi-value-field"> <input class="btn cbi-button cbi-button-apply" type="button" id="upload-btn" value="<%:RST Backup%>" /> </div> </div> <div class="cbi-value" id="_reset_div"> <label class="cbi-value-title"><%:Restore to default configuration%></label> <div class="cbi-value-field"> <input class="btn cbi-button cbi-button-remove" type="button" onclick="do_reset()" value="<%:Do Reset%>" /> </div> </div> <div id="upload-modal" class="up-modal" style="display:none;"> <div class="up-modal-content"> <h3><%:Restore Backup File%></h3> <div class="cbi-value" id="_upload_div"> <div class="up-cbi-value-field"> <input class="cbi-input-file" type="file" id="ulfile" name="ulfile" accept=".tar.gz" required /> <br /> <div class="up-button-container"> <input class="btn cbi-button cbi-button-apply" type="submit" value="<%:UL Restore%>" /> <input class="btn cbi-button cbi-button-remove" type="button" id="upload-close" value="<%:CLOSE WIN%>" /> </div> </div> </div> </div> </div> <style> .up-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; border: 2px solid #ccc; box-shadow: 0 0 10px rgba(0,0,0,0.5); z-index: 1000; } .up-modal-content { width: 100%; max-width: 400px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; } .up-button-container { display: flex; justify-content: space-between; width: 100%; max-width: 250px; } .up-cbi-value-field { display: flex; flex-direction: column; align-items: center; width: 100%; } </style> <script> // JavaScript 版本的 url 函数 function url(...args) { let url = "/cgi-bin/luci/admin/services/shadowsocksr"; for (let i = 0; i < args.length; i++) { if (args[i] !== "") { url += "/" + args[i]; } } return url; } // 上传按钮点击事件 document.getElementById("upload-btn").addEventListener("click", function() { document.getElementById("upload-modal").style.display = "block"; }); // 关闭上传模态框 document.getElementById("upload-close").addEventListener("click", function() { document.getElementById("upload-modal").style.display = "none"; }); // 备份下载函数 function dl_backup(btn) { fetch(url("backup"), { // 使用 JavaScript 版本的 url 函数 method: 'POST', credentials: 'same-origin' }) .then(response => { if (!response.ok) { throw new Error("备份失败!"); } const filename = response.headers.get("X-Backup-Filename"); if (!filename) { return; } return response.blob().then(blob => ({ blob, filename })); }) .then(result => { if (!result) return; const { blob, filename } = result; const url = window.URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); a.remove(); window.URL.revokeObjectURL(url); }) .catch(error => alert(error.message)); } // 恢复出厂设置 function do_reset(btn) { if (confirm("<%: Do you want to restore the client to default settings?%>")) { setTimeout(function () { if (confirm("<%: Are you sure you want to restore the client to default settings?%>")) { // 清理日志 var xhr1 = new XMLHttpRequest(); xhr1.open("GET", url("clear_log"), true); // 使用 JavaScript 版本的 url 函数 xhr1.send(); // 恢复出厂 var xhr2 = new XMLHttpRequest(); xhr2.open("GET", url("reset"), true); // 使用 JavaScript 版本的 url 函数 xhr2.send(); // 处理响应 xhr2.onload = function() { if (xhr2.status === 200) { window.location.href = url("reset"); } }; } }, 1000); } } </script>
28harishkumar/blog
9,971
public/js/tinymce/plugins/media/plugin.min.js
tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d<c.length;d++)if(-1!==b.indexOf(c[d].filter))return c[d]}function e(){function b(a){var b,c,f,g;b=d.find("#width")[0],c=d.find("#height")[0],f=b.value(),g=c.value(),d.find("#constrain")[0].checked()&&e&&j&&f&&g&&(a.control==b?(g=Math.round(f/e*g),isNaN(g)||c.value(g)):(f=Math.round(g/j*f),isNaN(f)||b.value(f))),e=f,j=g}function c(){k=h(this.value()),this.parent().parent().fromJSON(k)}var d,e,j,k,l=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onchange:function(a){tinymce.each(a.meta,function(a,b){d.find("#"+b).value(a)})}}];a.settings.media_alt_source!==!1&&l.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),a.settings.media_poster!==!1&&l.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),a.settings.media_dimensions!==!1&&l.push({type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),k=i(a.selection.getNode()),e=k.width,j=k.height;var n={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:f(),multiline:!0,label:"Source"};n[m]=c,d=a.windowManager.open({title:"Insert/edit video",data:k,bodyType:"tabpanel",body:[{title:"General",type:"form",onShowTab:function(){k=h(this.next().find("#embed").value()),this.fromJSON(k)},items:l},{title:"Embed",type:"panel",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,onShowTab:function(){this.find("#embed").value(g(this.parent().toJSON()))},items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},n]}],onSubmit:function(){var b,c,d,e;for(b=a.dom.select("img[data-mce-object]"),a.insertContent(g(this.toJSON())),c=a.dom.select("img[data-mce-object]"),d=0;d<b.length;d++)for(e=c.length-1;e>=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=a.convertURL(b+"/moxieplayer.swf","movie"),tinymce.each(l,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type?f+='<iframe src="'+e.source1+'" width="'+e.width+'" height="'+e.height+'"></iframe>':"application/x-shockwave-flash"==e.source1mime?(f+='<object data="'+e.source1+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">',e.poster&&(f+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),f+="</object>"):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='<audio controls="controls" src="'+e.source1+'">'+(e.source2?'\n<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</audio>":"script"==e.type?f+='<script src="'+e.source1+'"></script>':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source1+'"'+(e.source1mime?' type="'+e.source1mime+'"':"")+" />\n"+(e.source2?'<source src="'+e.source2+'"'+(e.source2mime?' type="'+e.source2mime+'"':"")+" />\n":"")+"</video>"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),("iframe"==a||"object"==a||"embed"==a||"video"==a||"audio"==a)&&(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){c.comment(a)},cdata:function(a){c.cdata(a)},text:function(a,b){c.text(a,b)},start:function(a,b,d){if("script"!=a&&"noscript"!=a){for(var e=0;e<b.length;e++)if(0===b[e].name.indexOf("on"))return;c.start(a,b,d)}},end:function(a){"script"!=a&&"noscript"!=a&&c.end(a)}},new tinymce.html.Schema({})).parse(b),c.getContent()}function k(a,b,c){function d(a,b){var c,d,e,f;for(c in b)if(e=""+b[c],a.map[c])for(d=a.length;d--;)f=a[d],f.name==c&&(e?(a.map[c]=e,f.value=e):(delete a.map[c],a.splice(d,1)));else e&&(a.push({name:c,value:e}),a.map[c]=e)}var e,f=new tinymce.html.Writer,g=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(a){f.comment(a)},cdata:function(a){f.cdata(a)},text:function(a,b){f.text(a,b)},start:function(a,h,i){switch(a){case"video":case"object":case"embed":case"img":case"iframe":d(h,{width:b.width,height:b.height})}if(c)switch(a){case"video":d(h,{poster:b.poster,src:""}),b.source2&&d(h,{src:""});break;case"iframe":d(h,{src:b.source1});break;case"source":if(g++,2>=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}var l=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"'}],m=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("</"+a+"[^>]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b,c){for(var e,f,g,h,i,j,k,l,m=b.length;m--;)if(f=b[m],f.parent&&("script"!=f.name||(l=d(f.attr("src"))))){for(g=new tinymce.html.Node("img",1),g.shortEnded=!0,l&&(l.width&&f.attr("width",l.width.toString()),l.height&&f.attr("height",l.height.toString())),j=f.attributes,e=j.length;e--;)h=j[e].name,i=j[e].value,"width"!==h&&"height"!==h&&"style"!==h&&(("data"==h||"src"==h)&&(i=a.convertURL(i,h)),g.attr("data-mce-p-"+h,i));k=f.firstChild&&f.firstChild.value,k&&(g.attr("data-mce-html",escape(k)),g.firstChild=null),g.attr({width:f.attr("width")||"300",height:f.attr("height")||("audio"==c?"30":"150"),style:f.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),f.replace(g)}}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k=a.length;k--;)if(c=a[k],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&d.attr({width:c.attr("width"),height:c.attr("height")}),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var l=f[e].name;0===l.indexOf("data-mce-p-")&&d.attr(l.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");("audio"==b||"script"==b)&&a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0})});
2929004360/ruoyi-sign
4,084
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
package com.ruoyi.web.controller.system; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.service.ISysPostService; /** * 岗位信息操作处理 * * @author ruoyi */ @RestController @RequestMapping("/system/post") public class SysPostController extends BaseController { @Autowired private ISysPostService postService; /** * 获取岗位列表 */ @PreAuthorize("@ss.hasPermi('system:post:list')") @GetMapping("/list") public TableDataInfo list(SysPost post) { startPage(); List<SysPost> list = postService.selectPostList(post); return getDataTable(list); } @Log(title = "岗位管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:post:export')") @PostMapping("/export") public void export(HttpServletResponse response, SysPost post) { List<SysPost> list = postService.selectPostList(post); ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class); util.exportExcel(response, list, "岗位数据"); } /** * 根据岗位编号获取详细信息 */ @PreAuthorize("@ss.hasPermi('system:post:query')") @GetMapping(value = "/{postId}") public AjaxResult getInfo(@PathVariable Long postId) { return success(postService.selectPostById(postId)); } /** * 新增岗位 */ @PreAuthorize("@ss.hasPermi('system:post:add')") @Log(title = "岗位管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysPost post) { if (!postService.checkPostNameUnique(post)) { return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在"); } else if (!postService.checkPostCodeUnique(post)) { return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在"); } post.setCreateBy(getUsername()); return toAjax(postService.insertPost(post)); } /** * 修改岗位 */ @PreAuthorize("@ss.hasPermi('system:post:edit')") @Log(title = "岗位管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysPost post) { if (!postService.checkPostNameUnique(post)) { return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在"); } else if (!postService.checkPostCodeUnique(post)) { return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在"); } post.setUpdateBy(getUsername()); return toAjax(postService.updatePost(post)); } /** * 删除岗位 */ @PreAuthorize("@ss.hasPermi('system:post:remove')") @Log(title = "岗位管理", businessType = BusinessType.DELETE) @DeleteMapping("/{postIds}") public AjaxResult remove(@PathVariable Long[] postIds) { return toAjax(postService.deletePostByIds(postIds)); } /** * 获取岗位选择框列表 */ @GetMapping("/optionselect") public AjaxResult optionselect() { List<SysPost> posts = postService.selectPostAll(); return success(posts); } }
2929004360/ruoyi-sign
4,613
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
package com.ruoyi.web.controller.system; import cn.binarywang.wx.miniapp.api.WxMaService; import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.SysMenu; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginBody; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.domain.model.WechatLogin; import com.ruoyi.common.sign.RsaUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.framework.web.service.SysLoginService; import com.ruoyi.framework.web.service.SysPermissionService; import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysMenuService; import me.chanjar.weixin.common.error.WxErrorException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import java.util.List; import java.util.Set; /** * 登录验证 * * @author ruoyi */ @RestController @Validated public class SysLoginController { @Autowired private SysLoginService loginService; @Autowired private ISysMenuService menuService; @Autowired private SysPermissionService permissionService; @Autowired private TokenService tokenService; @Autowired private WxMaService wxMaService; @Autowired private RuoYiConfig ruoYiConfig; @Autowired private ISysConfigService configService; /** * 登录方法 * * @param loginBody 登录信息 * @return 结果 */ @PostMapping("/login") public AjaxResult login(@RequestBody LoginBody loginBody) throws Exception { if(Boolean.parseBoolean(configService.selectConfigByKey("sys_public_demonstrate")) && !Constants.SUPER_ADMIN.equals(loginBody.getUsername())) { if (!ruoYiConfig.getPublicCode().equals(loginBody.getPublicCode())) { return AjaxResult.error("公众号code错误,请关注ruoyi-wvp公众号获取正确的公众号code"); } } AjaxResult ajax = AjaxResult.success(); // 生成令牌 String token = loginService.login(loginBody.getUsername(), RsaUtils.decryptByPrivateKey(loginBody.getPassword()), loginBody.getCode(), loginBody.getUuid()); ajax.put(Constants.TOKEN, token); return ajax; } /** * 获取用户信息 * * @return 用户信息 */ @GetMapping("getInfo") public AjaxResult getInfo() { LoginUser loginUser = SecurityUtils.getLoginUser(); SysUser user = loginUser.getUser(); // 角色集合 Set<String> roles = permissionService.getRolePermission(user); // 权限集合 Set<String> permissions = permissionService.getMenuPermission(user); if (!loginUser.getPermissions().equals(permissions)) { loginUser.setPermissions(permissions); tokenService.refreshToken(loginUser); } AjaxResult ajax = AjaxResult.success(); ajax.put("user", user); ajax.put("roles", roles); ajax.put("permissions", permissions); return ajax; } /** * 获取路由信息 * * @return 路由信息 */ @GetMapping("getRouters") public AjaxResult getRouters() { Long userId = SecurityUtils.getUserId(); List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId); return AjaxResult.success(menuService.buildMenus(menus)); } /** * 微信登录 * * @param wechatLogin 微信登录参数 * @return */ @PostMapping("/wechatLogin") public AjaxResult wechatLogin(@RequestBody WechatLogin wechatLogin) throws WxErrorException { // 调用微信小程序服务,获取jscode对应的session信息 WxMaJscode2SessionResult wxMaJscode2SessionResult = wxMaService.jsCode2SessionInfo(wechatLogin.getCode()); // 调用微信小程序服务,获取用户手机号信息 WxMaPhoneNumberInfo phoneInfo = wxMaService.getUserService().getPhoneNoInfo(wxMaJscode2SessionResult.getSessionKey(), wechatLogin.getEncryptedData(), wechatLogin.getIv()); // 获取用户手机号 String purePhoneNumber = phoneInfo.getPurePhoneNumber(); // 返回用户手机号 return AjaxResult.success(purePhoneNumber); } }
28harishkumar/blog
4,232
public/js/tinymce/plugins/template/plugin.min.js
tinymce.PluginManager.add("template",function(a){function b(b){return function(){var c=a.settings.templates;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):b(c)}}function c(b){function c(b){function c(b){if(-1==b.indexOf("<html>")){var c="";tinymce.each(a.contentCSS,function(b){c+='<link type="text/css" rel="stylesheet" href="'+a.documentBaseURI.toAbsolute(b)+'">'}),b="<!DOCTYPE html><html><head>"+c+"</head><body>"+b+"</body></html>"}b=f(b,"template_preview_replace_values");var e=d.find("iframe")[0].getEl().contentWindow.document;e.open(),e.write(b),e.close()}var g=b.control.value();g.url?tinymce.util.XHR.send({url:g.url,success:function(a){e=a,c(e)}}):(e=g.content,c(e)),d.find("#description")[0].text(b.control.value().description)}var d,e,h=[];return b&&0!==b.length?(tinymce.each(b,function(a){h.push({selected:!h.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),d=a.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:h,onselect:c}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){g(!1,e)},width:a.getParam("template_popup_width",600),height:a.getParam("template_popup_height",500)}),void d.find("listbox")[0].fire("select")):void a.windowManager.alert("No templates defined")}function d(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}var e="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),g="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),h="January February March April May June July August September October November December".split(" ");return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(h[c.getMonth()])),b=b.replace("%b",""+a.translate(g[c.getMonth()])),b=b.replace("%A",""+a.translate(f[c.getDay()])),b=b.replace("%a",""+a.translate(e[c.getDay()])),b=b.replace("%%","%")}function e(b){var c=a.dom,d=a.getParam("template_replace_values");h(c.select("*",b),function(a){h(d,function(b,e){c.hasClass(a,e)&&"function"==typeof d[e]&&d[e](a)})})}function f(b,c){return h(a.getParam(c),function(a,c){"function"!=typeof a&&(b=b.replace(new RegExp("\\{\\$"+c+"\\}","g"),a))}),b}function g(b,c){function g(a,b){return new RegExp("\\b"+b+"\\b","g").test(a.className)}var i,j,k=a.dom,l=a.selection.getContent();c=f(c,"template_replace_values"),i=k.create("div",null,c),j=k.select(".mceTmpl",i),j&&j.length>0&&(i=k.create("div",null),i.appendChild(j[0].cloneNode(!0))),h(k.select("*",i),function(b){g(b,a.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_cdate_format",a.getLang("template.cdate_format")))),g(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format")))),g(b,a.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(b.innerHTML=l)}),e(i),a.execCommand("mceInsertContent",!1,i.innerHTML),a.addVisual()}var h=tinymce.each;a.addCommand("mceInsertTemplate",g),a.addButton("template",{title:"Insert template",onclick:b(c)}),a.addMenuItem("template",{text:"Insert template",onclick:b(c),context:"insert"}),a.on("PreProcess",function(b){var c=a.dom;h(c.select("div",b.node),function(b){c.hasClass(b,"mceTmpl")&&(h(c.select("*",b),function(b){c.hasClass(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format"))))}),e(b))})})});
281677160/openwrt-package
1,121
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm
<%+cbi/valueheader%> <script type="text/javascript">//<![CDATA[ function refresh_data(btn,dataname) { btn.disabled = true; btn.value = '<%:Refresh...%> '; murl=dataname; XHR.get('<%=luci.dispatcher.build_url("admin", "services", "shadowsocksr","refresh")%>', { set:murl }, function(x,rv) { var s = document.getElementById(dataname+'-status'); if (s) { switch (rv.ret) { case 0: s.innerHTML ="<font style=\'color:green\'>"+"<%:Refresh OK!%> "+"<%:Total Records:%>"+rv.retcount+"</font>"; break; case 1: s.innerHTML ="<font style=\'color:green\'>"+"<%:No new data!%> "+"</font>"; break; default: s.innerHTML ="<font style=\'color:red\'>"+"<%:Refresh Error!%> "+"</font>"; break; } } btn.disabled = false; btn.value = '<%:Refresh Data %>'; } ); return false; } //]]></script> <input type="button" class="btn cbi-button cbi-button-reload" value="<%:Refresh Data%> " onclick="return refresh_data(this,'<%=self.option%>')" /> <span id="<%=self.option%>-status"><em><%=self.value%></em></span> <%+cbi/valuefooter%>
2929004360/ruoyi-sign
2,955
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
package com.ruoyi.web.controller.common; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.annotation.Resource; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.FastByteArrayOutputStream; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import com.google.code.kaptcha.Producer; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.sign.Base64; import com.ruoyi.common.utils.uuid.IdUtils; import com.ruoyi.system.service.ISysConfigService; /** * 验证码操作处理 * * @author ruoyi */ @RestController public class CaptchaController { @Resource(name = "captchaProducer") private Producer captchaProducer; @Resource(name = "captchaProducerMath") private Producer captchaProducerMath; @Autowired private RedisCache redisCache; @Autowired private ISysConfigService configService; /** * 生成验证码 */ @GetMapping("/captchaImage") public AjaxResult getCode(HttpServletResponse response) throws IOException { AjaxResult ajax = AjaxResult.success(); boolean captchaEnabled = configService.selectCaptchaEnabled(); ajax.put("captchaEnabled", captchaEnabled); if (!captchaEnabled) { return ajax; } // 保存验证码信息 String uuid = IdUtils.simpleUUID(); String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid; String capStr = null, code = null; BufferedImage image = null; // 生成验证码 String captchaType = RuoYiConfig.getCaptchaType(); if ("math".equals(captchaType)) { String capText = captchaProducerMath.createText(); capStr = capText.substring(0, capText.lastIndexOf("@")); code = capText.substring(capText.lastIndexOf("@") + 1); image = captchaProducerMath.createImage(capStr); } else if ("char".equals(captchaType)) { capStr = code = captchaProducer.createText(); image = captchaProducer.createImage(capStr); } redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); // 转换流信息写出 FastByteArrayOutputStream os = new FastByteArrayOutputStream(); try { ImageIO.write(image, "jpg", os); } catch (IOException e) { return AjaxResult.error(e.getMessage()); } ajax.put("uuid", uuid); ajax.put("img", Base64.encode(os.toByteArray())); return ajax; } }
2929004360/ruoyi-sign
10,497
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
package com.ruoyi.web.controller.common; import cn.hutool.core.io.FileUtil; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.FileSuffix; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.exception.file.FileNameLengthLimitExceededException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.file.MimeTypeUtils; import com.ruoyi.framework.config.ServerConfig; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.io.IOUtils; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage; import org.jodconverter.DocumentConverter; import org.jodconverter.document.DefaultDocumentFormatRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.commons.CommonsMultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.UUID; /** * 通用请求处理 * * @author ruoyi */ @RestController @RequestMapping("/common") public class CommonController { private static final Logger log = LoggerFactory.getLogger(CommonController.class); @Autowired private ServerConfig serverConfig; private static final String FILE_DELIMETER = ","; @Resource private DocumentConverter documentConverter; /** * 通用下载请求 * * @param fileName 文件名称 * @param delete 是否删除 */ @PostMapping("/download") public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) { try { if (!FileUtils.checkAllowDownload(fileName)) { throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName)); } String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); String filePath = RuoYiConfig.getDownloadPath() + fileName; response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); FileUtils.setAttachmentResponseHeader(response, realFileName); FileUtils.writeBytes(filePath, response.getOutputStream()); if (delete) { FileUtils.deleteFile(filePath); } } catch (Exception e) { log.error("下载文件失败", e); } } /** * 通用上传请求(单个) */ @PostMapping("/upload") public AjaxResult uploadFile(MultipartFile file) throws Exception { try { // 上传文件路径 String filePath = RuoYiConfig.getUploadPath(); // 上传并返回新文件名称 String fileName = FileUploadUtils.upload(filePath, file); String url = serverConfig.getUrl() + fileName; AjaxResult ajax = AjaxResult.success(); ajax.put("url", url); ajax.put("fileName", fileName); ajax.put("newFileName", FileUtils.getName(fileName)); ajax.put("originalFilename", file.getOriginalFilename()); return ajax; } catch (Exception e) { return AjaxResult.error(e.getMessage()); } } /** * 通用上传请求(多个) */ @PostMapping("/uploads") public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception { try { // 上传文件路径 String filePath = RuoYiConfig.getUploadPath(); List<String> urls = new ArrayList<String>(); List<String> fileNames = new ArrayList<String>(); List<String> newFileNames = new ArrayList<String>(); List<String> originalFilenames = new ArrayList<String>(); for (MultipartFile file : files) { // 上传并返回新文件名称 String fileName = FileUploadUtils.upload(filePath, file); String url = serverConfig.getUrl() + fileName; urls.add(url); fileNames.add(fileName); newFileNames.add(FileUtils.getName(fileName)); originalFilenames.add(file.getOriginalFilename()); } AjaxResult ajax = AjaxResult.success(); ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER)); ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER)); ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER)); ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER)); return ajax; } catch (Exception e) { return AjaxResult.error(e.getMessage()); } } /** * 本地资源通用下载 */ @PostMapping("/download/resource") public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response) throws Exception { try { if (!FileUtils.checkAllowDownload(resource)) { throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource)); } // 本地资源路径 String localPath = RuoYiConfig.getProfile(); // 数据库资源地址 String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX); // 下载名称 String downloadName = StringUtils.substringAfterLast(downloadPath, "/"); response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); FileUtils.setAttachmentResponseHeader(response, downloadName); FileUtils.writeBytes(downloadPath, response.getOutputStream()); } catch (Exception e) { log.error("下载文件失败", e); } } /** * 签章文件上传 */ @PostMapping("/pdf/upload") public AjaxResult uploadPdfFile(MultipartFile file) throws Exception { try { // 获取文件名长度 int fileNameLength = Objects.requireNonNull(file.getOriginalFilename()).length(); // 如果文件名长度超过默认长度,抛出异常 if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); } // 上传文件路径 String filePath = RuoYiConfig.getUploadPath(); // 检查文件类型是否允许上传 FileUploadUtils.assertAllowed(file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); // 获取文件后缀名 String fileSuffix = Objects.requireNonNull(file.getOriginalFilename()).substring(file.getOriginalFilename().lastIndexOf(".") + 1); // 提取文件名 String fileName = FileUploadUtils.extractFilename(file); // 获取文件绝对路径 String absPath = FileUploadUtils.getAbsoluteFile(filePath, fileName).getAbsolutePath(); // 将文件保存到指定路径 file.transferTo(Paths.get(absPath)); // 判断是否是图片文件 转为PDF格式 if (!FileSuffix.PDF.equals(fileSuffix)) { String path = absPath.substring(0, absPath.lastIndexOf(".") + 1) + "pdf"; File rename = FileUtil.rename(new File(absPath), UUID.randomUUID() + "." + fileSuffix, true); documentConverter.convert(rename).to(new File(path)).as(DefaultDocumentFormatRegistry.PDF).execute(); String newFileName = FileUploadUtils.extractFilename(fileToMultipartFile(new File(path))); rename.delete(); return getPdfData(path, getPathFileName(filePath, newFileName), new File(path).getName(), serverConfig.getUrl() + getPathFileName(filePath, fileName)); } return getPdfData(absPath, getPathFileName(filePath, fileName), file.getOriginalFilename(), serverConfig.getUrl() + getPathFileName(filePath, fileName)); } catch (Exception e) { return AjaxResult.error(e.getMessage()); } } public MultipartFile fileToMultipartFile(File file) { FileItem item = new DiskFileItemFactory().createItem("file", MediaType.MULTIPART_FORM_DATA_VALUE, true, file.getName()); try (InputStream input = new FileInputStream(file); OutputStream os = item.getOutputStream()) { // 流转移 IOUtils.copy(input, os); } catch (Exception e) { throw new IllegalArgumentException("Invalid file: " + e, e); } return new CommonsMultipartFile(item); } public AjaxResult getPdfData(String filePath, String fileName, String originalFilename, String url) { AjaxResult ajax = AjaxResult.success(); File file = new File(filePath); try (PDDocument document = PDDocument.load(file)) { int pageCount = document.getNumberOfPages(); ajax.put("pages", pageCount); ajax.put("url", url); ajax.put("fileName", fileName); ajax.put("newFileName", FileUtils.getName(fileName)); ajax.put("originalFilename", originalFilename); List<Float> widthList = new ArrayList<>(); List<Float> heightList = new ArrayList<>(); for (int i = 0; i < pageCount; i++) { PDPage page = document.getPage(i); float width = page.getMediaBox().getWidth(); float height = page.getMediaBox().getHeight(); widthList.add(width); heightList.add(height); } ajax.put("width", widthList); ajax.put("height", heightList); } catch (IOException e) { e.printStackTrace(); } return ajax; } public static String getPathFileName(String uploadDir, String fileName) throws IOException { int dirLastIndex = RuoYiConfig.getProfile().length() + 1; String currentDir = StringUtils.substring(uploadDir, dirLastIndex); return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; } }
28harishkumar/blog
2,754
public/js/tinymce/plugins/jbimages/js/dialog.js
/** * Justboil.me - a TinyMCE image upload plugin * jbimages/js/dialog.js * * Released under Creative Commons Attribution 3.0 Unported License * * License: http://creativecommons.org/licenses/by/3.0/ * Plugin info: http://justboil.me/ * Author: Viktor Kuzhelnyi * * Version: 2.3 released 23/06/2013 */ tinyMCEPopup.requireLangPack(); var jbImagesDialog = { resized : false, iframeOpened : false, timeoutStore : false, init : function() { document.getElementById("upload_target").src += '/' + tinyMCEPopup.getLang('jbimages_dlg.lang_id', 'english'); if (navigator.userAgent.indexOf('Opera') > -1) { document.getElementById("close_link").style.display = 'block'; } }, inProgress : function() { document.getElementById("upload_infobar").style.display = 'none'; document.getElementById("upload_additional_info").innerHTML = ''; document.getElementById("upload_form_container").style.display = 'none'; document.getElementById("upload_in_progress").style.display = 'block'; this.timeoutStore = window.setTimeout(function(){ document.getElementById("upload_additional_info").innerHTML = tinyMCEPopup.getLang('jbimages_dlg.longer_than_usual', 0) + '<br />' + tinyMCEPopup.getLang('jbimages_dlg.maybe_an_error', 0) + '<br /><a href="#" onClick="jbImagesDialog.showIframe()">' + tinyMCEPopup.getLang('jbimages_dlg.view_output', 0) + '</a>'; tinyMCEPopup.editor.windowManager.resizeBy(0, 30, tinyMCEPopup.id); }, 20000); }, showIframe : function() { if (this.iframeOpened == false) { document.getElementById("upload_target").className = 'upload_target_visible'; tinyMCEPopup.editor.windowManager.resizeBy(0, 190, tinyMCEPopup.id); this.iframeOpened = true; } }, uploadFinish : function(result) { if (result.resultCode == 'failed') { window.clearTimeout(this.timeoutStore); document.getElementById("upload_in_progress").style.display = 'none'; document.getElementById("upload_infobar").style.display = 'block'; document.getElementById("upload_infobar").innerHTML = result.result; document.getElementById("upload_form_container").style.display = 'block'; if (this.resized == false) { tinyMCEPopup.editor.windowManager.resizeBy(0, 30, tinyMCEPopup.id); this.resized = true; } } else { document.getElementById("upload_in_progress").style.display = 'none'; document.getElementById("upload_infobar").style.display = 'block'; document.getElementById("upload_infobar").innerHTML = tinyMCEPopup.getLang('jbimages_dlg.upload_complete', 0); tinyMCEPopup.editor.execCommand('mceInsertContent', false, '<img src="' + result.filename +'" />'); tinyMCEPopup.close(); } } }; tinyMCEPopup.onInit.add(jbImagesDialog.init, jbImagesDialog);
28harishkumar/blog
2,796
public/js/tinymce/plugins/jbimages/js/dialog-v4.js
/** * Justboil.me - a TinyMCE image upload plugin * jbimages/js/dialog-v4.js * * Released under Creative Commons Attribution 3.0 Unported License * * License: http://creativecommons.org/licenses/by/3.0/ * Plugin info: http://justboil.me/ * Author: Viktor Kuzhelnyi * * Version: 2.3 released 23/06/2013 */ var jbImagesDialog = { resized : false, iframeOpened : false, timeoutStore : false, inProgress : function() { document.getElementById("upload_infobar").style.display = 'none'; document.getElementById("upload_additional_info").innerHTML = ''; document.getElementById("upload_form_container").style.display = 'none'; document.getElementById("upload_in_progress").style.display = 'block'; this.timeoutStore = window.setTimeout(function(){ document.getElementById("upload_additional_info").innerHTML = 'This is taking longer than usual.' + '<br />' + 'An error may have occurred.' + '<br /><a href="#" onClick="jbImagesDialog.showIframe()">' + 'View script\'s output' + '</a>'; // tinyMCEPopup.editor.windowManager.resizeBy(0, 30, tinyMCEPopup.id); }, 20000); }, showIframe : function() { if (this.iframeOpened == false) { document.getElementById("upload_target").className = 'upload_target_visible'; // tinyMCEPopup.editor.windowManager.resizeBy(0, 190, tinyMCEPopup.id); this.iframeOpened = true; } }, uploadFinish : function(result) { if (result.resultCode == 'failed') { window.clearTimeout(this.timeoutStore); document.getElementById("upload_in_progress").style.display = 'none'; document.getElementById("upload_infobar").style.display = 'block'; document.getElementById("upload_infobar").innerHTML = result.result; document.getElementById("upload_form_container").style.display = 'block'; if (this.resized == false) { // tinyMCEPopup.editor.windowManager.resizeBy(0, 30, tinyMCEPopup.id); this.resized = true; } } else { document.getElementById("upload_in_progress").style.display = 'none'; document.getElementById("upload_infobar").style.display = 'block'; document.getElementById("upload_infobar").innerHTML = 'Upload Complete'; var w = this.getWin(); tinymce = w.tinymce; tinymce.EditorManager.activeEditor.insertContent('<img src="' + result.filename +'">'); this.close(); } }, getWin : function() { return (!window.frameElement && window.dialogArguments) || opener || parent || top; }, close : function() { var t = this; // To avoid domain relaxing issue in Opera function close() { tinymce.EditorManager.activeEditor.windowManager.close(window); tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup }; if (tinymce.isOpera) this.getWin().setTimeout(close, 0); else close(); } };
281677160/openwrt-package
4,618
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm
<%# Copyright 2018-2019 Lienol <lawlienol@gmail.com> Licensed to the public under the Apache License 2.0. -%> <script type="text/javascript"> //<![CDATA[ window.addEventListener('load', function () { const doms = document.getElementsByClassName('pingtime'); const ports = document.getElementsByClassName("socket-connected"); const transports = document.getElementsByClassName("transport"); const wsPaths = document.getElementsByClassName("wsPath"); const tlss = document.getElementsByClassName("tls"); const xhr = (index) => { return new Promise((res) => { const dom = doms[index]; const port = ports[index]; const transport = transports[index]; const wsPath = wsPaths[index]; const tls = tlss[index]; if (!dom) res(); port.innerHTML = '<font style=\"color:#0072c3\">connect</font>'; XHR.get('<%=luci.dispatcher.build_url("admin/services/shadowsocksr/ping")%>', { index, domain: dom.getAttribute("hint"), port: port.getAttribute("hint"), transport: transport.getAttribute("hint"), wsPath: wsPath.getAttribute("hint"), tls: tls.getAttribute("hint") }, (x, result) => { let col = '#ff0000'; if (result.ping) { if (result.ping < 300) col = '#ff3300'; if (result.ping < 200) col = '#ff7700'; if (result.ping < 100) col = '#249400'; } dom.innerHTML = `<font style=\"color:${col}\">${(result.ping ? result.ping : "--") + " ms"}</font>`; if (result.socket) { port.innerHTML = '<font style=\"color:#249400\">ok</font>'; } else { port.innerHTML = '<font style=\"color:#ff0000\">fail</font>'; } res(); }); }); }; let task = -1; const thread = () => { task = task + 1; if (doms[task]) { xhr(task).then(thread); } }; for (let i = 0; i < 20; i++) { thread(); } }); function cbi_row_drop(fromId, toId, store, isToBottom) { var fromNode = document.getElementById(fromId); var toNode = document.getElementById(toId); if (!fromNode || !toNode) return false; var table = fromNode.parentNode; while (table && table.nodeName.toLowerCase() != "table") table = table.parentNode; if (!table) return false; var ids = []; if (isToBottom) { toNode.parentNode.appendChild(fromNode); } else { fromNode.parentNode.insertBefore(fromNode, toNode); } for (var idx = 2; idx < table.rows.length; idx++) { table.rows[idx].className = table.rows[idx].className.replace( /cbi-rowstyle-[12]/, "cbi-rowstyle-" + (1 + (idx % 2)) ); if (table.rows[idx].id && table.rows[idx].id.match(/-([^\-]+)$/)) ids.push(RegExp.$1); } var input = document.getElementById(store); if (input) input.value = ids.join(" "); return false; } // set tr draggable function enableDragForTable(table_selector, store) { // 添加 CSS 样式 const style = document.createElement("style"); style.textContent = ` tr[draggable="true"] { cursor: move; user-select: none; } `; document.head.appendChild(style); var trs = document.querySelectorAll(table_selector + " tr"); if (!trs || trs.length.length < 3) { return; } function ondragstart(ev) { ev.dataTransfer.setData("Text", ev.target.id); } function ondrop(ev) { var from = ev.dataTransfer.getData("Text"); cbi_row_drop(from, this.id, store); } function ondragover(ev) { ev.preventDefault(); ev.dataTransfer.dropEffect = "move"; } function moveToTop(id) { var top = document.querySelectorAll(table_selector + " tr")[2]; cbi_row_drop(id, top.id, store); } function moveToBottom(id) { //console.log('moveToBottom:', id); var trList = document.querySelectorAll(table_selector + " tr"); var bottom = trList[trList.length - 1]; cbi_row_drop(id, bottom.id, store, true); } for (let index = 2; index < trs.length; index++) { const el = trs[index]; el.setAttribute("draggable", true); el.ondragstart = ondragstart; el.ondrop = ondrop; el.ondragover = ondragover; // reset the behaviors of the btns var upBtns = el.querySelectorAll(".cbi-button.cbi-button-up"); if (upBtns && upBtns.length > 0) { upBtns.forEach(function (_el) { _el.onclick = function () { moveToTop(el.id); }; }); } var downBtns = el.querySelectorAll(".cbi-button.cbi-button-down"); if (downBtns && downBtns.length > 0) { downBtns.forEach(function (_el) { _el.onclick = function () { moveToBottom(el.id); }; }); } } } // enable enableDragForTable( "#cbi-shadowsocksr-servers table", "cbi.sts.shadowsocksr.servers" ); //]]> </script>
2929004360/ruoyi-sign
8,461
ruoyi-admin/src/main/java/com/ruoyi/web/controller/work/PdfController.java
package com.ruoyi.web.controller.work; import cn.hutool.core.io.resource.ResourceUtil; import com.alibaba.fastjson2.JSON; import com.itextpdf.text.pdf.PdfReader; import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.redis.RedisLock; import com.ruoyi.common.exception.file.FileUploadException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.work.config.PdfSignatureConfig; import com.ruoyi.work.domain.KeywordInfo; import com.ruoyi.work.domain.Stamp; import com.ruoyi.work.service.IPdfService; import com.ruoyi.work.utils.PdfUtils; import com.ruoyi.work.utils.TransparentImageUtils; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.rendering.PDFRenderer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotBlank; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * 操作pdf盖章 * * @author fengcheng */ @RestController @RequestMapping("/file/pdf") @Validated public class PdfController extends BaseController { @Autowired private IPdfService pdfService; @Autowired private RedisLock redisLock; @Autowired private PdfSignatureConfig pdfSignatureConfig; private static final String PDF_COUNTERSIGN = "pdf_countersign"; /** * 完成盖章和签名 * * @param stampList * @return */ @PostMapping("/complete") public AjaxResult complete(@RequestBody List<Stamp> stampList) { redisLock.lock(PDF_COUNTERSIGN); try { pdfService.completeStamp(stampList); } finally { redisLock.unlock(PDF_COUNTERSIGN); } return AjaxResult.success(); } /** * 完成加盖骑缝章 * * @return */ @PostMapping("/completeRidingSeal") public AjaxResult completeRidingSeal(@RequestBody Stamp stamp) throws IOException { boolean b; // 获取pdf文件路径 String localPath = RuoYiConfig.getProfile(); String pathPdf = StringUtils.substringAfter(stamp.getFilePath(), Constants.RESOURCE_PREFIX); String inputPdfPathPdf = localPath + pathPdf; String outPdfPathPdf = localPath + "/temp" + pathPdf; // 获取章图片路径 String inputPdfPathSura = localPath + StringUtils.substringAfter(stamp.getImagesUrl(), Constants.RESOURCE_PREFIX); PdfSignatureConfig pdfSignatureConfig1 = new PdfSignatureConfig( ResourceUtil.getStream(pdfSignatureConfig.getPath()), pdfSignatureConfig.getPassword(), pdfSignatureConfig.getName(), pdfSignatureConfig.getPhone(), pdfSignatureConfig.getPlace(), pdfSignatureConfig.getCause()); redisLock.lock(PDF_COUNTERSIGN); try { b = PdfUtils.generatePagingSeal(pdfSignatureConfig1, inputPdfPathPdf, outPdfPathPdf, inputPdfPathSura, stamp.getX(), stamp.getY(), stamp.getWidth(), stamp.getHeight(), localPath); } finally { redisLock.unlock(PDF_COUNTERSIGN); } return toAjax(b); } /** * 通过关键字获取xy * * @param filePath 文档id * @param keyword 关键字 * @return Result */ @GetMapping("/keyword") public AjaxResult getSealLocation(String filePath, String keyword) { // 本地资源路径 String localPath = RuoYiConfig.getProfile(); // 数据库资源地址 String loadPath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX); try (InputStream io = Files.newInputStream(Paths.get(loadPath))) { List<KeywordInfo> list = pdfService.getSealLocation(new PdfReader(io), keyword); return AjaxResult.success(list); } catch (Exception e) { return AjaxResult.error(e.getMessage()); } } /** * 生成骑缝章图片 * * @param suraImg 印章路径 * @param page pdf总页数 * @return */ @GetMapping("/generatePagingSeal") public AjaxResult generatePagingSeal(String suraImg, int page) { // 本地资源路径 String localPath = RuoYiConfig.getProfile(); // 数据库资源地址 String loadPath = localPath + StringUtils.substringAfter(suraImg, Constants.RESOURCE_PREFIX); List<HashMap<String, Object>> map = new ArrayList<>(); // 获取文件后缀 String fileExtension = FileUploadUtils.getFileExtension(loadPath); String name = new File(loadPath).getName(); String nameWithoutExtension = name.substring(0, name.lastIndexOf(".")); try { BufferedImage[] images = PdfUtils.getImage(loadPath, page, null, null); for (int i = 0; i < page; i++) { HashMap<String, Object> hashMap = new HashMap<String, Object>(16); BufferedImage image = images[i]; String filePath = localPath + "/sura/" + nameWithoutExtension + (i + 1) + "." + fileExtension; File outputFile = new File(filePath); if (!outputFile.exists()) { outputFile.mkdirs(); } ImageIO.write(image, fileExtension, outputFile); if (TransparentImageUtils.changeImgColor(filePath, filePath.replace(FileUploadUtils.getFileExtension(filePath), "png"))) { String fileName = "/sura" + "/" + outputFile.getName(); hashMap.put("url", Constants.RESOURCE_PREFIX + fileName); hashMap.put("page", i + 1); map.add(hashMap); } else { throw new FileUploadException("处理失败"); } } } catch (Exception e) { e.printStackTrace(); return AjaxResult.error(); } return AjaxResult.success(map); } /** * 获取pdf大纲 * * @param filePath * @return */ @GetMapping("/getPdfOutline") public AjaxResult getPdfOutline(@NotBlank(message = "filePath为空") String filePath) { // 本地资源路径 String localPath = RuoYiConfig.getProfile(); // 数据库资源地址 String downloadPath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX); List<HashMap<String, Object>> outlines = pdfService.getPdfOutline(downloadPath); return AjaxResult.success(outlines); } /** * 获取pdf指定页图片,返回给前端图片 * * @param filePath 文档路径 * @param page 页码 * @param response * @throws IOException */ @Anonymous @GetMapping("/img") public void img(String filePath, Integer page, HttpServletResponse response) throws IOException { // 本地资源路径 String localPath = RuoYiConfig.getProfile(); // 数据库资源地址 String downloadPath = localPath + StringUtils.substringAfter(filePath, Constants.RESOURCE_PREFIX); PDDocument doc = PDDocument.load(new File(downloadPath)); PDFRenderer renderer = new PDFRenderer(doc); int pageCount = doc.getNumberOfPages(); if (page - 1 > pageCount) { //返回结果 response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); // 获取PrintWriter对象 PrintWriter out = response.getWriter(); out.print(JSON.toJSONString(AjaxResult.error())); // 释放PrintWriter对象 out.flush(); out.close(); return; } response.setContentType("image/jpeg"); // 不缓存此内容 response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expire", 0); BufferedImage image = renderer.renderImage(page - 1, 2f); ImageIO.write(image, "JPEG", response.getOutputStream()); doc.close(); } }
2929004360/ruoyi-sign
2,380
ruoyi-admin/src/main/java/com/ruoyi/web/controller/work/WorkSignFileController.java
package com.ruoyi.web.controller.work; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.api.domain.WorkSignFile; import com.ruoyi.work.service.IWorkSignFileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotNull; import java.util.List; /** * 签署文件Controller * * @author fengcheng * @date 2025-03-20 */ @RestController @RequestMapping("/work/signFile") public class WorkSignFileController extends BaseController { @Autowired private IWorkSignFileService workSignFileService; /** * 获取盖章主文件详细信息 * * @param signId * @return */ @GetMapping("/getInfoWorkSignFile/{signId}") public AjaxResult getInfoWorkSignFile(@NotNull(message = "signId为空") @PathVariable("signId") Long signId) throws Exception { return success(workSignFileService.getInfoWorkSignFile(signId)); } /** * 查询签署文件列表 * * @param signId * @return */ @GetMapping("/listWorkSignFileList/{signId}") public AjaxResult listWorkSignFileList(@NotNull(message = "signId为空") @PathVariable("signId") Long signId) throws Exception { WorkSignFile workSignFile = new WorkSignFile(); workSignFile.setSignId(signId); return success(workSignFileService.selectWorkSignFileList(workSignFile)); } /** * 查询签署文件列表 */ @PreAuthorize("@ss.hasPermi('work:signFile:list')") @GetMapping("/list") public TableDataInfo list(WorkSignFile workSignFile) { startPage(); List<WorkSignFile> list = workSignFileService.selectWorkSignFileList(workSignFile); return getDataTable(list); } /** * 获取签署文件详细信息 */ @PreAuthorize("@ss.hasPermi('work:signFile:query')") @GetMapping(value = "/{signFileId}") public AjaxResult getInfo(@PathVariable("signFileId") Long signFileId) { return success(workSignFileService.selectWorkSignFileBySignFileId(signFileId)); } }
2929004360/ruoyi-sign
4,316
ruoyi-admin/src/main/java/com/ruoyi/web/controller/work/WorkSignController.java
package com.ruoyi.web.controller.work; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.api.domain.WorkSign; import com.ruoyi.flowable.api.domain.vo.WorkSignVo; import com.ruoyi.work.service.IWorkSignService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotNull; import java.util.List; /** * 签署Controller * * @author fengcheng * @date 2025-03-18 */ @RestController @RequestMapping("/work/sign") @Validated public class WorkSignController extends BaseController { @Autowired private IWorkSignService workSignService; /** * 提交审核 * * @param signId * @return */ @PreAuthorize("@ss.hasPermi('work:sign:submit')") @Log(title = "隐患上报", businessType = BusinessType.UPDATE) @PutMapping("/submit/{signId}") public AjaxResult submit(@NotNull(message = "signId为空") @PathVariable("signId") Long signId) throws Exception { return toAjax(workSignService.submit(signId)); } /** * 撤销审核 * * @param signId * @return */ @PreAuthorize("@ss.hasPermi('work:sign:revoke')") @Log(title = "隐患上报", businessType = BusinessType.UPDATE) @PutMapping("/revoke/{signId}") public AjaxResult revoke(@NotNull(message = "signId为空") @PathVariable("signId") Long signId) throws Exception { return toAjax(workSignService.revoke(signId)); } /** * 重新申请 * * @param signId * @return */ @PreAuthorize("@ss.hasPermi('work:sign:resubmit')") @Log(title = "隐患上报", businessType = BusinessType.UPDATE) @PutMapping("/reapply/{signId}") public AjaxResult reapply(@NotNull(message = "signId为空") @PathVariable("signId") Long signId) throws Exception { return toAjax(workSignService.reapply(signId)); } /** * 查询签署列表 */ @PreAuthorize("@ss.hasPermi('work:sign:list')") @GetMapping("/list") public TableDataInfo list(WorkSignVo workSignVo) { startPage(); List<WorkSign> list = workSignService.selectWorkSignList(workSignVo); return getDataTable(list); } /** * 导出签署列表 */ @PreAuthorize("@ss.hasPermi('work:sign:export')") @Log(title = "签署", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, WorkSignVo workSignVo) { startPage(); List<WorkSign> list = workSignService.selectWorkSignList(workSignVo); TableDataInfo dataTable = getDataTable(list); ExcelUtil<WorkSign> util = new ExcelUtil<WorkSign>(WorkSign.class); util.exportExcel(response, (List<WorkSign>) dataTable.getRows(), "签署数据"); } /** * 获取签署详细信息 */ @PreAuthorize("@ss.hasPermi('work:sign:query')") @GetMapping(value = "/{signId}") public AjaxResult getInfo(@PathVariable("signId") Long signId) { return success(workSignService.selectWorkSignBySignId(signId)); } /** * 新增签署 */ @PreAuthorize("@ss.hasPermi('work:sign:add')") @Log(title = "签署", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody WorkSignVo workSignVo) { return toAjax(workSignService.insertWorkSign(workSignVo)); } /** * 修改签署 */ @PreAuthorize("@ss.hasPermi('work:sign:edit')") @Log(title = "签署", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody WorkSignVo workSignVo) { return toAjax(workSignService.updateWorkSign(workSignVo)); } /** * 删除签署 */ @PreAuthorize("@ss.hasPermi('work:sign:remove')") @Log(title = "签署", businessType = BusinessType.DELETE) @DeleteMapping("/{signIds}") public AjaxResult remove(@PathVariable Long[] signIds) { return toAjax(workSignService.deleteWorkSignBySignIds(signIds)); } }
2929004360/ruoyi-sign
3,118
ruoyi-admin/src/main/java/com/ruoyi/web/controller/work/WorkSealController.java
package com.ruoyi.web.controller.work; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.work.domain.WorkSeal; import com.ruoyi.work.service.IWorkSealService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * 印章管理Controller * * @author fengcheng * @date 2025-03-17 */ @RestController @RequestMapping("/work/seal") public class WorkSealController extends BaseController { @Autowired private IWorkSealService workSealService; /** * 查询印章管理列表 */ @PreAuthorize("@ss.hasPermi('work:seal:list')") @GetMapping("/listWorkSealVo") public AjaxResult listWorkSealVo(WorkSeal workSeal) { List<WorkSeal> list = workSealService.selectWorkSealList(workSeal); return success(list); } /** * 查询印章管理列表 */ @PreAuthorize("@ss.hasPermi('work:seal:list')") @GetMapping("/list") public TableDataInfo list(WorkSeal workSeal) { startPage(); List<WorkSeal> list = workSealService.selectWorkSealList(workSeal); return getDataTable(list); } /** * 导出印章管理列表 */ @PreAuthorize("@ss.hasPermi('work:seal:export')") @Log(title = "印章管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, WorkSeal workSeal) { List<WorkSeal> list = workSealService.selectWorkSealList(workSeal); ExcelUtil<WorkSeal> util = new ExcelUtil<WorkSeal>(WorkSeal.class); util.exportExcel(response, list, "印章管理数据"); } /** * 获取印章管理详细信息 */ @PreAuthorize("@ss.hasPermi('work:seal:query')") @GetMapping(value = "/{suraId}") public AjaxResult getInfo(@PathVariable("suraId") Long suraId) { return success(workSealService.selectWorkSealBySuraId(suraId)); } /** * 新增印章管理 */ @PreAuthorize("@ss.hasPermi('work:seal:add')") @Log(title = "印章管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody WorkSeal workSeal) { return toAjax(workSealService.insertWorkSeal(workSeal)); } /** * 修改印章管理 */ @PreAuthorize("@ss.hasPermi('work:seal:edit')") @Log(title = "印章管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody WorkSeal workSeal) { return toAjax(workSealService.updateWorkSeal(workSeal)); } /** * 删除印章管理 */ @PreAuthorize("@ss.hasPermi('work:seal:remove')") @Log(title = "印章管理", businessType = BusinessType.DELETE) @DeleteMapping("/{suraIds}") public AjaxResult remove(@PathVariable Long[] suraIds) { return toAjax(workSealService.deleteWorkSealBySuraIds(suraIds)); } }
28harishkumar/blog
6,356
public/js/tinymce/plugins/jbimages/ci/index.php
<?php /* *--------------------------------------------------------------- * APPLICATION ENVIRONMENT *--------------------------------------------------------------- * * You can load different configurations depending on your * current environment. Setting the environment also influences * things like logging and error reporting. * * This can be set to anything, but default usage is: * * development * testing * production * * NOTE: If you change these, also change the error_reporting() code below * */ define('ENVIRONMENT', 'production'); /* *--------------------------------------------------------------- * ERROR REPORTING *--------------------------------------------------------------- * * Different environments will require different levels of error reporting. * By default development will show errors but testing and live will hide them. */ if (defined('ENVIRONMENT')) { switch (ENVIRONMENT) { case 'development': error_reporting(E_ALL); break; case 'testing': case 'production': error_reporting(0); break; default: exit('The application environment is not set correctly.'); } } /* *--------------------------------------------------------------- * SYSTEM FOLDER NAME *--------------------------------------------------------------- * * This variable must contain the name of your "system" folder. * Include the path if the folder is not in the same directory * as this file. * */ $system_path = 'system'; /* *--------------------------------------------------------------- * APPLICATION FOLDER NAME *--------------------------------------------------------------- * * If you want this front controller to use a different "application" * folder then the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! * */ $application_folder = 'application'; /* * -------------------------------------------------------------------- * DEFAULT CONTROLLER * -------------------------------------------------------------------- * * Normally you will set your default controller in the routes.php file. * You can, however, force a custom routing by hard-coding a * specific controller class/function here. For most applications, you * WILL NOT set your routing here, but it's an option for those * special instances where you might want to override the standard * routing in a specific front controller that shares a common CI installation. * * IMPORTANT: If you set the routing here, NO OTHER controller will be * callable. In essence, this preference limits your application to ONE * specific controller. Leave the function name blank if you need * to call functions dynamically via the URI. * * Un-comment the $routing array below to use this feature * */ // The directory name, relative to the "controllers" folder. Leave blank // if your controller is not in a sub-folder within the "controllers" folder // $routing['directory'] = ''; // The controller class file name. Example: Mycontroller // $routing['controller'] = ''; // The controller function you wish to be called. // $routing['function'] = ''; /* * ------------------------------------------------------------------- * CUSTOM CONFIG VALUES * ------------------------------------------------------------------- * * The $assign_to_config array below will be passed dynamically to the * config class when initialized. This allows you to set custom config * items or override any default config values found in the config.php file. * This can be handy as it permits you to share one application between * multiple front controller files, with each file containing different * config values. * * Un-comment the $assign_to_config array below to use this feature * */ // $assign_to_config['name_of_config_item'] = 'value of config item'; // -------------------------------------------------------------------- // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE // -------------------------------------------------------------------- /* * --------------------------------------------------------------- * Resolve the system path for increased reliability * --------------------------------------------------------------- */ // Set the current directory correctly for CLI requests if (defined('STDIN')) { chdir(dirname(__FILE__)); } if (realpath($system_path) !== FALSE) { $system_path = realpath($system_path).'/'; } // ensure there's a trailing slash $system_path = rtrim($system_path, '/').'/'; // Is the system path correct? if ( ! is_dir($system_path)) { exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME)); } /* * ------------------------------------------------------------------- * Now that we know the path, set the main path constants * ------------------------------------------------------------------- */ // The name of THIS file define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); // The PHP file extension // this global constant is deprecated. define('EXT', '.php'); // Path to the system folder define('BASEPATH', str_replace("\\", "/", $system_path)); // Path to the front controller (this file) define('FCPATH', str_replace(SELF, '', __FILE__)); // Name of the "system folder" define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); // The path to the "application" folder if (is_dir($application_folder)) { define('APPPATH', $application_folder.'/'); } else { if ( ! is_dir(BASEPATH.$application_folder.'/')) { exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); } define('APPPATH', BASEPATH.$application_folder.'/'); } /* * -------------------------------------------------------------------- * LOAD THE BOOTSTRAP FILE * -------------------------------------------------------------------- * * And away we go... * */ require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ /* Location: ./index.php */
2929004360/ruoyi-sign
3,387
ruoyi-admin/src/main/java/com/ruoyi/web/controller/work/WorkSignatureController.java
package com.ruoyi.web.controller.work; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.work.domain.WorkSignature; import com.ruoyi.work.service.IWorkSignatureService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * 签名Controller * * @author fengcheng * @date 2025-03-18 */ @RestController @RequestMapping("/work/signature") public class WorkSignatureController extends BaseController { @Autowired private IWorkSignatureService workSignatureService; /** * 查询签名列表 */ @PreAuthorize("@ss.hasPermi('work:signature:list')") @GetMapping("/listWorkSignatureVo") public AjaxResult listWorkSignatureVo(WorkSignature workSignature) { List<WorkSignature> list = workSignatureService.selectWorkSignatureList(workSignature); return success(list); } /** * 查询签名列表 */ @PreAuthorize("@ss.hasPermi('work:signature:list')") @GetMapping("/list") public TableDataInfo list(WorkSignature workSignature) { startPage(); List<WorkSignature> list = workSignatureService.selectWorkSignatureList(workSignature); return getDataTable(list); } /** * 导出签名列表 */ @PreAuthorize("@ss.hasPermi('work:signature:export')") @Log(title = "签名", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, WorkSignature workSignature) { List<WorkSignature> list = workSignatureService.selectWorkSignatureList(workSignature); ExcelUtil<WorkSignature> util = new ExcelUtil<WorkSignature>(WorkSignature.class); util.exportExcel(response, list, "签名数据"); } /** * 获取签名详细信息 */ @PreAuthorize("@ss.hasPermi('work:signature:query')") @GetMapping(value = "/{signatureId}") public AjaxResult getInfo(@PathVariable("signatureId") Long signatureId) { return success(workSignatureService.selectWorkSignatureBySignatureId(signatureId)); } /** * 新增签名 */ @PreAuthorize("@ss.hasPermi('work:signature:add')") @Log(title = "签名", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody WorkSignature workSignature) { return toAjax(workSignatureService.insertWorkSignature(workSignature)); } /** * 修改签名 */ @PreAuthorize("@ss.hasPermi('work:signature:edit')") @Log(title = "签名", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody WorkSignature workSignature) { return toAjax(workSignatureService.updateWorkSignature(workSignature)); } /** * 删除签名 */ @PreAuthorize("@ss.hasPermi('work:signature:remove')") @Log(title = "签名", businessType = BusinessType.DELETE) @DeleteMapping("/{signatureIds}") public AjaxResult remove(@PathVariable Long[] signatureIds) { return toAjax(workSignatureService.deleteWorkSignatureBySignatureIds(signatureIds)); } }
28harishkumar/blog
1,293
public/js/tinymce/plugins/jbimages/css/dialog-v4.css
/** * Justboil.me - a TinyMCE image upload plugin * jbimages/css/dialog-v4.css * * Released under Creative Commons Attribution 3.0 Unported License * * License: http://creativecommons.org/licenses/by/3.0/ * Plugin info: http://justboil.me/ * Author: Viktor Kuzhelnyi * * Version: 2.3 released 23/06/2013 */ body {font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -text-align:center; padding:0 10px 0 5px;} h2 {color:#666; visibility:hidden;} .form-inline input { display: inline-block; *display: inline; margin-bottom: 0; vertical-align: middle; *zoom: 1; } #upload_target {border:0; margin:0; padding:0; width:0; height:0; display:none;} .upload_infobar {display:none; font-size:12pt; background:#fff; margin-top:10px; border-radius:5px;} .upload_infobar img.spinner {margin-right:10px;} .upload_infobar a {color:#0000cc;} #upload_additional_info {font-size:10pt; padding-left:26px;} #the_plugin_name {margin:15px 0 0 0;} #the_plugin_name, #the_plugin_name a {color:#777; font-size:9px;} #the_plugin_name a {text-decoration:none;} #the_plugin_name a:hover {color:#333;} /* this class makes the upload script output visible */ .upload_target_visible {width:100%!important; height:200px!important; border:1px solid #000!important; display:block!important}
2929004360/ruoyi-sign
11,574
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfProcessController.java
package com.ruoyi.web.controller.flowable; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.base.BaseController; import com.ruoyi.flowable.core.domain.ProcessQuery; import com.ruoyi.flowable.domain.bo.DdToBpmn; import com.ruoyi.flowable.domain.bo.ResubmitProcess; import com.ruoyi.flowable.domain.bo.WfCopyBo; import com.ruoyi.flowable.domain.vo.*; import com.ruoyi.flowable.page.PageQuery; import com.ruoyi.flowable.page.TableDataInfo; import com.ruoyi.flowable.service.IWfCopyService; import com.ruoyi.flowable.service.IWfProcessService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.util.List; import java.util.Map; /** * 工作流流程管理 * * @author fengcheng * @createTime 2022/3/24 18:54 */ @Slf4j @RequiredArgsConstructor @RestController @RequestMapping("/flowable/workflow/process") @Validated public class WfProcessController extends BaseController { private final IWfProcessService processService; private final IWfCopyService copyService; /** * 根据菜单id获取可发起列表 */ @GetMapping(value = "/getStartList/{menuId}") public R<List<WfDefinitionVo>> getStartList(@NotBlank(message = "menuId不能为空") @PathVariable("menuId") String menuId) { List<WfDefinitionVo> list = processService.getStartList(menuId); return R.ok(list); } /** * 查询可发起流程列表 * * @param processQuery 查询参数 */ @GetMapping(value = "/list") @PreAuthorize("@ss.hasPermi('workflow:process:startList')") public R<List<WfDefinitionVo>> startProcessList(ProcessQuery processQuery) { return R.ok(processService.selectPageStartProcessList(processQuery)); } /** * 我拥有的流程 */ @PreAuthorize("@ss.hasPermi('workflow:process:ownList')") @GetMapping(value = "/ownList") public TableDataInfo<WfTaskVo> ownProcessList(ProcessQuery processQuery, PageQuery pageQuery) { return processService.selectPageOwnProcessList(processQuery, pageQuery); } /** * 获取待办列表 */ @PreAuthorize("@ss.hasPermi('workflow:process:todoList')") @GetMapping(value = "/todoList") public TableDataInfo<WfTaskVo> todoProcessList(ProcessQuery processQuery, PageQuery pageQuery) { return processService.selectPageTodoProcessList(processQuery, pageQuery); } /** * 获取待签列表 * * @param processQuery 流程业务对象 * @param pageQuery 分页参数 */ @PreAuthorize("@ss.hasPermi('workflow:process:claimList')") @GetMapping(value = "/claimList") public TableDataInfo<WfTaskVo> claimProcessList(ProcessQuery processQuery, PageQuery pageQuery) { return processService.selectPageClaimProcessList(processQuery, pageQuery); } /** * 获取已办列表 * * @param pageQuery 分页参数 */ @PreAuthorize("@ss.hasPermi('workflow:process:finishedList')") @GetMapping(value = "/finishedList") public TableDataInfo<WfTaskVo> finishedProcessList(ProcessQuery processQuery, PageQuery pageQuery) { return processService.selectPageFinishedProcessList(processQuery, pageQuery); } /** * 获取我的抄送列表 * * @param copyBo 流程抄送对象 * @param pageQuery 分页参数 */ @PreAuthorize("@ss.hasPermi('workflow:process:myCopyList')") @GetMapping(value = "/myCopyList") public TableDataInfo<WfCopyVo> myCopyProcessList(WfCopyBo copyBo, PageQuery pageQuery) { if (!SecurityUtils.hasRole("admin")) { copyBo.setOriginatorId(SecurityUtils.getUserId()); } return copyService.selectPageList(copyBo, pageQuery); } /** * 获取抄送列表 * * @param copyBo 流程抄送对象 * @param pageQuery 分页参数 */ @PreAuthorize("@ss.hasPermi('workflow:process:copyList')") @GetMapping(value = "/copyList") public TableDataInfo<WfCopyVo> copyProcessList(WfCopyBo copyBo, PageQuery pageQuery) { if (!SecurityUtils.hasRole("admin")) { copyBo.setUserId(SecurityUtils.getUserId()); } return copyService.selectPageList(copyBo, pageQuery); } /** * 删除抄送列表 * * @param copyIds 抄送id * @return */ @PreAuthorize("@ss.hasAnyPermi('workflow:process:removeCopy,workflow:process:removeMyCopy')") @DeleteMapping(value = "/delCopy/{copyIds}") public R<Void> deleteCopy(@PathVariable String[] copyIds) { copyService.deleteCopy(copyIds); return R.ok(); } /** * 导出我拥有流程列表 */ @PreAuthorize("@ss.hasPermi('workflow:process:ownExport')") @Log(title = "我拥有流程", businessType = BusinessType.EXPORT) @PostMapping("/ownExport") public void ownExport(@Validated ProcessQuery processQuery, HttpServletResponse response) { List<WfTaskVo> list = processService.selectOwnProcessList(processQuery); List<WfOwnTaskExportVo> listVo = BeanUtil.copyToList(list, WfOwnTaskExportVo.class); for (WfOwnTaskExportVo exportVo : listVo) { exportVo.setStatus(ObjectUtil.isNull(exportVo.getFinishTime()) ? "进行中" : "已完成"); } ExcelUtil<WfOwnTaskExportVo> util = new ExcelUtil<WfOwnTaskExportVo>(WfOwnTaskExportVo.class); util.exportExcel(response, listVo, "我拥有流程"); } /** * 导出待办流程列表 */ @PreAuthorize("@ss.hasPermi('workflow:process:todoExport')") @Log(title = "待办流程", businessType = BusinessType.EXPORT) @PostMapping("/todoExport") public void todoExport(@Validated ProcessQuery processQuery, HttpServletResponse response) { List<WfTaskVo> list = processService.selectTodoProcessList(processQuery); List<WfTodoTaskExportVo> listVo = BeanUtil.copyToList(list, WfTodoTaskExportVo.class); ExcelUtil<WfTodoTaskExportVo> util = new ExcelUtil<WfTodoTaskExportVo>(WfTodoTaskExportVo.class); util.exportExcel(response, listVo, "待办流程"); } /** * 导出待签流程列表 */ @PreAuthorize("@ss.hasPermi('workflow:process:claimExport')") @Log(title = "待签流程", businessType = BusinessType.EXPORT) @PostMapping("/claimExport") public void claimExport(@Validated ProcessQuery processQuery, HttpServletResponse response) { List<WfTaskVo> list = processService.selectClaimProcessList(processQuery); List<WfClaimTaskExportVo> listVo = BeanUtil.copyToList(list, WfClaimTaskExportVo.class); ExcelUtil<WfClaimTaskExportVo> util = new ExcelUtil<WfClaimTaskExportVo>(WfClaimTaskExportVo.class); util.exportExcel(response, listVo, "待签流程"); } /** * 导出已办流程列表 */ @PreAuthorize("@ss.hasPermi('workflow:process:finishedExport')") @Log(title = "已办流程", businessType = BusinessType.EXPORT) @PostMapping("/finishedExport") public void finishedExport(@Validated ProcessQuery processQuery, HttpServletResponse response) { List<WfTaskVo> list = processService.selectFinishedProcessList(processQuery); List<WfFinishedTaskExportVo> listVo = BeanUtil.copyToList(list, WfFinishedTaskExportVo.class); ExcelUtil<WfFinishedTaskExportVo> util = new ExcelUtil<WfFinishedTaskExportVo>(WfFinishedTaskExportVo.class); util.exportExcel(response, listVo, "已办流程"); } /** * 导出抄送流程列表 */ @PreAuthorize("@ss.hasPermi('workflow:process:copyExport')") @Log(title = "抄送流程", businessType = BusinessType.EXPORT) @PostMapping("/copyExport") public void copyExport(WfCopyBo copyBo, HttpServletResponse response) { if (!SecurityUtils.hasRole("admin")) { copyBo.setUserId(SecurityUtils.getUserId()); } List<WfCopyVo> list = copyService.selectList(copyBo); ExcelUtil<WfCopyVo> util = new ExcelUtil<WfCopyVo>(WfCopyVo.class); util.exportExcel(response, list, "抄送流程"); } /** * 导出我的抄送流程列表 */ @PreAuthorize("@ss.hasPermi('workflow:process:myCopyExport')") @Log(title = "抄送流程", businessType = BusinessType.EXPORT) @PostMapping("/myCopyExport") public void myCopyExport(WfCopyBo copyBo, HttpServletResponse response) { if (!SecurityUtils.hasRole("admin")) { copyBo.setOriginatorId(SecurityUtils.getUserId()); } List<WfCopyVo> list = copyService.selectList(copyBo); ExcelUtil<WfCopyVo> util = new ExcelUtil<WfCopyVo>(WfCopyVo.class); util.exportExcel(response, list, "抄送流程"); } /** * 查询流程部署关联表单信息 * * @param definitionId 流程定义id * @param deployId 流程部署id */ @GetMapping("/getProcessForm") @PreAuthorize("@ss.hasPermi('workflow:process:start')") public R<?> getForm(@RequestParam(value = "definitionId") String definitionId, @RequestParam(value = "deployId") String deployId, @RequestParam(value = "procInsId", required = false) String procInsId) { return R.ok(processService.selectFormContent(definitionId, deployId, procInsId)); } /** * 根据流程定义id启动流程实例 * * @param processDefId 流程定义id * @param variables 变量集合,json对象 */ @PreAuthorize("@ss.hasPermi('workflow:process:start')") @PostMapping("/start/{processDefId}") public R<String> start(@PathVariable(value = "processDefId") String processDefId, @RequestBody Map<String, Object> variables) { processService.startProcessByDefId(processDefId, variables); return R.ok(null, "流程启动成功"); } /** * 重新发起流程实例 * * @param resubmitProcess 重新发起 */ @PreAuthorize("@ss.hasPermi('workflow:process:start')") @PostMapping("/resubmit") public R<String> resubmit(@RequestBody ResubmitProcess resubmitProcess) { processService.resubmitProcess(resubmitProcess); return R.ok(null, "流程启动成功"); } /** * 删除流程实例 * * @param instanceIds 流程实例ID串 */ @DeleteMapping("/instance/{instanceIds}") public R<Void> delete(@PathVariable String[] instanceIds) { processService.deleteProcessByIds(instanceIds); return R.ok(); } /** * 读取xml文件 * * @param processDefId 流程定义ID */ @GetMapping("/bpmnXml/{processDefId}") public R<String> getBpmnXml(@PathVariable(value = "processDefId") String processDefId) { return R.ok(processService.queryBpmnXmlById(processDefId), null); } /** * 查询流程详情信息 * * @param procInsId 流程实例ID * @param taskId 任务ID * @param formType 表单类型 */ @GetMapping("/detail") public R detail(String procInsId, String taskId, @NotNull(message = "表单类型不能为空") String formType) { return R.ok(processService.queryProcessDetail(procInsId, taskId, formType)); } /** * 根据钉钉流程json转flowable的bpmn的xml格式 * * @param ddToBpmn */ @PostMapping("/ddtobpmn") public R<String> ddToBpmn(@RequestBody DdToBpmn ddToBpmn) { return processService.dingdingToBpmn(ddToBpmn); } /** * 查询流程是否结束 * * @param procInsId * @param */ @GetMapping("/iscompleted") public R processIsCompleted(String procInsId) { return R.ok(processService.processIsCompleted(procInsId)); } }
2929004360/ruoyi-sign
1,736
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfInstanceController.java
package com.ruoyi.web.controller.flowable; import com.ruoyi.common.core.domain.R; import com.ruoyi.flowable.api.domain.bo.WfTaskBo; import com.ruoyi.flowable.service.IWfInstanceService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; /** * 工作流流程实例管理 * * @author fengcheng * @createTime 2022/3/10 00:12 */ @Slf4j @RequiredArgsConstructor @RestController @RequestMapping("/flowable/workflow/instance") public class WfInstanceController { private final IWfInstanceService instanceService; /** * 激活或挂起流程实例 * * @param state 1:激活,2:挂起 * @param instanceId 流程实例ID */ @PostMapping(value = "/updateState") public R updateState(@RequestParam Integer state, @RequestParam String instanceId) { instanceService.updateState(state, instanceId); return R.ok(); } /** * 结束流程实例 * * @param bo 流程任务业务对象 */ @PostMapping(value = "/stopProcessInstance") public R stopProcessInstance(@RequestBody WfTaskBo bo) { instanceService.stopProcessInstance(bo); return R.ok(); } /** * 删除流程实例 * * @param instanceId 流程实例ID * @param deleteReason 删除原因 */ @Deprecated @DeleteMapping(value = "/delete") public R delete(@RequestParam String instanceId, String deleteReason) { instanceService.delete(instanceId, deleteReason); return R.ok(); } /** * 查询流程实例详情信息 * * @param procInsId 流程实例ID * @param deployId 流程部署ID */ @GetMapping("/detail") public R detail(String procInsId, String deployId) { return R.ok(instanceService.queryDetailProcess(procInsId, deployId)); } }
2929004360/ruoyi-sign
3,857
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfFormController.java
package com.ruoyi.web.controller.flowable; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.domain.WfDeployForm; import com.ruoyi.flowable.domain.bo.WfFormBo; import com.ruoyi.flowable.domain.vo.WfFormVo; import com.ruoyi.flowable.service.IWfDeployFormService; import com.ruoyi.flowable.service.IWfFormService; import lombok.RequiredArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Arrays; import java.util.List; /** * 流程表单Controller * * @author fengcheng * @createTime 2022/3/7 22:07 */ @RequiredArgsConstructor @RestController @RequestMapping("/flowable/workflow/form" ) public class WfFormController extends BaseController { private final IWfFormService formService; private final IWfDeployFormService deployFormService; /** * 查询流程表单列表 */ @PreAuthorize("@ss.hasPermi('workflow:form:list')") @GetMapping("/queryList" ) public AjaxResult queryList(WfFormBo bo) { return success(formService.queryPageList(bo)); } /** * 查询流程表单列表 */ @PreAuthorize("@ss.hasPermi('workflow:form:list')") @GetMapping("/list" ) public TableDataInfo list(WfFormBo bo) { startPage(); List<WfFormVo> list = formService.queryPageList(bo); return getDataTable(list); } /** * 导出流程表单列表 */ @PreAuthorize("@ss.hasPermi('workflow:form:export')") @Log(title = "流程表单" , businessType = BusinessType.EXPORT) @PostMapping("/export" ) public void export(WfFormBo bo, HttpServletResponse response) { List<WfFormVo> list = formService.queryList(bo); ExcelUtil<WfFormVo> util = new ExcelUtil<WfFormVo>(WfFormVo.class); util.exportExcel(response, list, "流程表单" ); } /** * 获取流程表单详细信息 * * @param formId 主键 */ @PreAuthorize("@ss.hasPermi('workflow:form:query')") @GetMapping(value = "/{formId}" ) public R<WfFormVo> getInfo(@NotNull(message = "主键不能为空" ) @PathVariable("formId" ) String formId) { return R.ok(formService.queryById(formId)); } /** * 新增流程表单 */ @PreAuthorize("@ss.hasPermi('workflow:form:add')") @Log(title = "流程表单" , businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody WfFormBo bo) { return toAjax(formService.insertForm(bo)); } /** * 修改流程表单 */ @PreAuthorize("@ss.hasPermi('workflow:form:edit')") @Log(title = "流程表单" , businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody WfFormBo bo) { return toAjax(formService.updateForm(bo)); } /** * 删除流程表单 * * @param formIds 主键串 */ @PreAuthorize("@ss.hasPermi('workflow:form:remove')") @Log(title = "流程表单" , businessType = BusinessType.DELETE) @DeleteMapping("/{formIds}" ) public AjaxResult remove(@NotEmpty(message = "主键不能为空" ) @PathVariable String[] formIds) { return toAjax(formService.deleteWithValidByIds(Arrays.asList(formIds)) ? 1 : 0); } /** * 挂载流程表单 */ @Log(title = "流程表单" , businessType = BusinessType.INSERT) @PostMapping("/addDeployForm" ) public AjaxResult addDeployForm(@RequestBody WfDeployForm deployForm) { return toAjax(deployFormService.insertWfDeployForm(deployForm)); } }
281677160/openwrt-package
8,851
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua
-- Licensed to the public under the GNU General Public License v3. require "luci.http" require "luci.sys" require "nixio.fs" require "luci.dispatcher" require "luci.model.uci" local uci = require "luci.model.uci".cursor() local m, s, o, node local server_count = 0 -- 确保正确判断程序是否存在 local function is_finded(e) return luci.sys.exec(string.format('type -t -p "%s" 2>/dev/null', e)) ~= "" end -- 优化 CBI UI(新版 LuCI 专用) local function optimize_cbi_ui() luci.http.write([[ <script type="text/javascript"> // 修正上移、下移按钮名称 document.querySelectorAll("input.btn.cbi-button.cbi-button-up").forEach(function(btn) { btn.value = "]] .. translate("Move up") .. [["; }); document.querySelectorAll("input.btn.cbi-button.cbi-button-down").forEach(function(btn) { btn.value = "]] .. translate("Move down") .. [["; }); // 删除控件和说明之间的多余换行 document.querySelectorAll("div.cbi-value-description").forEach(function(descDiv) { var prev = descDiv.previousSibling; while (prev && prev.nodeType === Node.TEXT_NODE && prev.textContent.trim() === "") { prev = prev.previousSibling; } if (prev && prev.nodeType === Node.ELEMENT_NODE && prev.tagName === "BR") { prev.remove(); } }); </script> ]]) end local has_ss_rust = is_finded("sslocal") or is_finded("ssserver") local has_ss_libev = is_finded("ss-redir") or is_finded("ss-local") local ss_type_list = {} if has_ss_rust then table.insert(ss_type_list, { id = "ss-rust", name = translate("ShadowSocks-rust Version") }) end if has_ss_libev then table.insert(ss_type_list, { id = "ss-libev", name = translate("ShadowSocks-libev Version") }) end -- 如果用户没有手动设置,则自动选择 if ss_type == "" then if has_ss_rust then ss_type = "ss-rust" elseif has_ss_libev then ss_type = "ss-libev" end end uci:foreach("shadowsocksr", "servers", function(s) server_count = server_count + 1 end) m = Map("shadowsocksr", translate("Servers subscription and manage")) -- Server Subscribe s = m:section(TypedSection, "server_subscribe") s.anonymous = true o = s:option(Flag, "auto_update", translate("Auto Update")) o.rmempty = false o.description = translate("Auto Update Server subscription, GFW list and CHN route") o = s:option(ListValue, "auto_update_week_time", translate("Update Time (Every Week)")) o:value('*', translate("Every Day")) o:value("1", translate("Every Monday")) o:value("2", translate("Every Tuesday")) o:value("3", translate("Every Wednesday")) o:value("4", translate("Every Thursday")) o:value("5", translate("Every Friday")) o:value("6", translate("Every Saturday")) o:value("0", translate("Every Sunday")) o.default = "*" o.rmempty = true o:depends("auto_update", "1") o = s:option(ListValue, "auto_update_day_time", translate("Update time (every day)")) for t = 0, 23 do o:value(t, t .. ":00") end o.default = 2 o.rmempty = true o:depends("auto_update", "1") o = s:option(ListValue, "auto_update_min_time", translate("Update Interval (min)")) for i = 0, 59 do o:value(i, i .. ":00") end o.default = 30 o.rmempty = true o:depends("auto_update", "1") -- 确保 ss_type_list 不为空 if #ss_type_list > 0 then o = s:option(ListValue, "ss_type", string.format("<b><span style='color:red;'>%s</span></b>", translate("ShadowSocks Node Use Version"))) o.description = translate("Selection ShadowSocks Node Use Version.") for _, v in ipairs(ss_type_list) do o:value(v.id, v.name) -- 存储 "ss-libev" / "ss-rust",但 UI 显示完整名称 end o.default = ss_type -- 设置默认值 o.write = function(self, section, value) -- 更新 Shadowsocks 节点的 has_ss_type uci:foreach("shadowsocksr", "servers", function(s) local node_type = uci:get("shadowsocksr", s[".name"], "type") -- 获取节点类型 if node_type == "ss" then -- 仅修改 Shadowsocks 节点 local old_value = uci:get("shadowsocksr", s[".name"], "has_ss_type") if old_value ~= value then uci:set("shadowsocksr", s[".name"], "has_ss_type", value) end end end) -- 更新当前 section 的 ss_type Value.write(self, section, value) end end o = s:option(DynamicList, "subscribe_url", translate("Subscribe URL")) o.rmempty = true o = s:option(Value, "filter_words", translate("Subscribe Filter Words")) o.rmempty = true o.description = translate("Filter Words splited by /") o = s:option(Value, "save_words", translate("Subscribe Save Words")) o.rmempty = true o.description = translate("Save Words splited by /") o = s:option(Button, "update_Sub", translate("Update Subscribe List")) o.inputstyle = "reload" o.description = translate("Update subscribe url list first") o.write = function() uci:commit("shadowsocksr") luci.sys.exec("rm -rf /tmp/sub_md5_*") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers")) end o = s:option(Flag, "allow_insecure", translate("Allow subscribe Insecure nodes By default")) o.rmempty = false o.description = translate("Subscribe nodes allows insecure connection as TLS client (insecure)") o.default = "0" o = s:option(Flag, "switch", translate("Subscribe Default Auto-Switch")) o.rmempty = false o.description = translate("Subscribe new add server default Auto-Switch on") o.default = "1" o = s:option(Flag, "proxy", translate("Through proxy update")) o.rmempty = false o.description = translate("Through proxy update list, Not Recommended ") o = s:option(Button, "subscribe", translate("Update All Subscribe Servers")) o.rawhtml = true o.template = "shadowsocksr/subscribe" o = s:option(Button, "delete", translate("Delete All Subscribe Servers")) o.inputstyle = "reset" o.description = string.format(translate("Server Count") .. ": %d", server_count) o.write = function() uci:delete_all("shadowsocksr", "servers", function(s) if s.hashkey or s.isSubscribe then return true else return false end end) uci:save("shadowsocksr") uci:commit("shadowsocksr") for file in nixio.fs.glob("/tmp/sub_md5_*") do nixio.fs.remove(file) end luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "delete")) return end o = s:option(Value, "user_agent", translate("User-Agent")) o.default = "v2rayN/9.99" o:value("curl", "Curl") o:value("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0", "Edge for Linux") o:value("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0", "Edge for Windows") o:value("v2rayN/9.99", "v2rayN") -- [[ Servers Manage ]]-- s = m:section(TypedSection, "servers") s.anonymous = true s.addremove = true s.template = "cbi/tblsection" s.sortable = true s.extedit = luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers", "%s") function s.create(...) local sid = TypedSection.create(...) if sid then luci.http.redirect(s.extedit % sid) return end end s.render = function(self, ...) Map.render(self, ...) if type(optimize_cbi_ui) == "function" then optimize_cbi_ui() end end o = s:option(DummyValue, "type", translate("Type")) function o.cfgvalue(self, section) return m:get(section, "v2ray_protocol") or Value.cfgvalue(self, section) or translate("None") end o = s:option(DummyValue, "alias", translate("Alias")) function o.cfgvalue(...) return Value.cfgvalue(...) or translate("None") end o = s:option(DummyValue, "server_port", translate("Server Port")) function o.cfgvalue(...) return Value.cfgvalue(...) or "N/A" end o = s:option(DummyValue, "server_port", translate("Socket Connected")) o.template = "shadowsocksr/socket" o.width = "10%" o.render = function(self, section, scope) self.transport = s:cfgvalue(section).transport if self.transport == 'ws' then self.ws_path = s:cfgvalue(section).ws_path self.tls = s:cfgvalue(section).tls end DummyValue.render(self, section, scope) end o = s:option(DummyValue, "server", translate("Ping Latency")) o.template = "shadowsocksr/ping" o.width = "10%" local global_server = uci:get_first('shadowsocksr', 'global', 'global_server') node = s:option(Button, "apply_node", translate("Apply")) node.inputstyle = "apply" node.render = function(self, section, scope) if section == global_server then self.title = translate("Reapply") else self.title = translate("Apply") end Button.render(self, section, scope) end node.write = function(self, section) uci:set("shadowsocksr", '@global[0]', 'global_server', section) uci:save("shadowsocksr") uci:commit("shadowsocksr") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "restart")) end o = s:option(Flag, "switch_enable", translate("Auto Switch")) o.rmempty = false function o.cfgvalue(...) return Value.cfgvalue(...) or 1 end m:append(Template("shadowsocksr/server_list")) return m
28harishkumar/blog
4,069
public/js/tinymce/plugins/jbimages/css/dialog.css
/** * Justboil.me - a TinyMCE image upload plugin * jbimages/css/dialog.css * * Released under Creative Commons Attribution 3.0 Unported License * * License: http://creativecommons.org/licenses/by/3.0/ * Plugin info: http://justboil.me/ * Author: Viktor Kuzhelnyi * * Version: 2.3 released 23/06/2013 */ body {font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; text-align:center;} h2 {color:#666;} .form-inline input { display: inline-block; *display: inline; margin-bottom: 0; vertical-align: middle; *zoom: 1; } .jbFileBox {border:0!important;} .jbFileBox {width:120px!important; } #upload_target {border:0; margin:0; padding:0; width:0; height:0; display:none;} .upload_infobar {display:none; font-size:12pt; background:#fff; padding:5px; margin-top:10px; border-radius:5px;} .upload_infobar img.spinner {margin-right:10px;} .upload_infobar a {color:#0000cc;} #upload_additional_info {font-size:10pt; padding-left:26px;} #the_plugin_name {margin:25px 0 0 0;} #the_plugin_name, #the_plugin_name a {color:#777; font-size:9px;} #the_plugin_name a {text-decoration:none;} #the_plugin_name a:hover {color:#333;} #close_link {margin-top:10px; display:none;} /* for opera */ /* this class makes the upload script output visible */ .upload_target_visible {width:100%!important; height:200px!important; border:1px solid #000!important; display:block!important} /* sweet upload button (from twitter bootstrap) */ .btn { display: inline-block; *display: inline; padding: 4px 12px; margin-bottom: 0; *margin-left: .3em; font-size: 14px; line-height: 20px; color: #333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; cursor: pointer; background-color: #f5f5f5; *background-color: #e6e6e6; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; border: 1px solid #bbbbbb; *border: 0; border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-bottom-color: #a2a2a2; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); *zoom: 1; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { color: #333333; background-color: #e6e6e6; *background-color: #d9d9d9; } .btn:active, .btn.active { background-color: #cccccc \9; } .btn:first-child { *margin-left: 0; } .btn:hover { color: #333333; text-decoration: none; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } .btn:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn.active, .btn:active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn { border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); }
28harishkumar/blog
1,704
public/js/tinymce/plugins/jbimages/langs/ru_dlg.js
/** * Justboil.me - a TinyMCE image upload plugin * jbimages/langs/ru_dlg.js * * Released under Creative Commons Attribution 3.0 Unported License * * License: http://creativecommons.org/licenses/by/3.0/ * Plugin info: http://justboil.me/ * Author: Viktor Kuzhelnyi * * Version: 2.3 released 23/06/2013 */ tinyMCE.addI18n('ru.jbimages_dlg',{ title : '\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430', select_an_image : '\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435', upload_in_progress : '\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430', upload_complete : '\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430', upload : '\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c', longer_than_usual : '\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u043e.', maybe_an_error : '\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.', view_output : '\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430', lang_id : 'russian' /* php-side language files are in: ci/application/language/{lang_id}; */ });
28harishkumar/blog
12,818
public/js/tinymce/plugins/jbimages/ci/application/config/config.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* |-------------------------------------------------------------------------- | Base Site URL |-------------------------------------------------------------------------- | | URL to your CodeIgniter root. Typically this will be your base URL, | WITH a trailing slash: | | http://example.com/ | | If this is not set then CodeIgniter will guess the protocol, domain and | path to your installation. | */ $config['base_url'] = ''; /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = 'index.php'; /* |-------------------------------------------------------------------------- | URI PROTOCOL |-------------------------------------------------------------------------- | | This item determines which server global should be used to retrieve the | URI string. The default setting of 'AUTO' works for most servers. | If your links do not seem to work, try one of the other delicious flavors: | | 'AUTO' Default - auto detects | 'PATH_INFO' Uses the PATH_INFO | 'QUERY_STRING' Uses the QUERY_STRING | 'REQUEST_URI' Uses the REQUEST_URI | 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO | */ $config['uri_protocol'] = 'QUERY_STRING'; /* |-------------------------------------------------------------------------- | URL suffix |-------------------------------------------------------------------------- | | This option allows you to add a suffix to all URLs generated by CodeIgniter. | For more information please see the user guide: | | http://codeigniter.com/user_guide/general/urls.html */ $config['url_suffix'] = ''; /* |-------------------------------------------------------------------------- | Default Language |-------------------------------------------------------------------------- | | This determines which set of language files should be used. Make sure | there is an available translation if you intend to use something other | than english. | */ $config['language'] = 'english'; /* |-------------------------------------------------------------------------- | Default Character Set |-------------------------------------------------------------------------- | | This determines which character set is used by default in various methods | that require a character set to be provided. | */ $config['charset'] = 'UTF-8'; /* |-------------------------------------------------------------------------- | Enable/Disable System Hooks |-------------------------------------------------------------------------- | | If you would like to use the 'hooks' feature you must enable it by | setting this variable to TRUE (boolean). See the user guide for details. | */ $config['enable_hooks'] = FALSE; /* |-------------------------------------------------------------------------- | Class Extension Prefix |-------------------------------------------------------------------------- | | This item allows you to set the filename/classname prefix when extending | native libraries. For more information please see the user guide: | | http://codeigniter.com/user_guide/general/core_classes.html | http://codeigniter.com/user_guide/general/creating_libraries.html | */ $config['subclass_prefix'] = 'MY_'; /* |-------------------------------------------------------------------------- | Allowed URL Characters |-------------------------------------------------------------------------- | | This lets you specify with a regular expression which characters are permitted | within your URLs. When someone tries to submit a URL with disallowed | characters they will get a warning message. | | As a security measure you are STRONGLY encouraged to restrict URLs to | as few characters as possible. By default only these are allowed: a-z 0-9~%.:_- | | Leave blank to allow all characters -- but only if you are insane. | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! | */ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; /* |-------------------------------------------------------------------------- | Enable Query Strings |-------------------------------------------------------------------------- | | By default CodeIgniter uses search-engine friendly segment based URLs: | example.com/who/what/where/ | | By default CodeIgniter enables access to the $_GET array. If for some | reason you would like to disable it, set 'allow_get_array' to FALSE. | | You can optionally enable standard query string based URLs: | example.com?who=me&what=something&where=here | | Options are: TRUE or FALSE (boolean) | | The other items let you set the query string 'words' that will | invoke your controllers and its functions: | example.com/index.php?c=controller&m=function | | Please note that some of the helpers won't work as expected when | this feature is enabled, since CodeIgniter is designed primarily to | use segment based URLs. | */ $config['allow_get_array'] = FALSE; $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; // experimental not currently in use /* |-------------------------------------------------------------------------- | Error Logging Threshold |-------------------------------------------------------------------------- | | If you have enabled error logging, you can set an error threshold to | determine what gets logged. Threshold options are: | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: | | 0 = Disables logging, Error logging TURNED OFF | 1 = Error Messages (including PHP errors) | 2 = Debug Messages | 3 = Informational Messages | 4 = All Messages | | For a live site you'll usually only enable Errors (1) to be logged otherwise | your log files will fill up very fast. | */ $config['log_threshold'] = 0; /* |-------------------------------------------------------------------------- | Error Logging Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | application/logs/ folder. Use a full server path with trailing slash. | */ $config['log_path'] = ''; /* |-------------------------------------------------------------------------- | Date Format for Logs |-------------------------------------------------------------------------- | | Each item that is logged has an associated date. You can use PHP date | codes to set your own date formatting | */ $config['log_date_format'] = 'Y-m-d H:i:s'; /* |-------------------------------------------------------------------------- | Cache Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | system/cache/ folder. Use a full server path with trailing slash. | */ $config['cache_path'] = ''; /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | If you use the Encryption class or the Session class you | MUST set an encryption key. See the user guide for info. | */ $config['encryption_key'] = ''; /* |-------------------------------------------------------------------------- | Session Variables |-------------------------------------------------------------------------- | | 'sess_cookie_name' = the name you want for the cookie | 'sess_expiration' = the number of SECONDS you want the session to last. | by default sessions last 7200 seconds (two hours). Set to zero for no expiration. | 'sess_expire_on_close' = Whether to cause the session to expire automatically | when the browser window is closed | 'sess_encrypt_cookie' = Whether to encrypt the cookie | 'sess_use_database' = Whether to save the session data to a database | 'sess_table_name' = The name of the session database table | 'sess_match_ip' = Whether to match the user's IP address when reading the session data | 'sess_match_useragent' = Whether to match the User Agent when reading the session data | 'sess_time_to_update' = how many seconds between CI refreshing Session Information | */ $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = FALSE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = FALSE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; $config['sess_time_to_update'] = 300; /* |-------------------------------------------------------------------------- | Cookie Related Variables |-------------------------------------------------------------------------- | | 'cookie_prefix' = Set a prefix if you need to avoid collisions | 'cookie_domain' = Set to .your-domain.com for site-wide cookies | 'cookie_path' = Typically will be a forward slash | 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists. | */ $config['cookie_prefix'] = ""; $config['cookie_domain'] = ""; $config['cookie_path'] = "/"; $config['cookie_secure'] = FALSE; /* |-------------------------------------------------------------------------- | Global XSS Filtering |-------------------------------------------------------------------------- | | Determines whether the XSS filter is always active when GET, POST or | COOKIE data is encountered | */ $config['global_xss_filtering'] = FALSE; /* |-------------------------------------------------------------------------- | Cross Site Request Forgery |-------------------------------------------------------------------------- | Enables a CSRF cookie token to be set. When set to TRUE, token will be | checked on a submitted form. If you are accepting user data, it is strongly | recommended CSRF protection be enabled. | | 'csrf_token_name' = The token name | 'csrf_cookie_name' = The cookie name | 'csrf_expire' = The number in seconds the token should expire. */ $config['csrf_protection'] = FALSE; $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] = 7200; /* |-------------------------------------------------------------------------- | Output Compression |-------------------------------------------------------------------------- | | Enables Gzip output compression for faster page loads. When enabled, | the output class will test whether your server supports Gzip. | Even if it does, however, not all browsers support compression | so enable only if you are reasonably sure your visitors can handle it. | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it | means you are prematurely outputting something to your browser. It could | even be a line of whitespace at the end of one of your scripts. For | compression to work, nothing can be sent before the output buffer is called | by the output class. Do not 'echo' any values with compression enabled. | */ $config['compress_output'] = FALSE; /* |-------------------------------------------------------------------------- | Master Time Reference |-------------------------------------------------------------------------- | | Options are 'local' or 'gmt'. This pref tells the system whether to use | your server's local time as the master 'now' reference, or convert it to | GMT. See the 'date helper' page of the user guide for information | regarding date handling. | */ $config['time_reference'] = 'local'; /* |-------------------------------------------------------------------------- | Rewrite PHP Short Tags |-------------------------------------------------------------------------- | | If your PHP installation does not have short tag support enabled CI | can rewrite the tags on-the-fly, enabling you to utilize that syntax | in your view files. Options are TRUE or FALSE (boolean) | */ $config['rewrite_short_tags'] = FALSE; /* |-------------------------------------------------------------------------- | Reverse Proxy IPs |-------------------------------------------------------------------------- | | If your server is behind a reverse proxy, you must whitelist the proxy IP | addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR | header in order to properly identify the visitor's IP address. | Comma-delimited, e.g. '10.0.1.200,10.0.1.201' | */ $config['proxy_ips'] = ''; /* End of file config.php */ /* Location: ./application/config/config.php */
28harishkumar/blog
4,453
public/js/tinymce/plugins/jbimages/ci/application/config/mimes.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | MIME TYPES | ------------------------------------------------------------------- | This file contains an array of mime types. It is used by the | Upload class to help identify allowed file types. | */ $mimes = array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'), 'bin' => 'application/macbinary', 'dms' => 'application/octet-stream', 'lha' => 'application/octet-stream', 'lzh' => 'application/octet-stream', 'exe' => array('application/octet-stream', 'application/x-msdownload'), 'class' => 'application/octet-stream', 'psd' => 'application/x-photoshop', 'so' => 'application/octet-stream', 'sea' => 'application/octet-stream', 'dll' => 'application/octet-stream', 'oda' => 'application/oda', 'pdf' => array('application/pdf', 'application/x-download'), 'ai' => 'application/postscript', 'eps' => 'application/postscript', 'ps' => 'application/postscript', 'smi' => 'application/smil', 'smil' => 'application/smil', 'mif' => 'application/vnd.mif', 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'), 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'), 'wbxml' => 'application/wbxml', 'wmlc' => 'application/wmlc', 'dcr' => 'application/x-director', 'dir' => 'application/x-director', 'dxr' => 'application/x-director', 'dvi' => 'application/x-dvi', 'gtar' => 'application/x-gtar', 'gz' => 'application/x-gzip', 'php' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php', 'phtml' => 'application/x-httpd-php', 'phps' => 'application/x-httpd-php-source', 'js' => 'application/x-javascript', 'swf' => 'application/x-shockwave-flash', 'sit' => 'application/x-stuffit', 'tar' => 'application/x-tar', 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'), 'xhtml' => 'application/xhtml+xml', 'xht' => 'application/xhtml+xml', 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'), 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mpga' => 'audio/mpeg', 'mp2' => 'audio/mpeg', 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), 'aif' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'ram' => 'audio/x-pn-realaudio', 'rm' => 'audio/x-pn-realaudio', 'rpm' => 'audio/x-pn-realaudio-plugin', 'ra' => 'audio/x-realaudio', 'rv' => 'video/vnd.rn-realvideo', 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), 'bmp' => array('image/bmp', 'image/x-windows-bmp'), 'gif' => 'image/gif', 'jpeg' => array('image/jpeg', 'image/pjpeg'), 'jpg' => array('image/jpeg', 'image/pjpeg'), 'jpe' => array('image/jpeg', 'image/pjpeg'), 'png' => array('image/png', 'image/x-png'), 'tiff' => 'image/tiff', 'tif' => 'image/tiff', 'css' => 'text/css', 'html' => 'text/html', 'htm' => 'text/html', 'shtml' => 'text/html', 'txt' => 'text/plain', 'text' => 'text/plain', 'log' => array('text/plain', 'text/x-log'), 'rtx' => 'text/richtext', 'rtf' => 'text/rtf', 'xml' => 'text/xml', 'xsl' => 'text/xml', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'qt' => 'video/quicktime', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo', 'movie' => 'video/x-sgi-movie', 'doc' => 'application/msword', 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'), 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'), 'word' => array('application/msword', 'application/octet-stream'), 'xl' => 'application/excel', 'eml' => 'message/rfc822', 'json' => array('application/json', 'text/json') ); /* End of file mimes.php */ /* Location: ./application/config/mimes.php */
28harishkumar/blog
1,566
public/js/tinymce/plugins/jbimages/ci/application/config/foreign_chars.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | Foreign Characters | ------------------------------------------------------------------- | This file contains an array of foreign characters for transliteration | conversion used by the Text helper | */ $foreign_characters = array( '/ä|æ|ǽ/' => 'ae', '/ö|œ/' => 'oe', '/ü/' => 'ue', '/Ä/' => 'Ae', '/Ü/' => 'Ue', '/Ö/' => 'Oe', '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A', '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a', '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', '/ç|ć|ĉ|ċ|č/' => 'c', '/Ð|Ď|Đ/' => 'D', '/ð|ď|đ/' => 'd', '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E', '/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e', '/Ĝ|Ğ|Ġ|Ģ/' => 'G', '/ĝ|ğ|ġ|ģ/' => 'g', '/Ĥ|Ħ/' => 'H', '/ĥ|ħ/' => 'h', '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I', '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i', '/Ĵ/' => 'J', '/ĵ/' => 'j', '/Ķ/' => 'K', '/ķ/' => 'k', '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L', '/ĺ|ļ|ľ|ŀ|ł/' => 'l', '/Ñ|Ń|Ņ|Ň/' => 'N', '/ñ|ń|ņ|ň|ʼn/' => 'n', '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O', '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o', '/Ŕ|Ŗ|Ř/' => 'R', '/ŕ|ŗ|ř/' => 'r', '/Ś|Ŝ|Ş|Š/' => 'S', '/ś|ŝ|ş|š|ſ/' => 's', '/Ţ|Ť|Ŧ/' => 'T', '/ţ|ť|ŧ/' => 't', '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U', '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u', '/Ý|Ÿ|Ŷ/' => 'Y', '/ý|ÿ|ŷ/' => 'y', '/Ŵ/' => 'W', '/ŵ/' => 'w', '/Ź|Ż|Ž/' => 'Z', '/ź|ż|ž/' => 'z', '/Æ|Ǽ/' => 'AE', '/ß/'=> 'ss', '/IJ/' => 'IJ', '/ij/' => 'ij', '/Œ/' => 'OE', '/ƒ/' => 'f' ); /* End of file foreign_chars.php */ /* Location: ./application/config/foreign_chars.php */
28harishkumar/blog
1,282
public/js/tinymce/plugins/jbimages/ci/application/config/migration.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* |-------------------------------------------------------------------------- | Enable/Disable Migrations |-------------------------------------------------------------------------- | | Migrations are disabled by default but should be enabled | whenever you intend to do a schema migration. | */ $config['migration_enabled'] = FALSE; /* |-------------------------------------------------------------------------- | Migrations version |-------------------------------------------------------------------------- | | This is used to set migration version that the file system should be on. | If you run $this->migration->latest() this is the version that schema will | be upgraded / downgraded to. | */ $config['migration_version'] = 0; /* |-------------------------------------------------------------------------- | Migrations Path |-------------------------------------------------------------------------- | | Path to your migrations folder. | Typically, it will be within your application path. | Also, writing permission is required within the migrations path. | */ $config['migration_path'] = APPPATH . 'migrations/'; /* End of file migration.php */ /* Location: ./application/config/migration.php */
28harishkumar/blog
1,138
public/js/tinymce/plugins/jbimages/ci/application/config/doctypes.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $_doctypes = array( 'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', 'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', 'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', 'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', 'html5' => '<!DOCTYPE html>', 'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', 'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">', 'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">' ); /* End of file doctypes.php */ /* Location: ./application/config/doctypes.php */
2929004360/ruoyi-sign
5,849
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfModelController.java
package com.ruoyi.web.controller.flowable; import cn.hutool.core.bean.BeanUtil; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.base.BaseController; import com.ruoyi.flowable.domain.WfCategory; import com.ruoyi.flowable.domain.bo.WfModelBo; import com.ruoyi.flowable.domain.vo.WfCategoryVo; import com.ruoyi.flowable.domain.vo.WfModelExportVo; import com.ruoyi.flowable.domain.vo.WfModelVo; import com.ruoyi.flowable.page.PageQuery; import com.ruoyi.flowable.page.TableDataInfo; import com.ruoyi.flowable.service.IWfCategoryService; import com.ruoyi.flowable.service.IWfModelService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; /** * 工作流流程模型管理 * * @author fengcheng */ @Slf4j @RequiredArgsConstructor @RestController @RequestMapping("/flowable/workflow/model") public class WfModelController extends BaseController { /** * 流程模型服务 */ private final IWfModelService modelService; /** * 流程分类服务 */ private final IWfCategoryService categoryService; /** * 查询流程模型列表 * * @param modelBo 流程模型对象 */ @PreAuthorize("@ss.hasPermi('workflow:model:list')") @GetMapping("/list") public R<List<WfModelVo>> list(WfModelBo modelBo) { List<WfModelVo> list = modelService.selectList(modelBo); return R.ok(list); } /** * 查询流程模型列表 * * @param modelBo 流程模型对象 * @param pageQuery 分页参数 */ @PreAuthorize("@ss.hasPermi('workflow:model:list')") @GetMapping("/historyList") public TableDataInfo<WfModelVo> historyList(WfModelBo modelBo, PageQuery pageQuery) { return modelService.historyList(modelBo, pageQuery); } /** * 获取流程模型详细信息 * * @param modelId 模型主键 */ @PreAuthorize("@ss.hasPermi('workflow:model:query')") @GetMapping(value = "/{modelId}") public R<WfModelVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable("modelId") String modelId) { return R.ok(modelService.getModel(modelId)); } /** * 获取流程表单详细信息 * * @param modelId 模型主键 */ @PreAuthorize("@ss.hasPermi('workflow:model:query')") @GetMapping(value = "/bpmnXml/{modelId}") public R<String> getBpmnXml(@NotNull(message = "主键不能为空") @PathVariable("modelId") String modelId) { return R.ok(modelService.queryBpmnXmlById(modelId), "操作成功"); } /** * 新增流程模型 */ @PreAuthorize("@ss.hasPermi('workflow:model:add')") @Log(title = "流程模型", businessType = BusinessType.INSERT) @PostMapping public R<String> add(@RequestBody WfModelBo modelBo) { return R.ok(modelService.insertModel(modelBo)); } /** * 修改流程模型 */ @PreAuthorize("@ss.hasPermi('workflow:model:edit')") @Log(title = "流程模型", businessType = BusinessType.UPDATE) @PutMapping public R<Void> edit(@RequestBody WfModelBo modelBo) { modelService.updateModel(modelBo); return R.ok(); } /** * 保存流程模型 */ @PreAuthorize("@ss.hasPermi('workflow:model:save')") @Log(title = "保存流程模型", businessType = BusinessType.INSERT) @PostMapping("/save") public R<String> save(@RequestBody WfModelBo modelBo) { modelService.saveModel(modelBo); return R.ok(); } /** * 设为最新流程模型 * * @param modelId * @return */ @PreAuthorize("@ss.hasPermi('workflow:model:save')") @Log(title = "设为最新流程模型", businessType = BusinessType.INSERT) @PostMapping("/latest") public R<?> latest(@RequestParam String modelId) { modelService.latestModel(modelId); return R.ok(); } /** * 删除流程模型 * * @param modelIds 流程模型主键串 */ @PreAuthorize("@ss.hasPermi('workflow:model:remove')") @Log(title = "删除流程模型", businessType = BusinessType.DELETE) @DeleteMapping("/{modelIds}") public R<String> remove(@NotEmpty(message = "主键不能为空") @PathVariable String[] modelIds) { modelService.deleteByIds(Arrays.asList(modelIds)); return R.ok(); } /** * 部署流程模型 * * @param modelId 流程模型主键 */ @PreAuthorize("@ss.hasPermi('workflow:model:deploy')") @Log(title = "部署流程模型", businessType = BusinessType.INSERT) @PostMapping("/deploy") public AjaxResult deployModel(@RequestParam String modelId) { return toAjax(modelService.deployModel(modelId)); } /** * 导出流程模型数据 */ @Log(title = "导出流程模型数据", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('workflow:model:export')") @PostMapping("/export") public void export(WfModelBo modelBo, HttpServletResponse response) { List<WfModelVo> list = modelService.list(modelBo); List<WfModelExportVo> listVo = BeanUtil.copyToList(list, WfModelExportVo.class); List<WfCategoryVo> categoryVos = categoryService.queryList(new WfCategory()); Map<String, String> categoryMap = categoryVos.stream() .collect(Collectors.toMap(WfCategoryVo::getCode, WfCategoryVo::getCategoryName)); for (WfModelExportVo exportVo : listVo) { exportVo.setCategoryName(categoryMap.get(exportVo.getCategory())); } ExcelUtil<WfModelExportVo> util = new ExcelUtil<WfModelExportVo>(WfModelExportVo.class); util.exportExcel(response, listVo, "流程模型数据"); } }
2929004360/ruoyi-sign
3,386
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfFlowMenuController.java
package com.ruoyi.web.controller.flowable; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.domain.WfFlowMenu; import com.ruoyi.flowable.service.IWfFlowMenuService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * 流程菜单Controller * * @author fengcheng * @date 2024-07-12 */ @RestController @RequestMapping("/flowable/wfFlowMenu" ) public class WfFlowMenuController extends BaseController { @Autowired private IWfFlowMenuService wfFlowMenuService; /** * 查询流程菜单列表 */ @PreAuthorize("@ss.hasPermi('workflow:wfFlowMenu:list')") @GetMapping("/list" ) public TableDataInfo list(WfFlowMenu wfFlowMenu) { startPage(); List<WfFlowMenu> list = wfFlowMenuService.selectWfFlowMenuList(wfFlowMenu); return getDataTable(list); } /** * 导出流程菜单列表 */ @PreAuthorize("@ss.hasPermi('workflow:wfFlowMenu:export')") @Log(title = "流程菜单" , businessType = BusinessType.EXPORT) @PostMapping("/export" ) public void export(HttpServletResponse response, WfFlowMenu wfFlowMenu) { List<WfFlowMenu> list = wfFlowMenuService.selectWfFlowMenuList(wfFlowMenu); ExcelUtil<WfFlowMenu> util = new ExcelUtil<WfFlowMenu>(WfFlowMenu.class); util.exportExcel(response, list, "流程菜单数据" ); } /** * 获取流程菜单详细信息 */ @PreAuthorize("@ss.hasPermi('workflow:wfFlowMenu:query')") @GetMapping(value = "/{flowMenuId}" ) public AjaxResult getInfo(@PathVariable("flowMenuId" ) String flowMenuId) { return success(wfFlowMenuService.selectWfFlowMenuByFlowMenuId(flowMenuId)); } /** * 获取流程菜单详细信息 */ @PreAuthorize("@ss.hasPermi('workflow:wfFlowMenu:query')") @GetMapping(value = "/getWfFlowMenuInfo/{menuId}" ) public AjaxResult getWfFlowMenuInfo(@PathVariable("menuId" ) String menuId) { return success(wfFlowMenuService.getWfFlowMenuInfo(menuId)); } /** * 新增流程菜单 */ @PreAuthorize("@ss.hasPermi('workflow:wfFlowMenu:add')") @Log(title = "流程菜单" , businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody WfFlowMenu wfFlowMenu) { return toAjax(wfFlowMenuService.insertWfFlowMenu(wfFlowMenu)); } /** * 修改流程菜单 */ @PreAuthorize("@ss.hasPermi('workflow:wfFlowMenu:edit')") @Log(title = "流程菜单" , businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody WfFlowMenu wfFlowMenu) { return toAjax(wfFlowMenuService.updateWfFlowMenu(wfFlowMenu)); } /** * 删除流程菜单 * * @param flowMenuIds * @return */ @PreAuthorize("@ss.hasPermi('workflow:wfFlowMenu:remove')") @Log(title = "流程菜单" , businessType = BusinessType.DELETE) @DeleteMapping("/{flowMenuIds}" ) public AjaxResult remove(@PathVariable Long[] flowMenuIds) { return toAjax(wfFlowMenuService.deleteWfFlowMenuByFlowMenuIds(flowMenuIds)); } }
281677160/openwrt-package
45,981
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua
-- Copyright (C) 2017 yushi studio <ywb94@qq.com> github.com/ywb94 -- Licensed to the public under the GNU General Public License v3. require "nixio.fs" require "luci.sys" require "luci.http" require "luci.jsonc" require "luci.model.uci" local uci = require "luci.model.uci".cursor() local m, s, o local sid = arg[1] local uuid = luci.sys.exec("cat /proc/sys/kernel/random/uuid") -- 确保正确判断程序是否存在 local function is_finded(e) return luci.sys.exec(string.format('type -t -p "%s" 2>/dev/null', e)) ~= "" end local function is_installed(e) return luci.model.ipkg.installed(e) end -- 判断系统是否 JS 版 LuCI local function is_js_luci() return luci.sys.call('[ -f "/www/luci-static/resources/uci.js" ]') == 0 end -- 显示提示条 local function showMsg_Redirect(redirectUrl, delay) local message = translate("Applying configuration changes… %ds") luci.http.write([[ <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function() { // 创建遮罩层 var overlay = document.createElement('div'); overlay.style.position = 'fixed'; overlay.style.top = '0'; overlay.style.left = '0'; overlay.style.width = '100%'; overlay.style.height = '100%'; overlay.style.backgroundColor = 'rgba(0, 0, 0, 0.5)'; overlay.style.zIndex = '9999'; // 创建提示条 var messageDiv = document.createElement('div'); messageDiv.style.position = 'fixed'; messageDiv.style.top = '20%'; messageDiv.style.left = '50%'; messageDiv.style.transform = 'translateX(-50%)'; messageDiv.style.width = '81%'; //messageDiv.style.maxWidth = '1200px'; messageDiv.style.background = '#ffffff'; messageDiv.style.border = '1px solid #000000'; messageDiv.style.borderRadius = '5px'; messageDiv.style.padding = '18px 20px'; messageDiv.style.color = '#000000'; //messageDiv.style.fontWeight = 'bold'; messageDiv.style.fontFamily = 'Arial, Helvetica, sans-serif'; messageDiv.style.textAlign = 'left'; messageDiv.style.zIndex = '10000'; var spinner = document.createElement('span'); spinner.style.display = 'inline-block'; spinner.style.width = '20px'; spinner.style.height = '20px'; spinner.style.marginRight = '10px'; spinner.style.border = '3px solid #666'; spinner.style.borderTopColor = '#000'; spinner.style.borderRadius = '50%'; spinner.style.animation = 'spin 1s linear infinite'; messageDiv.appendChild(spinner); var textSpan = document.createElement('span'); var remaining = Math.ceil(]] .. 90000 .. [[ / 1000); function updateMessage() { textSpan.textContent = "]] .. message .. [[".replace("%ds", remaining + "s"); } updateMessage(); messageDiv.appendChild(textSpan); document.body.appendChild(messageDiv); var style = document.createElement('style'); style.innerHTML = ` @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }`; document.head.appendChild(style); var countdownInterval = setInterval(function() { remaining--; if (remaining < 0) remaining = 0; updateMessage(); if (remaining <= 0) clearInterval(countdownInterval); }, 1000); // 将遮罩层和提示条添加到页面 document.body.appendChild(overlay); document.body.appendChild(messageDiv); // 重定向或隐藏提示条和遮罩层 var redirectUrl = ']] .. (redirectUrl or "") .. [['; var delay = ]] .. (delay or 3000) .. [[; setTimeout(function() { if (redirectUrl) { window.location.href = redirectUrl; } else { if (messageDiv && messageDiv.parentNode) { messageDiv.parentNode.removeChild(messageDiv); } if (overlay && overlay.parentNode) { overlay.parentNode.removeChild(overlay); } window.location.href = window.location.href; } }, delay); }); </script> ]]) end -- 兼容新旧版本 LuCI local function set_apply_on_parse(map) if not map then return end if is_js_luci() then -- JS 版 LuCI:显示提示条并延迟跳转 map.apply_on_parse = false map.on_after_apply = function(self) luci.http.prepare_content("text/html") showMsg_Redirect(self.redirect or luci.dispatcher.build_url() , 3000) end else -- Lua 版 LuCI:直接跳转 map.apply_on_parse = true map.on_after_apply = function(self) luci.http.redirect(self.redirect) end end -- 保持原渲染流程 map.render = function(self, ...) getmetatable(self).__index.render(self, ...) -- 保持原渲染流程 end end local has_ss_rust = is_finded("sslocal") or is_finded("ssserver") local has_ss_libev = is_finded("ss-redir") or is_finded("ss-local") -- 读取当前存储的 ss_type local ss_type = uci:get_first("shadowsocksr", "server_subscribe", "ss_type") local server_table = {} local encrypt_methods = { -- ssr "none", "table", "rc4", "rc4-md5-6", "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "cast5-cfb", "des-cfb", "idea-cfb", "rc2-cfb", "seed-cfb", "salsa20", "chacha20", "chacha20-ietf" } local encrypt_methods_ss = { -- plain "none", "plain", -- aead "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305", -- aead 2022 "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305" --[[ stream "none", "plain", "table", "rc4", "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "salsa20", "chacha20", "chacha20-ietf" ]]-- } local protocol = { -- ssr "origin", "verify_deflate", "auth_sha1_v4", "auth_aes128_sha1", "auth_aes128_md5", "auth_chain_a", "auth_chain_b", "auth_chain_c", "auth_chain_d", "auth_chain_e", "auth_chain_f" } local obfs = { -- ssr "plain", "http_simple", "http_post", "random_head", "tls1.2_ticket_auth" } local securitys = { -- vmess "auto", "none", "zero", "aes-128-gcm", "chacha20-poly1305" } local tls_flows = { -- tls "xtls-rprx-vision", "xtls-rprx-vision-udp443", "none" } m = Map("shadowsocksr", translate("Edit ShadowSocksR Server")) m.redirect = luci.dispatcher.build_url("admin/services/shadowsocksr/servers") if m.uci:get("shadowsocksr", sid) ~= "servers" then luci.http.redirect(m.redirect) return end -- 保存&应用成功后跳转到节点列表 set_apply_on_parse(m) -- [[ Servers Setting ]]-- s = m:section(NamedSection, sid, "servers") s.anonymous = true s.addremove = false o = s:option(DummyValue, "ssr_url", "SS/SSR/V2RAY/TROJAN/HYSTERIA2 URL") o.rawhtml = true o.template = "shadowsocksr/ssrurl" o.value = sid o = s:option(ListValue, "type", translate("Server Node Type")) if is_finded("xray") or is_finded("v2ray") then o:value("v2ray", translate("V2Ray/XRay")) end if is_finded("ssr-redir") then o:value("ssr", translate("ShadowsocksR")) end if has_ss_rust or has_ss_libev then o:value("ss", translate("ShadowSocks")) end if is_finded("trojan") then o:value("trojan", translate("Trojan")) end if is_finded("naive") then o:value("naiveproxy", translate("NaiveProxy")) end if is_finded("hysteria") then o:value("hysteria2", translate("Hysteria2")) end if is_finded("tuic-client") then o:value("tuic", translate("TUIC")) end if is_finded("shadow-tls") and is_finded("sslocal") then o:value("shadowtls", translate("Shadow-TLS")) end if is_finded("ipt2socks") then o:value("socks5", translate("Socks5")) end if is_finded("redsocks2") then o:value("tun", translate("Network Tunnel")) end o.description = translate("Using incorrect encryption mothod may causes service fail to start") o = s:option(Value, "alias", translate("Alias(optional)")) o = s:option(ListValue, "iface", translate("Network interface to use")) for _, e in ipairs(luci.sys.net.devices()) do if e ~= "lo" then o:value(e) end end o:depends("type", "tun") o.description = translate("Redirect traffic to this network interface") -- 新增一个选择框,用于选择 Shadowsocks 版本 o = s:option(ListValue, "has_ss_type", string.format("<b><span style='color:red;'>%s</span></b>", translate("ShadowSocks Node Use Version"))) o.description = translate("Selection ShadowSocks Node Use Version.") -- 设置默认 Shadowsocks 版本 -- 动态添加选项 if has_ss_rust then o:value("ss-rust", translate("ShadowSocks-rust Version")) end if has_ss_libev then o:value("ss-libev", translate("ShadowSocks-libev Version")) end -- 设置默认值 if ss_type == "ss-rust" then o.default = "ss-rust" elseif ss_type == "ss-libev" then o.default = "ss-libev" end o:depends("type", "ss") o.write = function(self, section, value) -- 更新 Shadowsocks 节点的 has_ss_type uci:foreach("shadowsocksr", "servers", function(s) local node_type = uci:get("shadowsocksr", s[".name"], "type") -- 获取节点类型 if node_type == "ss" then -- 仅修改 Shadowsocks 节点 local old_value = uci:get("shadowsocksr", s[".name"], "has_ss_type") if old_value ~= value then uci:set("shadowsocksr", s[".name"], "has_ss_type", value) end end end) -- 更新 server_subscribe 的 ss_type local old_value = uci:get("shadowsocksr", "server_subscribe", "ss_type") if old_value ~= value then uci:set("shadowsocksr", "@server_subscribe[0]", "ss_type", value) end -- 更新当前 section 的 has_ss_type Value.write(self, section, value) end o = s:option(ListValue, "v2ray_protocol", translate("V2Ray/XRay protocol")) o:value("vless", translate("VLESS")) o:value("vmess", translate("VMess")) o:value("trojan", translate("Trojan")) o:value("shadowsocks", translate("ShadowSocks")) if is_finded("xray") then o:value("wireguard", translate("WireGuard")) end o:value("socks", translate("Socks")) o:value("http", translate("HTTP")) o:depends("type", "v2ray") o = s:option(Value, "server", translate("Server Address")) o.datatype = "host" o.rmempty = false o:depends("type", "ssr") o:depends("type", "ss") o:depends("type", "v2ray") o:depends("type", "trojan") o:depends("type", "naiveproxy") o:depends("type", "hysteria2") o:depends("type", "tuic") o:depends("type", "shadowtls") o:depends("type", "socks5") o = s:option(Value, "server_port", translate("Server Port")) o.datatype = "port" o.rmempty = true o:depends("type", "ssr") o:depends("type", "ss") o:depends("type", "v2ray") o:depends("type", "trojan") o:depends("type", "naiveproxy") o:depends("type", "hysteria2") o:depends("type", "tuic") o:depends("type", "shadowtls") o:depends("type", "socks5") o = s:option(Flag, "auth_enable", translate("Enable Authentication")) o.rmempty = false o.default = "0" o:depends("type", "socks5") o:depends({type = "v2ray", v2ray_protocol = "http"}) o:depends({type = "v2ray", v2ray_protocol = "socks"}) o = s:option(Value, "username", translate("Username")) o.rmempty = true o:depends("type", "naiveproxy") o:depends({type = "socks5", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "socks", auth_enable = true}) o = s:option(Value, "password", translate("Password")) o.password = true o.rmempty = true o:depends("type", "ssr") o:depends("type", "ss") o:depends("type", "trojan") o:depends("type", "naiveproxy") o:depends("type", "shadowtls") o:depends({type = "socks5", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "socks", socks_ver = "5", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o:depends({type = "v2ray", v2ray_protocol = "trojan"}) o = s:option(ListValue, "encrypt_method", translate("Encrypt Method")) for _, v in ipairs(encrypt_methods) do o:value(v) end o.rmempty = true o:depends("type", "ssr") o = s:option(ListValue, "encrypt_method_ss", translate("Encrypt Method")) for _, v in ipairs(encrypt_methods_ss) do if v == "none" then o.default = "none" o:value("none", translate("none")) else o:value(v, translate(v)) end end o.rmempty = true o:depends("type", "ss") o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o = s:option(Flag, "uot", translate("UDP over TCP")) o.description = translate("Enable the SUoT protocol, requires server support.") o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o.default = "0" o = s:option(Flag, "ivCheck", translate("Bloom Filter")) o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o.default = "1" -- [[ Enable Shadowsocks Plugin ]]-- o = s:option(Flag, "enable_plugin", translate("Enable Plugin")) o.rmempty = true o:depends("type", "ss") o.default = "0" -- Shadowsocks Plugin o = s:option(ListValue, "plugin", translate("Obfs")) o:value("none", translate("None")) if is_finded("obfs-local") then o:value("obfs-local", translate("obfs-local")) end if is_finded("v2ray-plugin") then o:value("v2ray-plugin", translate("v2ray-plugin")) end if is_finded("xray-plugin") then o:value("xray-plugin", translate("xray-plugin")) end if is_finded("shadow-tls") then o:value("shadow-tls", translate("shadow-tls")) end o:value("custom", translate("Custom")) o.rmempty = true o:depends({enable_plugin = true}) o = s:option(Value, "custom_plugin", translate("Custom Plugin Path")) o.placeholder = "/path/to/custom-plugin" o:depends({plugin = "custom"}) o = s:option(Value, "plugin_opts", translate("Plugin Opts")) o.rmempty = true o:depends({enable_plugin = true}) o = s:option(ListValue, "protocol", translate("Protocol")) for _, v in ipairs(protocol) do o:value(v) end o.rmempty = true o:depends("type", "ssr") o = s:option(Value, "protocol_param", translate("Protocol param (optional)")) o:depends("type", "ssr") o = s:option(ListValue, "obfs", translate("Obfs")) for _, v in ipairs(obfs) do o:value(v) end o.rmempty = true o:depends("type", "ssr") o = s:option(Value, "obfs_param", translate("Obfs param (optional)")) o:depends("type", "ssr") -- [[ Hysteria2 ]]-- o = s:option(Value, "hy2_auth", translate("Users Authentication")) o:depends("type", "hysteria2") o.password = true o.rmempty = false o = s:option(Flag, "flag_port_hopping", translate("Enable Port Hopping")) o:depends("type", "hysteria2") o.rmempty = true o.default = "0" o = s:option(Value, "port_range", translate("Port hopping range")) o.description = translate("Format as 10000:20000 or 10000-20000 Multiple groups are separated by commas (,).") o:depends({type = "hysteria2", flag_port_hopping = true}) --o.datatype = "portrange" o.rmempty = true o = s:option(Flag, "flag_transport", translate("Enable Transport Protocol Settings")) o:depends("type", "hysteria2") o.rmempty = true o.default = "0" o = s:option(ListValue, "transport_protocol", translate("Transport Protocol")) o:depends({type = "hysteria2", flag_transport = true}) o:value("udp", translate("UDP")) o.default = "udp" o.rmempty = true o = s:option(Value, "hopinterval", translate("Port Hopping Interval(Unit:Second)")) o:depends({type = "hysteria2", flag_transport = true, flag_port_hopping = true}) o.datatype = "uinteger" o.rmempty = true o.default = "30" o = s:option(Flag, "flag_obfs", translate("Enable Obfuscation")) o:depends("type", "hysteria2") o.rmempty = true o.default = "0" o = s:option(Flag, "lazy_mode", translate("Enable Lazy Mode")) o:depends("type", "hysteria2") o.rmempty = true o.default = "0" o = s:option(Value, "obfs_type", translate("Obfuscation Type")) o:depends({type = "hysteria2", flag_obfs = "1"}) o.rmempty = true o.placeholder = "salamander" o = s:option(Value, "salamander", translate("Obfuscation Password")) o:depends({type = "hysteria2", flag_obfs = "1"}) o.password = true o.rmempty = true o.placeholder = "cry_me_a_r1ver" o = s:option(Flag, "flag_quicparam", translate("Hysterir QUIC parameters")) o:depends("type", "hysteria2") o.rmempty = true o.default = "0" o = s:option(Flag, "disablepathmtudiscovery", translate("Disable QUIC path MTU discovery")) o:depends({type = "hysteria2",flag_quicparam = "1"}) o.rmempty = true o.default = false --[[Hysteria2 QUIC parameters setting]] o = s:option(Value, "initstreamreceivewindow", translate("QUIC initStreamReceiveWindow")) o:depends({type = "hysteria2", flag_quicparam = "1"}) o.datatype = "uinteger" o.rmempty = true o.default = "8388608" o = s:option(Value, "maxstreamreceivewindow", translate("QUIC maxStreamReceiveWindow")) o:depends({type = "hysteria2", flag_quicparam = "1"}) o.datatype = "uinteger" o.rmempty = true o.default = "8388608" o = s:option(Value, "initconnreceivewindow", translate("QUIC initConnReceiveWindow")) o:depends({type = "hysteria2", flag_quicparam = "1"}) o.datatype = "uinteger" o.rmempty = true o.default = "20971520" o = s:option(Value, "maxconnreceivewindow", translate("QUIC maxConnReceiveWindow")) o:depends({type = "hysteria2", flag_quicparam = "1"}) o.datatype = "uinteger" o.rmempty = true o.default = "20971520" o = s:option(Value, "maxidletimeout", translate("QUIC maxIdleTimeout(Unit:second)")) o:depends({type = "hysteria2", flag_quicparam = "1"}) o.rmempty = true o.datatype = "uinteger" o.default = "30" o = s:option(Value, "keepaliveperiod", translate("The keep-alive period.(Unit:second)")) o.description = translate("Default value 0 indicatesno heartbeat.") o:depends({type = "hysteria2", flag_quicparam = "1"}) o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.rmempty = true o.datatype = "uinteger" o.default = "10" --[[ Shadow-TLS Options ]] o = s:option(ListValue, "shadowtls_protocol", translate("shadowTLS protocol Version")) o:depends("type", "shadowtls") o:value("v3", translate("Enable V3 protocol.")) o:value("v2", translate("Enable V2 protocol.")) o.default = "v3" o.rmempty = true o = s:option(Flag, "strict", translate("TLS 1.3 Strict mode")) o:depends("type", "shadowtls") o.default = "1" o.rmempty = false o = s:option(Flag, "fastopen", translate("TCP Fast Open"), translate("Enabling TCP Fast Open Requires Server Support.")) o:depends("type", "shadowtls") o.default = "0" o.rmempty = false o = s:option(Flag, "disable_nodelay", translate("Disable TCP No_delay")) o:depends("type", "shadowtls") o.default = "0" o.rmempty = true o = s:option(Value, "shadowtls_sni", translate("shadow-TLS SNI")) o:depends("type", "shadowtls") o.datatype = "host" o.rmempty = true o.default = "" --[[ add a ListValue for Choose chain type,sslocal or vmess ]] o = s:option(ListValue, "chain_type", translate("Shadow-TLS ChainPoxy type")) o:depends("type", "shadowtls") if is_finded("sslocal") then o:value("sslocal", translate("ShadowSocks-rust Version")) end if is_finded("xray") or is_finded("v2ray") then o:value("vmess", translate("Vmess Protocol")) end o.default = "sslocal" o.rmempty = false o = s:option(Value, "sslocal_password",translate("Shadowsocks password")) o:depends({type = "shadowtls", chain_type = "sslocal"}) o.rmempty = true o = s:option(ListValue, "sslocal_method", translate("Encrypt Method")) o:depends({type = "shadowtls", chain_type = "sslocal"}) for _, v in ipairs(encrypt_methods_ss) do o:value(v) end o = s:option(Value, "vmess_uuid", translate("Vmess UUID")) o:depends({type = "shadowtls", chain_type = "vmess"}) o.rmempty = false o.default = uuid o = s:option(ListValue, "vmess_method", translate("Encrypt Method")) o:depends({type = "shadowtls", chain_type = "vmess"}) for _, v in ipairs(securitys) do o:value(v, v:lower()) end o.rmempty = true o.default="auto" -- [[ TUIC ]] -- TuicNameId o = s:option(Value, "tuic_uuid", translate("TUIC User UUID")) o.password = true o.rmempty = true o.default = uuid o:depends("type", "tuic") --Tuic IP o = s:option(Value, "tuic_ip", translate("TUIC Server IP Address")) o.rmempty = true o.datatype = "ip4addr" o.default = "" o:depends("type", "tuic") -- Tuic Password o = s:option(Value, "tuic_passwd", translate("TUIC User Password")) o.password = true o.rmempty = true o.default = "" o:depends("type", "tuic") o = s:option(ListValue, "udp_relay_mode", translate("UDP relay mode")) o:depends("type", "tuic") o:value("native", translate("native UDP characteristics")) o:value("quic", translate("lossless UDP relay using QUIC streams")) o.default = "native" o.rmempty = true o = s:option(ListValue, "congestion_control", translate("Congestion control algorithm")) o:depends("type", "tuic") o:value("bbr", translate("BBR")) o:value("cubic", translate("CUBIC")) o:value("new_reno", translate("New Reno")) o.default = "cubic" o.rmempty = true o = s:option(Value, "heartbeat", translate("Heartbeat interval(second)")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = "3" o.rmempty = true o = s:option(Value, "timeout", translate("Timeout for establishing a connection to server(second)")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = "8" o.rmempty = true o = s:option(Value, "gc_interval", translate("Garbage collection interval(second)")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = "3" o.rmempty = true o = s:option(Value, "gc_lifetime", translate("Garbage collection lifetime(second)")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = "15" o.rmempty = true o = s:option(Value, "send_window", translate("TUIC send window")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = 20971520 o.rmempty = true o = s:option(Value, "receive_window", translate("TUIC receive window")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = 10485760 o.rmempty = true o = s:option(Flag, "disable_sni", translate("Disable SNI")) o:depends("type", "tuic") o.default = "0" o.rmempty = true o = s:option(Flag, "zero_rtt_handshake", translate("Enable 0-RTT QUIC handshake")) o:depends("type", "tuic") o.default = "0" o.rmempty = true -- Tuic settings for the local inbound socks5 server o = s:option(Flag, "tuic_dual_stack", translate("Dual-stack Listening Socket")) o.description = translate("If this option is not set, the socket behavior is platform dependent.") o:depends("type", "tuic") o.default = "0" o.rmempty = true o = s:option(Value, "tuic_max_package_size", translate("Maximum packet size the socks5 server can receive from external")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = 1500 o.rmempty = true -- AlterId o = s:option(Value, "alter_id", translate("AlterId")) o.datatype = "port" o.default = 16 o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vmess"}) -- VmessId o = s:option(Value, "vmess_id", translate("Vmess/VLESS ID (UUID)")) o.password = true o.rmempty = true o.default = uuid o:depends({type = "v2ray", v2ray_protocol = "vmess"}) o:depends({type = "v2ray", v2ray_protocol = "vless"}) -- VLESS Encryption o = s:option(Value, "vless_encryption", translate("VLESS Encryption")) o.rmempty = true o.default = "none" o:value("none") o:depends({type = "v2ray", v2ray_protocol = "vless"}) -- 加密方式 o = s:option(ListValue, "security", translate("Encrypt Method")) for _, v in ipairs(securitys) do o:value(v, v:upper()) end o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vmess"}) -- SOCKS Version o = s:option(ListValue, "socks_ver", translate("Socks Version")) o:value("4", "Socks4") o:value("4a", "Socks4A") o:value("5", "Socks5") o.rmempty = true o.default = "5" o:depends({type = "v2ray", v2ray_protocol = "socks"}) -- 传输协议 o = s:option(ListValue, "transport", translate("Transport")) o:value("raw", "RAW (TCP)") o:value("kcp", "mKCP") o:value("ws", "WebSocket") o:value("httpupgrade", "HTTPUpgrade") o:value("xhttp", "XHTTP (SplitHTTP)") o:value("h2", "HTTP/2") o:value("quic", "QUIC") o:value("grpc", "gRPC") o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vless"}) o:depends({type = "v2ray", v2ray_protocol = "vmess"}) o:depends({type = "v2ray", v2ray_protocol = "trojan"}) o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o:depends({type = "v2ray", v2ray_protocol = "socks"}) o:depends({type = "v2ray", v2ray_protocol = "http"}) -- [[ RAW部分 ]]-- -- TCP伪装 o = s:option(ListValue, "tcp_guise", translate("Camouflage Type")) o:depends("transport", "raw") o:value("none", translate("None")) o:value("http", translate("HTTP")) o.rmempty = true -- HTTP域名 o = s:option(Value, "http_host", translate("HTTP Host")) o:depends("tcp_guise", "http") o.rmempty = true -- HTTP路径 o = s:option(Value, "http_path", translate("HTTP Path")) o:depends("tcp_guise", "http") o.rmempty = true -- [[ WS部分 ]]-- -- WS域名 o = s:option(Value, "ws_host", translate("WebSocket Host")) o:depends({transport = "ws", tls = false}) o.datatype = "hostname" o.rmempty = true -- WS路径 o = s:option(Value, "ws_path", translate("WebSocket Path")) o:depends("transport", "ws") o.rmempty = true if is_finded("v2ray") then -- WS前置数据 o = s:option(Value, "ws_ed", translate("Max Early Data")) o:depends("ws_ed_enable", true) o.datatype = "uinteger" o:value("2048") o.rmempty = true -- WS前置数据标头 o = s:option(Value, "ws_ed_header", translate("Early Data Header Name")) o:depends("ws_ed_enable", true) o:value("Sec-WebSocket-Protocol") o.rmempty = true end -- [[ httpupgrade部分 ]]-- -- httpupgrade域名 o = s:option(Value, "httpupgrade_host", translate("Httpupgrade Host")) o:depends({transport = "httpupgrade", tls = false}) o.rmempty = true -- httpupgrade路径 o = s:option(Value, "httpupgrade_path", translate("Httpupgrade Path")) o:depends("transport", "httpupgrade") o.rmempty = true -- [[ XHTTP部分 ]]-- -- XHTTP 模式 o = s:option(ListValue, "xhttp_mode", translate("XHTTP Mode")) o:depends("transport", "xhttp") o.default = "auto" o:value("auto") o:value("packet-up") o:value("stream-up") o:value("stream-one") -- XHTTP 主机 o = s:option(Value, "xhttp_host", translate("XHTTP Host")) o.datatype = "hostname" o:depends("transport", "xhttp") o.rmempty = true -- XHTTP 路径 o = s:option(Value, "xhttp_path", translate("XHTTP Path")) o.placeholder = "/" o:depends("transport", "xhttp") o.rmempty = true -- XHTTP 附加项 o = s:option(Flag, "enable_xhttp_extra", translate("XHTTP Extra")) o.description = translate("Enable this option to configure XHTTP Extra (JSON format).") o.rmempty = true o.default = "0" o:depends("transport", "xhttp") o = s:option(TextValue, "xhttp_extra", " ") o.description = translate( "<font><b>" .. translate("Configure XHTTP Extra Settings (JSON format), see:") .. "</b></font>" .. " <a href='https://xtls.github.io/config/transports/splithttp.html#extra' target='_blank'>" .. "<font style='color:green'><b>" .. translate("Click to the page") .. "</b></font></a>") o:depends("enable_xhttp_extra", true) o.rmempty = true o.rows = 10 o.wrap = "off" o.custom_write = function(self, section, value) m:set(section, "xhttp_extra", value) local success, data = pcall(luci.jsonc.parse, value) if success and data then local address = (data.extra and data.extra.downloadSettings and data.extra.downloadSettings.address) or (data.downloadSettings and data.downloadSettings.address) if address and address ~= "" then m:set(section, "download_address", address) else m:del(section, "download_address") end else m:del(section, "download_address") end end o.validate = function(self, value) value = value:gsub("\r\n", "\n"):gsub("^[ \t]*\n", ""):gsub("\n[ \t]*$", ""):gsub("\n[ \t]*\n", "\n") if value:sub(-1) == "\n" then value = value:sub(1, -2) end local success, data = pcall(luci.jsonc.parse, value) if not success or not data then return nil, translate("Invalid JSON format") end return value end -- [[ H2部分 ]]-- -- H2域名 o = s:option(Value, "h2_host", translate("HTTP/2 Host")) o:depends("transport", "h2") o.rmempty = true -- H2路径 o = s:option(Value, "h2_path", translate("HTTP/2 Path")) o:depends("transport", "h2") o.rmempty = true -- gRPC o = s:option(Value, "serviceName", translate("gRPC Service Name")) o:depends("transport", "grpc") o.rmempty = true if is_finded("xray") then -- gPRC模式 o = s:option(ListValue, "grpc_mode", translate("gRPC Mode")) o:depends("transport", "grpc") o:value("gun", translate("Gun")) o:value("multi", translate("Multi")) o.rmempty = true end if is_finded("xray") then -- gRPC初始窗口 o = s:option(Value, "initial_windows_size", translate("Initial Windows Size")) o.datatype = "uinteger" o:depends("transport", "grpc") o.default = 0 o.rmempty = true -- H2/gRPC健康检查 o = s:option(Flag, "health_check", translate("H2/gRPC Health Check")) o:depends("transport", "h2") o:depends("transport", "grpc") o.rmempty = true o = s:option(Value, "read_idle_timeout", translate("H2 Read Idle Timeout")) o.datatype = "uinteger" o:depends({health_check = true, transport = "h2"}) o.default = 60 o.rmempty = true o = s:option(Value, "idle_timeout", translate("gRPC Idle Timeout")) o.datatype = "uinteger" o:depends({health_check = true, transport = "grpc"}) o.default = 60 o.rmempty = true o = s:option(Value, "health_check_timeout", translate("Health Check Timeout")) o.datatype = "uinteger" o:depends("health_check", 1) o.default = 20 o.rmempty = true o = s:option(Flag, "permit_without_stream", translate("Permit Without Stream")) o:depends({health_check = true, transport = "grpc"}) o.rmempty = true end -- [[ QUIC部分 ]]-- o = s:option(ListValue, "quic_security", translate("QUIC Security")) o:depends("transport", "quic") o:value("none", translate("None")) o:value("aes-128-gcm", translate("aes-128-gcm")) o:value("chacha20-poly1305", translate("chacha20-poly1305")) o.rmempty = true o = s:option(Value, "quic_key", translate("QUIC Key")) o:depends("transport", "quic") o.rmempty = true o = s:option(ListValue, "quic_guise", translate("Header")) o:depends("transport", "quic") o.rmempty = true o:value("none", translate("None")) o:value("srtp", translate("VideoCall (SRTP)")) o:value("utp", translate("BitTorrent (uTP)")) o:value("wechat-video", translate("WechatVideo")) o:value("dtls", translate("DTLS 1.2")) o:value("wireguard", translate("WireGuard")) -- [[ mKCP部分 ]]-- o = s:option(ListValue, "kcp_guise", translate("Camouflage Type")) o:depends("transport", "kcp") o:value("none", translate("None")) o:value("srtp", translate("VideoCall (SRTP)")) o:value("utp", translate("BitTorrent (uTP)")) o:value("wechat-video", translate("WechatVideo")) o:value("dtls", translate("DTLS 1.2")) o:value("wireguard", translate("WireGuard")) o.rmempty = true o = s:option(Value, "mtu", translate("MTU")) o.datatype = "uinteger" o:depends("transport", "kcp") o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) -- o.default = 1350 o.rmempty = true o = s:option(Value, "tti", translate("TTI")) o.datatype = "uinteger" o:depends("transport", "kcp") o.default = 50 o.rmempty = true o = s:option(Value, "uplink_capacity", translate("Uplink Capacity(Default:Mbps)")) o.datatype = "uinteger" o:depends("transport", "kcp") o:depends("type", "hysteria2") o.placeholder = 5 o.rmempty = true o = s:option(Value, "downlink_capacity", translate("Downlink Capacity(Default:Mbps)")) o.datatype = "uinteger" o:depends("transport", "kcp") o:depends("type", "hysteria2") o.placeholder = 20 o.rmempty = true o = s:option(Value, "read_buffer_size", translate("Read Buffer Size")) o.datatype = "uinteger" o:depends("transport", "kcp") o.default = 2 o.rmempty = true o = s:option(Value, "write_buffer_size", translate("Write Buffer Size")) o.datatype = "uinteger" o:depends("transport", "kcp") o.default = 2 o.rmempty = true o = s:option(Value, "seed", translate("Obfuscate password (optional)")) o:depends("transport", "kcp") o.rmempty = true o = s:option(Flag, "congestion", translate("Congestion")) o:depends("transport", "kcp") o.rmempty = true -- [[ WireGuard 部分 ]]-- o = s:option(Flag, "kernelmode", translate("Enabled Kernel virtual NIC TUN(optional)")) o.description = translate("Virtual NIC TUN of Linux kernel can be used only when system supports and have root permission. If used, IPv6 routing table 1023 is occupied.") o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.default = "0" o.rmempty = true o = s:option(DynamicList, "local_addresses", translate("Local addresses")) o.datatype = "cidr" o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.rmempty = true o = s:option(DynamicList, "reserved", translate("Reserved bytes(optional)")) o.description = translate("Wireguard reserved bytes.") o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.rmempty = true o = s:option(Value, "private_key", translate("Private key")) o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.password = true o.rmempty = true o = s:option(Value, "peer_pubkey", translate("Peer public key")) o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.rmempty = true o = s:option(Value, "preshared_key", translate("Pre-shared key")) o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.password = true o.rmempty = true o = s:option(DynamicList, "allowedips", translate("allowedIPs(optional)")) o.description = translate("Wireguard allows only traffic from specific source IP.") o.datatype = "cidr" o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.default = "0.0.0.0/0" o.rmempty = true -- [[ TLS ]]-- o = s:option(Flag, "tls", translate("TLS")) o.rmempty = true o.default = "0" o:depends({type = "v2ray", v2ray_protocol = "vless", reality = false}) o:depends({type = "v2ray", v2ray_protocol = "vmess", reality = false}) o:depends({type = "v2ray", v2ray_protocol = "trojan", reality = false}) o:depends({type = "v2ray", v2ray_protocol = "shadowsocks", reality = false}) o:depends({type = "v2ray", v2ray_protocol = "socks", socks_ver = "5", reality = false}) o:depends({type = "v2ray", v2ray_protocol = "http", reality = false}) o:depends("type", "trojan") o:depends("type", "hysteria2") -- [[ TLS部分 ]] -- o = s:option(Flag, "tls_sessionTicket", translate("Session Ticket")) o:depends({type = "trojan", tls = true}) o.default = "0" if is_finded("xray") then -- [[ REALITY ]] o = s:option(Flag, "reality", translate("REALITY")) o.rmempty = true o.default = "0" o:depends({type = "v2ray", v2ray_protocol = "vless", tls = false}) o = s:option(Value, "reality_publickey", translate("Public key")) o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vless", reality = true}) o = s:option(Value, "reality_shortid", translate("Short ID")) o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vless", reality = true}) o = s:option(Value, "reality_spiderx", translate("spiderX")) o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vless", reality = true}) -- [[ XTLS ]]-- o = s:option(ListValue, "tls_flow", translate("Flow")) for _, v in ipairs(tls_flows) do if v == "none" then o.default = "none" o:value("none", translate("none")) else o:value(v, translate(v)) end end o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "raw", tls = true}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "raw", reality = true}) o = s:option(ListValue, "xhttp_tls_flow", translate("Flow")) for _, v in ipairs(tls_flows) do if v == "none" then o.default = "none" o:value("none", translate("none")) else o:value("xtls-rprx-vision", translate("xtls-rprx-vision")) end end o.rmempty = true o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "xhttp", tls = true}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "xhttp", reality = true}) -- [[ uTLS ]]-- o = s:option(ListValue, "fingerprint", translate("Finger Print")) o.default = "" 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:value("", translate("disable")) o:depends({type = "v2ray", tls = true}) o:depends({type = "v2ray", reality = true}) o = s:option(Flag, "enable_ech", translate("Enable ECH(optional)")) o.rmempty = true o.default = "0" o:depends({type = "v2ray", tls = true}) o = s:option(TextValue, "ech_config", translate("ECH Config")) o.description = translate( "<font><b>" .. translate("If it is not empty, it indicates that the Client has enabled Encrypted Client, see:") .. "</b></font>" .. " <a href='https://xtls.github.io/config/transport.html#tlsobject' target='_blank'>" .. "<font style='color:green'><b>" .. translate("Click to the page") .. "</b></font></a>") o:depends("enable_ech", true) o.default = "" o.rows = 5 o.wrap = "soft" o.validate = function(self, value) -- 清理空行和多余换行 return (value:gsub("[\r\n]", "")):gsub("^%s*(.-)%s*$", "%1") end o = s:option(ListValue, "ech_ForceQuery", translate("ECH Query Policy")) o.description = translate("Controls the policy used when performing DNS queries for ECH configuration.") o.default = "none" o:value("none") o:value("half") o:value("full") o:depends("enable_ech", true) o = s:option(Flag, "enable_mldsa65verify", translate("Enable ML-DSA-65(optional)")) o.rmempty = true o.default = "0" o:depends({type = "v2ray", reality = true}) o = s:option(TextValue, "reality_mldsa65verify", translate("ML-DSA-65 Public key")) o.description = translate( "<font><b>" .. translate("The client has not configured mldsa65Verify, but it will not perform the \"additional verification\" step and can still connect normally, see:") .. "</b></font>" .. " <a href='https://github.com/XTLS/Xray-core/pull/4915' target='_blank'>" .. "<font style='color:green'><b>" .. translate("Click to the page") .. "</b></font></a>") o:depends("enable_mldsa65verify", true) o.default = "" o.rows = 5 o.wrap = "soft" o.validate = function(self, value) -- 清理空行和多余换行 return (value:gsub("[\r\n]", "")):gsub("^%s*(.-)%s*$", "%1") end end o = s:option(Value, "tls_host", translate("TLS Host")) o.datatype = "hostname" o:depends("tls", true) o:depends("xtls", true) o:depends("reality", true) o.rmempty = true -- TLS ALPN o = s:option(ListValue, "tls_alpn", translate("TLS ALPN")) o.default = "" o:value("", translate("Default")) o:value("h3") o:value("h2") o:value("h3,h2") o:value("http/1.1") o:value("h2,http/1.1") o:value("h3,h2,http/1.1") o:depends("tls", true) o:depends({type = "hysteria2", tls = true}) -- TUIC ALPN o = s:option(ListValue, "tuic_alpn", translate("TUIC ALPN")) o.default = "" o:value("", translate("Default")) o:value("h3") o:value("spdy/3.1") o:value("h3,spdy/3.1") o:depends("type", "tuic") -- [[ allowInsecure ]]-- o = s:option(Flag, "insecure", translate("allowInsecure")) o.rmempty = false o:depends("tls", true) o:depends("type", "hysteria2") o.description = translate("If true, allowss insecure connection at TLS client, e.g., TLS server uses unverifiable certificates.") -- [[ Hysteria2 TLS pinSHA256 ]] -- o = s:option(Value, "pinsha256", translate("Certificate fingerprint")) o:depends("type", "hysteria2") o.rmempty = true -- [[ Mux.Cool ]] -- o = s:option(Flag, "mux", translate("Mux"), translate("Enable Mux.Cool")) o.rmempty = false o.default = false o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "raw"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "ws"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "kcp"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "httpupgrade"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "h2"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "quic"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "grpc"}) o:depends({type = "v2ray", v2ray_protocol = "vmess"}) o:depends({type = "v2ray", v2ray_protocol = "trojan"}) o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o:depends({type = "v2ray", v2ray_protocol = "socks"}) o:depends({type = "v2ray", v2ray_protocol = "http"}) -- [[ TCP 最大并发连接数 ]]-- o = s:option(Value, "concurrency", translate("concurrency")) o.description = translate( "<ul>" .. "<li>" .. translate("Default: disable. When entering a negative number, such as -1, The Mux module will not be used to carry TCP traffic.") .. "</li>" .. "<li>" .. translate("Min value is 1, Max value is 128. When omitted or set to 0, it equals 8.") .. "</li>" .. "</ul>") o.rmempty = true o.default = "-1" o:value("-1", translate("disable")) o:value("8", translate("8")) o:depends("mux", true) -- [[ UDP 最大并发连接数 ]]-- o = s:option(Value, "xudpConcurrency", translate("xudpConcurrency")) o.description = translate( "<ul>" .. "<li>" .. translate("Default:16. When entering a negative number, such as -1, The Mux module will not be used to carry UDP traffic, Use original UDP transmission method of proxy protocol.") .. "</li>" .. "<li>" .. translate("Min value is 1, Max value is 1024. When omitted or set to 0, Will same path as TCP traffic.") .. "</li>" .. "</ul>") o.rmempty = true o.default = "16" o:value("-1", translate("disable")) o:value("16", translate("16")) o:depends("mux", true) -- [[ 对被代理的 UDP/443 流量处理方式 ]]-- o = s:option(ListValue, "xudpProxyUDP443", translate("xudpProxyUDP443")) o.description = translate( "<ul>" .. "<li>" .. translate("Default reject rejects traffic.") .. "</li>" .. "<li>" .. translate("allow: Allows use Mux connection.") .. "</li>" .. "<li>" .. translate("skip: Not use Mux module to carry UDP 443 traffic, Use original UDP transmission method of proxy protocol.") .. "</li>" .. "</ul>") o.rmempty = true o.default = "reject" o:value("reject", translate("reject")) o:value("allow", translate("allow")) o:value("skip", translate("skip")) o:depends("mux", true) -- [[ XHTTP TCP Fast Open ]]-- o = s:option(Flag, "tcpfastopen", translate("TCP Fast Open"), translate("Enabling TCP Fast Open Requires Server Support.")) o.rmempty = true o.default = "0" o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "xhttp"}) -- [[ MPTCP ]]-- o = s:option(Flag, "mptcp", translate("MPTCP"), translate("Enable Multipath TCP, need to be enabled in both server and client configuration.")) o.rmempty = true o.default = "0" o:depends({type = "v2ray", v2ray_protocol = "vless"}) o:depends({type = "v2ray", v2ray_protocol = "vmess"}) o:depends({type = "v2ray", v2ray_protocol = "trojan"}) o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o:depends({type = "v2ray", v2ray_protocol = "socks"}) o:depends({type = "v2ray", v2ray_protocol = "http"}) -- [[ custom_tcpcongestion 连接服务器节点的 TCP 拥塞控制算法 ]]-- o = s:option(ListValue, "custom_tcpcongestion", translate("custom_tcpcongestion")) o.rmempty = true o.default = "" o:value("", translate("comment_tcpcongestion_disable")) o:value("bbr", translate("BBR")) o:value("cubic", translate("CUBIC")) o:value("reno", translate("Reno")) o:depends({type = "v2ray", v2ray_protocol = "vless"}) o:depends({type = "v2ray", v2ray_protocol = "vmess"}) o:depends({type = "v2ray", v2ray_protocol = "trojan"}) o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o:depends({type = "v2ray", v2ray_protocol = "socks"}) o:depends({type = "v2ray", v2ray_protocol = "http"}) -- [[ Cert ]]-- o = s:option(Flag, "certificate", translate("Self-signed Certificate")) o.rmempty = true o.default = "0" o:depends("type", "tuic") o:depends({type = "hysteria2", insecure = false}) o:depends({type = "trojan", tls = true, insecure = false}) o:depends({type = "v2ray", v2ray_protocol = "vmess", tls = true, insecure = false}) o:depends({type = "v2ray", v2ray_protocol = "vless", tls = true, insecure = false}) o.description = translate("If you have a self-signed certificate,please check the box") o = s:option(DummyValue, "upload", translate("Upload")) o.template = "shadowsocksr/certupload" o:depends("certificate", 1) cert_dir = "/etc/ssl/private/" local path luci.http.setfilehandler(function(meta, chunk, eof) if not fd then if (not meta) or (not meta.name) or (not meta.file) then return end fd = nixio.open(cert_dir .. meta.file, "w") if not fd then path = translate("Create upload file error.") return end end if chunk and fd then fd:write(chunk) end if eof and fd then fd:close() fd = nil path = '/etc/ssl/private/' .. meta.file .. '' end end) if luci.http.formvalue("upload") then local f = luci.http.formvalue("ulfile") if #f <= 0 then path = translate("No specify upload file.") end end o = s:option(Value, "certpath", translate("Current Certificate Path")) o:depends("certificate", 1) o:value("/etc/ssl/private/ca.crt") o.description = translate("Please confirm the current certificate path") o.default = "/etc/ssl/private/ca.crt" o = s:option(Flag, "fast_open", translate("TCP Fast Open"), translate("Enabling TCP Fast Open Requires Server Support.")) o.rmempty = true o.default = "0" o:depends("type", "ssr") o:depends("type", "ss") o:depends("type", "trojan") o:depends("type", "hysteria2") o = s:option(Flag, "switch_enable", translate("Enable Auto Switch")) o.rmempty = false o.default = "1" o = s:option(Value, "local_port", translate("Local Port")) o.datatype = "port" o.default = 1234 o.rmempty = false if is_finded("kcptun-client") then o = s:option(Flag, "kcp_enable", translate("KcpTun Enable")) o.rmempty = true o.default = "0" o:depends("type", "ssr") o:depends("type", "ss") o = s:option(Value, "kcp_port", translate("KcpTun Port")) o.datatype = "portrange" o.default = 4000 o:depends("type", "ssr") o:depends("type", "ss") o = s:option(Value, "kcp_password", translate("KcpTun Password")) o.password = true o:depends("type", "ssr") o:depends("type", "ss") o = s:option(Value, "kcp_param", translate("KcpTun Param")) o.default = "--nocomp" o:depends("type", "ssr") o:depends("type", "ss") end return m
2929004360/ruoyi-sign
4,521
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfDeployController.java
package com.ruoyi.web.controller.flowable; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.flowable.base.BaseController; import com.ruoyi.flowable.core.domain.ProcessQuery; import com.ruoyi.flowable.domain.bo.WfModelBo; import com.ruoyi.flowable.domain.vo.WfDeployVo; import com.ruoyi.flowable.domain.vo.WfFormVo; import com.ruoyi.flowable.domain.vo.WfModelVo; import com.ruoyi.flowable.page.PageQuery; import com.ruoyi.flowable.page.TableDataInfo; import com.ruoyi.flowable.service.IWfDeployFormService; import com.ruoyi.flowable.service.IWfDeployService; import com.ruoyi.flowable.service.IWfModelProcdefService; import com.ruoyi.flowable.service.IWfModelService; import com.ruoyi.flowable.utils.JsonUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.validation.constraints.NotEmpty; import java.util.*; import java.util.stream.Collectors; /** * 流程部署 * * @author fengcheng * @createTime 2022/3/24 20:57 */ @Slf4j @RequiredArgsConstructor @RestController @Validated @RequestMapping("/flowable/workflow/deploy") public class WfDeployController extends BaseController { private final IWfDeployService deployService; private final IWfDeployFormService deployFormService; private final IWfModelService wfModelService; private final IWfModelProcdefService wfModelProcdefService; /** * 查询流程部署列表 */ @PreAuthorize("@ss.hasPermi('workflow:deploy:list')") @GetMapping("/list") public R<List<WfDeployVo>> list(ProcessQuery processQuery) { if (SecurityUtils.hasRole("admin")) { List<WfDeployVo> list = deployService.selectWfDeployList(processQuery, null); return R.ok(list); } else { List<WfModelVo> wfModelVoList = wfModelService.selectList(new WfModelBo()); List<String> modelIdList = wfModelVoList.stream().map(WfModelVo::getModelId).collect(Collectors.toList()); if (modelIdList.size() == 0) { return R.ok(new ArrayList<>()); } List<String> procdefIdList = wfModelProcdefService.selectWfModelProcdefListByModelIdList(modelIdList); List<WfDeployVo> list = deployService.selectWfDeployList(processQuery, procdefIdList); return R.ok(list); } } /** * 查询流程部署版本列表 */ @PreAuthorize("@ss.hasPermi('workflow:deploy:list')") @GetMapping("/publishList") public TableDataInfo<WfDeployVo> publishList(@RequestParam String processKey, PageQuery pageQuery) { return deployService.queryPublishList(processKey, pageQuery); } /** * 激活或挂起流程 * * @param state 状态(active:激活 suspended:挂起) * @param definitionId 流程定义ID */ @PreAuthorize("@ss.hasPermi('workflow:deploy:state')") @PutMapping(value = "/changeState") public R<Void> changeState(@RequestParam String state, @RequestParam String definitionId) { deployService.updateState(definitionId, state); return R.ok(); } /** * 读取xml文件 * * @param definitionId 流程定义ID * @return */ @PreAuthorize("@ss.hasPermi('workflow:deploy:query')") @GetMapping("/bpmnXml/{definitionId}") public R<String> getBpmnXml(@PathVariable(value = "definitionId") String definitionId) { return R.ok(deployService.queryBpmnXmlById(definitionId), null); } /** * 删除流程部署 * * @param deployIds 流程部署ids */ @PreAuthorize("@ss.hasPermi('workflow:deploy:remove')") @Log(title = "删除流程部署", businessType = BusinessType.DELETE) @DeleteMapping("/{deployIds}") public R<String> remove(@NotEmpty(message = "主键不能为空") @PathVariable String[] deployIds) { deployService.deleteByIds(Arrays.asList(deployIds)); return R.ok(); } /** * 查询流程部署关联表单信息 * * @param deployId 流程部署id */ @GetMapping("/form/{deployId}") public R<?> start(@PathVariable(value = "deployId") String deployId) { WfFormVo formVo = deployFormService.selectDeployFormByDeployId(deployId); if (Objects.isNull(formVo)) { return R.fail("请先配置流程表单"); } return R.ok(JsonUtils.parseObject(formVo.getContent(), Map.class)); } }
2929004360/ruoyi-sign
6,739
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfTaskController.java
package com.ruoyi.web.controller.flowable; import cn.hutool.core.util.ObjectUtil; import com.ruoyi.common.core.domain.R; import com.ruoyi.flowable.api.domain.bo.WfTaskBo; import com.ruoyi.flowable.service.IWfTaskService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxErrorException; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletResponse; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * 工作流任务管理 * * @author fengcheng */ @Slf4j @RequiredArgsConstructor @RestController @RequestMapping("/flowable/workflow/task") public class WfTaskController { private final IWfTaskService flowTaskService; /** * 取消申请 */ @PostMapping(value = "/stopProcess") @PreAuthorize("@ss.hasPermi('workflow:process:cancel')") public R stopProcess(@RequestBody WfTaskBo bo) { flowTaskService.stopProcess(bo); return R.ok(null, "取消申请成功"); } /** * 收回流程 */ @PostMapping(value = "/recallProcess") @PreAuthorize("@ss.hasPermi('workflow:process:recall')") public R recallProcess(@RequestBody WfTaskBo bo) { return flowTaskService.recallProcess(bo); } /** * 撤回流程 */ @PostMapping(value = "/revokeProcess") @PreAuthorize("@ss.hasPermi('workflow:process:revoke')") public R revokeProcess(@RequestBody WfTaskBo bo) { flowTaskService.revokeProcess(bo); return R.ok(); } /** * 获取流程变量 * * @param taskId 流程任务Id */ @GetMapping(value = "/processVariables/{taskId}") @PreAuthorize("@ss.hasPermi('workflow:process:query')") public R processVariables(@PathVariable(value = "taskId") String taskId) { return R.ok(flowTaskService.getProcessVariables(taskId)); } /** * 审批任务 */ @PostMapping(value = "/complete") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R complete(@RequestBody WfTaskBo bo) { flowTaskService.complete(bo); return R.ok(); } /** * 驳回任务 */ @PostMapping(value = "/reject") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R taskReject(@RequestBody WfTaskBo taskBo) { flowTaskService.taskReject(taskBo); return R.ok(); } /** * 拒绝任务 */ @PostMapping(value = "/refuse") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R taskRefuse(@RequestBody WfTaskBo taskBo) { flowTaskService.taskRefuse(taskBo); return R.ok(); } /** * 退回任务 */ @PostMapping(value = "/return") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R taskReturn(@RequestBody WfTaskBo bo) { flowTaskService.taskReturn(bo); return R.ok(); } /** * 加签任务 */ @PostMapping(value = "/addSign") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R addSignTask(@RequestBody WfTaskBo bo) { flowTaskService.addSignTask(bo); return R.ok("加签任务成功"); } /** * 多实例加签任务 */ @PostMapping(value = "/multiInstanceAddSign") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R multiInstanceAddSign(@RequestBody WfTaskBo bo) { flowTaskService.multiInstanceAddSign(bo); return R.ok("多实例加签任务成功"); } /** * 任务跳转 */ @PostMapping(value = "/jump") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R taskJump(@RequestBody WfTaskBo bo) { flowTaskService.taskJump(bo); return R.ok(); } /** * 获取用户任务节点,作为跳转任务使用 */ @PostMapping(value = "/userTask") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R userTaskList(@RequestBody WfTaskBo bo) { return flowTaskService.userTaskList(bo); } /** * 获取所有可回退的节点 */ @PostMapping(value = "/returnList") @PreAuthorize("@ss.hasPermi('workflow:process:query')") public R findReturnTaskList(@RequestBody WfTaskBo bo) { return R.ok(flowTaskService.findReturnTaskList(bo)); } /** * 删除任务 */ @DeleteMapping(value = "/delete") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R delete(@RequestBody WfTaskBo bo) { flowTaskService.deleteTask(bo); return R.ok(); } /** * 认领/签收任务 */ @PostMapping(value = "/claim") @PreAuthorize("@ss.hasPermi('workflow:process:claim')") public R claim(@RequestBody WfTaskBo bo) { flowTaskService.claim(bo); return R.ok(); } /** * 取消认领/签收任务 */ @PostMapping(value = "/unClaim") @PreAuthorize("@ss.hasPermi('workflow:process:claim')") public R unClaim(@RequestBody WfTaskBo bo) { flowTaskService.unClaim(bo); return R.ok(); } /** * 委派任务 */ @PostMapping(value = "/delegate") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R delegate(@RequestBody WfTaskBo bo) { if (ObjectUtil.hasNull(bo.getTaskId(), bo.getUserId())) { return R.fail("参数错误!"); } flowTaskService.delegateTask(bo); return R.ok(); } /** * 转办任务 */ @PostMapping(value = "/transfer") @PreAuthorize("@ss.hasPermi('workflow:process:approval')") public R transfer(@RequestBody WfTaskBo bo) { if (ObjectUtil.hasNull(bo.getTaskId(), bo.getUserId())) { return R.fail("参数错误!"); } flowTaskService.transferTask(bo); return R.ok(); } /** * 生成流程图 * * @param processId 任务ID */ @RequestMapping("/diagram/{processId}") public void genProcessDiagram(HttpServletResponse response, @PathVariable("processId") String processId) { InputStream inputStream = flowTaskService.diagram(processId); OutputStream os = null; BufferedImage image = null; try { image = ImageIO.read(inputStream); response.setContentType("image/png"); os = response.getOutputStream(); if (image != null) { ImageIO.write(image, "png", os); } } catch (Exception e) { e.printStackTrace(); } finally { try { if (os != null) { os.flush(); os.close(); } } catch (IOException e) { e.printStackTrace(); } } } }
2929004360/ruoyi-sign
3,984
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfModelTemplateController.java
package com.ruoyi.web.controller.flowable; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.domain.WfModelTemplate; import com.ruoyi.flowable.service.IWfModelTemplateService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * 模型模板Controller * * @author fengcheng * @date 2024-07-17 */ @RestController @RequestMapping("/flowable/wfModelTemplate") public class WfModelTemplateController extends BaseController { @Autowired private IWfModelTemplateService wfModelTemplateService; /** * 查询模型模板列表 */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:list')") @GetMapping("/listWfModelTemplate") public AjaxResult listWfModelTemplate(WfModelTemplate wfModelTemplate) { List<WfModelTemplate> list = wfModelTemplateService.selectWfModelTemplateList(wfModelTemplate); return success(list); } /** * 查询模型模板列表 */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:list')") @GetMapping("/list") public TableDataInfo list(WfModelTemplate wfModelTemplate) { startPage(); List<WfModelTemplate> list = wfModelTemplateService.selectWfModelTemplateList(wfModelTemplate); return getDataTable(list); } /** * 导出模型模板列表 */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:export')") @Log(title = "模型模板", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, WfModelTemplate wfModelTemplate) { List<WfModelTemplate> list = wfModelTemplateService.selectWfModelTemplateList(wfModelTemplate); ExcelUtil<WfModelTemplate> util = new ExcelUtil<WfModelTemplate>(WfModelTemplate.class); util.exportExcel(response, list, "模型模板数据"); } /** * 获取模型模板详细信息 */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:query')") @GetMapping(value = "/{modelTemplateId}") public AjaxResult getInfo(@PathVariable("modelTemplateId") String modelTemplateId) { return success(wfModelTemplateService.selectWfModelTemplateByModelTemplateId(modelTemplateId)); } /** * 新增模型模板 */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:add')") @Log(title = "模型模板", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody WfModelTemplate wfModelTemplate) { return toAjax(wfModelTemplateService.insertWfModelTemplate(wfModelTemplate)); } /** * 修改模型模板 */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:edit')") @Log(title = "模型模板", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody WfModelTemplate wfModelTemplate) { return toAjax(wfModelTemplateService.updateWfModelTemplate(wfModelTemplate)); } /** * 修改模型模板xml */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:edit')") @Log(title = "模型模板", businessType = BusinessType.UPDATE) @PutMapping("/editBpmnXml") public AjaxResult editBpmnXml(@RequestBody WfModelTemplate wfModelTemplate) { return toAjax(wfModelTemplateService.editBpmnXml(wfModelTemplate)); } /** * 删除模型模板 */ @PreAuthorize("@ss.hasPermi('workflow:wfModelTemplate:remove')") @Log(title = "模型模板", businessType = BusinessType.DELETE) @DeleteMapping("/{modelTemplateIds}") public AjaxResult remove(@PathVariable String[] modelTemplateIds) { return toAjax(wfModelTemplateService.deleteWfModelTemplateByModelTemplateIds(modelTemplateIds)); } }
28harishkumar/blog
3,088
public/js/tinymce/plugins/jbimages/ci/application/config/autoload.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | AUTO-LOADER | ------------------------------------------------------------------- | This file specifies which systems should be loaded by default. | | In order to keep the framework as light-weight as possible only the | absolute minimal resources are loaded by default. For example, | the database is not connected to automatically since no assumption | is made regarding whether you intend to use it. This file lets | you globally define which systems you would like loaded with every | request. | | ------------------------------------------------------------------- | Instructions | ------------------------------------------------------------------- | | These are the things you can load automatically: | | 1. Packages | 2. Libraries | 3. Helper files | 4. Custom config files | 5. Language files | 6. Models | */ /* | ------------------------------------------------------------------- | Auto-load Packges | ------------------------------------------------------------------- | Prototype: | | $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared'); | */ $autoload['packages'] = array(); /* | ------------------------------------------------------------------- | Auto-load Libraries | ------------------------------------------------------------------- | These are the classes located in the system/libraries folder | or in your application/libraries folder. | | Prototype: | | $autoload['libraries'] = array('database', 'session', 'xmlrpc'); */ $autoload['libraries'] = array(); /* | ------------------------------------------------------------------- | Auto-load Helper Files | ------------------------------------------------------------------- | Prototype: | | $autoload['helper'] = array('url', 'file'); */ $autoload['helper'] = array(); /* | ------------------------------------------------------------------- | Auto-load Config files | ------------------------------------------------------------------- | Prototype: | | $autoload['config'] = array('config1', 'config2'); | | NOTE: This item is intended for use ONLY if you have created custom | config files. Otherwise, leave it blank. | */ $autoload['config'] = array(); /* | ------------------------------------------------------------------- | Auto-load Language files | ------------------------------------------------------------------- | Prototype: | | $autoload['language'] = array('lang1', 'lang2'); | | NOTE: Do not include the "_lang" part of your file. For example | "codeigniter_lang.php" would be referenced as array('codeigniter'); | */ $autoload['language'] = array(); /* | ------------------------------------------------------------------- | Auto-load Models | ------------------------------------------------------------------- | Prototype: | | $autoload['model'] = array('model1', 'model2'); | */ $autoload['model'] = array(); /* End of file autoload.php */ /* Location: ./application/config/autoload.php */
28harishkumar/blog
3,211
public/js/tinymce/plugins/jbimages/ci/application/config/database.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | DATABASE CONNECTIVITY SETTINGS | ------------------------------------------------------------------- | This file will contain the settings needed to access your database. | | For complete instructions please consult the 'Database Connection' | page of the User Guide. | | ------------------------------------------------------------------- | EXPLANATION OF VARIABLES | ------------------------------------------------------------------- | | ['hostname'] The hostname of your database server. | ['username'] The username used to connect to the database | ['password'] The password used to connect to the database | ['database'] The name of the database you want to connect to | ['dbdriver'] The database type. ie: mysql. Currently supported: mysql, mysqli, postgre, odbc, mssql, sqlite, oci8 | ['dbprefix'] You can add an optional prefix, which will be added | to the table name when using the Active Record class | ['pconnect'] TRUE/FALSE - Whether to use a persistent connection | ['db_debug'] TRUE/FALSE - Whether database errors should be displayed. | ['cache_on'] TRUE/FALSE - Enables/disables query caching | ['cachedir'] The path to the folder where cache files should be stored | ['char_set'] The character set used in communicating with the database | ['dbcollat'] The character collation used in communicating with the database | NOTE: For MySQL and MySQLi databases, this setting is only used | as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7 | (and in table creation queries made with DB Forge). | There is an incompatibility in PHP with mysql_real_escape_string() which | can make your site vulnerable to SQL injection if you are using a | multi-byte character set and are running versions lower than these. | Sites using Latin-1 or UTF-8 database character set and collation are unaffected. | ['swap_pre'] A default table prefix that should be swapped with the dbprefix | ['autoinit'] Whether or not to automatically initialize the database. | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections | - good for ensuring strict SQL while developing | | The $active_group variable lets you choose which connection group to | make active. By default there is only one group (the 'default' group). | | The $active_record variables lets you determine whether or not to load | the active record class */ $active_group = 'default'; $active_record = TRUE; $db['default']['hostname'] = 'localhost'; $db['default']['username'] = ''; $db['default']['password'] = ''; $db['default']['database'] = ''; $db['default']['dbdriver'] = 'mysql'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE; /* End of file database.php */ /* Location: ./application/config/database.php */
2929004360/ruoyi-sign
4,293
ruoyi-admin/src/main/java/com/ruoyi/web/controller/flowable/WfCategoryController.java
package com.ruoyi.web.controller.flowable; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.flowable.domain.WfCategory; import com.ruoyi.flowable.domain.vo.WfCategoryVo; import com.ruoyi.flowable.page.PageQuery; import com.ruoyi.flowable.page.TableDataInfo; import com.ruoyi.flowable.service.IWfCategoryService; import lombok.RequiredArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Arrays; import java.util.List; /** * 流程分类Controller * * @author fengcheng * @date 2022-01-15 */ @Validated @RequiredArgsConstructor @RestController @RequestMapping("/flowable/workflow/category") public class WfCategoryController extends BaseController { private final IWfCategoryService categoryService; /** * 查询流程分类列表 * * @param category 流程分类对象 * @param pageQuery 分页参数 * @return */ @PreAuthorize("@ss.hasPermi('workflow:category:list')") @GetMapping("/list") public TableDataInfo<WfCategoryVo> list(WfCategory category, PageQuery pageQuery) { return categoryService.queryPageList(category, pageQuery); } /** * 查询全部的流程分类列表 * * @param category 流程分类对象 * @return */ @PreAuthorize("@ss.hasPermi('workflow:category:list')") @GetMapping("/listAll") public R<List<WfCategoryVo>> listAll(WfCategory category) { return R.ok(categoryService.queryList(category)); } /** * 导出流程分类列表 * * @param category 流程分类对象 * @param response 响应 */ @PreAuthorize("@ss.hasPermi('workflow:category:export')") @Log(title = "流程分类", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(@Validated WfCategory category, HttpServletResponse response) { List<WfCategoryVo> list = categoryService.queryList(category); ExcelUtil<WfCategoryVo> util = new ExcelUtil<WfCategoryVo>(WfCategoryVo.class); util.exportExcel(response, list, "流程分类"); } /** * 获取流程分类详细信息 * * @param categoryId 分类主键 */ @PreAuthorize("@ss.hasPermi('workflow:category:query')") @GetMapping("/{categoryId}") public R<WfCategoryVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable("categoryId") String categoryId) { return R.ok(categoryService.queryById(categoryId)); } /** * 新增流程分类 * * @param category 流程分类对象 * @return */ @PreAuthorize("@ss.hasPermi('workflow:category:add')") @Log(title = "流程分类", businessType = BusinessType.INSERT) @PostMapping() public AjaxResult add(@Validated @RequestBody WfCategory category) { if (categoryService.checkCategoryCodeUnique(category)) { return error("新增流程分类'" + category.getCategoryName() + "'失败,流程编码已存在"); } return toAjax(categoryService.insertCategory(category)); } /** * 修改流程分类 * * @param category 流程分类对象 * @return */ @PreAuthorize("@ss.hasPermi('workflow:category:edit')") @Log(title = "流程分类", businessType = BusinessType.UPDATE) @PutMapping() public AjaxResult edit(@Validated @RequestBody WfCategory category) { if (categoryService.checkCategoryCodeUnique(category)) { return error("修改流程分类'" + category.getCategoryName() + "'失败,流程编码已存在"); } return toAjax(categoryService.updateCategory(category)); } /** * 校验并删除数据 * * @param categoryIds 主键集合 * @return 结果 */ @PreAuthorize("@ss.hasPermi('workflow:category:remove')") @Log(title = "流程分类", businessType = BusinessType.DELETE) @DeleteMapping("/{categoryIds}") public AjaxResult remove(@NotEmpty(message = "主键不能为空") @PathVariable String[] categoryIds) { return toAjax(categoryService.deleteWithValidByIds(Arrays.asList(categoryIds), true)); } }
281677160/openwrt-package
18,437
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua
local m, s, o local uci = require "luci.model.uci".cursor() -- 获取 LAN IP 地址 function lanip() local lan_ip lan_ip = luci.sys.exec("uci -q get network.lan.ipaddr 2>/dev/null | awk -F '/' '{print $1}' | tr -d '\n'") if not lan_ip or lan_ip == "" then lan_ip = luci.sys.exec("ip address show $(uci -q -p /tmp/state get network.lan.ifname || uci -q -p /tmp/state get network.lan.device) | grep -w 'inet' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -1 | tr -d '\n'") end if not lan_ip or lan_ip == "" then lan_ip = luci.sys.exec("ip addr show | grep -w 'inet' | grep 'global' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -n 1 | tr -d '\n'") end return lan_ip end local lan_ip = lanip() local server_table = {} local type_table = {} local function is_finded(e) return luci.sys.exec(string.format('type -t -p "%s" 2>/dev/null', e)) ~= "" end uci:foreach("shadowsocksr", "servers", function(s) if s.alias then server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.v2ray_protocol or s.type), s.alias} elseif s.server and s.server_port then server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(s.v2ray_protocol or s.type), s.server, s.server_port} end if s.type then type_table[s[".name"]] = s.type end end) local key_table = {} for key, _ in pairs(server_table) do table.insert(key_table, key) end table.sort(key_table) m = Map("shadowsocksr") -- [[ global ]]-- s = m:section(TypedSection, "global", translate("Server failsafe auto swith and custom update settings")) s.anonymous = true -- o = s:option(Flag, "monitor_enable", translate("Enable Process Deamon")) -- o.rmempty = false -- o.default = "1" o = s:option(Flag, "enable_switch", translate("Enable Auto Switch")) o.rmempty = false o.default = "1" o = s:option(Value, "switch_time", translate("Switch check cycly(second)")) o.datatype = "uinteger" o:depends("enable_switch", "1") o.default = 667 o = s:option(Value, "switch_timeout", translate("Check timout(second)")) o.datatype = "uinteger" o:depends("enable_switch", "1") o.default = 5 o = s:option(Value, "switch_try_count", translate("Check Try Count")) o.datatype = "uinteger" o:depends("enable_switch", "1") o.default = 3 o = s:option(Value, "gfwlist_url", translate("gfwlist Update url")) o:value("https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt", translate("v2fly/domain-list-community")) o:value("https://fastly.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt", translate("Loyalsoldier/v2ray-rules-dat")) o:value("https://fastly.jsdelivr.net/gh/Loukky/gfwlist-by-loukky/gfwlist.txt", translate("Loukky/gfwlist-by-loukky")) o:value("https://fastly.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt", translate("gfwlist/gfwlist")) o.default = "https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt" o = s:option(Value, "chnroute_url", translate("Chnroute Update url")) o:value("https://ispip.clang.cn/all_cn.txt", translate("Clang.CN")) o:value("https://ispip.clang.cn/all_cn_cidr.txt", translate("Clang.CN.CIDR")) o:value("https://fastly.jsdelivr.net/gh/gaoyifan/china-operator-ip@ip-lists/china.txt", translate("china-operator-ip")) o.default = "https://ispip.clang.cn/all_cn.txt" o = s:option(Flag, "netflix_enable", translate("Enable Netflix Mode")) o.description = translate("When disabled shunt mode, will same time stopped shunt service.") o.rmempty = false o = s:option(Value, "nfip_url", translate("nfip_url")) o:value("https://fastly.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt", translate("Netflix IP Only")) o:value("https://fastly.jsdelivr.net/gh/QiuSimons/Netflix_IP/getflix.txt", translate("Netflix and AWS")) o.default = "https://fastly.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt" o.description = translate("Customize Netflix IP Url") o:depends("netflix_enable", "1") o = s:option(ListValue, "shunt_dns_mode", translate("DNS Query Mode For Shunt Mode")) if is_finded("dns2socks") then o:value("1", translate("Use DNS2SOCKS query and cache")) end if is_finded("dns2socks-rust") then o:value("2", translate("Use DNS2SOCKS-RUST query and cache")) end if is_finded("mosdns") then o:value("3", translate("Use MosDNS query")) end if is_finded("dnsproxy") then o:value("4", translate("Use DNSPROXY query and cache")) end if is_finded("chinadns-ng") then o:value("5", translate("Use ChinaDNS-NG query and cache")) end o:depends("netflix_enable", "1") o.default = 1 o = s:option(Value, "shunt_dnsserver", translate("Anti-pollution DNS Server For Shunt Mode")) o:value("8.8.4.4:53", translate("Google Public DNS (8.8.4.4)")) o:value("8.8.8.8:53", translate("Google Public DNS (8.8.8.8)")) o:value("208.67.222.222:53", translate("OpenDNS (208.67.222.222)")) o:value("208.67.220.220:53", translate("OpenDNS (208.67.220.220)")) o:value("209.244.0.3:53", translate("Level 3 Public DNS (209.244.0.3)")) o:value("209.244.0.4:53", translate("Level 3 Public DNS (209.244.0.4)")) o:value("4.2.2.1:53", translate("Level 3 Public DNS (4.2.2.1)")) o:value("4.2.2.2:53", translate("Level 3 Public DNS (4.2.2.2)")) o:value("4.2.2.3:53", translate("Level 3 Public DNS (4.2.2.3)")) o:value("4.2.2.4:53", translate("Level 3 Public DNS (4.2.2.4)")) o:value("1.1.1.1:53", translate("Cloudflare DNS (1.1.1.1)")) o:depends("shunt_dns_mode", "1") o:depends("shunt_dns_mode", "2") o.description = translate("Custom DNS Server format as IP:PORT (default: 8.8.4.4:53)") o.datatype = "ip4addrport" o = s:option(ListValue, "shunt_mosdns_dnsserver", translate("Anti-pollution DNS Server")) o:value("tcp://8.8.4.4:53,tcp://8.8.8.8:53", translate("Google Public DNS")) o:value("tcp://208.67.222.222:53,tcp://208.67.220.220:53", translate("OpenDNS")) o:value("tcp://209.244.0.3:53,tcp://209.244.0.4:53", translate("Level 3 Public DNS-1 (209.244.0.3-4)")) o:value("tcp://4.2.2.1:53,tcp://4.2.2.2:53", translate("Level 3 Public DNS-2 (4.2.2.1-2)")) o:value("tcp://4.2.2.3:53,tcp://4.2.2.4:53", translate("Level 3 Public DNS-3 (4.2.2.3-4)")) o:value("tcp://1.1.1.1:53,tcp://1.0.0.1:53", translate("Cloudflare DNS")) o:depends("shunt_dns_mode", "3") o.description = translate("Custom DNS Server for MosDNS") o = s:option(Flag, "shunt_mosdns_ipv6", translate("Disable IPv6 In MosDNS Query Mode (Shunt Mode)")) o:depends("shunt_dns_mode", "3") o.rmempty = false o.default = "0" if is_finded("dnsproxy") then o = s:option(ListValue, "shunt_parse_method", translate("Select DNS parse Mode")) o.description = translate( "<ul>" .. "<li>" .. translate("When use DNS list file, please ensure list file exists and is formatted correctly.") .. "</li>" .. "<li>" .. translate("Tips: Dnsproxy DNS Parse List Path:") .. " <a href='http://" .. lan_ip .. "/cgi-bin/luci/admin/services/shadowsocksr/control' target='_blank'>" .. translate("Click here to view or manage the DNS list file") .. "</a>" .. "</li>" .. "</ul>" ) o:value("single_dns", translate("Set Single DNS")) o:value("parse_file", translate("Use DNS List File")) o:depends("shunt_dns_mode", "4") o.rmempty = true o.default = "single_dns" o = s:option(Value, "dnsproxy_shunt_forward", translate("Anti-pollution DNS Server")) o:value("sdns://AgUAAAAAAAAABzguOC40LjQgsKKKE4EwvtIbNjGjagI2607EdKSVHowYZtyvD9iPrkkHOC44LjQuNAovZG5zLXF1ZXJ5", translate("Google DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAAACC2vD25TAYM7EnyCH8Xw1-0g5OccnTsGH9vQUUH0njRtAxkbnMudHduaWMudHcKL2Rucy1xdWVyeQ", translate("TWNIC-101 DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAADzE4NS4yMjIuMjIyLjIyMiAOp5Svj-oV-Fz-65-8H2VKHLKJ0egmfEgrdPeAQlUFFA8xODUuMjIyLjIyMi4yMjIKL2Rucy1xdWVyeQ", translate("dns.sb DNSCrypt SDNS")) o:value("sdns://AgMAAAAAAAAADTE0OS4xMTIuMTEyLjkgsBkgdEu7dsmrBT4B4Ht-BQ5HPSD3n3vqQ1-v5DydJC8SZG5zOS5xdWFkOS5uZXQ6NDQzCi9kbnMtcXVlcnk", translate("Quad9 DNSCrypt SDNS")) o:value("sdns://AQMAAAAAAAAAETk0LjE0MC4xNC4xNDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20", translate("AdGuard DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAABzEuMC4wLjGgENk8mGSlIfMGXMOlIlCcKvq7AVgcrZxtjon911-ep0cg63Ul-I8NlFj4GplQGb_TTLiczclX57DvMV8Q-JdjgRgSZG5zLmNsb3VkZmxhcmUuY29tCi9kbnMtcXVlcnk", translate("Cloudflare DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAADjEwNC4xNi4yNDkuMjQ5ABJjbG91ZGZsYXJlLWRucy5jb20KL2Rucy1xdWVyeQ", translate("cloudflare-dns.com DNSCrypt SDNS")) o:depends("shunt_parse_method", "single_dns") o.description = translate("Custom DNS Server (support: IP:Port or tls://IP:Port or https://IP/dns-query and other format).") o = s:option(ListValue, "shunt_upstreams_logic_mode", translate("Defines the upstreams logic mode")) o.description = translate( "<ul>" .. "<li>" .. translate("Defines the upstreams logic mode, possible values: load_balance, parallel, fastest_addr (default: load_balance).") .. "</li>" .. "<li>" .. translate("When two or more DNS servers are deployed, enable this function.") .. "</li>" .. "</ul>" ) o:value("load_balance", translate("load_balance")) o:value("parallel", translate("parallel")) o:value("fastest_addr", translate("fastest_addr")) o:depends("shunt_parse_method", "parse_file") o.rmempty = true o.default = "load_balance" o = s:option(Flag, "shunt_dnsproxy_ipv6", translate("Disable IPv6 query mode")) o.description = translate("When disabled, all AAAA requests are not resolved.") o:depends("shunt_parse_method", "single_dns") o:depends("shunt_parse_method", "parse_file") o.rmempty = false o.default = "1" end if is_finded("chinadns-ng") then o = s:option(Value, "chinadns_ng_shunt_dnsserver", translate("Anti-pollution DNS Server For Shunt Mode")) o:value("8.8.4.4:53", translate("Google Public DNS (8.8.4.4)")) o:value("8.8.8.8:53", translate("Google Public DNS (8.8.8.8)")) o:value("208.67.222.222:53", translate("OpenDNS (208.67.222.222)")) o:value("208.67.220.220:53", translate("OpenDNS (208.67.220.220)")) o:value("209.244.0.3:53", translate("Level 3 Public DNS (209.244.0.3)")) o:value("209.244.0.4:53", translate("Level 3 Public DNS (209.244.0.4)")) o:value("4.2.2.1:53", translate("Level 3 Public DNS (4.2.2.1)")) o:value("4.2.2.2:53", translate("Level 3 Public DNS (4.2.2.2)")) o:value("4.2.2.3:53", translate("Level 3 Public DNS (4.2.2.3)")) o:value("4.2.2.4:53", translate("Level 3 Public DNS (4.2.2.4)")) o:value("1.1.1.1:53", translate("Cloudflare DNS (1.1.1.1)")) o:depends("shunt_dns_mode", "5") o.description = translate( "<ul>" .. "<li>" .. translate("Custom DNS Server format as IP:PORT (default: 8.8.4.4:53)") .. "</li>" .. "<li>" .. translate("Muitiple DNS server can saperate with ','") .. "</li>" .. "</ul>" ) o = s:option(ListValue, "chinadns_ng_shunt_proto", translate("ChinaDNS-NG shunt query protocol")) o:value("none", translate("UDP/TCP upstream")) o:value("tcp", translate("TCP upstream")) o:value("udp", translate("UDP upstream")) o:value("tls", translate("DoT upstream (Need use wolfssl version)")) o:depends("shunt_dns_mode", "5") end o = s:option(Flag, "apple_optimization", translate("Apple domains optimization"), translate("For Apple domains equipped with Chinese mainland CDN, always responsive to Chinese CDN IP addresses")) o.rmempty = false o.default = "1" o = s:option(Value, "apple_url", translate("Apple Domains Update url")) o:value("https://fastly.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/apple.china.conf", translate("felixonmars/dnsmasq-china-list")) o.default = "https://fastly.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/apple.china.conf" o:depends("apple_optimization", "1") o = s:option(Value, "apple_dns", translate("Apple Domains DNS"), translate("If empty, Not change Apple domains parsing DNS (Default is empty)")) o.rmempty = true o.default = "" o.datatype = "ip4addr" o:depends("apple_optimization", "1") o = s:option(Flag, "adblock", translate("Enable adblock")) o.rmempty = false o = s:option(Value, "adblock_url", translate("adblock_url")) o:value("https://raw.githubusercontent.com/neodevpro/neodevhost/master/lite_dnsmasq.conf", translate("NEO DEV HOST Lite")) o:value("https://raw.githubusercontent.com/neodevpro/neodevhost/master/dnsmasq.conf", translate("NEO DEV HOST Full")) o:value("https://anti-ad.net/anti-ad-for-dnsmasq.conf", translate("anti-AD")) o.default = "https://raw.githubusercontent.com/neodevpro/neodevhost/master/lite_dnsmasq.conf" o:depends("adblock", "1") o.description = translate("Support AdGuardHome and DNSMASQ format list") o = s:option(Button, "Reset", translate("Reset to defaults")) o.inputstyle = "reload" o.write = function() luci.sys.call("/etc/init.d/shadowsocksr reset") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers")) end -- [[ SOCKS5 Proxy ]]-- s = m:section(TypedSection, "socks5_proxy", translate("Global SOCKS5 Proxy Server")) s.anonymous = true -- Enable/Disable Option o = s:option(Flag, "enabled", translate("Enable")) o.default = 0 o.rmempty = false -- Server Selection o = s:option(ListValue, "server", translate("Server")) o:value("same", translate("Same as Global Server")) for _, key in pairs(key_table) do o:value(key, server_table[key]) end o.default = "same" o.rmempty = false -- Dynamic value handling based on enabled/disabled state o.cfgvalue = function(self, section) local enabled = m:get(section, "enabled") if enabled == "0" then return m:get(section, "old_server") end return Value.cfgvalue(self, section)-- Default to `same` when enabled end o.write = function(self, section, value) local enabled = m:get(section, "enabled") if enabled == "0" then local old_server = Value.cfgvalue(self, section) if old_server ~= "nil" then m:set(section, "old_server", old_server) end m:set(section, "server", "nil") else m:del(section, "old_server") -- Write the value normally when enabled Value.write(self, section, value) end end -- Socks Auth if is_finded("xray") then o = s:option(ListValue, "socks5_auth", translate("Socks5 Auth Mode"), translate("Socks protocol auth methods, default:noauth.")) o.default = "noauth" o:value("noauth", "NOAUTH") o:value("password", "PASSWORD") o.rmempty = true for key, server_type in pairs(type_table) do if server_type == "v2ray" then -- 如果服务器类型是 v2ray,则设置依赖项显示 o:depends("server", key) end end o:depends({server = "same", disable = true}) -- Socks User o = s:option(Value, "socks5_user", translate("Socks5 User"), translate("Only when Socks5 Auth Mode is password valid, Mandatory.")) o.rmempty = true o:depends("socks5_auth", "password") -- Socks Password o = s:option(Value, "socks5_pass", translate("Socks5 Password"), translate("Only when Socks5 Auth Mode is password valid, Not mandatory.")) o.password = true o.rmempty = true o:depends("socks5_auth", "password") -- Socks Mixed o = s:option(Flag, "socks5_mixed", translate("Enabled Mixed"), translate("Mixed as an alias of socks, default:Enabled.")) o.default = "1" o.rmempty = false for key, server_type in pairs(type_table) do if server_type == "v2ray" then -- 如果服务器类型是 v2ray,则设置依赖项显示 o:depends("server", key) end end o:depends({server = "same", disable = true}) end -- Local Port o = s:option(Value, "local_port", translate("Local Port")) o.datatype = "port" o.default = 1080 o.rmempty = false -- [[ fragmen Settings ]]-- if is_finded("xray") then s = m:section(TypedSection, "global_xray_fragment", translate("Xray Fragment Settings")) s.anonymous = true o = s:option(Flag, "fragment", translate("Fragment"), translate("TCP fragments, which can deceive the censorship system in some cases, such as bypassing SNI blacklists.")) o.default = 0 o = s:option(ListValue, "fragment_packets", translate("Fragment Packets"), translate("\"1-3\" is for segmentation at TCP layer, applying to the beginning 1 to 3 data writes by the client. \"tlshello\" is for TLS client hello packet fragmentation.")) o.default = "tlshello" o:value("tlshello", "tlshello") o:value("1-1", "1-1") o:value("1-2", "1-2") o:value("1-3", "1-3") o:value("1-5", "1-5") o:depends("fragment", true) o = s:option(Value, "fragment_length", translate("Fragment Length"), translate("Fragmented packet length (byte)")) o.default = "100-200" o:depends("fragment", true) o = s:option(Value, "fragment_interval", translate("Fragment Interval"), translate("Fragmentation interval (ms)")) o.default = "10-20" o:depends("fragment", true) o = s:option(Value, "fragment_maxsplit", translate("Max Split"), translate("Limit the maximum number of splits.")) o.default = "100-200" o:depends("fragment", true) o = s:option(Flag, "noise", translate("Noise"), translate("UDP noise, Under some circumstances it can bypass some UDP based protocol restrictions.")) o.default = 0 s = m:section(TypedSection, "xray_noise_packets", translate("Xray Noise Packets")) s.description = translate( "<font style='color:red'>" .. translate("To send noise packets, select \"Noise\" in Xray Settings.") .. "</font>" .. "<br/><font><b>" .. translate("For specific usage, see:") .. "</b></font>" .. "<a href='https://xtls.github.io/config/outbounds/freedom.html' target='_blank'>" .. "<font style='color:green'><b>" .. translate("Click to the page") .. "</b></font></a>") s.template = "cbi/tblsection" s.sortable = true s.anonymous = true s.addremove = true s.remove = function(self, section) for k, v in pairs(self.children) do v.rmempty = true v.validate = nil end TypedSection.remove(self, section) end o = s:option(Flag, "enabled", translate("Enable")) o.default = 1 o.rmempty = false o = s:option(ListValue, "type", translate("Type")) o.default = "base64" o:value("rand", "rand") o:value("str", "str") o:value("hex", "hex") o:value("base64", "base64") o = s:option(Value, "domainStrategy", translate("Domain Strategy")) o.default = "UseIP" o:value("AsIs", "AsIs") o:value("UseIP", "UseIP") o:value("UseIPv4", "UseIPv4") o:value("ForceIP", "ForceIP") o:value("ForceIPv4", "ForceIPv4") o.rmempty = false o = s:option(Value, "packet", translate("Packet")) o.datatype = "minlength(1)" o.rmempty = false o = s:option(Value, "delay", translate("Delay (ms)")) o.datatype = "or(uinteger,portrange)" o.rmempty = false o = s:option(Value, "applyto", translate("IP Type")) o.default = "IP" o:value("IP", "ALL") o:value("IPV4", "IPv4") o:value("IPV6", "IPv6") o.rmempty = false end return m
28harishkumar/blog
1,558
public/js/tinymce/plugins/jbimages/ci/application/config/constants.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* |-------------------------------------------------------------------------- | File and Directory Modes |-------------------------------------------------------------------------- | | These prefs are used when checking and setting modes when working | with the file system. The defaults are fine on servers with proper | security, but you may wish (or even need) to change the values in | certain environments (Apache running a separate process for each | user, PHP under CGI with Apache suEXEC, etc.). Octal values should | always be used to set the mode correctly. | */ define('FILE_READ_MODE', 0644); define('FILE_WRITE_MODE', 0666); define('DIR_READ_MODE', 0755); define('DIR_WRITE_MODE', 0777); /* |-------------------------------------------------------------------------- | File Stream Modes |-------------------------------------------------------------------------- | | These modes are used when working with fopen()/popen() | */ define('FOPEN_READ', 'rb'); define('FOPEN_READ_WRITE', 'r+b'); define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care define('FOPEN_WRITE_CREATE', 'ab'); define('FOPEN_READ_WRITE_CREATE', 'a+b'); define('FOPEN_WRITE_CREATE_STRICT', 'xb'); define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b'); /* End of file constants.php */ /* Location: ./application/config/constants.php */
28harishkumar/blog
3,295
public/js/tinymce/plugins/jbimages/ci/application/config/smileys.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | SMILEYS | ------------------------------------------------------------------- | This file contains an array of smileys for use with the emoticon helper. | Individual images can be used to replace multiple simileys. For example: | :-) and :) use the same image replacement. | | Please see user guide for more info: | http://codeigniter.com/user_guide/helpers/smiley_helper.html | */ $smileys = array( // smiley image name width height alt ':-)' => array('grin.gif', '19', '19', 'grin'), ':lol:' => array('lol.gif', '19', '19', 'LOL'), ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), ':)' => array('smile.gif', '19', '19', 'smile'), ';-)' => array('wink.gif', '19', '19', 'wink'), ';)' => array('wink.gif', '19', '19', 'wink'), ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), ':-S' => array('confused.gif', '19', '19', 'confused'), ':wow:' => array('surprise.gif', '19', '19', 'surprised'), ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), ':P' => array('raspberry.gif', '19', '19', 'raspberry'), ':blank:' => array('blank.gif', '19', '19', 'blank stare'), ':long:' => array('longface.gif', '19', '19', 'long face'), ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), ':down:' => array('downer.gif', '19', '19', 'downer'), ':red:' => array('embarrassed.gif', '19', '19', 'red face'), ':sick:' => array('sick.gif', '19', '19', 'sick'), ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), ':-/' => array('hmm.gif', '19', '19', 'hmmm'), '>:(' => array('mad.gif', '19', '19', 'mad'), ':mad:' => array('mad.gif', '19', '19', 'mad'), '>:-(' => array('angry.gif', '19', '19', 'angry'), ':angry:' => array('angry.gif', '19', '19', 'angry'), ':zip:' => array('zip.gif', '19', '19', 'zipper'), ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), ':ahhh:' => array('shock.gif', '19', '19', 'shock'), ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), ':snake:' => array('snake.gif', '19', '19', 'snake'), ':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'), ':question:' => array('question.gif', '19', '19', 'question') // no comma after last item ); /* End of file smileys.php */ /* Location: ./application/config/smileys.php */
28harishkumar/blog
1,579
public/js/tinymce/plugins/jbimages/ci/application/config/routes.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | URI ROUTING | ------------------------------------------------------------------------- | This file lets you re-map URI requests to specific controller functions. | | Typically there is a one-to-one relationship between a URL string | and its corresponding controller class/method. The segments in a | URL normally follow this pattern: | | example.com/class/method/id/ | | In some instances, however, you may want to remap this relationship | so that a different class/function is called than the one | corresponding to the URL. | | Please see the user guide for complete details: | | http://codeigniter.com/user_guide/general/routing.html | | ------------------------------------------------------------------------- | RESERVED ROUTES | ------------------------------------------------------------------------- | | There area two reserved routes: | | $route['default_controller'] = 'welcome'; | | This route indicates which controller class should be loaded if the | URI contains no data. In the above example, the "welcome" class | would be loaded. | | $route['404_override'] = 'errors/page_missing'; | | This route will tell the Router what URI segments to use if those provided | in the URL cannot be matched to a valid route. | */ $route['default_controller'] = "uploader"; $route['404_override'] = ''; $route['(:any)'] = "uploader/$1"; /* End of file routes.php */ /* Location: ./application/config/routes.php */
28harishkumar/blog
5,589
public/js/tinymce/plugins/jbimages/ci/application/config/user_agents.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | USER AGENT TYPES | ------------------------------------------------------------------- | This file contains four arrays of user agent data. It is used by the | User Agent Class to help identify browser, platform, robot, and | mobile device data. The array keys are used to identify the device | and the array values are used to set the actual name of the item. | */ $platforms = array ( 'windows nt 6.0' => 'Windows Longhorn', 'windows nt 5.2' => 'Windows 2003', 'windows nt 5.0' => 'Windows 2000', 'windows nt 5.1' => 'Windows XP', 'windows nt 4.0' => 'Windows NT 4.0', 'winnt4.0' => 'Windows NT 4.0', 'winnt 4.0' => 'Windows NT', 'winnt' => 'Windows NT', 'windows 98' => 'Windows 98', 'win98' => 'Windows 98', 'windows 95' => 'Windows 95', 'win95' => 'Windows 95', 'windows' => 'Unknown Windows OS', 'os x' => 'Mac OS X', 'ppc mac' => 'Power PC Mac', 'freebsd' => 'FreeBSD', 'ppc' => 'Macintosh', 'linux' => 'Linux', 'debian' => 'Debian', 'sunos' => 'Sun Solaris', 'beos' => 'BeOS', 'apachebench' => 'ApacheBench', 'aix' => 'AIX', 'irix' => 'Irix', 'osf' => 'DEC OSF', 'hp-ux' => 'HP-UX', 'netbsd' => 'NetBSD', 'bsdi' => 'BSDi', 'openbsd' => 'OpenBSD', 'gnu' => 'GNU/Linux', 'unix' => 'Unknown Unix OS' ); // The order of this array should NOT be changed. Many browsers return // multiple browser types so we want to identify the sub-type first. $browsers = array( 'Flock' => 'Flock', 'Chrome' => 'Chrome', 'Opera' => 'Opera', 'MSIE' => 'Internet Explorer', 'Internet Explorer' => 'Internet Explorer', 'Shiira' => 'Shiira', 'Firefox' => 'Firefox', 'Chimera' => 'Chimera', 'Phoenix' => 'Phoenix', 'Firebird' => 'Firebird', 'Camino' => 'Camino', 'Netscape' => 'Netscape', 'OmniWeb' => 'OmniWeb', 'Safari' => 'Safari', 'Mozilla' => 'Mozilla', 'Konqueror' => 'Konqueror', 'icab' => 'iCab', 'Lynx' => 'Lynx', 'Links' => 'Links', 'hotjava' => 'HotJava', 'amaya' => 'Amaya', 'IBrowse' => 'IBrowse' ); $mobiles = array( // legacy array, old values commented out 'mobileexplorer' => 'Mobile Explorer', // 'openwave' => 'Open Wave', // 'opera mini' => 'Opera Mini', // 'operamini' => 'Opera Mini', // 'elaine' => 'Palm', 'palmsource' => 'Palm', // 'digital paths' => 'Palm', // 'avantgo' => 'Avantgo', // 'xiino' => 'Xiino', 'palmscape' => 'Palmscape', // 'nokia' => 'Nokia', // 'ericsson' => 'Ericsson', // 'blackberry' => 'BlackBerry', // 'motorola' => 'Motorola' // Phones and Manufacturers 'motorola' => "Motorola", 'nokia' => "Nokia", 'palm' => "Palm", 'iphone' => "Apple iPhone", 'ipad' => "iPad", 'ipod' => "Apple iPod Touch", 'sony' => "Sony Ericsson", 'ericsson' => "Sony Ericsson", 'blackberry' => "BlackBerry", 'cocoon' => "O2 Cocoon", 'blazer' => "Treo", 'lg' => "LG", 'amoi' => "Amoi", 'xda' => "XDA", 'mda' => "MDA", 'vario' => "Vario", 'htc' => "HTC", 'samsung' => "Samsung", 'sharp' => "Sharp", 'sie-' => "Siemens", 'alcatel' => "Alcatel", 'benq' => "BenQ", 'ipaq' => "HP iPaq", 'mot-' => "Motorola", 'playstation portable' => "PlayStation Portable", 'hiptop' => "Danger Hiptop", 'nec-' => "NEC", 'panasonic' => "Panasonic", 'philips' => "Philips", 'sagem' => "Sagem", 'sanyo' => "Sanyo", 'spv' => "SPV", 'zte' => "ZTE", 'sendo' => "Sendo", // Operating Systems 'symbian' => "Symbian", 'SymbianOS' => "SymbianOS", 'elaine' => "Palm", 'palm' => "Palm", 'series60' => "Symbian S60", 'windows ce' => "Windows CE", // Browsers 'obigo' => "Obigo", 'netfront' => "Netfront Browser", 'openwave' => "Openwave Browser", 'mobilexplorer' => "Mobile Explorer", 'operamini' => "Opera Mini", 'opera mini' => "Opera Mini", // Other 'digital paths' => "Digital Paths", 'avantgo' => "AvantGo", 'xiino' => "Xiino", 'novarra' => "Novarra Transcoder", 'vodafone' => "Vodafone", 'docomo' => "NTT DoCoMo", 'o2' => "O2", // Fallback 'mobile' => "Generic Mobile", 'wireless' => "Generic Mobile", 'j2me' => "Generic Mobile", 'midp' => "Generic Mobile", 'cldc' => "Generic Mobile", 'up.link' => "Generic Mobile", 'up.browser' => "Generic Mobile", 'smartphone' => "Generic Mobile", 'cellphone' => "Generic Mobile" ); // There are hundreds of bots but these are the most common. $robots = array( 'googlebot' => 'Googlebot', 'msnbot' => 'MSNBot', 'slurp' => 'Inktomi Slurp', 'yahoo' => 'Yahoo', 'askjeeves' => 'AskJeeves', 'fastcrawler' => 'FastCrawler', 'infoseek' => 'InfoSeek Robot 1.0', 'lycos' => 'Lycos' ); /* End of file user_agents.php */ /* Location: ./application/config/user_agents.php */
28harishkumar/blog
3,687
public/js/tinymce/plugins/jbimages/ci/application/controllers/uploader.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Uploader extends CI_Controller { /* Constructor */ public function __construct() { parent::__construct(); $this->load->helper(array('jbimages','language')); // is_allowed is a helper function which is supposed to return False if upload operation is forbidden // [See jbimages/is_alllowed.php] if (is_allowed() === FALSE) { exit; } // User configured settings $this->config->load('uploader_settings', TRUE); } /* Language set */ private function _lang_set($lang) { // We accept any language set as lang_id in **_dlg.js // Therefore an error will occur if language file doesn't exist $this->config->set_item('language', $lang); $this->lang->load('jbstrings', $lang); } /* Default upload routine */ public function upload ($lang='english') { // Set language $this->_lang_set($lang); // Get configuartion data (we fill up 2 arrays - $config and $conf) $conf['img_path'] = $this->config->item('img_path', 'uploader_settings'); $conf['allow_resize'] = $this->config->item('allow_resize', 'uploader_settings'); $config['allowed_types'] = $this->config->item('allowed_types', 'uploader_settings'); $config['max_size'] = $this->config->item('max_size', 'uploader_settings'); $config['encrypt_name'] = $this->config->item('encrypt_name', 'uploader_settings'); $config['overwrite'] = $this->config->item('overwrite', 'uploader_settings'); $config['upload_path'] = $this->config->item('upload_path', 'uploader_settings'); if (!$conf['allow_resize']) { $config['max_width'] = $this->config->item('max_width', 'uploader_settings'); $config['max_height'] = $this->config->item('max_height', 'uploader_settings'); } else { $conf['max_width'] = $this->config->item('max_width', 'uploader_settings'); $conf['max_height'] = $this->config->item('max_height', 'uploader_settings'); if ($conf['max_width'] == 0 and $conf['max_height'] == 0) { $conf['allow_resize'] = FALSE; } } // Load uploader $this->load->library('upload', $config); if ($this->upload->do_upload()) // Success { // General result data $result = $this->upload->data(); // Shall we resize an image? if ($conf['allow_resize'] and $conf['max_width'] > 0 and $conf['max_height'] > 0 and (($result['image_width'] > $conf['max_width']) or ($result['image_height'] > $conf['max_height']))) { // Resizing parameters $resizeParams = array ( 'source_image' => $result['full_path'], 'new_image' => $result['full_path'], 'width' => $conf['max_width'], 'height' => $conf['max_height'] ); // Load resize library $this->load->library('image_lib', $resizeParams); // Do resize $this->image_lib->resize(); } // Add our stuff $result['result'] = "file_uploaded"; $result['resultcode'] = 'ok'; $result['file_name'] = $conf['img_path'] . '/' . $result['file_name']; // Output to user $this->load->view('ajax_upload_result', $result); } else // Failure { // Compile data for output $result['result'] = $this->upload->display_errors(' ', ' '); $result['resultcode'] = 'failed'; // Output to user $this->load->view('ajax_upload_result', $result); } } /* Blank Page (default source for iframe) */ public function blank($lang='english') { $this->_lang_set($lang); $this->load->view('blank'); } public function index($lang='english') { $this->blank($lang); } } /* End of file uploader.php */ /* Location: ./application/controllers/uploader.php */
281677160/openwrt-package
3,284
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/log.lua
require "luci.util" require "nixio.fs" require "luci.sys" require "luci.http" f = SimpleForm("logview") f.reset = false f.submit = false f:append(Template("shadowsocksr/log")) -- 自定义 log 函数 function log(...) local result = os.date("%Y-%m-%d %H:%M:%S: ") .. table.concat({...}, " ") local f, err = io.open("/var/log/ssrplus.log", "a") if f and err == nil then f:write(result .. "\n") f:close() end end -- 创建备份与恢复表单 fb = SimpleForm('backup-restore') fb.reset = false fb.submit = false s = fb:section(SimpleSection, translate("Backup and Restore"), translate("Backup or Restore Client and Server Configurations.") .. "<br><font style='color:red'><b>" .. translate("Note: Restoring configurations across different versions may cause compatibility issues.") .. "</b></font>") s.anonymous = true s:append(Template("shadowsocksr/backup_restore")) -- 定义备份目标文件和目录 local backup_targets = { files = { "/etc/config/shadowsocksr" }, dirs = { "/etc/ssrplus" } } local file_path = '/tmp/shadowsocksr_upload.tar.gz' local temp_dir = '/tmp/shadowsocksr_bak' local fd -- 处理文件上传 luci.http.setfilehandler(function(meta, chunk, eof) if not fd and meta and meta.name == "ulfile" and chunk then -- 初始化上传处理 luci.sys.call("rm -rf " .. temp_dir) nixio.fs.remove(file_path) fd = nixio.open(file_path, "w") luci.sys.call("echo '' > /var/log/ssrplus.log") end if fd and chunk then fd:write(chunk) end if eof and fd then fd:close() fd = nil if nixio.fs.access(file_path) then log(" * shadowsocksr 配置文件上传成功…") -- 使用自定义的 log 函数 luci.sys.call("mkdir -p " .. temp_dir) if luci.sys.call("tar -xzf " .. file_path .. " -C " .. temp_dir) == 0 then -- 处理文件还原 for _, target in ipairs(backup_targets.files) do local temp_file = temp_dir .. target if nixio.fs.access(temp_file) then luci.sys.call(string.format("cp -f '%s' '%s'", temp_file, target)) log(" * 文件 " .. target .. " 还原成功…") -- 使用自定义的 log 函数 end end -- 处理目录还原 for _, target in ipairs(backup_targets.dirs) do local temp_dir_path = temp_dir .. target if nixio.fs.access(temp_dir_path) then luci.sys.call(string.format("cp -rf '%s'/* '%s/'", temp_dir_path, target)) log(" * 目录 " .. target .. " 还原成功…") -- 使用自定义的 log 函数 end end log(" * shadowsocksr 配置还原成功…") -- 使用自定义的 log 函数 log(" * 重启 shadowsocksr 服务中…\n") -- 使用自定义的 log 函数 luci.sys.call('/etc/init.d/shadowsocksr restart > /dev/null 2>&1 &') else log(" * shadowsocksr 配置文件解压失败,请重试!") -- 使用自定义的 log 函数 end else log(" * shadowsocksr 配置文件上传失败,请重试!") -- 使用自定义的 log 函数 end -- 清理临时文件 luci.sys.call("rm -rf " .. temp_dir) nixio.fs.remove(file_path) end end) return f, fb
2929004360/ruoyi-sign
5,097
ruoyi-work/src/main/resources/mapper/work/WorkSignatureMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.work.mapper.WorkSignatureMapper"> <resultMap type="WorkSignature" id="WorkSignatureResult"> <result property="signatureId" column="signature_id"/> <result property="deptId" column="dept_id"/> <result property="userId" column="user_id"/> <result property="deptName" column="dept_name"/> <result property="userName" column="user_name"/> <result property="name" column="name"/> <result property="imgUrl" column="img_url"/> <result property="remark" column="remark"/> <result property="createTime" column="create_time"/> <result property="updateTime" column="update_time"/> </resultMap> <sql id="selectWorkSignatureVo"> select s.signature_id, s.dept_id, s.user_id, s.dept_name, s.user_name, s.name, s.img_url, s.remark, s.create_time, s.update_time from work_signature s left join sys_user u on u.user_id = s.user_id left join sys_dept d on s.dept_id = d.dept_id </sql> <select id="selectWorkSignatureList" parameterType="WorkSignature" resultMap="WorkSignatureResult"> <include refid="selectWorkSignatureVo"/> <where> <if test="name != null and name != ''">and s.name like concat('%', #{name}, '%')</if> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} </if> <!-- 数据范围过滤 --> ${params.dataScope} </where> order by s.create_time desc </select> <select id="selectWorkSignatureBySignatureId" parameterType="Long" resultMap="WorkSignatureResult"> select signature_id, dept_id, user_id, dept_name, user_name, name, img_url, remark, create_time, update_time from work_signature where signature_id = #{signatureId} </select> <insert id="insertWorkSignature" parameterType="WorkSignature" useGeneratedKeys="true" keyProperty="signatureId"> insert into work_signature <trim prefix="(" suffix=")" suffixOverrides=","> <if test="deptId != null">dept_id,</if> <if test="userId != null">user_id,</if> <if test="deptName != null">dept_name,</if> <if test="userName != null">user_name,</if> <if test="name != null and name != ''">name,</if> <if test="imgUrl != null">img_url,</if> <if test="remark != null">remark,</if> <if test="createTime != null">create_time,</if> <if test="updateTime != null">update_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="deptId != null">#{deptId},</if> <if test="userId != null">#{userId},</if> <if test="deptName != null">#{deptName},</if> <if test="userName != null">#{userName},</if> <if test="name != null and name != ''">#{name},</if> <if test="imgUrl != null">#{imgUrl},</if> <if test="remark != null">#{remark},</if> <if test="createTime != null">#{createTime},</if> <if test="updateTime != null">#{updateTime},</if> </trim> </insert> <update id="updateWorkSignature" parameterType="WorkSignature"> update work_signature <trim prefix="SET" suffixOverrides=","> <if test="deptId != null">dept_id = #{deptId},</if> <if test="userId != null">user_id = #{userId},</if> <if test="deptName != null">dept_name = #{deptName},</if> <if test="userName != null">user_name = #{userName},</if> <if test="name != null and name != ''">name = #{name},</if> <if test="imgUrl != null">img_url = #{imgUrl},</if> <if test="remark != null">remark = #{remark},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if> </trim> where signature_id = #{signatureId} </update> <delete id="deleteWorkSignatureBySignatureId" parameterType="Long"> delete from work_signature where signature_id = #{signatureId} </delete> <delete id="deleteWorkSignatureBySignatureIds" parameterType="String"> delete from work_signature where signature_id in <foreach item="signatureId" collection="array" open="(" separator="," close=")"> #{signatureId} </foreach> </delete> </mapper>
2929004360/ruoyi-sign
5,706
ruoyi-work/src/main/resources/mapper/work/WorkSealMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.work.mapper.WorkSealMapper"> <resultMap type="WorkSeal" id="WorkSealResult"> <result property="suraId" column="sura_id"/> <result property="deptId" column="dept_id"/> <result property="userId" column="user_id"/> <result property="deptName" column="dept_name"/> <result property="userName" column="user_name"/> <result property="name" column="name"/> <result property="type" column="type"/> <result property="suraUrl" column="sura_url"/> <result property="suraSize" column="sura_size"/> <result property="remark" column="remark"/> <result property="delFlag" column="del_flag"/> <result property="createTime" column="create_time"/> <result property="updateTime" column="update_time"/> </resultMap> <sql id="selectWorkSealVo"> select s.sura_id, s.dept_id, s.user_id, s.dept_name, s.user_name, s.name, s.type, s.sura_url, s.sura_size, s.remark, s.del_flag, s.create_time, s.update_time from work_seal s left join sys_user u on u.user_id = s.user_id left join sys_dept d on s.dept_id = d.dept_id </sql> <select id="selectWorkSealList" parameterType="WorkSeal" resultMap="WorkSealResult"> <include refid="selectWorkSealVo"/> <where> <if test="name != null and name != ''">and s.name like concat('%', #{name}, '%')</if> <if test="type != null and type != ''">and s.type = #{type}</if> <if test="suraSize != null and suraSize != ''">and s.sura_size = #{suraSize}</if> and s.del_flag = '0' <!-- 数据范围过滤 --> ${params.dataScope} </where> order by s.create_time desc </select> <select id="selectWorkSealBySuraId" parameterType="Long" resultMap="WorkSealResult"> select sura_id, dept_id, user_id, dept_name, user_name, name, type, sura_url, sura_size, remark, del_flag, create_time, update_time from work_seal where sura_id = #{suraId} </select> <insert id="insertWorkSeal" parameterType="WorkSeal" useGeneratedKeys="true" keyProperty="suraId"> insert into work_seal <trim prefix="(" suffix=")" suffixOverrides=","> <if test="deptId != null">dept_id,</if> <if test="userId != null">user_id,</if> <if test="deptName != null">dept_name,</if> <if test="userName != null">user_name,</if> <if test="name != null and name != ''">name,</if> <if test="type != null">type,</if> <if test="suraUrl != null">sura_url,</if> <if test="suraSize != null">sura_size,</if> <if test="remark != null">remark,</if> <if test="delFlag != null">del_flag,</if> <if test="createTime != null">create_time,</if> <if test="updateTime != null">update_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="deptId != null">#{deptId},</if> <if test="userId != null">#{userId},</if> <if test="deptName != null">#{deptName},</if> <if test="userName != null">#{userName},</if> <if test="name != null and name != ''">#{name},</if> <if test="type != null">#{type},</if> <if test="suraUrl != null">#{suraUrl},</if> <if test="suraSize != null">#{suraSize},</if> <if test="remark != null">#{remark},</if> <if test="delFlag != null">#{delFlag},</if> <if test="createTime != null">#{createTime},</if> <if test="updateTime != null">#{updateTime},</if> </trim> </insert> <update id="updateWorkSeal" parameterType="WorkSeal"> update work_seal <trim prefix="SET" suffixOverrides=","> <if test="deptId != null">dept_id = #{deptId},</if> <if test="userId != null">user_id = #{userId},</if> <if test="deptName != null">dept_name = #{deptName},</if> <if test="userName != null">user_name = #{userName},</if> <if test="name != null and name != ''">name = #{name},</if> <if test="type != null">type = #{type},</if> <if test="suraUrl != null">sura_url = #{suraUrl},</if> <if test="suraSize != null">sura_size = #{suraSize},</if> <if test="remark != null">remark = #{remark},</if> <if test="delFlag != null">del_flag = #{delFlag},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if> </trim> where sura_id = #{suraId} </update> <delete id="deleteWorkSealBySuraId" parameterType="Long"> update work_seal set del_flag = "1" where sura_id = #{suraId} </delete> <delete id="deleteWorkSealBySuraIds" parameterType="String"> update work_seal set del_flag = "1" where sura_id in <foreach item="suraId" collection="array" open="(" separator="," close=")"> #{suraId} </foreach> </delete> </mapper>
2929004360/ruoyi-sign
9,926
ruoyi-work/src/main/resources/mapper/work/WorkSignMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.work.mapper.WorkSignMapper"> <resultMap type="WorkSign" id="WorkSignResult"> <result property="signId" column="sign_id"/> <result property="userId" column="user_id"/> <result property="deptId" column="dept_id"/> <result property="userName" column="user_name"/> <result property="deptName" column="dept_name"/> <result property="fileName" column="file_name"/> <result property="fileShare" column="file_share"/> <result property="fileType" column="file_type"/> <result property="subject" column="subject"/> <result property="definitionId" column="definition_id"/> <result property="processId" column="process_id"/> <result property="processName" column="process_name"/> <result property="schedule" column="schedule"/> <result property="signDate" column="sign_date"/> <result property="remark" column="remark"/> <result property="delFlag" column="del_flag"/> <result property="createTime" column="create_time"/> <result property="updateTime" column="update_time"/> </resultMap> <resultMap type="WorkSignVo" id="WorkSignVoResult"> <result property="signId" column="sign_id"/> <result property="userId" column="user_id"/> <result property="deptId" column="dept_id"/> <result property="userName" column="user_name"/> <result property="deptName" column="dept_name"/> <result property="fileName" column="file_name"/> <result property="fileShare" column="file_share"/> <result property="fileType" column="file_type"/> <result property="subject" column="subject"/> <result property="definitionId" column="definition_id"/> <result property="processId" column="process_id"/> <result property="processName" column="process_name"/> <result property="schedule" column="schedule"/> <result property="signDate" column="sign_date"/> <result property="remark" column="remark"/> <result property="delFlag" column="del_flag"/> <result property="createTime" column="create_time"/> <result property="updateTime" column="update_time"/> <collection property="signFileList" ofType="WorkSignFile"> <result property="fileName" column="f_file_name"/> <result property="page" column="f_page"/> <result property="fileUrl" column="f_file_url"/> <result property="width" column="f_width"/> <result property="height" column="f_height"/> <result property="type" column="f_type"/> </collection> </resultMap> <sql id="selectWorkSignVo"> SELECT s.sign_id, s.user_id, s.dept_id, s.user_name, s.dept_name, s.file_name, s.file_share, s.file_type, s.subject, s.definition_id, s.process_id, s.process_name, s.schedule, s.sign_date, s.remark, s.del_flag, s.create_time, s.update_time, f.file_name 'f_file_name', f.page 'f_page', f.file_url 'f_file_url', f.width 'f_width', f.height 'f_height', f.type 'f_type' FROM work_sign s LEFT JOIN work_sign_file f ON s.sign_id = f.sign_id </sql> <select id="selectWorkSignList" parameterType="WorkSignVo" resultMap="WorkSignVoResult"> <include refid="selectWorkSignVo"/> <where> <if test="userId != null and userId != ''">and s.user_id = #{userId}</if> <if test="deptId != null and deptId != ''">and s.dept_id = #{deptId}</if> <if test="userName != null and userName != ''">and s.user_name like concat('%', #{userName}, '%')</if> <if test="deptName != null and deptName != ''">and s.dept_name like concat('%', #{deptName}, '%')</if> <if test="fileName != null and fileName != ''">and s.file_name like concat('%', #{fileName}, '%')</if> <if test="fileType != null and fileType != ''">and s.file_type = #{fileType}</if> <if test="schedule != null and schedule != ''">and s.schedule = #{schedule}</if> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} </if> and s.del_flag = '0' </where> </select> <select id="selectWorkSignBySignId" parameterType="Long" resultMap="WorkSignVoResult"> SELECT s.sign_id, s.user_id, s.dept_id, s.user_name, s.dept_name, s.file_name, s.file_share, s.file_type, s.subject, s.definition_id, s.process_id, s.process_name, s.schedule, s.sign_date, s.remark, s.del_flag, s.create_time, s.update_time FROM work_sign s where s.sign_id = #{signId} </select> <insert id="insertWorkSign" parameterType="WorkSignVo" useGeneratedKeys="true" keyProperty="signId"> insert into work_sign <trim prefix="(" suffix=")" suffixOverrides=","> <if test="signId != null">sign_id,</if> <if test="userId != null">user_id,</if> <if test="deptId != null">dept_id,</if> <if test="userName != null">user_name,</if> <if test="deptName != null">dept_name,</if> <if test="fileName != null and fileName != ''">file_name,</if> <if test="fileShare != null">file_share,</if> <if test="fileType != null">file_type,</if> <if test="subject != null and subject != ''">subject,</if> <if test="definitionId != null">definition_id,</if> <if test="processId != null">process_id,</if> <if test="processName != null">process_name,</if> <if test="schedule != null">schedule,</if> <if test="signDate != null">sign_date,</if> <if test="remark != null">remark,</if> <if test="delFlag != null">del_flag,</if> <if test="createTime != null">create_time,</if> <if test="updateTime != null">update_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="signId != null">#{signId},</if> <if test="userId != null">#{userId},</if> <if test="deptId != null">#{deptId},</if> <if test="userName != null">#{userName},</if> <if test="deptName != null">#{deptName},</if> <if test="fileName != null and fileName != ''">#{fileName},</if> <if test="fileShare != null">#{fileShare},</if> <if test="fileType != null">#{fileType},</if> <if test="subject != null and subject != ''">#{subject},</if> <if test="definitionId != null">#{definitionId},</if> <if test="processId != null">#{processId},</if> <if test="processName != null">#{processName},</if> <if test="schedule != null">#{schedule},</if> <if test="signDate != null">#{signDate},</if> <if test="remark != null">#{remark},</if> <if test="delFlag != null">#{delFlag},</if> <if test="createTime != null">#{createTime},</if> <if test="updateTime != null">#{updateTime},</if> </trim> </insert> <update id="updateWorkSign" parameterType="WorkSignVo"> update work_sign <trim prefix="SET" suffixOverrides=","> <if test="userId != null">user_id = #{userId},</if> <if test="deptId != null">dept_id = #{deptId},</if> <if test="userName != null">user_name = #{userName},</if> <if test="deptName != null">dept_name = #{deptName},</if> <if test="fileName != null and fileName != ''">file_name = #{fileName},</if> <if test="fileShare != null">file_share = #{fileShare},</if> <if test="fileType != null">file_type = #{fileType},</if> <if test="subject != null and subject != ''">subject = #{subject},</if> <if test="definitionId != null">definition_id = #{definitionId},</if> <if test="processId != null">process_id = #{processId},</if> <if test="processName != null">process_name = #{processName},</if> <if test="schedule != null">schedule = #{schedule},</if> <if test="signDate != null">sign_date = #{signDate},</if> <if test="remark != null">remark = #{remark},</if> <if test="delFlag != null">del_flag = #{delFlag},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if> </trim> where sign_id = #{signId} </update> <delete id="deleteWorkSignBySignId" parameterType="String"> update work_sign set del_flag = "1" where sign_id = #{signId} </delete> <delete id="deleteWorkSignBySignIds" parameterType="String"> update work_sign set del_flag = "1" where sign_id in <foreach item="signId" collection="array" open="(" separator="," close=")"> #{signId} </foreach> </delete> </mapper>
281677160/openwrt-package
12,695
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua
-- Copyright (C) 2017 yushi studio <ywb94@qq.com> github.com/ywb94 -- Copyright (C) 2018 lean <coolsnowwolf@gmail.com> github.com/coolsnowwolf -- Licensed to the public under the GNU General Public License v3. local m, s, sec, o local uci = require "luci.model.uci".cursor() -- 获取 LAN IP 地址 function lanip() local lan_ip lan_ip = luci.sys.exec("uci -q get network.lan.ipaddr 2>/dev/null | awk -F '/' '{print $1}' | tr -d '\n'") if not lan_ip or lan_ip == "" then lan_ip = luci.sys.exec("ip address show $(uci -q -p /tmp/state get network.lan.ifname || uci -q -p /tmp/state get network.lan.device) | grep -w 'inet' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -1 | tr -d '\n'") end if not lan_ip or lan_ip == "" then lan_ip = luci.sys.exec("ip addr show | grep -w 'inet' | grep 'global' | grep -Eo 'inet [0-9\.]+' | awk '{print $2}' | head -n 1 | tr -d '\n'") end return lan_ip end local lan_ip = lanip() local validation = require "luci.cbi.datatypes" local function is_finded(e) return luci.sys.exec(string.format('type -t -p "%s" 2>/dev/null', e)) ~= "" end m = Map("shadowsocksr", translate("ShadowSocksR Plus+ Settings"), translate("<h3>Support SS/SSR/V2RAY/XRAY/TROJAN/NAIVEPROXY/SOCKS5/TUN etc.</h3>")) m:section(SimpleSection).template = "shadowsocksr/status" local server_table = {} uci:foreach("shadowsocksr", "servers", function(s) if s.alias then server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.v2ray_protocol or s.type), s.alias} elseif s.server and s.server_port then server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(s.v2ray_protocol or s.type), s.server, s.server_port} end end) local key_table = {} for key, _ in pairs(server_table) do table.insert(key_table, key) end table.sort(key_table) -- [[ Global Setting ]]-- s = m:section(TypedSection, "global") s.anonymous = true o = s:option(ListValue, "global_server", translate("Main Server")) o:value("nil", translate("Disable")) for _, key in pairs(key_table) do o:value(key, server_table[key]) end o.default = "nil" o.rmempty = false o = s:option(ListValue, "udp_relay_server", translate("Game Mode UDP Server")) o:value("", translate("Disable")) o:value("same", translate("Same as Global Server")) for _, key in pairs(key_table) do o:value(key, server_table[key]) end if uci:get_first("shadowsocksr", 'global', 'netflix_enable', '0') == '1' then o = s:option(ListValue, "netflix_server", translate("Netflix Node")) o:value("nil", translate("Disable")) o:value("same", translate("Same as Global Server")) for _, key in pairs(key_table) do o:value(key, server_table[key]) end o.default = "nil" o.rmempty = false o = s:option(Flag, "netflix_proxy", translate("External Proxy Mode")) o.rmempty = false o.description = translate("Forward Netflix Proxy through Main Proxy") o.default = "0" end o = s:option(ListValue, "threads", translate("Multi Threads Option")) o:value("0", translate("Auto Threads")) o:value("1", translate("1 Thread")) o:value("2", translate("2 Threads")) o:value("4", translate("4 Threads")) o:value("8", translate("8 Threads")) o:value("16", translate("16 Threads")) o:value("32", translate("32 Threads")) o:value("64", translate("64 Threads")) o:value("128", translate("128 Threads")) o.default = "0" o.rmempty = false o = s:option(ListValue, "run_mode", translate("Running Mode")) o:value("gfw", translate("GFW List Mode")) o:value("router", translate("IP Route Mode")) o:value("all", translate("Global Mode")) o:value("oversea", translate("Oversea Mode")) o.default = gfw o = s:option(ListValue, "dports", translate("Proxy Ports")) o:value("1", translate("All Ports")) o:value("2", translate("Only Common Ports")) o:value("3", translate("Custom Ports")) cp = s:option(Value, "custom_ports", translate("Enter Custom Ports")) cp:depends("dports", "3") -- 仅当用户选择“Custom Ports”时显示 cp.placeholder = "e.g., 80,443,8080" o.default = 1 o = s:option(ListValue, "pdnsd_enable", translate("Resolve Dns Mode")) if is_finded("dns2tcp") then o:value("1", translate("Use DNS2TCP query")) end if is_finded("dns2socks") then o:value("2", translate("Use DNS2SOCKS query and cache")) end if is_finded("dns2socks-rust") then o:value("3", translate("Use DNS2SOCKS-RUST query and cache")) end if is_finded("mosdns") then o:value("4", translate("Use MOSDNS query (Not Support Oversea Mode)")) end if is_finded("dnsproxy") then o:value("5", translate("Use DNSPROXY query and cache")) end if is_finded("chinadns-ng") then o:value("6", translate("Use ChinaDNS-NG query and cache")) end o:value("0", translate("Use Local DNS Service listen port 5335")) o.default = 1 o = s:option(Value, "tunnel_forward", translate("Anti-pollution DNS Server")) o:value("8.8.4.4:53", translate("Google Public DNS (8.8.4.4)")) o:value("8.8.8.8:53", translate("Google Public DNS (8.8.8.8)")) o:value("208.67.222.222:53", translate("OpenDNS (208.67.222.222)")) o:value("208.67.220.220:53", translate("OpenDNS (208.67.220.220)")) o:value("209.244.0.3:53", translate("Level 3 Public DNS (209.244.0.3)")) o:value("209.244.0.4:53", translate("Level 3 Public DNS (209.244.0.4)")) o:value("4.2.2.1:53", translate("Level 3 Public DNS (4.2.2.1)")) o:value("4.2.2.2:53", translate("Level 3 Public DNS (4.2.2.2)")) o:value("4.2.2.3:53", translate("Level 3 Public DNS (4.2.2.3)")) o:value("4.2.2.4:53", translate("Level 3 Public DNS (4.2.2.4)")) o:value("1.1.1.1:53", translate("Cloudflare DNS (1.1.1.1)")) o:value("114.114.114.114:53", translate("Oversea Mode DNS-1 (114.114.114.114)")) o:value("114.114.115.115:53", translate("Oversea Mode DNS-2 (114.114.115.115)")) o:depends("pdnsd_enable", "1") o:depends("pdnsd_enable", "2") o:depends("pdnsd_enable", "3") o.description = translate("Custom DNS Server format as IP:PORT (default: 8.8.4.4:53)") o.datatype = "ip4addrport" o.default = "8.8.4.4:53" o = s:option(ListValue, "tunnel_forward_mosdns", translate("Anti-pollution DNS Server")) o:value("tcp://8.8.4.4:53,tcp://8.8.8.8:53", translate("Google Public DNS")) o:value("tcp://208.67.222.222:53,tcp://208.67.220.220:53", translate("OpenDNS")) o:value("tcp://209.244.0.3:53,tcp://209.244.0.4:53", translate("Level 3 Public DNS-1 (209.244.0.3-4)")) o:value("tcp://4.2.2.1:53,tcp://4.2.2.2:53", translate("Level 3 Public DNS-2 (4.2.2.1-2)")) o:value("tcp://4.2.2.3:53,tcp://4.2.2.4:53", translate("Level 3 Public DNS-3 (4.2.2.3-4)")) o:value("tcp://1.1.1.1:53,tcp://1.0.0.1:53", translate("Cloudflare DNS")) o:depends("pdnsd_enable", "4") o.description = translate("Custom DNS Server for MosDNS") o = s:option(Flag, "mosdns_ipv6", translate("Disable IPv6 in MOSDNS query mode")) o:depends("pdnsd_enable", "4") o.rmempty = false o.default = "1" if is_finded("dnsproxy") then o = s:option(ListValue, "parse_method", translate("Select DNS parse Mode")) o.description = translate( "<ul>" .. "<li>" .. translate("When use DNS list file, please ensure list file exists and is formatted correctly.") .. "</li>" .. "<li>" .. translate("Tips: Dnsproxy DNS Parse List Path:") .. " <a href='http://" .. lan_ip .. "/cgi-bin/luci/admin/services/shadowsocksr/control' target='_blank'>" .. translate("Click here to view or manage the DNS list file") .. "</a>" .. "</li>" .. "</ul>" ) o:value("single_dns", translate("Set Single DNS")) o:value("parse_file", translate("Use DNS List File")) o:depends("pdnsd_enable", "5") o.rmempty = true o.default = "single_dns" o = s:option(Value, "dnsproxy_tunnel_forward", translate("Anti-pollution DNS Server")) o:value("sdns://AgUAAAAAAAAABzguOC40LjQgsKKKE4EwvtIbNjGjagI2607EdKSVHowYZtyvD9iPrkkHOC44LjQuNAovZG5zLXF1ZXJ5", translate("Google DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAAACC2vD25TAYM7EnyCH8Xw1-0g5OccnTsGH9vQUUH0njRtAxkbnMudHduaWMudHcKL2Rucy1xdWVyeQ", translate("TWNIC-101 DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAADzE4NS4yMjIuMjIyLjIyMiAOp5Svj-oV-Fz-65-8H2VKHLKJ0egmfEgrdPeAQlUFFA8xODUuMjIyLjIyMi4yMjIKL2Rucy1xdWVyeQ", translate("dns.sb DNSCrypt SDNS")) o:value("sdns://AgMAAAAAAAAADTE0OS4xMTIuMTEyLjkgsBkgdEu7dsmrBT4B4Ht-BQ5HPSD3n3vqQ1-v5DydJC8SZG5zOS5xdWFkOS5uZXQ6NDQzCi9kbnMtcXVlcnk", translate("Quad9 DNSCrypt SDNS")) o:value("sdns://AQMAAAAAAAAAETk0LjE0MC4xNC4xNDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20", translate("AdGuard DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAABzEuMC4wLjGgENk8mGSlIfMGXMOlIlCcKvq7AVgcrZxtjon911-ep0cg63Ul-I8NlFj4GplQGb_TTLiczclX57DvMV8Q-JdjgRgSZG5zLmNsb3VkZmxhcmUuY29tCi9kbnMtcXVlcnk", translate("Cloudflare DNSCrypt SDNS")) o:value("sdns://AgcAAAAAAAAADjEwNC4xNi4yNDkuMjQ5ABJjbG91ZGZsYXJlLWRucy5jb20KL2Rucy1xdWVyeQ", translate("cloudflare-dns.com DNSCrypt SDNS")) o:depends("parse_method", "single_dns") o.description = translate("Custom DNS Server (support: IP:Port or tls://IP:Port or https://IP/dns-query and other format).") o = s:option(ListValue, "upstreams_logic_mode", translate("Defines the upstreams logic mode")) o.description = translate( "<ul>" .. "<li>" .. translate("Defines the upstreams logic mode, possible values: load_balance, parallel, fastest_addr (default: load_balance).") .. "</li>" .. "<li>" .. translate("When two or more DNS servers are deployed, enable this function.") .. "</li>" .. "</ul>" ) o:value("load_balance", translate("load_balance")) o:value("parallel", translate("parallel")) o:value("fastest_addr", translate("fastest_addr")) o:depends("parse_method", "parse_file") o.rmempty = true o.default = "load_balance" o = s:option(Flag, "dnsproxy_ipv6", translate("Disable IPv6 query mode")) o.description = translate("When disabled, all AAAA requests are not resolved.") o:depends("parse_method", "single_dns") o:depends("parse_method", "parse_file") o.rmempty = false o.default = "1" end if is_finded("chinadns-ng") then o = s:option(Value, "chinadns_ng_tunnel_forward", translate("Anti-pollution DNS Server")) o:value("8.8.4.4:53", translate("Google Public DNS (8.8.4.4)")) o:value("8.8.8.8:53", translate("Google Public DNS (8.8.8.8)")) o:value("208.67.222.222:53", translate("OpenDNS (208.67.222.222)")) o:value("208.67.220.220:53", translate("OpenDNS (208.67.220.220)")) o:value("209.244.0.3:53", translate("Level 3 Public DNS (209.244.0.3)")) o:value("209.244.0.4:53", translate("Level 3 Public DNS (209.244.0.4)")) o:value("4.2.2.1:53", translate("Level 3 Public DNS (4.2.2.1)")) o:value("4.2.2.2:53", translate("Level 3 Public DNS (4.2.2.2)")) o:value("4.2.2.3:53", translate("Level 3 Public DNS (4.2.2.3)")) o:value("4.2.2.4:53", translate("Level 3 Public DNS (4.2.2.4)")) o:value("1.1.1.1:53", translate("Cloudflare DNS (1.1.1.1)")) o:depends("pdnsd_enable", "6") o.description = translate( "<ul>" .. "<li>" .. translate("Custom DNS Server format as IP:PORT (default: 8.8.4.4:53)") .. "</li>" .. "<li>" .. translate("Muitiple DNS server can saperate with ','") .. "</li>" .. "</ul>" ) o = s:option(ListValue, "chinadns_ng_proto", translate("ChinaDNS-NG query protocol")) o:value("none", translate("UDP/TCP upstream")) o:value("tcp", translate("TCP upstream")) o:value("udp", translate("UDP upstream")) o:value("tls", translate("DoT upstream (Need use wolfssl version)")) o:depends("pdnsd_enable", "6") o = s:option(Value, "chinadns_forward", translate("Domestic DNS Server")) o:value("", translate("Disable ChinaDNS-NG")) o:value("wan", translate("Use DNS from WAN")) o:value("wan_114", translate("Use DNS from WAN and 114DNS")) o:value("114.114.114.114:53", translate("Nanjing Xinfeng 114DNS (114.114.114.114)")) o:value("119.29.29.29:53", translate("DNSPod Public DNS (119.29.29.29)")) o:value("223.5.5.5:53", translate("AliYun Public DNS (223.5.5.5)")) o:value("180.76.76.76:53", translate("Baidu Public DNS (180.76.76.76)")) o:value("101.226.4.6:53", translate("360 Security DNS (China Telecom) (101.226.4.6)")) o:value("123.125.81.6:53", translate("360 Security DNS (China Unicom) (123.125.81.6)")) o:value("1.2.4.8:53", translate("CNNIC SDNS (1.2.4.8)")) o:depends({pdnsd_enable = "1", run_mode = "router"}) o:depends({pdnsd_enable = "2", run_mode = "router"}) o:depends({pdnsd_enable = "3", run_mode = "router"}) o:depends({pdnsd_enable = "5", run_mode = "router"}) o:depends({pdnsd_enable = "6", run_mode = "router"}) o.description = translate("Custom DNS Server format as IP:PORT (default: disabled)") o.validate = function(self, value, section) if (section and value) then if value == "wan" or value == "wan_114" then return value end if validation.ip4addrport(value) then return value end return nil, translate("Expecting: %s"):format(translate("valid address:port")) end return value end end return m
28harishkumar/blog
1,160
public/js/tinymce/plugins/jbimages/ci/application/errors/error_404.php
<!DOCTYPE html> <html lang="en"> <head> <title>404 Page Not Found</title> <style type="text/css"> ::selection{ background-color: #E13300; color: white; } ::moz-selection{ background-color: #E13300; color: white; } ::webkit-selection{ background-color: #E13300; color: white; } body { background-color: #fff; margin: 40px; font: 13px/20px normal Helvetica, Arial, sans-serif; color: #4F5155; } a { color: #003399; background-color: transparent; font-weight: normal; } h1 { color: #444; background-color: transparent; border-bottom: 1px solid #D0D0D0; font-size: 19px; font-weight: normal; margin: 0 0 14px 0; padding: 14px 15px 10px 15px; } code { font-family: Consolas, Monaco, Courier New, Courier, monospace; font-size: 12px; background-color: #f9f9f9; border: 1px solid #D0D0D0; color: #002166; display: block; margin: 14px 0 14px 0; padding: 12px 10px 12px 10px; } #container { margin: 10px; border: 1px solid #D0D0D0; -webkit-box-shadow: 0 0 8px #D0D0D0; } p { margin: 12px 15px 12px 15px; } </style> </head> <body> <div id="container"> <h1><?php echo $heading; ?></h1> <?php echo $message; ?> </div> </body> </html>
2929004360/ruoyi-sign
4,839
ruoyi-work/src/main/resources/mapper/work/WorkSignFileMapper.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ruoyi.work.mapper.WorkSignFileMapper"> <resultMap type="WorkSignFile" id="WorkSignFileResult"> <result property="signFileId" column="sign_file_id" /> <result property="signId" column="sign_id" /> <result property="fileName" column="file_name" /> <result property="page" column="page" /> <result property="fileUrl" column="file_url" /> <result property="width" column="width" /> <result property="height" column="height" /> <result property="type" column="type" /> </resultMap> <sql id="selectWorkSignFileVo"> select sign_file_id, sign_id, file_name, page, file_url, width, height, type from work_sign_file </sql> <select id="selectWorkSignFileList" parameterType="WorkSignFile" resultMap="WorkSignFileResult"> <include refid="selectWorkSignFileVo"/> <where> <if test="signId != null "> and sign_id = #{signId}</if> <if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if> <if test="page != null "> and page = #{page}</if> <if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if> <if test="width != null and width != ''"> and width = #{width}</if> <if test="height != null and height != ''"> and height = #{height}</if> <if test="type != null and type != ''"> and type = #{type}</if> </where> </select> <select id="selectWorkSignFileBySignFileId" parameterType="Long" resultMap="WorkSignFileResult"> <include refid="selectWorkSignFileVo"/> where sign_file_id = #{signFileId} </select> <select id="getInfoWorkSignFile" resultMap="WorkSignFileResult"> <include refid="selectWorkSignFileVo"/> where sign_id = #{signId} and `type` = '1' </select> <insert id="insertWorkSignFile" parameterType="WorkSignFile"> insert into work_sign_file <trim prefix="(" suffix=")" suffixOverrides=","> <if test="signFileId != null">sign_file_id,</if> <if test="signId != null">sign_id,</if> <if test="fileName != null">file_name,</if> <if test="page != null">page,</if> <if test="fileUrl != null">file_url,</if> <if test="width != null">width,</if> <if test="height != null">height,</if> <if test="type != null">type,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="signFileId != null">#{signFileId},</if> <if test="signId != null">#{signId},</if> <if test="fileName != null">#{fileName},</if> <if test="page != null">#{page},</if> <if test="fileUrl != null">#{fileUrl},</if> <if test="width != null">#{width},</if> <if test="height != null">#{height},</if> <if test="type != null">#{type},</if> </trim> </insert> <insert id="insertWorkSignFileList"> insert into work_sign_file (sign_id, file_name, page, file_url, width, height, type) values <foreach collection="list" item="item" index="index" separator=","> (#{item.signId}, #{item.fileName}, #{item.page}, #{item.fileUrl}, #{item.width}, #{item.height}, #{item.type}) </foreach> </insert> <update id="updateWorkSignFile" parameterType="WorkSignFile"> update work_sign_file <trim prefix="SET" suffixOverrides=","> <if test="signId != null">sign_id = #{signId},</if> <if test="fileName != null">file_name = #{fileName},</if> <if test="page != null">page = #{page},</if> <if test="fileUrl != null">file_url = #{fileUrl},</if> <if test="width != null">width = #{width},</if> <if test="height != null">height = #{height},</if> <if test="type != null">type = #{type},</if> </trim> where sign_file_id = #{signFileId} </update> <delete id="deleteWorkSignFileBySignFileId" parameterType="Long"> delete from work_sign_file where sign_file_id = #{signFileId} </delete> <delete id="deleteWorkSignFileBySignFileIds" parameterType="String"> delete from work_sign_file where sign_file_id in <foreach item="signFileId" collection="array" open="(" separator="," close=")"> #{signFileId} </foreach> </delete> <delete id="deleteWorkSignFileBySignId"> delete from work_sign_file where sign_id = #{signId} </delete> </mapper>
281677160/openwrt-package
5,150
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua
require "luci.ip" require "nixio.fs" require "luci.sys" local m, s, o local function is_finded(e) return luci.sys.exec(string.format('type -t -p "%s" 2>/dev/null', e)) ~= "" end m = Map("shadowsocksr") s = m:section(TypedSection, "access_control") s.anonymous = true -- Interface control s:tab("Interface", translate("Interface control")) o = s:taboption("Interface", DynamicList, "Interface", translate("Interface")) o.template = "cbi/network_netlist" o.widget = "checkbox" o.nocreate = true o.unspecified = true o.description = translate("Listen only on the given interface or, if unspecified, on all") -- Part of WAN s:tab("wan_ac", translate("WAN IP AC")) o = s:taboption("wan_ac", DynamicList, "wan_bp_ips", translate("WAN White List IP")) o.datatype = "ip4addr" o = s:taboption("wan_ac", DynamicList, "wan_fw_ips", translate("WAN Force Proxy IP")) o.datatype = "ip4addr" -- Part of LAN s:tab("lan_ac", translate("LAN IP AC")) o = s:taboption("lan_ac", ListValue, "lan_ac_mode", translate("LAN Access Control")) o:value("0", translate("Disable")) o:value("w", translate("Allow listed only")) o:value("b", translate("Allow all except listed")) o.rmempty = false o = s:taboption("lan_ac", DynamicList, "lan_ac_ips", translate("LAN Host List")) o.datatype = "ipaddr" luci.ip.neighbors({family = 4}, function(entry) if entry.reachable then o:value(entry.dest:string()) end end) o:depends("lan_ac_mode", "w") o:depends("lan_ac_mode", "b") o = s:taboption("lan_ac", DynamicList, "lan_bp_ips", translate("LAN Bypassed Host List")) o.datatype = "ipaddr" luci.ip.neighbors({family = 4}, function(entry) if entry.reachable then o:value(entry.dest:string()) end end) o = s:taboption("lan_ac", DynamicList, "lan_fp_ips", translate("LAN Force Proxy Host List")) o.datatype = "ipaddr" luci.ip.neighbors({family = 4}, function(entry) if entry.reachable then o:value(entry.dest:string()) end end) o = s:taboption("lan_ac", DynamicList, "lan_gm_ips", translate("Game Mode Host List")) o.datatype = "ipaddr" luci.ip.neighbors({family = 4}, function(entry) if entry.reachable then o:value(entry.dest:string()) end end) -- Part of Self -- s:tab("self_ac", translate("Router Self AC")) -- o = s:taboption("self_ac",ListValue, "router_proxy", translate("Router Self Proxy")) -- o:value("1", translatef("Normal Proxy")) -- o:value("0", translatef("Bypassed Proxy")) -- o:value("2", translatef("Forwarded Proxy")) -- o.rmempty = false s:tab("esc", translate("Bypass Domain List")) local escconf = "/etc/ssrplus/white.list" o = s:taboption("esc", TextValue, "escconf") o.rows = 13 o.wrap = "off" o.rmempty = true o.cfgvalue = function(self, section) return nixio.fs.readfile(escconf) or "" end o.write = function(self, section, value) nixio.fs.writefile(escconf, value:gsub("\r\n", "\n")) end o.remove = function(self, section, value) nixio.fs.writefile(escconf, "") end s:tab("block", translate("Black Domain List")) local blockconf = "/etc/ssrplus/black.list" o = s:taboption("block", TextValue, "blockconf") o.rows = 13 o.wrap = "off" o.rmempty = true o.cfgvalue = function(self, section) return nixio.fs.readfile(blockconf) or " " end o.write = function(self, section, value) nixio.fs.writefile(blockconf, value:gsub("\r\n", "\n")) end o.remove = function(self, section, value) nixio.fs.writefile(blockconf, "") end s:tab("denydomain", translate("Deny Domain List")) local denydomainconf = "/etc/ssrplus/deny.list" o = s:taboption("denydomain", TextValue, "denydomainconf") o.rows = 13 o.wrap = "off" o.rmempty = true o.cfgvalue = function(self, section) return nixio.fs.readfile(denydomainconf) or " " end o.write = function(self, section, value) nixio.fs.writefile(denydomainconf, value:gsub("\r\n", "\n")) end o.remove = function(self, section, value) nixio.fs.writefile(denydomainconf, "") end s:tab("netflix", translate("Netflix Domain List")) local netflixconf = "/etc/ssrplus/netflix.list" o = s:taboption("netflix", TextValue, "netflixconf") o.rows = 13 o.wrap = "off" o.rmempty = true o.cfgvalue = function(self, section) return nixio.fs.readfile(netflixconf) or " " end o.write = function(self, section, value) nixio.fs.writefile(netflixconf, value:gsub("\r\n", "\n")) end o.remove = function(self, section, value) nixio.fs.writefile(netflixconf, "") end if is_finded("dnsproxy") then s:tab("dnsproxy", translate("Dnsproxy Parse List")) local dnsproxyconf = "/etc/ssrplus/dnsproxy_dns.list" o = s:taboption("dnsproxy", TextValue, "dnsproxyconf", "", "<font style=color:red>" .. translate("Specifically for edit dnsproxy DNS parse files.") .. "</font>") o.rows = 13 o.wrap = "off" o.rmempty = true o.cfgvalue = function(self, section) return nixio.fs.readfile(dnsproxyconf) or " " end o.write = function(self, section, value) nixio.fs.writefile(dnsproxyconf, value:gsub("\r\n", "\n")) end o.remove = function(self, section, value) nixio.fs.writefile(dnsproxyconf, "") end end if luci.sys.call('[ -f "/www/luci-static/resources/uci.js" ]') == 0 then m.apply_on_parse = true function m.on_apply(self) luci.sys.call("/etc/init.d/shadowsocksr reload > /dev/null 2>&1 &") end end return m
2929004360/ruoyi-sign
1,553
ruoyi-work/src/main/java/com/ruoyi/work/mapper/WorkSignFileMapper.java
package com.ruoyi.work.mapper; import com.ruoyi.flowable.api.domain.WorkSignFile; import java.util.List; /** * 签署文件Mapper接口 * * @author fengcheng * @date 2025-03-20 */ public interface WorkSignFileMapper { /** * 查询签署文件 * * @param signFileId 签署文件主键 * @return 签署文件 */ public WorkSignFile selectWorkSignFileBySignFileId(Long signFileId); /** * 查询签署文件列表 * * @param workSignFile 签署文件 * @return 签署文件集合 */ public List<WorkSignFile> selectWorkSignFileList(WorkSignFile workSignFile); /** * 新增签署文件 * * @param workSignFile 签署文件 * @return 结果 */ public int insertWorkSignFile(WorkSignFile workSignFile); /** * 修改签署文件 * * @param workSignFile 签署文件 * @return 结果 */ public int updateWorkSignFile(WorkSignFile workSignFile); /** * 删除签署文件 * * @param signFileId 签署文件主键 * @return 结果 */ public int deleteWorkSignFileBySignFileId(Long signFileId); /** * 批量删除签署文件 * * @param signFileIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWorkSignFileBySignFileIds(Long[] signFileIds); /** * 根据签署id删除签署文件 * * @param signId */ void deleteWorkSignFileBySignId(Long signId); /** * 批量新增签署文件 * * @param signFileList */ void insertWorkSignFileList(List<WorkSignFile> signFileList); /** * 根据签署id查询签署文件 * * @param signId 签署id * @return */ WorkSignFile getInfoWorkSignFile(Long signId); }
2929004360/ruoyi-sign
1,048
ruoyi-work/src/main/java/com/ruoyi/work/mapper/WorkSealMapper.java
package com.ruoyi.work.mapper; import java.util.List; import com.ruoyi.work.domain.WorkSeal; /** * 印章管理Mapper接口 * * @author fengcheng * @date 2025-03-17 */ public interface WorkSealMapper { /** * 查询印章管理 * * @param suraId 印章管理主键 * @return 印章管理 */ public WorkSeal selectWorkSealBySuraId(Long suraId); /** * 查询印章管理列表 * * @param workSeal 印章管理 * @return 印章管理集合 */ public List<WorkSeal> selectWorkSealList(WorkSeal workSeal); /** * 新增印章管理 * * @param workSeal 印章管理 * @return 结果 */ public int insertWorkSeal(WorkSeal workSeal); /** * 修改印章管理 * * @param workSeal 印章管理 * @return 结果 */ public int updateWorkSeal(WorkSeal workSeal); /** * 删除印章管理 * * @param suraId 印章管理主键 * @return 结果 */ public int deleteWorkSealBySuraId(Long suraId); /** * 批量删除印章管理 * * @param suraIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWorkSealBySuraIds(Long[] suraIds); }
28harishkumar/blog
1,156
public/js/tinymce/plugins/jbimages/ci/application/errors/error_db.php
<!DOCTYPE html> <html lang="en"> <head> <title>Database Error</title> <style type="text/css"> ::selection{ background-color: #E13300; color: white; } ::moz-selection{ background-color: #E13300; color: white; } ::webkit-selection{ background-color: #E13300; color: white; } body { background-color: #fff; margin: 40px; font: 13px/20px normal Helvetica, Arial, sans-serif; color: #4F5155; } a { color: #003399; background-color: transparent; font-weight: normal; } h1 { color: #444; background-color: transparent; border-bottom: 1px solid #D0D0D0; font-size: 19px; font-weight: normal; margin: 0 0 14px 0; padding: 14px 15px 10px 15px; } code { font-family: Consolas, Monaco, Courier New, Courier, monospace; font-size: 12px; background-color: #f9f9f9; border: 1px solid #D0D0D0; color: #002166; display: block; margin: 14px 0 14px 0; padding: 12px 10px 12px 10px; } #container { margin: 10px; border: 1px solid #D0D0D0; -webkit-box-shadow: 0 0 8px #D0D0D0; } p { margin: 12px 15px 12px 15px; } </style> </head> <body> <div id="container"> <h1><?php echo $heading; ?></h1> <?php echo $message; ?> </div> </body> </html>
28harishkumar/blog
1,147
public/js/tinymce/plugins/jbimages/ci/application/errors/error_general.php
<!DOCTYPE html> <html lang="en"> <head> <title>Error</title> <style type="text/css"> ::selection{ background-color: #E13300; color: white; } ::moz-selection{ background-color: #E13300; color: white; } ::webkit-selection{ background-color: #E13300; color: white; } body { background-color: #fff; margin: 40px; font: 13px/20px normal Helvetica, Arial, sans-serif; color: #4F5155; } a { color: #003399; background-color: transparent; font-weight: normal; } h1 { color: #444; background-color: transparent; border-bottom: 1px solid #D0D0D0; font-size: 19px; font-weight: normal; margin: 0 0 14px 0; padding: 14px 15px 10px 15px; } code { font-family: Consolas, Monaco, Courier New, Courier, monospace; font-size: 12px; background-color: #f9f9f9; border: 1px solid #D0D0D0; color: #002166; display: block; margin: 14px 0 14px 0; padding: 12px 10px 12px 10px; } #container { margin: 10px; border: 1px solid #D0D0D0; -webkit-box-shadow: 0 0 8px #D0D0D0; } p { margin: 12px 15px 12px 15px; } </style> </head> <body> <div id="container"> <h1><?php echo $heading; ?></h1> <?php echo $message; ?> </div> </body> </html>
281677160/openwrt-package
6,599
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua
-- Copyright (C) 2017 yushi studio <ywb94@qq.com> -- Licensed to the public under the GNU General Public License v3. require "nixio.fs" require "luci.sys" require "luci.model.uci" local m, s, o local redir_run = 0 local reudp_run = 0 local sock5_run = 0 local server_run = 0 local kcptun_run = 0 local tunnel_run = 0 local gfw_count = 0 local ad_count = 0 local ip_count = 0 local nfip_count = 0 local Process_list = luci.sys.exec("busybox ps -w") local uci = require "luci.model.uci".cursor() -- html constants font_blue = [[<b style=color:green>]] style_blue = [[<b style=color:red>]] font_off = [[</b>]] bold_on = [[<strong>]] bold_off = [[</strong>]] local kcptun_version = translate("Unknown") local kcp_file = "/usr/bin/kcptun-client" if not nixio.fs.access(kcp_file) then kcptun_version = translate("Not exist") else if not nixio.fs.access(kcp_file, "rwx", "rx", "rx") then nixio.fs.chmod(kcp_file, 755) end kcptun_version = "<b>" ..luci.sys.exec(kcp_file .. " -v | awk '{printf $3}'") .. "</b>" if not kcptun_version or kcptun_version == "" then kcptun_version = translate("Unknown") end end if nixio.fs.access("/etc/ssrplus/gfw_list.conf") then gfw_count = tonumber(luci.sys.exec("cat /etc/ssrplus/gfw_list.conf | wc -l")) / 2 end if nixio.fs.access("/etc/ssrplus/ad.conf") then ad_count = tonumber(luci.sys.exec("cat /etc/ssrplus/ad.conf | wc -l")) end if nixio.fs.access("/etc/ssrplus/china_ssr.txt") then ip_count = tonumber(luci.sys.exec("cat /etc/ssrplus/china_ssr.txt | wc -l")) end if nixio.fs.access("/etc/ssrplus/applechina.conf") then apple_count = tonumber(luci.sys.exec("cat /etc/ssrplus/applechina.conf | wc -l")) end if nixio.fs.access("/etc/ssrplus/netflixip.list") then nfip_count = tonumber(luci.sys.exec("cat /etc/ssrplus/netflixip.list | wc -l")) end if Process_list:find("udp.only.ssr.reudp") then reudp_run = 1 end if Process_list:find("tcp.only.ssr.retcp") then redir_run = 1 end if Process_list:find("tcp.udp.ssr.local") then sock5_run = 1 end if Process_list:find("tcp.udp.ssr.retcp") then redir_run = 1 reudp_run = 1 end if Process_list:find("local.ssr.retcp") then redir_run = 1 sock5_run = 1 end if Process_list:find("local.udp.ssr.retcp") then reudp_run = 1 redir_run = 1 sock5_run = 1 end if Process_list:find("kcptun.client") then kcptun_run = 1 end if Process_list:find("ssr.server") then server_run = 1 end if Process_list:find("ssrplus/bin/dns2tcp") or Process_list:find("ssrplus/bin/mosdns") or Process_list:find("dnsproxy.*127.0.0.1.*5335") or Process_list:find("chinadns.*127.0.0.1.*5335") or (Process_list:find("ssrplus.dns") and Process_list:find("dns2socks.*127.0.0.1.*127.0.0.1.5335")) then pdnsd_run = 1 end m = SimpleForm("Version") m.reset = false m.submit = false s = m:field(DummyValue, "redir_run", translate("Global Client")) s.rawhtml = true if redir_run == 1 then s.value = font_blue .. bold_on .. translate("Running") .. bold_off .. font_off else s.value = style_blue .. bold_on .. translate("Not Running") .. bold_off .. font_off end s = m:field(DummyValue, "reudp_run", translate("Game Mode UDP Relay")) s.rawhtml = true if reudp_run == 1 then s.value = font_blue .. bold_on .. translate("Running") .. bold_off .. font_off else s.value = style_blue .. bold_on .. translate("Not Running") .. bold_off .. font_off end if uci:get_first("shadowsocksr", 'global', 'pdnsd_enable', '0') ~= '0' then s = m:field(DummyValue, "pdnsd_run", translate("DNS Anti-pollution")) s.rawhtml = true if pdnsd_run == 1 then s.value = font_blue .. bold_on .. translate("Running") .. bold_off .. font_off else s.value = style_blue .. bold_on .. translate("Not Running") .. bold_off .. font_off end end s = m:field(DummyValue, "sock5_run", translate("Global SOCKS5 Proxy Server")) s.rawhtml = true if sock5_run == 1 then s.value = font_blue .. bold_on .. translate("Running") .. bold_off .. font_off else s.value = style_blue .. bold_on .. translate("Not Running") .. bold_off .. font_off end s = m:field(DummyValue, "server_run", translate("Local Servers")) s.rawhtml = true if server_run == 1 then s.value = font_blue .. bold_on .. translate("Running") .. bold_off .. font_off else s.value = style_blue .. bold_on .. translate("Not Running") .. bold_off .. font_off end if nixio.fs.access("/usr/bin/kcptun-client") then s = m:field(DummyValue, "kcp_version", translate("KcpTun Version")) s.rawhtml = true s.value = kcptun_version s = m:field(DummyValue, "kcptun_run", translate("KcpTun")) s.rawhtml = true if kcptun_run == 1 then s.value = font_blue .. bold_on .. translate("Running") .. bold_off .. font_off else s.value = style_blue .. bold_on .. translate("Not Running") .. bold_off .. font_off end end s = m:field(Button, "Restart", translate("Restart ShadowSocksR Plus+")) s.inputtitle = translate("Restart Service") s.inputstyle = "reload" s.write = function() luci.sys.call("/etc/init.d/shadowsocksr restart >/dev/null 2>&1 &") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "client")) end s = m:field(DummyValue, "google", translate("Google Connectivity")) s.value = translate("No Check") s.template = "shadowsocksr/check" s = m:field(DummyValue, "baidu", translate("Baidu Connectivity")) s.value = translate("No Check") s.template = "shadowsocksr/check" s = m:field(DummyValue, "gfw_data", translate("GFW List Data")) s.rawhtml = true s.template = "shadowsocksr/refresh" s.value = gfw_count .. " " .. translate("Records") s = m:field(DummyValue, "ip_data", translate("China IP Data")) s.rawhtml = true s.template = "shadowsocksr/refresh" s.value = ip_count .. " " .. translate("Records") if uci:get_first("shadowsocksr", 'global', 'apple_optimization', '0') ~= '0' then s = m:field(DummyValue, "apple_data", translate("Apple Domains Data")) s.rawhtml = true s.template = "shadowsocksr/refresh" s.value = apple_count .. " " .. translate("Records") end if uci:get_first("shadowsocksr", 'global', 'netflix_enable', '0') ~= '0' then s = m:field(DummyValue, "nfip_data", translate("Netflix IP Data")) s.rawhtml = true s.template = "shadowsocksr/refresh" s.value = nfip_count .. " " .. translate("Records") end if uci:get_first("shadowsocksr", 'global', 'adblock', '0') == '1' then s = m:field(DummyValue, "ad_data", translate("Advertising Data")) s.rawhtml = true s.template = "shadowsocksr/refresh" s.value = ad_count .. " " .. translate("Records") end s = m:field(DummyValue, "check_port", translate("Check Server Port")) s.template = "shadowsocksr/checkport" s.value = translate("No Check") return m
2929004360/ruoyi-sign
1,101
ruoyi-work/src/main/java/com/ruoyi/work/mapper/WorkSignMapper.java
package com.ruoyi.work.mapper; import com.ruoyi.flowable.api.domain.WorkSign; import com.ruoyi.flowable.api.domain.vo.WorkSignVo; import java.util.List; /** * 签署Mapper接口 * * @author fengcheng * @date 2025-03-18 */ public interface WorkSignMapper { /** * 查询签署 * * @param signId 签署主键 * @return 签署 */ public WorkSignVo selectWorkSignBySignId(Long signId); /** * 查询签署列表 * * @param workSignVo 签署 * @return 签署集合 */ public List<WorkSign> selectWorkSignList(WorkSignVo workSignVo); /** * 新增签署 * * @param workSignVo 签署 * @return 结果 */ public int insertWorkSign(WorkSignVo workSignVo); /** * 修改签署 * * @param workSignVo 签署 * @return 结果 */ public int updateWorkSign(WorkSignVo workSignVo); /** * 删除签署 * * @param signId 签署主键 * @return 结果 */ public int deleteWorkSignBySignId(Long signId); /** * 批量删除签署 * * @param signIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWorkSignBySignIds(Long[] signIds); }
2929004360/ruoyi-sign
1,160
ruoyi-work/src/main/java/com/ruoyi/work/mapper/WorkSignatureMapper.java
package com.ruoyi.work.mapper; import java.util.List; import com.ruoyi.work.domain.WorkSignature; /** * 签名Mapper接口 * * @author fengcheng * @date 2025-03-18 */ public interface WorkSignatureMapper { /** * 查询签名 * * @param signatureId 签名主键 * @return 签名 */ public WorkSignature selectWorkSignatureBySignatureId(Long signatureId); /** * 查询签名列表 * * @param workSignature 签名 * @return 签名集合 */ public List<WorkSignature> selectWorkSignatureList(WorkSignature workSignature); /** * 新增签名 * * @param workSignature 签名 * @return 结果 */ public int insertWorkSignature(WorkSignature workSignature); /** * 修改签名 * * @param workSignature 签名 * @return 结果 */ public int updateWorkSignature(WorkSignature workSignature); /** * 删除签名 * * @param signatureId 签名主键 * @return 结果 */ public int deleteWorkSignatureBySignatureId(Long signatureId); /** * 批量删除签名 * * @param signatureIds 需要删除的数据主键集合 * @return 结果 */ public int deleteWorkSignatureBySignatureIds(Long[] signatureIds); }
2929004360/ruoyi-sign
1,166
ruoyi-work/src/main/java/com/ruoyi/work/service/IWorkSignatureService.java
package com.ruoyi.work.service; import java.util.List; import com.ruoyi.work.domain.WorkSignature; /** * 签名Service接口 * * @author fengcheng * @date 2025-03-18 */ public interface IWorkSignatureService { /** * 查询签名 * * @param signatureId 签名主键 * @return 签名 */ public WorkSignature selectWorkSignatureBySignatureId(Long signatureId); /** * 查询签名列表 * * @param workSignature 签名 * @return 签名集合 */ public List<WorkSignature> selectWorkSignatureList(WorkSignature workSignature); /** * 新增签名 * * @param workSignature 签名 * @return 结果 */ public int insertWorkSignature(WorkSignature workSignature); /** * 修改签名 * * @param workSignature 签名 * @return 结果 */ public int updateWorkSignature(WorkSignature workSignature); /** * 批量删除签名 * * @param signatureIds 需要删除的签名主键集合 * @return 结果 */ public int deleteWorkSignatureBySignatureIds(Long[] signatureIds); /** * 删除签名信息 * * @param signatureId 签名主键 * @return 结果 */ public int deleteWorkSignatureBySignatureId(Long signatureId); }
281677160/openwrt-package
3,429
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua
-- Copyright (C) 2017 yushi studio <ywb94@qq.com> -- Licensed to the public under the GNU General Public License v3. require "luci.http" require "luci.dispatcher" require "nixio.fs" local m, s, o local sid = arg[1] local encrypt_methods = { "rc4-md5", "rc4-md5-6", "rc4", "table", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "cast5-cfb", "des-cfb", "idea-cfb", "rc2-cfb", "seed-cfb", "salsa20", "chacha20", "chacha20-ietf" } local encrypt_methods_ss = { -- aead "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305", -- aead 2022 "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305" --[[ stream "table", "rc4", "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "salsa20", "chacha20", "chacha20-ietf" ]] } local protocol = {"origin"} obfs = {"plain", "http_simple", "http_post"} m = Map("shadowsocksr", translate("Edit ShadowSocksR Server")) m.redirect = luci.dispatcher.build_url("admin/services/shadowsocksr/server") if m.uci:get("shadowsocksr", sid) ~= "server_config" then luci.http.redirect(m.redirect) return end -- [[ Server Setting ]]-- s = m:section(NamedSection, sid, "server_config") s.anonymous = true s.addremove = false o = s:option(Flag, "enable", translate("Enable")) o.default = 1 o.rmempty = false o = s:option(ListValue, "type", translate("Server Type")) o:value("socks5", translate("Socks5")) if nixio.fs.access("/usr/bin/ssserver") or nixio.fs.access("/usr/bin/ss-server") then o:value("ss", translate("ShadowSocks")) end if nixio.fs.access("/usr/bin/ssr-server") then o:value("ssr", translate("ShadowsocksR")) end o.default = "socks5" o = s:option(Value, "server_port", translate("Server Port")) o.datatype = "port" math.randomseed(tostring(os.time()):reverse():sub(1, 7)) o.default = math.random(10240, 20480) o.rmempty = false o.description = translate("warning! Please do not reuse the port!") o = s:option(Value, "timeout", translate("Connection Timeout")) o.datatype = "uinteger" o.default = 60 o.rmempty = false o:depends("type", "ss") o:depends("type", "ssr") o = s:option(Value, "username", translate("Username")) o.rmempty = false o:depends("type", "socks5") o = s:option(Value, "password", translate("Password")) o.password = true o.rmempty = false o = s:option(ListValue, "encrypt_method", translate("Encrypt Method")) for _, v in ipairs(encrypt_methods) do o:value(v) end o.rmempty = false o:depends("type", "ssr") o = s:option(ListValue, "encrypt_method_ss", translate("Encrypt Method")) for _, v in ipairs(encrypt_methods_ss) do o:value(v) end o.rmempty = false o:depends("type", "ss") o = s:option(ListValue, "protocol", translate("Protocol")) for _, v in ipairs(protocol) do o:value(v) end o.rmempty = false o:depends("type", "ssr") o = s:option(ListValue, "obfs", translate("Obfs")) for _, v in ipairs(obfs) do o:value(v) end o.rmempty = false o:depends("type", "ssr") o = s:option(Value, "obfs_param", translate("Obfs param (optional)")) o:depends("type", "ssr") o = s:option(Flag, "fast_open", translate("TCP Fast Open")) o.rmempty = false o:depends("type", "ss") o:depends("type", "ssr") return m
28harishkumar/blog
2,592
public/js/tinymce/plugins/jbimages/ci/application/language/french/imglib_lang.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); $lang['imglib_source_image_required'] = "Vous devez sp&eacute;cifier une image source dans vos pr&eacute;f&eacute;rences."; $lang['imglib_gd_required'] = "La librairie GD est requise pour cette fonctionnalit&eacute;."; $lang['imglib_gd_required_for_props'] = "Votre serveur doit supporter la librairie d\'images GD pour d&eacute;terminer les propri&eacute;t&eacute;s de l\'image"; $lang['imglib_unsupported_imagecreate'] = "Votre serveur ne dispose pas de la fonction GD n&eacute;cessaire pour traiter ce type d\'image."; $lang['imglib_gif_not_supported'] = "Le format GIF est souvent inutilisable du fait de restrictions de licence. Vous devriez utiliser le format JPG ou PNG &agrave; la place."; $lang['imglib_jpg_not_supported'] = "Le format JPG n\'est pas support&eacute;."; $lang['imglib_png_not_supported'] = "Le format PNG n\'est pas support&eacute;."; $lang['imglib_jpg_or_png_required'] = "Le protocole de redimensionnement sp&eacute;cifi&eacute; dans vos pr&eacute;f&eacute;rences ne fonctionne qu\'avec les formats d\'image JPG ou PNG."; $lang['imglib_copy_error'] = "Une erreur est survenue lors du remplacement du fichier. Veuillez v&eacute;rifier les permissions d\'&eacute;criture de votre r&eacute;pertoire."; $lang['imglib_rotate_unsupported'] = "Votre serveur ne supporte apparemment pas la rotation d\'images."; $lang['imglib_libpath_invalid'] = "Le chemin d\'acc&egrave;s &agrave; votre librairie de traitement d\'image n\'est pas correct. Veuillez indiquer le chemin correct dans vos pr&eacute;f&eacute;rences."; $lang['imglib_image_process_failed'] = "Le traitement de l\'image a &eacute;chou&eacute;. Veuillez v&eacute;rifier que votre serveur supporte le protocole choisi et que le chemin d\'acc&egrave;s &agrave; votre librairie de traitement d\'image est correct."; $lang['imglib_rotation_angle_required'] = "Un angle de rotation doit &ecirc;tre indiqu&eacute; pour effectuer cette transformation sur l\'image."; $lang['imglib_writing_failed_gif'] = "Image GIF "; $lang['imglib_invalid_path'] = "Le chemin d\'acc&egrave;s &agrave; l\'image est incorrect."; $lang['imglib_copy_failed'] = "Le processus de copie d\'image a &eacute;chou&eacute;."; $lang['imglib_missing_font'] = "Impossible de trouver une police de caract&egrave;res utilisable."; $lang['imglib_save_failed'] = "Impossible d\'enregistrer l\'image. V&eacute;rifiez que l\'image et le dossier disposent des droits d\'&eacute;criture."; /* End of file imglib_lang.php */ /* Location: ./application/language/french/imglib_lang.php */
28harishkumar/blog
2,081
public/js/tinymce/plugins/jbimages/ci/application/language/french/upload_lang.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); $lang['upload_userfile_not_set'] = "Impossible de trouver une variable de type POST nomm&eacute;e userfile."; $lang['upload_file_exceeds_limit'] = "Le fichier envoy&eacute; d&eacute;passe la taille limite d&eacute;finie dans votre fichier de configuration PHP."; $lang['upload_file_exceeds_form_limit'] = "Le fichier charg&eacute; d&eacute;passe la taille limite d&eacute;finie par le formulaire de soumission."; $lang['upload_file_partial'] = "Le fichier n\'a &eacute;t&eacute; que partiellement envoy&eacute;."; $lang['upload_no_temp_directory'] = "Le dossier temporaire manque."; $lang['upload_unable_to_write_file'] = "Incapable d\'&eacute;crire le fichier sur disque."; $lang['upload_stopped_by_extension'] = "Le chargement du fichier a &eacute;t&eacute; arr&ecirc;t&eacute; par une extension."; $lang['upload_no_file_selected'] = "Vous n\'avez pas s&eacute;lectionn&eacute; de fichier &agrave; envoyer."; $lang['upload_invalid_filetype'] = "Le type de fichier que vous tentez d\'envoyer n\'est pas autoris&eacute;."; $lang['upload_invalid_filesize'] = "Le fichier que vous tentez d\'envoyer est plus gros que la taille autoris&eacute;e."; $lang['upload_invalid_dimensions'] = "L\'image que vous tentez d\'envoyer d&eacute;passe les valeurs maximales autoris&eacute;es pour la hauteur ou la largeur."; $lang['upload_destination_error'] = "Une erreur est survenue lors du d&eacute;placement du fichier envoy&eacute; vers sa destination finale."; $lang['upload_no_filepath'] = "Le chemin de destination semble invalide."; $lang['upload_no_file_types'] = "Vous n\'avez pas sp&eacute;cifi&eacute; les types de fichier autoris&eacute;s."; $lang['upload_bad_filename'] = "Un fichier avec le m&ecirc;me nom que celui que vous avez envoy&eacute; existe d&eacute;j&agrave; sur le serveur."; $lang['upload_not_writable'] = "Le r&eacute;pertoire de destination ne semble pas &ecirc;tre accessible en &eacute;criture."; /* End of file upload_lang.php */ /* Location: ./application/language/french/upload_lang.php */
28harishkumar/blog
2,011
public/js/tinymce/plugins/jbimages/ci/application/language/russian/imglib_lang.php
<?php $lang['imglib_source_image_required'] = "You must specify a source image in your preferences."; $lang['imglib_gd_required'] = "The GD image library is required for this feature."; $lang['imglib_gd_required_for_props'] = "Your server must support the GD image library in order to determine the image properties."; $lang['imglib_unsupported_imagecreate'] = "Your server does not support the GD function required to process this type of image."; $lang['imglib_gif_not_supported'] = "GIF images are often not supported due to licensing restrictions. You may have to use JPG or PNG images instead."; $lang['imglib_jpg_not_supported'] = "JPG images are not supported."; $lang['imglib_png_not_supported'] = "PNG images are not supported."; $lang['imglib_jpg_or_png_required'] = "The image resize protocol specified in your preferences only works with JPEG or PNG image types."; $lang['imglib_copy_error'] = "An error was encountered while attempting to replace the file. Please make sure your file directory is writable."; $lang['imglib_rotate_unsupported'] = "Image rotation does not appear to be supported by your server."; $lang['imglib_libpath_invalid'] = "The path to your image library is not correct. Please set the correct path in your image preferences."; $lang['imglib_image_process_failed'] = "Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct."; $lang['imglib_rotation_angle_required'] = "An angle of rotation is required to rotate the image."; $lang['imglib_writing_failed_gif'] = "GIF image."; $lang['imglib_invalid_path'] = "The path to the image is not correct."; $lang['imglib_copy_failed'] = "The image copy routine failed."; $lang['imglib_missing_font'] = "Unable to find a font to use."; $lang['imglib_save_failed'] = "Unable to save the image. Please make sure the image and file directory are writable."; /* End of file imglib_lang.php */ /* Location: ./system/language/english/imglib_lang.php */
2929004360/ruoyi-sign
1,561
ruoyi-work/src/main/java/com/ruoyi/work/service/IWorkSignFileService.java
package com.ruoyi.work.service; import com.ruoyi.flowable.api.domain.WorkSignFile; import java.util.List; /** * 签署文件Service接口 * * @author fengcheng * @date 2025-03-20 */ public interface IWorkSignFileService { /** * 查询签署文件 * * @param signFileId 签署文件主键 * @return 签署文件 */ public WorkSignFile selectWorkSignFileBySignFileId(Long signFileId); /** * 查询签署文件列表 * * @param workSignFile 签署文件 * @return 签署文件集合 */ public List<WorkSignFile> selectWorkSignFileList(WorkSignFile workSignFile); /** * 新增签署文件 * * @param workSignFile 签署文件 * @return 结果 */ public int insertWorkSignFile(WorkSignFile workSignFile); /** * 修改签署文件 * * @param workSignFile 签署文件 * @return 结果 */ public int updateWorkSignFile(WorkSignFile workSignFile); /** * 批量删除签署文件 * * @param signFileIds 需要删除的签署文件主键集合 * @return 结果 */ public int deleteWorkSignFileBySignFileIds(Long[] signFileIds); /** * 删除签署文件信息 * * @param signFileId 签署文件主键 * @return 结果 */ public int deleteWorkSignFileBySignFileId(Long signFileId); /** * 根据签署id删除签署文件 * * @param signId */ void deleteWorkSignFileBySignId(Long signId); /** * 批量新增签署文件 * * @param signFileList */ void insertWorkSignFileList(List<WorkSignFile> signFileList); /** * 根据签署id查询签署文件 * * @param signId 签署id * @return */ WorkSignFile getInfoWorkSignFile(Long signId); }
2929004360/ruoyi-sign
1,056
ruoyi-work/src/main/java/com/ruoyi/work/service/IWorkSealService.java
package com.ruoyi.work.service; import java.util.List; import com.ruoyi.work.domain.WorkSeal; /** * 印章管理Service接口 * * @author fengcheng * @date 2025-03-17 */ public interface IWorkSealService { /** * 查询印章管理 * * @param suraId 印章管理主键 * @return 印章管理 */ public WorkSeal selectWorkSealBySuraId(Long suraId); /** * 查询印章管理列表 * * @param workSeal 印章管理 * @return 印章管理集合 */ public List<WorkSeal> selectWorkSealList(WorkSeal workSeal); /** * 新增印章管理 * * @param workSeal 印章管理 * @return 结果 */ public int insertWorkSeal(WorkSeal workSeal); /** * 修改印章管理 * * @param workSeal 印章管理 * @return 结果 */ public int updateWorkSeal(WorkSeal workSeal); /** * 批量删除印章管理 * * @param suraIds 需要删除的印章管理主键集合 * @return 结果 */ public int deleteWorkSealBySuraIds(Long[] suraIds); /** * 删除印章管理信息 * * @param suraId 印章管理主键 * @return 结果 */ public int deleteWorkSealBySuraId(Long suraId); }
281677160/openwrt-package
2,946
luci-app-ssr-plus/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua
-- Copyright (C) 2017 yushi studio <ywb94@qq.com> -- Licensed to the public under the GNU General Public License v3. require "luci.http" require "luci.dispatcher" local m, sec, o local encrypt_methods = { "table", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "cast5-cfb", "des-cfb", "idea-cfb", "rc2-cfb", "seed-cfb", "salsa20", "chacha20", "chacha20-ietf" } local encrypt_methods_ss = { -- aead "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305", -- aead 2022 "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305" --[[ stream "table", "rc4", "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "salsa20", "chacha20", "chacha20-ietf" ]] } local protocol = { "origin", "verify_deflate", "auth_sha1_v4", "auth_aes128_sha1", "auth_aes128_md5", "auth_chain_a" } obfs = { "plain", "http_simple", "http_post", "random_head", "tls1.2_ticket_auth", "tls1.2_ticket_fastauth" } m = Map("shadowsocksr") -- [[ Global Setting ]]-- sec = m:section(TypedSection, "server_global", translate("Global Setting")) sec.anonymous = true o = sec:option(Flag, "enable_server", translate("Enable Server")) o.rmempty = false -- [[ Server Setting ]]-- sec = m:section(TypedSection, "server_config", translate("Server Setting")) sec.anonymous = true sec.addremove = true sec.template = "cbi/tblsection" sec.extedit = luci.dispatcher.build_url("admin/services/shadowsocksr/server/%s") function sec.create(...) local sid = TypedSection.create(...) if sid then luci.http.redirect(sec.extedit % sid) return end end o = sec:option(Flag, "enable", translate("Enable")) function o.cfgvalue(...) return Value.cfgvalue(...) or translate("0") end o.rmempty = false o = sec:option(DummyValue, "type", translate("Server Type")) function o.cfgvalue(...) return Value.cfgvalue(...) or "ss" end o = sec:option(DummyValue, "server_port", translate("Server Port")) function o.cfgvalue(...) return Value.cfgvalue(...) or "-" end o = sec:option(DummyValue, "username", translate("Username")) function o.cfgvalue(...) return Value.cfgvalue(...) or "-" end o = sec:option(DummyValue, "encrypt_method", translate("Encrypt Method")) function o.cfgvalue(self, section) local method = self.map:get(section, "encrypt_method") or self.map:get(section, "encrypt_method_ss") return method and method:upper() or "-" end o = sec:option(DummyValue, "protocol", translate("Protocol")) function o.cfgvalue(...) return Value.cfgvalue(...) or "-" end o = sec:option(DummyValue, "obfs", translate("Obfs")) function o.cfgvalue(...) return Value.cfgvalue(...) or "-" end return m
2929004360/ruoyi-sign
1,588
ruoyi-work/src/main/java/com/ruoyi/work/service/IWorkSignService.java
package com.ruoyi.work.service; import com.ruoyi.flowable.api.domain.WorkSign; import com.ruoyi.flowable.api.domain.WorkSignFile; import com.ruoyi.flowable.api.domain.vo.WorkSignVo; import java.util.List; /** * 签署Service接口 * * @author fengcheng * @date 2025-03-18 */ public interface IWorkSignService { /** * 查询签署 * * @param signId 签署主键 * @return 签署 */ public WorkSignVo selectWorkSignBySignId(Long signId); /** * 查询签署列表 * * @param workSignVo 签署 * @return 签署集合 */ public List<WorkSign> selectWorkSignList(WorkSignVo workSignVo); /** * 新增签署 * * @param workSignVo 签署 * @return 结果 */ public int insertWorkSign(WorkSignVo workSignVo); /** * 修改签署 * * @param workSignVo 签署 * @return 结果 */ public int updateWorkSign(WorkSignVo workSignVo); /** * 批量删除签署 * * @param signIds 需要删除的签署主键集合 * @return 结果 */ public int deleteWorkSignBySignIds(Long[] signIds); /** * 删除签署信息 * * @param signId 签署主键 * @return 结果 */ public int deleteWorkSignBySignId(Long signId); /** * 重新申请 * * @param signId * @return */ int reapply(Long signId); /** * 撤销审核 * * @param signId * @return */ int revoke(Long signId); /** * 提交审核 * * @param signId * @return */ int submit(Long signId); /** * 查询签署文件列表 * * @param signId * @return */ List<WorkSignFile> listSignFile(Long signId); }
2929004360/ruoyi-sign
1,402
ruoyi-work/src/main/java/com/ruoyi/work/config/PdfSignatureConfig.java
package com.ruoyi.work.config; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import java.io.InputStream; /** * pdf签名配置 * * @author fengcheng */ @Data @NoArgsConstructor @AllArgsConstructor @Configuration public class PdfSignatureConfig { /** * 证书输入流 */ private InputStream pathInputStream; /** * 证书路径 */ @Value("${pdf-signature.certificate.path}") private String path; /** * 密码 */ @Value("${pdf-signature.certificate.password}") private String password; /** * 签字者 */ @Value("${pdf-signature.info.name}") private String name; /** * 联系电话 */ @Value("${pdf-signature.info.phone}") private String phone; /** * 地点 */ @Value("${pdf-signature.info.place}") private String place; /** * 原因 */ @Value("${pdf-signature.info.cause}") private String cause; public PdfSignatureConfig(InputStream pathInputStream, String password, String name, String phone, String place, String cause) { this.pathInputStream = pathInputStream; this.password = password; this.name = name; this.phone = phone; this.place = place; this.cause = cause; } }
2929004360/ruoyi-sign
2,528
ruoyi-work/src/main/java/com/ruoyi/work/utils/TransparentImageUtils.java
package com.ruoyi.work.utils; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; /** * 图片透明底工具类 * * @author fengcheng */ public class TransparentImageUtils { /** * 将背景替换为透明 * * @param path 图片路径 * @param newFilePath 新图片保存路径 * @return * @author fengcheng */ public static boolean changeImgColor(String path, String newFilePath) { try { File file = new File(path); String fileName = file.getName(); BufferedImage bi = ImageIO.read(file); Image image = (Image) bi; //将原图片的二进制转化为ImageIcon ImageIcon imageIcon = new ImageIcon(image); int width = imageIcon.getIconWidth(); int height = imageIcon.getIconHeight(); //图片缓冲流 BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR); Graphics2D graphics2D = (Graphics2D) bufferedImage.getGraphics(); graphics2D.drawImage(imageIcon.getImage(), 0, 0, imageIcon.getImageObserver()); int alpha = 255; //这个背景底色的选择,我这里选择的是比较偏的位置,可以修改位置。背景色选择不知道有没有别的更优的方式(比如先过滤一遍获取颜色次数最多的,但是因为感觉做起来会比较复杂没去实现),如果有可以评论。 int RGB = bufferedImage.getRGB(width - 1, height - 1); for (int i = bufferedImage.getMinX(); i < width; i++) { for (int j = bufferedImage.getMinY(); j < height; j++) { int rgb = bufferedImage.getRGB(i, j); int r = (rgb & 0xff0000) >> 16; int g = (rgb & 0xff00) >> 8; int b = (rgb & 0xff); int R = (RGB & 0xff0000) >> 16; int G = (RGB & 0xff00) >> 8; int B = (RGB & 0xff); //a为色差范围值,渐变色边缘处理,数值需要具体测试,50左右的效果比较可以 int a = 45; if (Math.abs(R - r) < a && Math.abs(G - g) < a && Math.abs(B - b) < a) { alpha = 0; } else { alpha = 255; } rgb = (alpha << 24) | (rgb & 0x00ffffff); bufferedImage.setRGB(i, j, rgb); } } ImageIO.write(bufferedImage, "png", new File(newFilePath)); } catch (IOException e) { e.printStackTrace(); return false; } return true; } }
28harishkumar/blog
1,483
public/js/tinymce/plugins/jbimages/ci/application/language/russian/upload_lang.php
<?php $lang['upload_userfile_not_set'] = "Не найдена переменная POST[userfile]."; $lang['upload_file_exceeds_limit'] = "Размер файла слишком большой для загрузки."; $lang['upload_file_exceeds_form_limit'] = "Размер файла слишком большой."; $lang['upload_file_partial'] = "Файл загрузился неполностью."; $lang['upload_no_temp_directory'] = "Внутренняя ошибка. Проблемы с временной папкой."; $lang['upload_unable_to_write_file'] = "Внутренняя ошибка. Проблемы с записью на диск."; $lang['upload_stopped_by_extension'] = "Загрузка прервана по неизвестной причине."; $lang['upload_no_file_selected'] = "Пожалуйста, выберите файл для загрузки."; $lang['upload_invalid_filetype'] = "Тип файла запрещен для загрузки."; $lang['upload_invalid_filesize'] = "Ваш файл больше разрешенного размера."; $lang['upload_invalid_dimensions'] = "Изображение которое вы пытаетесь загрузить превосходит максимально допустимые ширину/высоту."; $lang['upload_destination_error'] = "Внутренняя ошибка. Проблема с переносом файла в конечную папку."; $lang['upload_no_filepath'] = "Внутренняя ошибка. Указанный путь для загрузки неверен."; $lang['upload_no_file_types'] = "Внутренняя ошибка. Не указан перечень разрешенных для загрузки типов."; $lang['upload_bad_filename'] = "Файл уже существует."; $lang['upload_not_writable'] = "Внутренняя ошибка. Конечная папка не представляется разрешенной для записи."; /* End of file upload_lang.php */ /* Location: ./application/language/russian/upload_lang.php */
2929004360/ruoyi-sign
1,207
ruoyi-work/src/main/java/com/ruoyi/work/utils/ImageUtils.java
package com.ruoyi.work.utils; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; /** * 转换BufferedImage数据为byte数组 * * @author fengcheng */ public class ImageUtils { /** * 转换BufferedImage 数据为byte数组 * * @param image Image对象 * @param format image格式字符串.如"gif","png" * @return byte数组 */ public static byte[] imageToBytes(BufferedImage image, String format) { ByteArrayOutputStream out = new ByteArrayOutputStream(); try { ImageIO.write(image, format, out); } catch (IOException e) { e.printStackTrace(); } return out.toByteArray(); } /** * 转换byte数组为Image * * @param bytes * @return Image */ public static Image bytesToImage(byte[] bytes) { Image image = Toolkit.getDefaultToolkit().createImage(bytes); try { MediaTracker mt = new MediaTracker(new Label()); mt.addImage(image, 0); mt.waitForAll(); } catch (InterruptedException e) { e.printStackTrace(); } return image; } }
2929004360/ruoyi-sign
22,634
ruoyi-work/src/main/java/com/ruoyi/work/utils/PdfUtils.java
package com.ruoyi.work.utils; import com.itextpdf.awt.geom.Rectangle2D; import com.itextpdf.text.Font; import com.itextpdf.text.Image; import com.itextpdf.text.Rectangle; import com.itextpdf.text.*; import com.itextpdf.text.pdf.*; import com.itextpdf.text.pdf.parser.ImageRenderInfo; import com.itextpdf.text.pdf.parser.PdfReaderContentParser; import com.itextpdf.text.pdf.parser.RenderListener; import com.itextpdf.text.pdf.parser.TextRenderInfo; import com.itextpdf.text.pdf.security.*; import com.ruoyi.work.config.PdfSignatureConfig; import com.ruoyi.work.param.PdfAddContentParam; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.*; import java.nio.file.Files; import java.nio.file.Paths; import java.security.KeyStore; import java.security.PrivateKey; import java.security.cert.Certificate; import java.util.Calendar; import java.util.List; import java.util.UUID; /** * PDF工具类,提供 水印、签名、盖章、骑缝章 功能 * * @author fengcheng */ public class PdfUtils { /** * 往PDF上添加文字水印 * * @param inputFile 原文件 * @param outputFile 加水印后的文件 * @param waterMarkName 水印字符 */ public static void addWaterMark(String inputFile, String outputFile, String waterMarkName) { PdfReader reader = null; PdfStamper stamper = null; try { reader = new PdfReader(inputFile); stamper = new PdfStamper(reader, Files.newOutputStream(Paths.get(outputFile))); //水印字体,放到服务器上对应文件夹下(arial中文不生效) //BaseFont base = BaseFont.createFont("D:/workspace/springboot/src/main/resources/arial.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED); Rectangle pageRect; PdfGState gs = new PdfGState(); //填充不透明度 为1完全不透明 gs.setFillOpacity(0.1f); //笔画不透明度, 为1完全不透明 gs.setStrokeOpacity(0.1f); int total = reader.getNumberOfPages() + 1; JLabel label = new JLabel(); FontMetrics metrics; int textH; int textW; label.setText(waterMarkName); metrics = label.getFontMetrics(label.getFont()); textH = metrics.getHeight(); textW = metrics.stringWidth(label.getText()); PdfContentByte under; int interval = 0; for (int i = 1; i < total; i++) { pageRect = reader.getPageSizeWithRotation(i); //在字体下方加水印 under = stamper.getOverContent(i); under.beginText(); under.saveState(); under.setGState(gs); //这里修改水印字体大小 under.setFontAndSize(base, 36); //这里设置字体上下间隔 for (int height = interval + textH; height < pageRect.getHeight(); height = height + textH * 9) { //这里设置字体左右间隔 for (int width = interval + textW; width < pageRect.getWidth() + textW; width = width + textW * 4) { //这里设置倾斜角度 under.showTextAligned(Element.ALIGN_LEFT, waterMarkName, width - textW, height - textH, 45); } } under.endText(); } stamper.close(); reader.close(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (stamper != null) { stamper.close(); } } catch (IOException | DocumentException e) { e.printStackTrace(); } if (reader != null) { reader.close(); } } } /** * 根据指定坐标往PDF上添加文字内容 * * @param filePath 原文件路径 * @param pdfAddContentParams 实体类 */ public static byte[] addText(String filePath, List<PdfAddContentParam> pdfAddContentParams) throws Exception { PdfReader pdfReader = new PdfReader(filePath); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); //设置输入文件以及输出文件地址 PdfStamper stamper = new PdfStamper(pdfReader, byteArrayOutputStream); //设置字体 BaseFont baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); for (PdfAddContentParam pdfAddContentParam : pdfAddContentParams) { Font font = new Font(baseFont, 10); if (pdfAddContentParam.getPageNum() > pdfReader.getNumberOfPages()) { throw new RuntimeException("设置的页码数[" + pdfAddContentParam.getPageNum() + "]大于原文件页码数[" + pdfReader.getNumberOfPages() + "]!请重新输入"); } PdfContentByte overContent = stamper.getOverContent(pdfAddContentParam.getPageNum()); ColumnText columnText = new ColumnText(overContent); columnText.setSimpleColumn(pdfAddContentParam.getLlx(), pdfAddContentParam.getLly(), pdfAddContentParam.getUrx(), pdfAddContentParam.getUry()); Paragraph elements = new Paragraph(pdfAddContentParam.getContent()); elements.setFont(font); columnText.addElement(elements); columnText.go(); } stamper.close(); return byteArrayOutputStream.toByteArray(); } /** * 根据关键字往PDF上添加文字内容 * * @param filePath 原文件路径 * @param pdfAddContentParams 实体类 */ public static byte[] addTextByKeyword(String filePath, List<PdfAddContentParam> pdfAddContentParams) throws Exception { PdfReader pdfReader = new PdfReader(filePath); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); //设置输入文件以及输出文件地址 PdfStamper stamper = new PdfStamper(pdfReader, byteArrayOutputStream); // 获取PDF文件的总页数 int pageNum = pdfReader.getNumberOfPages(); PdfReaderContentParser pdfReaderContentParser = new PdfReaderContentParser(pdfReader); for (PdfAddContentParam pdfAddContentParam : pdfAddContentParams) { StringBuilder stringBuilder = new StringBuilder(); final boolean[] hasKeyword = {false, true}; String keyword = pdfAddContentParam.getKeyword(); int length = keyword.length(); if (length == 0) { throw new RuntimeException("请输入关键字!"); } for (int page = 1; page <= pageNum; page++) { if (hasKeyword[0]) { break; } int finalPage = page; pdfReaderContentParser.processContent(page, new RenderListener() { @Override public void beginTextBlock() { } @Override public void renderText(TextRenderInfo renderInfo) { // 读取PDF文件的内容 String text = renderInfo.getText().trim(); stringBuilder.append(text); if (stringBuilder.toString().contains(keyword)) { Rectangle2D.Float boundingRectangle = renderInfo.getBaseline().getBoundingRectange(); if (hasKeyword[1]) { // 关键字的坐标 double x = boundingRectangle.getX(); double y = boundingRectangle.getY(); //设置字体 BaseFont baseFont = null; try { baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); } catch (DocumentException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Font font = new Font(baseFont, 10); PdfContentByte overContent = stamper.getOverContent(finalPage); ColumnText columnText = new ColumnText(overContent); // 根据关键字的坐标计算+偏移量得到批注字体的坐标 columnText.setSimpleColumn((float) x + pdfAddContentParam.getLlx(), (float) y + pdfAddContentParam.getLly(), (float) x + 100 + pdfAddContentParam.getUrx(), (float) y + pdfAddContentParam.getUry()); Paragraph elements = new Paragraph(pdfAddContentParam.getContent()); elements.setFont(font); columnText.addElement(elements); try { columnText.go(); } catch (DocumentException e) { e.printStackTrace(); } hasKeyword[1] = false; } hasKeyword[0] = true; } if (stringBuilder.toString().length() > length * 3) { stringBuilder.setLength(0); } } @Override public void endTextBlock() { } @Override public void renderImage(ImageRenderInfo renderInfo) { } }); } } stamper.close(); pdfReader.close(); return byteArrayOutputStream.toByteArray(); } /** * pdf插入图片 * * @param oldPath 插入图片前的pdf路径 * @param newPath 插入图片后的pdf路径 * @param imgPath 图片路径 * @param x x轴坐标 * @param y y轴坐标 * @param width 图片宽度 * @param height 图片高度 * @param pageNum 当前页码 * @throws IOException * @throws DocumentException */ public static boolean addImage(String oldPath, String newPath, String imgPath, Float x, Float y, Integer width, Integer height, int pageNum) throws IOException, DocumentException { InputStream inputStream = Files.newInputStream(Paths.get(oldPath)); FileOutputStream out = new FileOutputStream(newPath); PdfReader reader = new PdfReader(inputStream); //pdf页数 int pdfPages = reader.getNumberOfPages(); if (pageNum > pdfPages) { return false; } PdfStamper stamper = new PdfStamper(reader, out); //图片 BufferedImage bufferedImage = ImageIO.read(Files.newInputStream(Paths.get(imgPath))); //图片放置的页码 //图片处理 Image img = Image.getInstance(ImageUtils.imageToBytes((bufferedImage), "png")); BufferedImage image = ImageIO.read(new File(imgPath)); if (width == null || width == 0) { width = image.getWidth(); } if (height == null || height == 0) { height = image.getHeight(); } //设置图片大小 img.scaleAbsolute(width, height); img.setTransparency(new int[0]); //设置图片位置 img.setAbsolutePosition(x, y); stamper.getOverContent(pageNum).addImage(img); //关闭资源 stamper.close(); out.close(); reader.close(); return true; } /** * 获取文件后缀的方法 * * @param filePath 文件路径 * @return 文件后缀 * @author fengcheng */ private static String getFileExtension(String filePath) { File file = new File(filePath); String extension = ""; try { if (file != null && file.exists()) { String name = file.getName(); extension = name.substring(name.lastIndexOf(".") + 1); } } catch (Exception e) { extension = ""; } return extension; } /** * 生成骑缝章 * * @param oldPath 原pdf路径 * @param newPath 新pdf路径 * @param imagesUrl 印章路径 * @param x 盖章x轴 * @param y 盖章y轴 * @param width 图片宽 * @param height 图片高 * @return 是否处理成功 * @throws IOException */ public static boolean generatePagingSeal(PdfSignatureConfig pdfSignatureConfig, String oldPath, String newPath, String imagesUrl, Float x, Float y, Float width, Float height, String storagePath) throws IOException { PdfReader pdfReader = new PdfReader(oldPath); int count = pdfReader.getNumberOfPages(); if (count == 1) { return false; } pdfReader.close(); String fileExtension = getFileExtension(imagesUrl); String name = new File(imagesUrl).getName(); String nameWithoutExtension = name.substring(0, name.lastIndexOf(".")); FileOutputStream fileOutputStream = null; try { KeyStore keyStore = KeyStore.getInstance("JKS"); keyStore.load(pdfSignatureConfig.getPathInputStream(), pdfSignatureConfig.getPassword().toCharArray()); String alias = (String) keyStore.aliases().nextElement(); PrivateKey PrivateKey = (PrivateKey) keyStore.getKey(alias, pdfSignatureConfig.getPassword().toCharArray()); Certificate[] chain = keyStore.getCertificateChain(alias); for (int i = 1; i <= count; i++) { String imageUrl = storagePath + "/sura/" + nameWithoutExtension + i + "." + fileExtension; PdfReader doc = new PdfReader(oldPath); Rectangle pageSize = doc.getPageSize(i); Float xAxle = (float) (pageSize.getWidth()) - width; if (y > (float) pageSize.getHeight()) { return false; } FileUtils.createFile(newPath); fileOutputStream = new FileOutputStream(newPath); /** * 1 参数依次为:文件名、文件输入流、文件版本号、临时文件、是否可以追加签名 * 1.1 false的话,pdf文件只允许被签名一次,多次签名,最后一次有效 * 1.2 true的话,pdf可以被追加签名,验签工具可以识别出每次签名之后文档是否被修改 */ PdfStamper stamper = PdfStamper.createSignature(doc, fileOutputStream, '\0', null, true); PdfSignatureAppearance appearance = stamper.getSignatureAppearance(); appearance.setReason(pdfSignatureConfig.getCause()); appearance.setLocation(pdfSignatureConfig.getPlace()); appearance.setSignDate(Calendar.getInstance()); appearance.setLayer2Text(pdfSignatureConfig.getPlace()); appearance.setLayer2Text(pdfSignatureConfig.getName()); appearance.setSignatureGraphic(Image.getInstance(imageUrl)); /** * 1 三个参数依次为:设置签名的位置、页码、签名域名称,多次追加签名的时候,签名域名称不能一样 * 1.1 签名的位置四个参数:印章左下角的X、Y轴坐标,印章右上角的X、Y轴坐标, * 这个位置是相对于PDF页面的位置坐标,即该坐标距PDF当前页左下角的坐标 */ appearance.setVisibleSignature(new Rectangle(xAxle + 60, pageSize.getHeight() - height - y, xAxle + width + 20, pageSize.getHeight() - y), i, String.valueOf(UUID.randomUUID())); /** * 设置认证等级,共4种,分别为:s * NOT_CERTIFIED、CERTIFIED_NO_CHANGES_ALLOWED、 * CERTIFIED_FORM_FILLING 和 CERTIFIED_FORM_FILLING_AND_ANNOTATIONS * * 需要用哪一种根据业务流程自行选择 */ appearance.setCertificationLevel(PdfSignatureAppearance.NOT_CERTIFIED); /** * 印章的渲染方式,同样有4种: * DESCRIPTION、NAME_AND_DESCRIPTION, * GRAPHIC_AND_DESCRIPTION,GRAPHIC; * 这里选择只显示印章 */ appearance.setRenderingMode(PdfSignatureAppearance.RenderingMode.GRAPHIC); /** * 算法主要为:RSA、DSA、ECDSA * 摘要算法,这里的itext提供了2个用于签名的接口,可以自己实现 */ ExternalDigest digest = new BouncyCastleDigest(); /** * 签名算法,参数依次为:证书秘钥、摘要算法名称,例如MD5 | SHA-1 | SHA-2.... 以及 提供者 */ ExternalSignature signature = new PrivateKeySignature(PrivateKey, DigestAlgorithms.SHA1, null); /** * 最重要的来了,调用itext签名方法完成pdf签章 */ MakeSignature.signDetached(appearance, digest, signature, chain, null, null, null, 0, MakeSignature.CryptoStandard.CMS); fileOutputStream.close(); // 复制文件 FileUtils.copyDir(newPath, oldPath); FileUtils.deleteFile(newPath); pdfReader.close(); fileOutputStream.close(); } } catch (Exception e) { e.printStackTrace(); return false; } return true; } /** * 定义GetImage方法,根据PDF页数分割印章图片 * * @param num PDF页数 * @return * @throws IOException */ public static BufferedImage[] getImage(String imagesUrl, int num, Integer width, Integer height) throws IOException { BufferedImage image = ImageIO.read(new File(imagesUrl)); int rows = 1; int chunks = rows * num; if (width == null || width == 0) { width = image.getWidth() / num; } if (height == null || height == 0) { height = image.getHeight() / rows; } int count = 0; BufferedImage[] imgs = new BufferedImage[chunks]; for (int x = 0; x < rows; x++) { for (int y = 0; y < num; y++) { imgs[count] = new BufferedImage(width, height, image.getType()); Graphics2D gr = imgs[count++].createGraphics(); gr.drawImage(image, 0, 0, width, height, width * y, height * x, width * y + width, height * x + height, Color.WHITE, null); gr.dispose(); } } return imgs; } /** * pdf插入图片 * * @param pdfSignatureConfig pdf签名配置 * @param oldPath 插入图片前的pdf路径 * @param newPath 插入图片后的pdf路径 * @param imgPath 图片路径 * @param x x轴坐标 * @param y y轴坐标 * @param width 图片宽度 * @param height 图片高度 * @param pageNum 当前页码 * @throws IOException * @throws DocumentException */ public static boolean stamp(PdfSignatureConfig pdfSignatureConfig, String oldPath, String newPath, String imgPath, Float x, Float y, Float width, Float height, int pageNum) { try { PdfReader pdfReader = new PdfReader(oldPath); int count = pdfReader.getNumberOfPages(); if (pageNum > count) { return false; } FileUtils.createFile(newPath); FileOutputStream fileOutputStream = new FileOutputStream(newPath); /** * 1 参数依次为:文件名、文件输入流、文件版本号、临时文件、是否可以追加签名 * 1.1 false的话,pdf文件只允许被签名一次,多次签名,最后一次有效 * 1.2 true的话,pdf可以被追加签名,验签工具可以识别出每次签名之后文档是否被修改 */ PdfStamper stamper = PdfStamper.createSignature(pdfReader, fileOutputStream, '\0', null, true); KeyStore keyStore = KeyStore.getInstance("JKS"); keyStore.load(pdfSignatureConfig.getPathInputStream(), pdfSignatureConfig.getPassword().toCharArray()); String alias = keyStore.aliases().nextElement(); PrivateKey PrivateKey = (PrivateKey) keyStore.getKey(alias, pdfSignatureConfig.getPassword().toCharArray()); Certificate[] chain = keyStore.getCertificateChain(alias); // 获取数字签章属性对象,设定数字签章的属性 PdfSignatureAppearance appearance = stamper.getSignatureAppearance(); appearance.setReason(pdfSignatureConfig.getCause()); appearance.setLocation(pdfSignatureConfig.getPlace()); appearance.setSignDate(Calendar.getInstance()); appearance.setLayer2Text(pdfSignatureConfig.getPlace()); appearance.setLayer2Text(pdfSignatureConfig.getName()); // /** // * 用于盖章的印章图片,引包的时候要引入itext包的image // */ // BufferedImage image = ImageIO.read(new File(imgPath)); // if (width == null || width == 0) { // width = image.getWidth(); // } // // if (height == null || height == 0) { // height = image.getHeight(); // } appearance.setSignatureGraphic(Image.getInstance(imgPath)); Rectangle pageSize = pdfReader.getPageSize(pageNum); /** * 1 三个参数依次为:设置签名的位置、页码、签名域名称,多次追加签名的时候,签名域名称不能一样 * 1.1 签名的位置四个参数:印章左下角的X、Y轴坐标,印章右上角的X、Y轴坐标, * 这个位置是相对于PDF页面的位置坐标,即该坐标距PDF当前页左下角的坐标 */ appearance.setVisibleSignature(new Rectangle(x, pageSize.getHeight() - height - y, x + width, pageSize.getHeight() - y), pageNum, String.valueOf(UUID.randomUUID())); /** * 设置认证等级,共4种,分别为:s * NOT_CERTIFIED、CERTIFIED_NO_CHANGES_ALLOWED、 * CERTIFIED_FORM_FILLING 和 CERTIFIED_FORM_FILLING_AND_ANNOTATIONS * * 需要用哪一种根据业务流程自行选择 */ appearance.setCertificationLevel(PdfSignatureAppearance.NOT_CERTIFIED); /** * 印章的渲染方式,同样有4种: * DESCRIPTION、NAME_AND_DESCRIPTION, * GRAPHIC_AND_DESCRIPTION,GRAPHIC; * 这里选择只显示印章 */ appearance.setRenderingMode(PdfSignatureAppearance.RenderingMode.GRAPHIC); /** * 算法主要为:RSA、DSA、ECDSA * 摘要算法,这里的itext提供了2个用于签名的接口,可以自己实现 */ ExternalDigest digest = new BouncyCastleDigest(); /** * 签名算法,参数依次为:证书秘钥、摘要算法名称,例如MD5 | SHA-1 | SHA-2.... 以及 提供者 */ ExternalSignature signature = new PrivateKeySignature(PrivateKey, DigestAlgorithms.SHA1, null); /** * 最重要的来了,调用itext签名方法完成pdf签章 */ MakeSignature.signDetached(appearance, digest, signature, chain, null, null, null, 0, MakeSignature.CryptoStandard.CMS); pdfReader.close(); fileOutputStream.close(); // 复制文件 FileUtils.copyDir(newPath, oldPath); FileUtils.deleteFile(newPath); } catch (Exception e) { e.printStackTrace(); return false; } return true; } }
28harishkumar/blog
27,548
public/js/tinymce/plugins/jbimages/ci/system/libraries/Upload.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * File Uploading Class * * @package CodeIgniter * @subpackage Libraries * @category Uploads * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/file_uploading.html */ class CI_Upload { public $max_size = 0; public $max_width = 0; public $max_height = 0; public $max_filename = 0; public $allowed_types = ""; public $file_temp = ""; public $file_name = ""; public $orig_name = ""; public $file_type = ""; public $file_size = ""; public $file_ext = ""; public $upload_path = ""; public $overwrite = FALSE; public $encrypt_name = FALSE; public $is_image = FALSE; public $image_width = ''; public $image_height = ''; public $image_type = ''; public $image_size_str = ''; public $error_msg = array(); public $mimes = array(); public $remove_spaces = TRUE; public $xss_clean = FALSE; public $temp_prefix = "temp_file_"; public $client_name = ''; protected $_file_name_override = ''; /** * Constructor * * @access public */ public function __construct($props = array()) { if (count($props) > 0) { $this->initialize($props); } log_message('debug', "Upload Class Initialized"); } // -------------------------------------------------------------------- /** * Initialize preferences * * @param array * @return void */ public function initialize($config = array()) { $defaults = array( 'max_size' => 0, 'max_width' => 0, 'max_height' => 0, 'max_filename' => 0, 'allowed_types' => "", 'file_temp' => "", 'file_name' => "", 'orig_name' => "", 'file_type' => "", 'file_size' => "", 'file_ext' => "", 'upload_path' => "", 'overwrite' => FALSE, 'encrypt_name' => FALSE, 'is_image' => FALSE, 'image_width' => '', 'image_height' => '', 'image_type' => '', 'image_size_str' => '', 'error_msg' => array(), 'mimes' => array(), 'remove_spaces' => TRUE, 'xss_clean' => FALSE, 'temp_prefix' => "temp_file_", 'client_name' => '' ); foreach ($defaults as $key => $val) { if (isset($config[$key])) { $method = 'set_'.$key; if (method_exists($this, $method)) { $this->$method($config[$key]); } else { $this->$key = $config[$key]; } } else { $this->$key = $val; } } // if a file_name was provided in the config, use it instead of the user input // supplied file name for all uploads until initialized again $this->_file_name_override = $this->file_name; } // -------------------------------------------------------------------- /** * Perform the file upload * * @return bool */ public function do_upload($field = 'userfile') { // Is $_FILES[$field] set? If not, no reason to continue. if ( ! isset($_FILES[$field])) { $this->set_error('upload_no_file_selected'); return FALSE; } // Is the upload path valid? if ( ! $this->validate_upload_path()) { // errors will already be set by validate_upload_path() so just return FALSE return FALSE; } // Was the file able to be uploaded? If not, determine the reason why. if ( ! is_uploaded_file($_FILES[$field]['tmp_name'])) { $error = ( ! isset($_FILES[$field]['error'])) ? 4 : $_FILES[$field]['error']; switch($error) { case 1: // UPLOAD_ERR_INI_SIZE $this->set_error('upload_file_exceeds_limit'); break; case 2: // UPLOAD_ERR_FORM_SIZE $this->set_error('upload_file_exceeds_form_limit'); break; case 3: // UPLOAD_ERR_PARTIAL $this->set_error('upload_file_partial'); break; case 4: // UPLOAD_ERR_NO_FILE $this->set_error('upload_no_file_selected'); break; case 6: // UPLOAD_ERR_NO_TMP_DIR $this->set_error('upload_no_temp_directory'); break; case 7: // UPLOAD_ERR_CANT_WRITE $this->set_error('upload_unable_to_write_file'); break; case 8: // UPLOAD_ERR_EXTENSION $this->set_error('upload_stopped_by_extension'); break; default : $this->set_error('upload_no_file_selected'); break; } return FALSE; } // Set the uploaded data as class variables $this->file_temp = $_FILES[$field]['tmp_name']; $this->file_size = $_FILES[$field]['size']; $this->_file_mime_type($_FILES[$field]); $this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $this->file_type); $this->file_type = strtolower(trim(stripslashes($this->file_type), '"')); $this->file_name = $this->_prep_filename($_FILES[$field]['name']); $this->file_ext = $this->get_extension($this->file_name); $this->client_name = $this->file_name; // Is the file type allowed to be uploaded? if ( ! $this->is_allowed_filetype()) { $this->set_error('upload_invalid_filetype'); return FALSE; } // if we're overriding, let's now make sure the new name and type is allowed if ($this->_file_name_override != '') { $this->file_name = $this->_prep_filename($this->_file_name_override); // If no extension was provided in the file_name config item, use the uploaded one if (strpos($this->_file_name_override, '.') === FALSE) { $this->file_name .= $this->file_ext; } // An extension was provided, lets have it! else { $this->file_ext = $this->get_extension($this->_file_name_override); } if ( ! $this->is_allowed_filetype(TRUE)) { $this->set_error('upload_invalid_filetype'); return FALSE; } } // Convert the file size to kilobytes if ($this->file_size > 0) { $this->file_size = round($this->file_size/1024, 2); } // Is the file size within the allowed maximum? if ( ! $this->is_allowed_filesize()) { $this->set_error('upload_invalid_filesize'); return FALSE; } // Are the image dimensions within the allowed size? // Note: This can fail if the server has an open_basdir restriction. if ( ! $this->is_allowed_dimensions()) { $this->set_error('upload_invalid_dimensions'); return FALSE; } // Sanitize the file name for security $this->file_name = $this->clean_file_name($this->file_name); // Truncate the file name if it's too long if ($this->max_filename > 0) { $this->file_name = $this->limit_filename_length($this->file_name, $this->max_filename); } // Remove white spaces in the name if ($this->remove_spaces == TRUE) { $this->file_name = preg_replace("/\s+/", "_", $this->file_name); } /* * Validate the file name * This function appends an number onto the end of * the file if one with the same name already exists. * If it returns false there was a problem. */ $this->orig_name = $this->file_name; if ($this->overwrite == FALSE) { $this->file_name = $this->set_filename($this->upload_path, $this->file_name); if ($this->file_name === FALSE) { return FALSE; } } /* * Run the file through the XSS hacking filter * This helps prevent malicious code from being * embedded within a file. Scripts can easily * be disguised as images or other file types. */ if ($this->xss_clean) { if ($this->do_xss_clean() === FALSE) { $this->set_error('upload_unable_to_write_file'); return FALSE; } } /* * Move the file to the final destination * To deal with different server configurations * we'll attempt to use copy() first. If that fails * we'll use move_uploaded_file(). One of the two should * reliably work in most environments */ if ( ! @copy($this->file_temp, $this->upload_path.$this->file_name)) { if ( ! @move_uploaded_file($this->file_temp, $this->upload_path.$this->file_name)) { $this->set_error('upload_destination_error'); return FALSE; } } /* * Set the finalized image dimensions * This sets the image width/height (assuming the * file was an image). We use this information * in the "data" function. */ $this->set_image_properties($this->upload_path.$this->file_name); return TRUE; } // -------------------------------------------------------------------- /** * Finalized Data Array * * Returns an associative array containing all of the information * related to the upload, allowing the developer easy access in one array. * * @return array */ public function data() { return array ( 'file_name' => $this->file_name, 'file_type' => $this->file_type, 'file_path' => $this->upload_path, 'full_path' => $this->upload_path.$this->file_name, 'raw_name' => str_replace($this->file_ext, '', $this->file_name), 'orig_name' => $this->orig_name, 'client_name' => $this->client_name, 'file_ext' => $this->file_ext, 'file_size' => $this->file_size, 'is_image' => $this->is_image(), 'image_width' => $this->image_width, 'image_height' => $this->image_height, 'image_type' => $this->image_type, 'image_size_str' => $this->image_size_str, ); } // -------------------------------------------------------------------- /** * Set Upload Path * * @param string * @return void */ public function set_upload_path($path) { // Make sure it has a trailing slash $this->upload_path = rtrim($path, '/').'/'; } // -------------------------------------------------------------------- /** * Set the file name * * This function takes a filename/path as input and looks for the * existence of a file with the same name. If found, it will append a * number to the end of the filename to avoid overwriting a pre-existing file. * * @param string * @param string * @return string */ public function set_filename($path, $filename) { if ($this->encrypt_name == TRUE) { mt_srand(); $filename = md5(uniqid(mt_rand())).$this->file_ext; } if ( ! file_exists($path.$filename)) { return $filename; } $filename = str_replace($this->file_ext, '', $filename); $new_filename = ''; for ($i = 1; $i < 100; $i++) { if ( ! file_exists($path.$filename.$i.$this->file_ext)) { $new_filename = $filename.$i.$this->file_ext; break; } } if ($new_filename == '') { $this->set_error('upload_bad_filename'); return FALSE; } else { return $new_filename; } } // -------------------------------------------------------------------- /** * Set Maximum File Size * * @param integer * @return void */ public function set_max_filesize($n) { $this->max_size = ((int) $n < 0) ? 0: (int) $n; } // -------------------------------------------------------------------- /** * Set Maximum File Name Length * * @param integer * @return void */ public function set_max_filename($n) { $this->max_filename = ((int) $n < 0) ? 0: (int) $n; } // -------------------------------------------------------------------- /** * Set Maximum Image Width * * @param integer * @return void */ public function set_max_width($n) { $this->max_width = ((int) $n < 0) ? 0: (int) $n; } // -------------------------------------------------------------------- /** * Set Maximum Image Height * * @param integer * @return void */ public function set_max_height($n) { $this->max_height = ((int) $n < 0) ? 0: (int) $n; } // -------------------------------------------------------------------- /** * Set Allowed File Types * * @param string * @return void */ public function set_allowed_types($types) { if ( ! is_array($types) && $types == '*') { $this->allowed_types = '*'; return; } $this->allowed_types = explode('|', $types); } // -------------------------------------------------------------------- /** * Set Image Properties * * Uses GD to determine the width/height/type of image * * @param string * @return void */ public function set_image_properties($path = '') { if ( ! $this->is_image()) { return; } if (function_exists('getimagesize')) { if (FALSE !== ($D = @getimagesize($path))) { $types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png'); $this->image_width = $D['0']; $this->image_height = $D['1']; $this->image_type = ( ! isset($types[$D['2']])) ? 'unknown' : $types[$D['2']]; $this->image_size_str = $D['3']; // string containing height and width } } } // -------------------------------------------------------------------- /** * Set XSS Clean * * Enables the XSS flag so that the file that was uploaded * will be run through the XSS filter. * * @param bool * @return void */ public function set_xss_clean($flag = FALSE) { $this->xss_clean = ($flag == TRUE) ? TRUE : FALSE; } // -------------------------------------------------------------------- /** * Validate the image * * @return bool */ public function is_image() { // IE will sometimes return odd mime-types during upload, so here we just standardize all // jpegs or pngs to the same file type. $png_mimes = array('image/x-png'); $jpeg_mimes = array('image/jpg', 'image/jpe', 'image/jpeg', 'image/pjpeg'); if (in_array($this->file_type, $png_mimes)) { $this->file_type = 'image/png'; } if (in_array($this->file_type, $jpeg_mimes)) { $this->file_type = 'image/jpeg'; } $img_mimes = array( 'image/gif', 'image/jpeg', 'image/png', ); return (in_array($this->file_type, $img_mimes, TRUE)) ? TRUE : FALSE; } // -------------------------------------------------------------------- /** * Verify that the filetype is allowed * * @return bool */ public function is_allowed_filetype($ignore_mime = FALSE) { if ($this->allowed_types == '*') { return TRUE; } if (count($this->allowed_types) == 0 OR ! is_array($this->allowed_types)) { $this->set_error('upload_no_file_types'); return FALSE; } $ext = strtolower(ltrim($this->file_ext, '.')); if ( ! in_array($ext, $this->allowed_types)) { return FALSE; } // Images get some additional checks $image_types = array('gif', 'jpg', 'jpeg', 'png', 'jpe'); if (in_array($ext, $image_types)) { if (getimagesize($this->file_temp) === FALSE) { return FALSE; } } if ($ignore_mime === TRUE) { return TRUE; } $mime = $this->mimes_types($ext); if (is_array($mime)) { if (in_array($this->file_type, $mime, TRUE)) { return TRUE; } } elseif ($mime == $this->file_type) { return TRUE; } return FALSE; } // -------------------------------------------------------------------- /** * Verify that the file is within the allowed size * * @return bool */ public function is_allowed_filesize() { if ($this->max_size != 0 AND $this->file_size > $this->max_size) { return FALSE; } else { return TRUE; } } // -------------------------------------------------------------------- /** * Verify that the image is within the allowed width/height * * @return bool */ public function is_allowed_dimensions() { if ( ! $this->is_image()) { return TRUE; } if (function_exists('getimagesize')) { $D = @getimagesize($this->file_temp); if ($this->max_width > 0 AND $D['0'] > $this->max_width) { return FALSE; } if ($this->max_height > 0 AND $D['1'] > $this->max_height) { return FALSE; } return TRUE; } return TRUE; } // -------------------------------------------------------------------- /** * Validate Upload Path * * Verifies that it is a valid upload path with proper permissions. * * * @return bool */ public function validate_upload_path() { if ($this->upload_path == '') { $this->set_error('upload_no_filepath'); return FALSE; } if (function_exists('realpath') AND @realpath($this->upload_path) !== FALSE) { $this->upload_path = str_replace("\\", "/", realpath($this->upload_path)); } if ( ! @is_dir($this->upload_path)) { $this->set_error('upload_no_filepath'); return FALSE; } if ( ! is_really_writable($this->upload_path)) { $this->set_error('upload_not_writable'); return FALSE; } $this->upload_path = preg_replace("/(.+?)\/*$/", "\\1/", $this->upload_path); return TRUE; } // -------------------------------------------------------------------- /** * Extract the file extension * * @param string * @return string */ public function get_extension($filename) { $x = explode('.', $filename); return '.'.end($x); } // -------------------------------------------------------------------- /** * Clean the file name for security * * @param string * @return string */ public function clean_file_name($filename) { $bad = array( "<!--", "-->", "'", "<", ">", '"', '&', '$', '=', ';', '?', '/', "%20", "%22", "%3c", // < "%253c", // < "%3e", // > "%0e", // > "%28", // ( "%29", // ) "%2528", // ( "%26", // & "%24", // $ "%3f", // ? "%3b", // ; "%3d" // = ); $filename = str_replace($bad, '', $filename); return stripslashes($filename); } // -------------------------------------------------------------------- /** * Limit the File Name Length * * @param string * @return string */ public function limit_filename_length($filename, $length) { if (strlen($filename) < $length) { return $filename; } $ext = ''; if (strpos($filename, '.') !== FALSE) { $parts = explode('.', $filename); $ext = '.'.array_pop($parts); $filename = implode('.', $parts); } return substr($filename, 0, ($length - strlen($ext))).$ext; } // -------------------------------------------------------------------- /** * Runs the file through the XSS clean function * * This prevents people from embedding malicious code in their files. * I'm not sure that it won't negatively affect certain files in unexpected ways, * but so far I haven't found that it causes trouble. * * @return void */ public function do_xss_clean() { $file = $this->file_temp; if (filesize($file) == 0) { return FALSE; } if (function_exists('memory_get_usage') && memory_get_usage() && ini_get('memory_limit') != '') { $current = ini_get('memory_limit') * 1024 * 1024; // There was a bug/behavioural change in PHP 5.2, where numbers over one million get output // into scientific notation. number_format() ensures this number is an integer // http://bugs.php.net/bug.php?id=43053 $new_memory = number_format(ceil(filesize($file) + $current), 0, '.', ''); ini_set('memory_limit', $new_memory); // When an integer is used, the value is measured in bytes. - PHP.net } // If the file being uploaded is an image, then we should have no problem with XSS attacks (in theory), but // IE can be fooled into mime-type detecting a malformed image as an html file, thus executing an XSS attack on anyone // using IE who looks at the image. It does this by inspecting the first 255 bytes of an image. To get around this // CI will itself look at the first 255 bytes of an image to determine its relative safety. This can save a lot of // processor power and time if it is actually a clean image, as it will be in nearly all instances _except_ an // attempted XSS attack. if (function_exists('getimagesize') && @getimagesize($file) !== FALSE) { if (($file = @fopen($file, 'rb')) === FALSE) // "b" to force binary { return FALSE; // Couldn't open the file, return FALSE } $opening_bytes = fread($file, 256); fclose($file); // These are known to throw IE into mime-type detection chaos // <a, <body, <head, <html, <img, <plaintext, <pre, <script, <table, <title // title is basically just in SVG, but we filter it anyhow if ( ! preg_match('/<(a|body|head|html|img|plaintext|pre|script|table|title)[\s>]/i', $opening_bytes)) { return TRUE; // its an image, no "triggers" detected in the first 256 bytes, we're good } else { return FALSE; } } if (($data = @file_get_contents($file)) === FALSE) { return FALSE; } $CI =& get_instance(); return $CI->security->xss_clean($data, TRUE); } // -------------------------------------------------------------------- /** * Set an error message * * @param string * @return void */ public function set_error($msg) { $CI =& get_instance(); $CI->lang->load('upload'); if (is_array($msg)) { foreach ($msg as $val) { $msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val); $this->error_msg[] = $msg; log_message('error', $msg); } } else { $msg = ($CI->lang->line($msg) == FALSE) ? $msg : $CI->lang->line($msg); $this->error_msg[] = $msg; log_message('error', $msg); } } // -------------------------------------------------------------------- /** * Display the error message * * @param string * @param string * @return string */ public function display_errors($open = '<p>', $close = '</p>') { $str = ''; foreach ($this->error_msg as $val) { $str .= $open.$val.$close; } return $str; } // -------------------------------------------------------------------- /** * List of Mime Types * * This is a list of mime types. We use it to validate * the "allowed types" set by the developer * * @param string * @return string */ public function mimes_types($mime) { global $mimes; if (count($this->mimes) == 0) { if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) { include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); } elseif (is_file(APPPATH.'config/mimes.php')) { include(APPPATH.'config//mimes.php'); } else { return FALSE; } $this->mimes = $mimes; unset($mimes); } return ( ! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime]; } // -------------------------------------------------------------------- /** * Prep Filename * * Prevents possible script execution from Apache's handling of files multiple extensions * http://httpd.apache.org/docs/1.3/mod/mod_mime.html#multipleext * * @param string * @return string */ protected function _prep_filename($filename) { if (strpos($filename, '.') === FALSE OR $this->allowed_types == '*') { return $filename; } $parts = explode('.', $filename); $ext = array_pop($parts); $filename = array_shift($parts); foreach ($parts as $part) { if ( ! in_array(strtolower($part), $this->allowed_types) OR $this->mimes_types(strtolower($part)) === FALSE) { $filename .= '.'.$part.'_'; } else { $filename .= '.'.$part; } } $filename .= '.'.$ext; return $filename; } // -------------------------------------------------------------------- /** * File MIME type * * Detects the (actual) MIME type of the uploaded file, if possible. * The input array is expected to be $_FILES[$field] * * @param array * @return void */ protected function _file_mime_type($file) { // We'll need this to validate the MIME info string (e.g. text/plain; charset=us-ascii) $regexp = '/^([a-z\-]+\/[a-z0-9\-\.\+]+)(;\s.+)?$/'; /* Fileinfo extension - most reliable method * * Unfortunately, prior to PHP 5.3 - it's only available as a PECL extension and the * more convenient FILEINFO_MIME_TYPE flag doesn't exist. */ if (function_exists('finfo_file')) { $finfo = finfo_open(FILEINFO_MIME); if (is_resource($finfo)) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system { $mime = @finfo_file($finfo, $file['tmp_name']); finfo_close($finfo); /* According to the comments section of the PHP manual page, * it is possible that this function returns an empty string * for some files (e.g. if they don't exist in the magic MIME database) */ if (is_string($mime) && preg_match($regexp, $mime, $matches)) { $this->file_type = $matches[1]; return; } } } /* This is an ugly hack, but UNIX-type systems provide a "native" way to detect the file type, * which is still more secure than depending on the value of $_FILES[$field]['type'], and as it * was reported in issue #750 (https://github.com/EllisLab/CodeIgniter/issues/750) - it's better * than mime_content_type() as well, hence the attempts to try calling the command line with * three different functions. * * Notes: * - the DIRECTORY_SEPARATOR comparison ensures that we're not on a Windows system * - many system admins would disable the exec(), shell_exec(), popen() and similar functions * due to security concerns, hence the function_exists() checks */ if (DIRECTORY_SEPARATOR !== '\\') { $cmd = 'file --brief --mime ' . escapeshellarg($file['tmp_name']) . ' 2>&1'; if (function_exists('exec')) { /* This might look confusing, as $mime is being populated with all of the output when set in the second parameter. * However, we only neeed the last line, which is the actual return value of exec(), and as such - it overwrites * anything that could already be set for $mime previously. This effectively makes the second parameter a dummy * value, which is only put to allow us to get the return status code. */ $mime = @exec($cmd, $mime, $return_status); if ($return_status === 0 && is_string($mime) && preg_match($regexp, $mime, $matches)) { $this->file_type = $matches[1]; return; } } if ( (bool) @ini_get('safe_mode') === FALSE && function_exists('shell_exec')) { $mime = @shell_exec($cmd); if (strlen($mime) > 0) { $mime = explode("\n", trim($mime)); if (preg_match($regexp, $mime[(count($mime) - 1)], $matches)) { $this->file_type = $matches[1]; return; } } } if (function_exists('popen')) { $proc = @popen($cmd, 'r'); if (is_resource($proc)) { $mime = @fread($proc, 512); @pclose($proc); if ($mime !== FALSE) { $mime = explode("\n", trim($mime)); if (preg_match($regexp, $mime[(count($mime) - 1)], $matches)) { $this->file_type = $matches[1]; return; } } } } } // Fall back to the deprecated mime_content_type(), if available (still better than $_FILES[$field]['type']) if (function_exists('mime_content_type')) { $this->file_type = @mime_content_type($file['tmp_name']); if (strlen($this->file_type) > 0) // It's possible that mime_content_type() returns FALSE or an empty string { return; } } $this->file_type = $file['type']; } // -------------------------------------------------------------------- } // END Upload Class /* End of file Upload.php */ /* Location: ./system/libraries/Upload.php */
2929004360/ruoyi-sign
9,257
ruoyi-work/src/main/java/com/ruoyi/work/utils/FileUtils.java
package com.ruoyi.work.utils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileTypeUtils; import com.ruoyi.common.utils.file.MimeTypeUtils; import org.apache.commons.lang3.ArrayUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.nio.file.Files; /** * 文件处理工具类 * * @author ruoyi */ public class FileUtils { /** * 字符常量:斜杠 {@code '/'} */ public static final char SLASH = '/'; /** * 字符常量:反斜杠 {@code '\\'} */ public static final char BACKSLASH = '\\'; public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"; /** * 输出指定文件的byte数组 * * @param filePath 文件路径 * @param os 输出流 * @return */ public static void writeBytes(String filePath, OutputStream os) throws IOException { FileInputStream fis = null; try { File file = new File(filePath); if (!file.exists()) { throw new FileNotFoundException(filePath); } fis = new FileInputStream(file); byte[] b = new byte[1024]; int length; while ((length = fis.read(b)) > 0) { os.write(b, 0, length); } } catch (IOException e) { throw e; } finally { if (os != null) { try { os.close(); } catch (IOException e1) { e1.printStackTrace(); } } if (fis != null) { try { fis.close(); } catch (IOException e1) { e1.printStackTrace(); } } } } /** * 删除文件 * * @param filePath 文件 * @return */ public static boolean deleteFile(String filePath) { boolean flag = false; File file = new File(filePath); // 路径为文件且不为空则进行删除 if (file.isFile() && file.exists()) { flag = file.delete(); } return flag; } /** * 文件名称验证 * * @param filename 文件名称 * @return true 正常 false 非法 */ public static boolean isValidFilename(String filename) { return filename.matches(FILENAME_PATTERN); } /** * 检查文件是否可下载 * * @param resource 需要下载的文件 * @return true 正常 false 非法 */ public static boolean checkAllowDownload(String resource) { // 禁止目录上跳级别 if (StringUtils.contains(resource, "..")) { return false; } // 检查允许下载的文件规则 if (ArrayUtils.contains(MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION, FileTypeUtils.getFileType(resource))) { return true; } // 不在允许下载的文件规则 return false; } /** * 下载文件名重新编码 * * @param request 请求对象 * @param fileName 文件名 * @return 编码后的文件名 */ public static String setFileDownloadHeader(HttpServletRequest request, String fileName) throws UnsupportedEncodingException { final String agent = request.getHeader("USER-AGENT"); String filename = fileName; if (agent.contains("MSIE")) { // IE浏览器 filename = URLEncoder.encode(filename, "utf-8"); filename = filename.replace("+", " "); } else if (agent.contains("Firefox")) { // 火狐浏览器 filename = new String(fileName.getBytes(), "ISO8859-1"); } else if (agent.contains("Chrome")) { // google浏览器 filename = URLEncoder.encode(filename, "utf-8"); } else { // 其它浏览器 filename = URLEncoder.encode(filename, "utf-8"); } return filename; } /** * 返回文件名 * * @param filePath 文件 * @return 文件名 */ public static String getName(String filePath) { if (null == filePath) { return null; } int len = filePath.length(); if (0 == len) { return filePath; } if (isFileSeparator(filePath.charAt(len - 1))) { // 以分隔符结尾的去掉结尾分隔符 len--; } int begin = 0; char c; for (int i = len - 1; i > -1; i--) { c = filePath.charAt(i); if (isFileSeparator(c)) { // 查找最后一个路径分隔符(/或者\) begin = i + 1; break; } } return filePath.substring(begin, len); } /** * 是否为Windows或者Linux(Unix)文件分隔符<br> * Windows平台下分隔符为\,Linux(Unix)为/ * * @param c 字符 * @return 是否为Windows或者Linux(Unix)文件分隔符 */ public static boolean isFileSeparator(char c) { return SLASH == c || BACKSLASH == c; } /** * 下载文件名重新编码 * * @param response 响应对象 * @param realFileName 真实文件名 * @return */ public static void setAttachmentResponseHeader(HttpServletResponse response, String realFileName) throws UnsupportedEncodingException { String percentEncodedFileName = percentEncode(realFileName); StringBuilder contentDispositionValue = new StringBuilder(); contentDispositionValue.append("attachment; filename=") .append(percentEncodedFileName) .append(";") .append("filename*=") .append("utf-8''") .append(percentEncodedFileName); response.setHeader("Content-disposition", contentDispositionValue.toString()); response.setHeader("download-filename", percentEncodedFileName); } /** * 百分号编码工具方法 * * @param s 需要百分号编码的字符串 * @return 百分号编码后的字符串 */ public static String percentEncode(String s) throws UnsupportedEncodingException { String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString()); return encode.replaceAll("\\+", "%20"); } /** * 创建文件顺便创建父目录 * * @param path 文件字符串路径例如d:/fulld/why/ass/a/asd */ public static void createFile(String path) { createFile(new File(path)); } /** * 创建文件顺便创建父目录 * * @param file file类 */ private static void createFile(File file) { if (file.exists() && file.isFile()) { file.delete(); try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); } return; } File parentFile = file.getParentFile(); if (parentFile.exists()) { if (parentFile.isFile()) { parentFile.delete(); parentFile.mkdirs(); } } else { parentFile.mkdirs(); } try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } /** * 创建文件夹顺便创建父目录 * * @param path 文件夹的路径字符串例如d:/fulld/why/ass/a/asd/ * @return 如果本来就存在或者创建成功,那么就返回true */ public static void mkdirs(String path) { mkdirs(new File(path)); } /** * 创建文件夹顺便创建父目录 * * @param file file类 */ public static void mkdirs(File file) { if (file.exists() && file.isDirectory()) { return; } if (file.exists()) { file.delete(); file.mkdirs(); } else { file.mkdirs(); } } //文件夹拷贝 不管是路径还是File对象都可直接使用 //拷贝文件夹方法 // String 对象 public static void copyDir(String srcPath, String destPath) { File src = new File(srcPath); File dest = new File(destPath); copyDir(src, dest); } //拷贝文件夹方法 //File 对象 public static void copyDir(File src, File dest) { if (src.isDirectory()) {//文件夹 dest = new File(dest, src.getName()); } copyDirDetail(src, dest); } //拷贝文件夹细节 public static void copyDirDetail(File src, File dest) { if (src.isFile()) { //文件直接复制 try { copyFile(src, dest); } catch (IOException e) { e.printStackTrace(); } } else if (src.isDirectory()) {//目录 //确保文件夹存在 dest.mkdirs(); //获取下一级目录|文件 for (File sub : src.listFiles()) { copyDirDetail(sub, new File(dest, sub.getName())); } } } //文件拷贝 public static void copyFile(String srcPath, String destPath) throws IOException { File src = new File(srcPath); File dest = new File(destPath); copyFile(src, dest); } public static void copyFile(File srcPath, File destPath) throws IOException { //选择流 InputStream is = Files.newInputStream(srcPath.toPath()); OutputStream os = Files.newOutputStream(destPath.toPath()); //拷贝 循环+读取+写出 byte[] flush = new byte[1024]; int len = 0; //读取 while (-1 != (len = is.read(flush))) { //写出 os.write(flush, 0, len); } os.flush();//强制刷出 //关闭流 先打开后关闭 os.close(); is.close(); } }
28harishkumar/blog
37,341
public/js/tinymce/plugins/jbimages/ci/system/libraries/Image_lib.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * Image Manipulation class * * @package CodeIgniter * @subpackage Libraries * @category Image_lib * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/image_lib.html */ class CI_Image_lib { var $image_library = 'gd2'; // Can be: imagemagick, netpbm, gd, gd2 var $library_path = ''; var $dynamic_output = FALSE; // Whether to send to browser or write to disk var $source_image = ''; var $new_image = ''; var $width = ''; var $height = ''; var $quality = '90'; var $create_thumb = FALSE; var $thumb_marker = '_thumb'; var $maintain_ratio = TRUE; // Whether to maintain aspect ratio when resizing or use hard values var $master_dim = 'auto'; // auto, height, or width. Determines what to use as the master dimension var $rotation_angle = ''; var $x_axis = ''; var $y_axis = ''; // Watermark Vars var $wm_text = ''; // Watermark text if graphic is not used var $wm_type = 'text'; // Type of watermarking. Options: text/overlay var $wm_x_transp = 4; var $wm_y_transp = 4; var $wm_overlay_path = ''; // Watermark image path var $wm_font_path = ''; // TT font var $wm_font_size = 17; // Font size (different versions of GD will either use points or pixels) var $wm_vrt_alignment = 'B'; // Vertical alignment: T M B var $wm_hor_alignment = 'C'; // Horizontal alignment: L R C var $wm_padding = 0; // Padding around text var $wm_hor_offset = 0; // Lets you push text to the right var $wm_vrt_offset = 0; // Lets you push text down var $wm_font_color = '#ffffff'; // Text color var $wm_shadow_color = ''; // Dropshadow color var $wm_shadow_distance = 2; // Dropshadow distance var $wm_opacity = 50; // Image opacity: 1 - 100 Only works with image // Private Vars var $source_folder = ''; var $dest_folder = ''; var $mime_type = ''; var $orig_width = ''; var $orig_height = ''; var $image_type = ''; var $size_str = ''; var $full_src_path = ''; var $full_dst_path = ''; var $create_fnc = 'imagecreatetruecolor'; var $copy_fnc = 'imagecopyresampled'; var $error_msg = array(); var $wm_use_drop_shadow = FALSE; var $wm_use_truetype = FALSE; /** * Constructor * * @param string * @return void */ public function __construct($props = array()) { if (count($props) > 0) { $this->initialize($props); } log_message('debug', "Image Lib Class Initialized"); } // -------------------------------------------------------------------- /** * Initialize image properties * * Resets values in case this class is used in a loop * * @access public * @return void */ function clear() { $props = array('source_folder', 'dest_folder', 'source_image', 'full_src_path', 'full_dst_path', 'new_image', 'image_type', 'size_str', 'quality', 'orig_width', 'orig_height', 'width', 'height', 'rotation_angle', 'x_axis', 'y_axis', 'create_fnc', 'copy_fnc', 'wm_overlay_path', 'wm_use_truetype', 'dynamic_output', 'wm_font_size', 'wm_text', 'wm_vrt_alignment', 'wm_hor_alignment', 'wm_padding', 'wm_hor_offset', 'wm_vrt_offset', 'wm_font_color', 'wm_use_drop_shadow', 'wm_shadow_color', 'wm_shadow_distance', 'wm_opacity'); foreach ($props as $val) { $this->$val = ''; } // special consideration for master_dim $this->master_dim = 'auto'; } // -------------------------------------------------------------------- /** * initialize image preferences * * @access public * @param array * @return bool */ function initialize($props = array()) { /* * Convert array elements into class variables */ if (count($props) > 0) { foreach ($props as $key => $val) { $this->$key = $val; } } /* * Is there a source image? * * If not, there's no reason to continue * */ if ($this->source_image == '') { $this->set_error('imglib_source_image_required'); return FALSE; } /* * Is getimagesize() Available? * * We use it to determine the image properties (width/height). * Note: We need to figure out how to determine image * properties using ImageMagick and NetPBM * */ if ( ! function_exists('getimagesize')) { $this->set_error('imglib_gd_required_for_props'); return FALSE; } $this->image_library = strtolower($this->image_library); /* * Set the full server path * * The source image may or may not contain a path. * Either way, we'll try use realpath to generate the * full server path in order to more reliably read it. * */ if (function_exists('realpath') AND @realpath($this->source_image) !== FALSE) { $full_source_path = str_replace("\\", "/", realpath($this->source_image)); } else { $full_source_path = $this->source_image; } $x = explode('/', $full_source_path); $this->source_image = end($x); $this->source_folder = str_replace($this->source_image, '', $full_source_path); // Set the Image Properties if ( ! $this->get_image_properties($this->source_folder.$this->source_image)) { return FALSE; } /* * Assign the "new" image name/path * * If the user has set a "new_image" name it means * we are making a copy of the source image. If not * it means we are altering the original. We'll * set the destination filename and path accordingly. * */ if ($this->new_image == '') { $this->dest_image = $this->source_image; $this->dest_folder = $this->source_folder; } else { if (strpos($this->new_image, '/') === FALSE AND strpos($this->new_image, '\\') === FALSE) { $this->dest_folder = $this->source_folder; $this->dest_image = $this->new_image; } else { if (function_exists('realpath') AND @realpath($this->new_image) !== FALSE) { $full_dest_path = str_replace("\\", "/", realpath($this->new_image)); } else { $full_dest_path = $this->new_image; } // Is there a file name? if ( ! preg_match("#\.(jpg|jpeg|gif|png)$#i", $full_dest_path)) { $this->dest_folder = $full_dest_path.'/'; $this->dest_image = $this->source_image; } else { $x = explode('/', $full_dest_path); $this->dest_image = end($x); $this->dest_folder = str_replace($this->dest_image, '', $full_dest_path); } } } /* * Compile the finalized filenames/paths * * We'll create two master strings containing the * full server path to the source image and the * full server path to the destination image. * We'll also split the destination image name * so we can insert the thumbnail marker if needed. * */ if ($this->create_thumb === FALSE OR $this->thumb_marker == '') { $this->thumb_marker = ''; } $xp = $this->explode_name($this->dest_image); $filename = $xp['name']; $file_ext = $xp['ext']; $this->full_src_path = $this->source_folder.$this->source_image; $this->full_dst_path = $this->dest_folder.$filename.$this->thumb_marker.$file_ext; /* * Should we maintain image proportions? * * When creating thumbs or copies, the target width/height * might not be in correct proportion with the source * image's width/height. We'll recalculate it here. * */ if ($this->maintain_ratio === TRUE && ($this->width != '' AND $this->height != '')) { $this->image_reproportion(); } /* * Was a width and height specified? * * If the destination width/height was * not submitted we will use the values * from the actual file * */ if ($this->width == '') $this->width = $this->orig_width; if ($this->height == '') $this->height = $this->orig_height; // Set the quality $this->quality = trim(str_replace("%", "", $this->quality)); if ($this->quality == '' OR $this->quality == 0 OR ! is_numeric($this->quality)) $this->quality = 90; // Set the x/y coordinates $this->x_axis = ($this->x_axis == '' OR ! is_numeric($this->x_axis)) ? 0 : $this->x_axis; $this->y_axis = ($this->y_axis == '' OR ! is_numeric($this->y_axis)) ? 0 : $this->y_axis; // Watermark-related Stuff... if ($this->wm_font_color != '') { if (strlen($this->wm_font_color) == 6) { $this->wm_font_color = '#'.$this->wm_font_color; } } if ($this->wm_shadow_color != '') { if (strlen($this->wm_shadow_color) == 6) { $this->wm_shadow_color = '#'.$this->wm_shadow_color; } } if ($this->wm_overlay_path != '') { $this->wm_overlay_path = str_replace("\\", "/", realpath($this->wm_overlay_path)); } if ($this->wm_shadow_color != '') { $this->wm_use_drop_shadow = TRUE; } if ($this->wm_font_path != '') { $this->wm_use_truetype = TRUE; } return TRUE; } // -------------------------------------------------------------------- /** * Image Resize * * This is a wrapper function that chooses the proper * resize function based on the protocol specified * * @access public * @return bool */ function resize() { $protocol = 'image_process_'.$this->image_library; if (preg_match('/gd2$/i', $protocol)) { $protocol = 'image_process_gd'; } return $this->$protocol('resize'); } // -------------------------------------------------------------------- /** * Image Crop * * This is a wrapper function that chooses the proper * cropping function based on the protocol specified * * @access public * @return bool */ function crop() { $protocol = 'image_process_'.$this->image_library; if (preg_match('/gd2$/i', $protocol)) { $protocol = 'image_process_gd'; } return $this->$protocol('crop'); } // -------------------------------------------------------------------- /** * Image Rotate * * This is a wrapper function that chooses the proper * rotation function based on the protocol specified * * @access public * @return bool */ function rotate() { // Allowed rotation values $degs = array(90, 180, 270, 'vrt', 'hor'); if ($this->rotation_angle == '' OR ! in_array($this->rotation_angle, $degs)) { $this->set_error('imglib_rotation_angle_required'); return FALSE; } // Reassign the width and height if ($this->rotation_angle == 90 OR $this->rotation_angle == 270) { $this->width = $this->orig_height; $this->height = $this->orig_width; } else { $this->width = $this->orig_width; $this->height = $this->orig_height; } // Choose resizing function if ($this->image_library == 'imagemagick' OR $this->image_library == 'netpbm') { $protocol = 'image_process_'.$this->image_library; return $this->$protocol('rotate'); } if ($this->rotation_angle == 'hor' OR $this->rotation_angle == 'vrt') { return $this->image_mirror_gd(); } else { return $this->image_rotate_gd(); } } // -------------------------------------------------------------------- /** * Image Process Using GD/GD2 * * This function will resize or crop * * @access public * @param string * @return bool */ function image_process_gd($action = 'resize') { $v2_override = FALSE; // If the target width/height match the source, AND if the new file name is not equal to the old file name // we'll simply make a copy of the original with the new name... assuming dynamic rendering is off. if ($this->dynamic_output === FALSE) { if ($this->orig_width == $this->width AND $this->orig_height == $this->height) { if ($this->source_image != $this->new_image) { if (@copy($this->full_src_path, $this->full_dst_path)) { @chmod($this->full_dst_path, FILE_WRITE_MODE); } } return TRUE; } } // Let's set up our values based on the action if ($action == 'crop') { // Reassign the source width/height if cropping $this->orig_width = $this->width; $this->orig_height = $this->height; // GD 2.0 has a cropping bug so we'll test for it if ($this->gd_version() !== FALSE) { $gd_version = str_replace('0', '', $this->gd_version()); $v2_override = ($gd_version == 2) ? TRUE : FALSE; } } else { // If resizing the x/y axis must be zero $this->x_axis = 0; $this->y_axis = 0; } // Create the image handle if ( ! ($src_img = $this->image_create_gd())) { return FALSE; } // Create The Image // // old conditional which users report cause problems with shared GD libs who report themselves as "2.0 or greater" // it appears that this is no longer the issue that it was in 2004, so we've removed it, retaining it in the comment // below should that ever prove inaccurate. // // if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE) if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor')) { $create = 'imagecreatetruecolor'; $copy = 'imagecopyresampled'; } else { $create = 'imagecreate'; $copy = 'imagecopyresized'; } $dst_img = $create($this->width, $this->height); if ($this->image_type == 3) // png we can actually preserve transparency { imagealphablending($dst_img, FALSE); imagesavealpha($dst_img, TRUE); } $copy($dst_img, $src_img, 0, 0, $this->x_axis, $this->y_axis, $this->width, $this->height, $this->orig_width, $this->orig_height); // Show the image if ($this->dynamic_output == TRUE) { $this->image_display_gd($dst_img); } else { // Or save it if ( ! $this->image_save_gd($dst_img)) { return FALSE; } } // Kill the file handles imagedestroy($dst_img); imagedestroy($src_img); // Set the file to 777 @chmod($this->full_dst_path, FILE_WRITE_MODE); return TRUE; } // -------------------------------------------------------------------- /** * Image Process Using ImageMagick * * This function will resize, crop or rotate * * @access public * @param string * @return bool */ function image_process_imagemagick($action = 'resize') { // Do we have a vaild library path? if ($this->library_path == '') { $this->set_error('imglib_libpath_invalid'); return FALSE; } if ( ! preg_match("/convert$/i", $this->library_path)) { $this->library_path = rtrim($this->library_path, '/').'/'; $this->library_path .= 'convert'; } // Execute the command $cmd = $this->library_path." -quality ".$this->quality; if ($action == 'crop') { $cmd .= " -crop ".$this->width."x".$this->height."+".$this->x_axis."+".$this->y_axis." \"$this->full_src_path\" \"$this->full_dst_path\" 2>&1"; } elseif ($action == 'rotate') { switch ($this->rotation_angle) { case 'hor' : $angle = '-flop'; break; case 'vrt' : $angle = '-flip'; break; default : $angle = '-rotate '.$this->rotation_angle; break; } $cmd .= " ".$angle." \"$this->full_src_path\" \"$this->full_dst_path\" 2>&1"; } else // Resize { $cmd .= " -resize ".$this->width."x".$this->height." \"$this->full_src_path\" \"$this->full_dst_path\" 2>&1"; } $retval = 1; @exec($cmd, $output, $retval); // Did it work? if ($retval > 0) { $this->set_error('imglib_image_process_failed'); return FALSE; } // Set the file to 777 @chmod($this->full_dst_path, FILE_WRITE_MODE); return TRUE; } // -------------------------------------------------------------------- /** * Image Process Using NetPBM * * This function will resize, crop or rotate * * @access public * @param string * @return bool */ function image_process_netpbm($action = 'resize') { if ($this->library_path == '') { $this->set_error('imglib_libpath_invalid'); return FALSE; } // Build the resizing command switch ($this->image_type) { case 1 : $cmd_in = 'giftopnm'; $cmd_out = 'ppmtogif'; break; case 2 : $cmd_in = 'jpegtopnm'; $cmd_out = 'ppmtojpeg'; break; case 3 : $cmd_in = 'pngtopnm'; $cmd_out = 'ppmtopng'; break; } if ($action == 'crop') { $cmd_inner = 'pnmcut -left '.$this->x_axis.' -top '.$this->y_axis.' -width '.$this->width.' -height '.$this->height; } elseif ($action == 'rotate') { switch ($this->rotation_angle) { case 90 : $angle = 'r270'; break; case 180 : $angle = 'r180'; break; case 270 : $angle = 'r90'; break; case 'vrt' : $angle = 'tb'; break; case 'hor' : $angle = 'lr'; break; } $cmd_inner = 'pnmflip -'.$angle.' '; } else // Resize { $cmd_inner = 'pnmscale -xysize '.$this->width.' '.$this->height; } $cmd = $this->library_path.$cmd_in.' '.$this->full_src_path.' | '.$cmd_inner.' | '.$cmd_out.' > '.$this->dest_folder.'netpbm.tmp'; $retval = 1; @exec($cmd, $output, $retval); // Did it work? if ($retval > 0) { $this->set_error('imglib_image_process_failed'); return FALSE; } // With NetPBM we have to create a temporary image. // If you try manipulating the original it fails so // we have to rename the temp file. copy ($this->dest_folder.'netpbm.tmp', $this->full_dst_path); unlink ($this->dest_folder.'netpbm.tmp'); @chmod($this->full_dst_path, FILE_WRITE_MODE); return TRUE; } // -------------------------------------------------------------------- /** * Image Rotate Using GD * * @access public * @return bool */ function image_rotate_gd() { // Create the image handle if ( ! ($src_img = $this->image_create_gd())) { return FALSE; } // Set the background color // This won't work with transparent PNG files so we are // going to have to figure out how to determine the color // of the alpha channel in a future release. $white = imagecolorallocate($src_img, 255, 255, 255); // Rotate it! $dst_img = imagerotate($src_img, $this->rotation_angle, $white); // Save the Image if ($this->dynamic_output == TRUE) { $this->image_display_gd($dst_img); } else { // Or save it if ( ! $this->image_save_gd($dst_img)) { return FALSE; } } // Kill the file handles imagedestroy($dst_img); imagedestroy($src_img); // Set the file to 777 @chmod($this->full_dst_path, FILE_WRITE_MODE); return TRUE; } // -------------------------------------------------------------------- /** * Create Mirror Image using GD * * This function will flip horizontal or vertical * * @access public * @return bool */ function image_mirror_gd() { if ( ! $src_img = $this->image_create_gd()) { return FALSE; } $width = $this->orig_width; $height = $this->orig_height; if ($this->rotation_angle == 'hor') { for ($i = 0; $i < $height; $i++) { $left = 0; $right = $width-1; while ($left < $right) { $cl = imagecolorat($src_img, $left, $i); $cr = imagecolorat($src_img, $right, $i); imagesetpixel($src_img, $left, $i, $cr); imagesetpixel($src_img, $right, $i, $cl); $left++; $right--; } } } else { for ($i = 0; $i < $width; $i++) { $top = 0; $bot = $height-1; while ($top < $bot) { $ct = imagecolorat($src_img, $i, $top); $cb = imagecolorat($src_img, $i, $bot); imagesetpixel($src_img, $i, $top, $cb); imagesetpixel($src_img, $i, $bot, $ct); $top++; $bot--; } } } // Show the image if ($this->dynamic_output == TRUE) { $this->image_display_gd($src_img); } else { // Or save it if ( ! $this->image_save_gd($src_img)) { return FALSE; } } // Kill the file handles imagedestroy($src_img); // Set the file to 777 @chmod($this->full_dst_path, FILE_WRITE_MODE); return TRUE; } // -------------------------------------------------------------------- /** * Image Watermark * * This is a wrapper function that chooses the type * of watermarking based on the specified preference. * * @access public * @param string * @return bool */ function watermark() { if ($this->wm_type == 'overlay') { return $this->overlay_watermark(); } else { return $this->text_watermark(); } } // -------------------------------------------------------------------- /** * Watermark - Graphic Version * * @access public * @return bool */ function overlay_watermark() { if ( ! function_exists('imagecolortransparent')) { $this->set_error('imglib_gd_required'); return FALSE; } // Fetch source image properties $this->get_image_properties(); // Fetch watermark image properties $props = $this->get_image_properties($this->wm_overlay_path, TRUE); $wm_img_type = $props['image_type']; $wm_width = $props['width']; $wm_height = $props['height']; // Create two image resources $wm_img = $this->image_create_gd($this->wm_overlay_path, $wm_img_type); $src_img = $this->image_create_gd($this->full_src_path); // Reverse the offset if necessary // When the image is positioned at the bottom // we don't want the vertical offset to push it // further down. We want the reverse, so we'll // invert the offset. Same with the horizontal // offset when the image is at the right $this->wm_vrt_alignment = strtoupper(substr($this->wm_vrt_alignment, 0, 1)); $this->wm_hor_alignment = strtoupper(substr($this->wm_hor_alignment, 0, 1)); if ($this->wm_vrt_alignment == 'B') $this->wm_vrt_offset = $this->wm_vrt_offset * -1; if ($this->wm_hor_alignment == 'R') $this->wm_hor_offset = $this->wm_hor_offset * -1; // Set the base x and y axis values $x_axis = $this->wm_hor_offset + $this->wm_padding; $y_axis = $this->wm_vrt_offset + $this->wm_padding; // Set the vertical position switch ($this->wm_vrt_alignment) { case 'T': break; case 'M': $y_axis += ($this->orig_height / 2) - ($wm_height / 2); break; case 'B': $y_axis += $this->orig_height - $wm_height; break; } // Set the horizontal position switch ($this->wm_hor_alignment) { case 'L': break; case 'C': $x_axis += ($this->orig_width / 2) - ($wm_width / 2); break; case 'R': $x_axis += $this->orig_width - $wm_width; break; } // Build the finalized image if ($wm_img_type == 3 AND function_exists('imagealphablending')) { @imagealphablending($src_img, TRUE); } // Set RGB values for text and shadow $rgba = imagecolorat($wm_img, $this->wm_x_transp, $this->wm_y_transp); $alpha = ($rgba & 0x7F000000) >> 24; // make a best guess as to whether we're dealing with an image with alpha transparency or no/binary transparency if ($alpha > 0) { // copy the image directly, the image's alpha transparency being the sole determinant of blending imagecopy($src_img, $wm_img, $x_axis, $y_axis, 0, 0, $wm_width, $wm_height); } else { // set our RGB value from above to be transparent and merge the images with the specified opacity imagecolortransparent($wm_img, imagecolorat($wm_img, $this->wm_x_transp, $this->wm_y_transp)); imagecopymerge($src_img, $wm_img, $x_axis, $y_axis, 0, 0, $wm_width, $wm_height, $this->wm_opacity); } // Output the image if ($this->dynamic_output == TRUE) { $this->image_display_gd($src_img); } else { if ( ! $this->image_save_gd($src_img)) { return FALSE; } } imagedestroy($src_img); imagedestroy($wm_img); return TRUE; } // -------------------------------------------------------------------- /** * Watermark - Text Version * * @access public * @return bool */ function text_watermark() { if ( ! ($src_img = $this->image_create_gd())) { return FALSE; } if ($this->wm_use_truetype == TRUE AND ! file_exists($this->wm_font_path)) { $this->set_error('imglib_missing_font'); return FALSE; } // Fetch source image properties $this->get_image_properties(); // Set RGB values for text and shadow $this->wm_font_color = str_replace('#', '', $this->wm_font_color); $this->wm_shadow_color = str_replace('#', '', $this->wm_shadow_color); $R1 = hexdec(substr($this->wm_font_color, 0, 2)); $G1 = hexdec(substr($this->wm_font_color, 2, 2)); $B1 = hexdec(substr($this->wm_font_color, 4, 2)); $R2 = hexdec(substr($this->wm_shadow_color, 0, 2)); $G2 = hexdec(substr($this->wm_shadow_color, 2, 2)); $B2 = hexdec(substr($this->wm_shadow_color, 4, 2)); $txt_color = imagecolorclosest($src_img, $R1, $G1, $B1); $drp_color = imagecolorclosest($src_img, $R2, $G2, $B2); // Reverse the vertical offset // When the image is positioned at the bottom // we don't want the vertical offset to push it // further down. We want the reverse, so we'll // invert the offset. Note: The horizontal // offset flips itself automatically if ($this->wm_vrt_alignment == 'B') $this->wm_vrt_offset = $this->wm_vrt_offset * -1; if ($this->wm_hor_alignment == 'R') $this->wm_hor_offset = $this->wm_hor_offset * -1; // Set font width and height // These are calculated differently depending on // whether we are using the true type font or not if ($this->wm_use_truetype == TRUE) { if ($this->wm_font_size == '') $this->wm_font_size = '17'; $fontwidth = $this->wm_font_size-($this->wm_font_size/4); $fontheight = $this->wm_font_size; $this->wm_vrt_offset += $this->wm_font_size; } else { $fontwidth = imagefontwidth($this->wm_font_size); $fontheight = imagefontheight($this->wm_font_size); } // Set base X and Y axis values $x_axis = $this->wm_hor_offset + $this->wm_padding; $y_axis = $this->wm_vrt_offset + $this->wm_padding; // Set verticle alignment if ($this->wm_use_drop_shadow == FALSE) $this->wm_shadow_distance = 0; $this->wm_vrt_alignment = strtoupper(substr($this->wm_vrt_alignment, 0, 1)); $this->wm_hor_alignment = strtoupper(substr($this->wm_hor_alignment, 0, 1)); switch ($this->wm_vrt_alignment) { case "T" : break; case "M": $y_axis += ($this->orig_height/2)+($fontheight/2); break; case "B": $y_axis += ($this->orig_height - $fontheight - $this->wm_shadow_distance - ($fontheight/2)); break; } $x_shad = $x_axis + $this->wm_shadow_distance; $y_shad = $y_axis + $this->wm_shadow_distance; // Set horizontal alignment switch ($this->wm_hor_alignment) { case "L": break; case "R": if ($this->wm_use_drop_shadow) $x_shad += ($this->orig_width - $fontwidth*strlen($this->wm_text)); $x_axis += ($this->orig_width - $fontwidth*strlen($this->wm_text)); break; case "C": if ($this->wm_use_drop_shadow) $x_shad += floor(($this->orig_width - $fontwidth*strlen($this->wm_text))/2); $x_axis += floor(($this->orig_width -$fontwidth*strlen($this->wm_text))/2); break; } // Add the text to the source image if ($this->wm_use_truetype) { if ($this->wm_use_drop_shadow) imagettftext($src_img, $this->wm_font_size, 0, $x_shad, $y_shad, $drp_color, $this->wm_font_path, $this->wm_text); imagettftext($src_img, $this->wm_font_size, 0, $x_axis, $y_axis, $txt_color, $this->wm_font_path, $this->wm_text); } else { if ($this->wm_use_drop_shadow) imagestring($src_img, $this->wm_font_size, $x_shad, $y_shad, $this->wm_text, $drp_color); imagestring($src_img, $this->wm_font_size, $x_axis, $y_axis, $this->wm_text, $txt_color); } // Output the final image if ($this->dynamic_output == TRUE) { $this->image_display_gd($src_img); } else { $this->image_save_gd($src_img); } imagedestroy($src_img); return TRUE; } // -------------------------------------------------------------------- /** * Create Image - GD * * This simply creates an image resource handle * based on the type of image being processed * * @access public * @param string * @return resource */ function image_create_gd($path = '', $image_type = '') { if ($path == '') $path = $this->full_src_path; if ($image_type == '') $image_type = $this->image_type; switch ($image_type) { case 1 : if ( ! function_exists('imagecreatefromgif')) { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_gif_not_supported')); return FALSE; } return imagecreatefromgif($path); break; case 2 : if ( ! function_exists('imagecreatefromjpeg')) { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_jpg_not_supported')); return FALSE; } return imagecreatefromjpeg($path); break; case 3 : if ( ! function_exists('imagecreatefrompng')) { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported')); return FALSE; } return imagecreatefrompng($path); break; } $this->set_error(array('imglib_unsupported_imagecreate')); return FALSE; } // -------------------------------------------------------------------- /** * Write image file to disk - GD * * Takes an image resource as input and writes the file * to the specified destination * * @access public * @param resource * @return bool */ function image_save_gd($resource) { switch ($this->image_type) { case 1 : if ( ! function_exists('imagegif')) { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_gif_not_supported')); return FALSE; } if ( ! @imagegif($resource, $this->full_dst_path)) { $this->set_error('imglib_save_failed'); return FALSE; } break; case 2 : if ( ! function_exists('imagejpeg')) { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_jpg_not_supported')); return FALSE; } if ( ! @imagejpeg($resource, $this->full_dst_path, $this->quality)) { $this->set_error('imglib_save_failed'); return FALSE; } break; case 3 : if ( ! function_exists('imagepng')) { $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported')); return FALSE; } if ( ! @imagepng($resource, $this->full_dst_path)) { $this->set_error('imglib_save_failed'); return FALSE; } break; default : $this->set_error(array('imglib_unsupported_imagecreate')); return FALSE; break; } return TRUE; } // -------------------------------------------------------------------- /** * Dynamically outputs an image * * @access public * @param resource * @return void */ function image_display_gd($resource) { header("Content-Disposition: filename={$this->source_image};"); header("Content-Type: {$this->mime_type}"); header('Content-Transfer-Encoding: binary'); header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT'); switch ($this->image_type) { case 1 : imagegif($resource); break; case 2 : imagejpeg($resource, '', $this->quality); break; case 3 : imagepng($resource); break; default : echo 'Unable to display the image'; break; } } // -------------------------------------------------------------------- /** * Re-proportion Image Width/Height * * When creating thumbs, the desired width/height * can end up warping the image due to an incorrect * ratio between the full-sized image and the thumb. * * This function lets us re-proportion the width/height * if users choose to maintain the aspect ratio when resizing. * * @access public * @return void */ function image_reproportion() { if ( ! is_numeric($this->width) OR ! is_numeric($this->height) OR $this->width == 0 OR $this->height == 0) return; if ( ! is_numeric($this->orig_width) OR ! is_numeric($this->orig_height) OR $this->orig_width == 0 OR $this->orig_height == 0) return; $new_width = ceil($this->orig_width*$this->height/$this->orig_height); $new_height = ceil($this->width*$this->orig_height/$this->orig_width); $ratio = (($this->orig_height/$this->orig_width) - ($this->height/$this->width)); if ($this->master_dim != 'width' AND $this->master_dim != 'height') { $this->master_dim = ($ratio < 0) ? 'width' : 'height'; } if (($this->width != $new_width) AND ($this->height != $new_height)) { if ($this->master_dim == 'height') { $this->width = $new_width; } else { $this->height = $new_height; } } } // -------------------------------------------------------------------- /** * Get image properties * * A helper function that gets info about the file * * @access public * @param string * @return mixed */ function get_image_properties($path = '', $return = FALSE) { // For now we require GD but we should // find a way to determine this using IM or NetPBM if ($path == '') $path = $this->full_src_path; if ( ! file_exists($path)) { $this->set_error('imglib_invalid_path'); return FALSE; } $vals = @getimagesize($path); $types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png'); $mime = (isset($types[$vals['2']])) ? 'image/'.$types[$vals['2']] : 'image/jpg'; if ($return == TRUE) { $v['width'] = $vals['0']; $v['height'] = $vals['1']; $v['image_type'] = $vals['2']; $v['size_str'] = $vals['3']; $v['mime_type'] = $mime; return $v; } $this->orig_width = $vals['0']; $this->orig_height = $vals['1']; $this->image_type = $vals['2']; $this->size_str = $vals['3']; $this->mime_type = $mime; return TRUE; } // -------------------------------------------------------------------- /** * Size calculator * * This function takes a known width x height and * recalculates it to a new size. Only one * new variable needs to be known * * $props = array( * 'width' => $width, * 'height' => $height, * 'new_width' => 40, * 'new_height' => '' * ); * * @access public * @param array * @return array */ function size_calculator($vals) { if ( ! is_array($vals)) { return; } $allowed = array('new_width', 'new_height', 'width', 'height'); foreach ($allowed as $item) { if ( ! isset($vals[$item]) OR $vals[$item] == '') $vals[$item] = 0; } if ($vals['width'] == 0 OR $vals['height'] == 0) { return $vals; } if ($vals['new_width'] == 0) { $vals['new_width'] = ceil($vals['width']*$vals['new_height']/$vals['height']); } elseif ($vals['new_height'] == 0) { $vals['new_height'] = ceil($vals['new_width']*$vals['height']/$vals['width']); } return $vals; } // -------------------------------------------------------------------- /** * Explode source_image * * This is a helper function that extracts the extension * from the source_image. This function lets us deal with * source_images with multiple periods, like: my.cool.jpg * It returns an associative array with two elements: * $array['ext'] = '.jpg'; * $array['name'] = 'my.cool'; * * @access public * @param array * @return array */ function explode_name($source_image) { $ext = strrchr($source_image, '.'); $name = ($ext === FALSE) ? $source_image : substr($source_image, 0, -strlen($ext)); return array('ext' => $ext, 'name' => $name); } // -------------------------------------------------------------------- /** * Is GD Installed? * * @access public * @return bool */ function gd_loaded() { if ( ! extension_loaded('gd')) { if ( ! dl('gd.so')) { return FALSE; } } return TRUE; } // -------------------------------------------------------------------- /** * Get GD version * * @access public * @return mixed */ function gd_version() { if (function_exists('gd_info')) { $gd_version = @gd_info(); $gd_version = preg_replace("/\D/", "", $gd_version['GD Version']); return $gd_version; } return FALSE; } // -------------------------------------------------------------------- /** * Set error message * * @access public * @param string * @return void */ function set_error($msg) { $CI =& get_instance(); $CI->lang->load('imglib'); if (is_array($msg)) { foreach ($msg as $val) { $msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val); $this->error_msg[] = $msg; log_message('error', $msg); } } else { $msg = ($CI->lang->line($msg) == FALSE) ? $msg : $CI->lang->line($msg); $this->error_msg[] = $msg; log_message('error', $msg); } } // -------------------------------------------------------------------- /** * Show error messages * * @access public * @param string * @return string */ function display_errors($open = '<p>', $close = '</p>') { $str = ''; foreach ($this->error_msg as $val) { $str .= $open.$val.$close; } return $str; } } // END Image_lib Class /* End of file Image_lib.php */ /* Location: ./system/libraries/Image_lib.php */
281677160/openwrt-package
84,803
luci-app-ssr-plus/luci-app-ssr-plus/po/templates/ssr-plus.pot
msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:353 msgid "" "\"1-3\" is for segmentation at TCP layer, applying to the beginning 1 to 3 " "data writes by the client. \"tlshello\" is for TLS client hello packet " "fragmentation." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:103 msgid "0" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:86 msgid "1 Thread" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:93 msgid "128 Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1344 msgid "16" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:90 msgid "16 Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:87 msgid "2 Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:91 msgid "32 Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1208 msgid "360" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:256 msgid "360 Security DNS (China Telecom) (101.226.4.6)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:257 msgid "360 Security DNS (China Unicom) (123.125.81.6)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:88 msgid "4 Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:92 msgid "64 Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1331 msgid "8" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:89 msgid "8 Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:379 msgid "<font style='color:red'>" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:919 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1223 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1250 msgid "<font><b>" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:30 msgid "<h3>Support SS/SSR/V2RAY/XRAY/TROJAN/NAIVEPROXY/SOCKS5/TUN etc.</h3>" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:151 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:177 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:211 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1324 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1337 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1350 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:174 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:200 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:235 msgid "<ul><li>" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:15 msgid "Access Control" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:169 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:192 msgid "AdGuard DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:16 msgid "Advanced Settings" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:203 msgid "Advertising Data" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:254 msgid "AliYun Public DNS (223.5.5.5)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:221 msgid "Alias" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:306 msgid "Alias(optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:105 msgid "All Ports" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:39 msgid "Allow all except listed" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:38 msgid "Allow listed only" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:150 msgid "Allow subscribe Insecure nodes By default" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:774 msgid "AlterId" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:133 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:164 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:135 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:156 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:187 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:221 msgid "Anti-pollution DNS Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:116 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:197 msgid "Anti-pollution DNS Server For Shunt Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:234 msgid "Apple Domains DNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:189 msgid "Apple Domains Data" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:229 msgid "Apple Domains Update url" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:225 msgid "Apple domains optimization" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:249 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:255 msgid "Apply" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:32 msgid "Applying configuration changes… %ds" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:133 msgid "Are you sure you want to restore the client to default settings?" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:266 msgid "Auto Switch" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:85 msgid "Auto Threads" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:73 msgid "Auto Update" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:75 msgid "Auto Update Server subscription, GFW list and CHN route" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:708 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1384 msgid "BBR" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/log.lua:25 msgid "Backup and Restore" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/log.lua:25 msgid "Backup or Restore Client and Server Configurations." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:174 msgid "Baidu Connectivity" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:255 msgid "Baidu Public DNS (180.76.76.76)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:233 msgid "Base64 sstr failed." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1034 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1044 msgid "BitTorrent (uTP)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:100 msgid "Black Domain List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:449 msgid "Bloom Filter" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:84 msgid "Bypass Domain List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:31 msgid "CLOSE WIN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:258 msgid "CNNIC SDNS (1.2.4.8)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:709 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1385 msgid "CUBIC" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:832 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1040 msgid "Camouflage Type" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1300 msgid "Certificate fingerprint" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:21 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:27 msgid "Check Connect" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm:17 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm:23 msgid "Check Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:209 msgid "Check Server Port" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:68 msgid "Check Try Count" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:63 msgid "Check timout(second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:6 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm:6 msgid "Check..." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:183 msgid "China IP Data" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:241 msgid "ChinaDNS-NG query protocol" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:217 msgid "ChinaDNS-NG shunt query protocol" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:80 msgid "Chnroute Update url" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:81 msgid "Clang.CN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:82 msgid "Clang.CN.CIDR" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/log.htm:35 msgid "Clear logs" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:155 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:178 msgid "Click here to view or manage the DNS list file" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:382 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:921 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1225 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1252 msgid "Click to the page" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:139 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:162 msgid "Cloudflare DNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:127 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:208 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:146 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:232 msgid "Cloudflare DNS (1.1.1.1)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:170 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:193 msgid "Cloudflare DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:20 msgid "Collecting data..." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:919 msgid "Configure XHTTP Extra Settings (JSON format), see:" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1093 msgid "Congestion" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:706 msgid "Congestion control algorithm" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:18 msgid "Connect Error" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:16 msgid "Connect OK" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:103 msgid "Connection Timeout" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1236 msgid "" "Controls the policy used when performing DNS queries for ECH configuration." msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:78 msgid "Copy SSR to clipboard successfully." msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:2 msgid "Create Backup File" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1420 msgid "Create upload file error." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1440 msgid "Current Certificate Path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:475 msgid "Custom" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:173 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:196 msgid "" "Custom DNS Server (support: IP:Port or tls://IP:Port or https://IP/dns-query " "and other format)." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:141 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:164 msgid "Custom DNS Server for MosDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:130 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:212 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:152 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:236 msgid "Custom DNS Server format as IP:PORT (default: 8.8.4.4:53)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:264 msgid "Custom DNS Server format as IP:PORT (default: disabled)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:479 msgid "Custom Plugin Path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:107 msgid "Custom Ports" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:94 msgid "Customize Netflix IP Url" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:4 msgid "DL Backup" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:124 msgid "DNS Anti-pollution" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:97 msgid "DNS Query Mode For Shunt Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:253 msgid "DNSPod Public DNS (119.29.29.29)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1036 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1046 msgid "DTLS 1.2" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1273 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1286 msgid "Default" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1351 msgid "Default reject rejects traffic." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:605 msgid "Default value 0 indicatesno heartbeat." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1325 msgid "" "Default: disable. When entering a negative number, such as -1, The Mux " "module will not be used to carry TCP traffic." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1338 msgid "" "Default:16. When entering a negative number, such as -1, The Mux module will " "not be used to carry UDP traffic, Use original UDP transmission method of " "proxy protocol." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:175 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:198 msgid "Defines the upstreams logic mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:178 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:201 msgid "" "Defines the upstreams logic mode, possible values: load_balance, parallel, " "fastest_addr (default: load_balance)." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:420 msgid "Delay (ms)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:168 msgid "Delete All Subscribe Servers" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:116 msgid "Deny Domain List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:54 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:62 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:70 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:37 msgid "Disable" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:249 msgid "Disable ChinaDNS-NG" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:143 msgid "Disable IPv6 In MosDNS Query Mode (Shunt Mode)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:166 msgid "Disable IPv6 in MOSDNS query mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:188 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:212 msgid "Disable IPv6 query mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:568 msgid "Disable QUIC path MTU discovery" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:750 msgid "Disable SNI" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:631 msgid "Disable TCP No_delay" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:149 msgid "Dnsproxy Parse List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:18 msgid "Do Reset" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:131 msgid "Do you want to restore the client to default settings?" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:221 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:245 msgid "DoT upstream (Need use wolfssl version)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:407 msgid "Domain Strategy" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:248 msgid "Domestic DNS Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1070 msgid "Downlink Capacity(Default:Mbps)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:761 msgid "Dual-stack Listening Socket" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1221 msgid "ECH Config" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1235 msgid "ECH Query Policy" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:869 msgid "Early Data Header Name" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:253 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:69 msgid "Edit ShadowSocksR Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:263 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:396 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:82 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:101 msgid "Enable" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:755 msgid "Enable 0-RTT QUIC handshake" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:395 msgid "Enable Authentication" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:54 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1454 msgid "Enable Auto Switch" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1216 msgid "Enable ECH(optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:547 msgid "Enable Lazy Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1243 msgid "Enable ML-DSA-65(optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1369 msgid "" "Enable Multipath TCP, need to be enabled in both server and client " "configuration." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1305 msgid "Enable Mux.Cool" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:86 msgid "Enable Netflix Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:542 msgid "Enable Obfuscation" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:455 msgid "Enable Plugin" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:514 msgid "Enable Port Hopping" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:84 msgid "Enable Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:525 msgid "Enable Transport Protocol Settings" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:617 msgid "Enable V2 protocol." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:616 msgid "Enable V3 protocol." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:240 msgid "Enable adblock" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:444 msgid "Enable the SUoT protocol, requires server support." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:912 msgid "Enable this option to configure XHTTP Extra (JSON format)." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1098 msgid "Enabled Kernel virtual NIC TUN(optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:327 msgid "Enabled Mixed" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:626 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1363 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1446 msgid "Enabling TCP Fast Open Requires Server Support." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:423 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:430 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:658 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:669 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:796 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:118 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:125 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:122 msgid "Encrypt Method" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:108 msgid "Enter Custom Ports" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:78 msgid "Every Day" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:83 msgid "Every Friday" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:79 msgid "Every Monday" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:84 msgid "Every Saturday" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:85 msgid "Every Sunday" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:82 msgid "Every Thursday" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:80 msgid "Every Tuesday" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:81 msgid "Every Wednesday" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:275 msgid "Expecting: %s" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:78 msgid "External Proxy Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:135 msgid "Filter Words splited by /" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1200 msgid "Finger Print" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1173 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1186 msgid "Flow" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:225 msgid "" "For Apple domains equipped with Chinese mainland CDN, always responsive to " "Chinese CDN IP addresses" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:380 msgid "For specific usage, see:" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:520 msgid "" "Format as 10000:20000 or 10000-20000 Multiple groups are separated by commas " "(,)." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:80 msgid "Forward Netflix Proxy through Main Proxy" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:350 msgid "Fragment" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:366 msgid "Fragment Interval" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:362 msgid "Fragment Length" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:353 msgid "Fragment Packets" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:366 msgid "Fragmentation interval (ms)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:362 msgid "Fragmented packet length (byte)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:178 msgid "GFW List Data" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:98 msgid "GFW List Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:68 msgid "Game Mode Host List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:115 msgid "Game Mode UDP Relay" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:61 msgid "Game Mode UDP Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:726 msgid "Garbage collection interval(second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:732 msgid "Garbage collection lifetime(second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:107 msgid "Global Client" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:100 msgid "Global Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:259 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:133 msgid "Global SOCKS5 Proxy Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:81 msgid "Global Setting" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:170 msgid "Google Connectivity" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:165 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:188 msgid "Google DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:134 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:157 msgid "Google Public DNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:117 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:198 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:136 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:222 msgid "Google Public DNS (8.8.4.4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:118 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:199 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:137 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:223 msgid "Google Public DNS (8.8.8.8)" msgstr "" #: applications/luci-app-ssr-plus/root/usr/share/rpcd/acl.d/luci-app-ssr-plus.json:3 msgid "Grant UCI access for luci-app-ssr-plus" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:975 msgid "Gun" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:994 msgid "H2 Read Idle Timeout" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:989 msgid "H2/gRPC Health Check" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:366 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:835 msgid "HTTP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:839 msgid "HTTP Host" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:844 msgid "HTTP Path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:957 msgid "HTTP/2 Host" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:962 msgid "HTTP/2 Path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1029 msgid "Header" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1006 msgid "Health Check Timeout" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:714 msgid "Heartbeat interval(second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:878 msgid "Httpupgrade Host" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:883 msgid "Httpupgrade Path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:289 msgid "Hysteria2" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:563 msgid "Hysterir QUIC parameters" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:99 msgid "IP Route Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:424 msgid "IP Type" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:234 msgid "If empty, Not change Apple domains parsing DNS (Default is empty)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1223 msgid "" "If it is not empty, it indicates that the Client has enabled Encrypted " "Client, see:" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:762 msgid "If this option is not set, the socket behavior is platform dependent." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1297 msgid "" "If true, allowss insecure connection at TLS client, e.g., TLS server uses " "unverifiable certificates." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1404 msgid "If you have a self-signed certificate,please check the box" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:819 msgid "Import" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:177 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:320 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:352 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:448 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:535 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:665 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:810 msgid "Import configuration information successfully." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:982 msgid "Initial Windows Size" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:17 msgid "Interface" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:16 msgid "Interface control" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:948 msgid "Invalid JSON format" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:813 msgid "Invalid format." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:153 msgid "KcpTun" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1464 msgid "KcpTun Enable" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1481 msgid "KcpTun Param" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1476 msgid "KcpTun Password" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1470 msgid "KcpTun Port" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:150 msgid "KcpTun Version" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:36 msgid "LAN Access Control" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:52 msgid "LAN Bypassed Host List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:60 msgid "LAN Force Proxy Host List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:42 msgid "LAN Host List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:34 msgid "LAN IP AC" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:121 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:202 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:140 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:226 msgid "Level 3 Public DNS (209.244.0.3)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:122 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:203 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:141 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:227 msgid "Level 3 Public DNS (209.244.0.4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:123 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:204 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:142 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:228 msgid "Level 3 Public DNS (4.2.2.1)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:124 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:205 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:143 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:229 msgid "Level 3 Public DNS (4.2.2.2)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:125 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:206 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:144 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:230 msgid "Level 3 Public DNS (4.2.2.3)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:126 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:207 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:145 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:231 msgid "Level 3 Public DNS (4.2.2.4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:136 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:159 msgid "Level 3 Public DNS-1 (209.244.0.3-4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:137 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:160 msgid "Level 3 Public DNS-2 (4.2.2.1-2)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:138 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:161 msgid "Level 3 Public DNS-3 (4.2.2.3-4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:370 msgid "Limit the maximum number of splits." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:22 msgid "Listen only on the given interface or, if unspecified, on all" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:340 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1458 msgid "Local Port" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:141 msgid "Local Servers" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1104 msgid "Local addresses" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:23 msgid "Log" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:76 msgid "Loukky/gfwlist-by-loukky" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:75 msgid "Loyalsoldier/v2ray-rules-dat" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1248 msgid "ML-DSA-65 Public key" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1369 msgid "MPTCP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1050 msgid "MTU" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:53 msgid "Main Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:862 msgid "Max Early Data" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:370 msgid "Max Split" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:767 msgid "Maximum packet size the socks5 server can receive from external" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1339 msgid "" "Min value is 1, Max value is 1024. When omitted or set to 0, Will same path " "as TCP traffic." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1326 msgid "" "Min value is 1, Max value is 128. When omitted or set to 0, it equals 8." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:327 msgid "Mixed as an alias of socks, default:Enabled." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:26 msgid "Move down" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:23 msgid "Move up" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:213 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:237 msgid "Muitiple DNS server can saperate with ','" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:976 msgid "Multi" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:84 msgid "Multi Threads Option" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1305 msgid "Mux" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:245 msgid "NEO DEV HOST Full" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:244 msgid "NEO DEV HOST Lite" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:10 msgid "NOT RUNNING" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:286 msgid "NaiveProxy" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:252 msgid "Nanjing Xinfeng 114DNS (114.114.114.114)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:132 msgid "Netflix Domain List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:196 msgid "Netflix IP Data" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:91 msgid "Netflix IP Only" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:69 msgid "Netflix Node" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:92 msgid "Netflix and AWS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:301 msgid "Network Tunnel" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:308 msgid "Network interface to use" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:710 msgid "New Reno" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:171 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:175 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:211 msgid "No Check" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:21 msgid "No new data!" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1436 msgid "No specify upload file." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:374 msgid "Noise" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:462 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:834 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1020 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1032 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1042 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:218 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:223 msgid "None" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:112 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:120 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:129 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:138 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:146 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:158 msgid "Not Running" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:28 msgid "Not exist" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/log.lua:27 msgid "" "Note: Restoring configurations across different versions may cause " "compatibility issues." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:461 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:497 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:139 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:133 msgid "Obfs" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:504 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:146 msgid "Obfs param (optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1089 msgid "Obfuscate password (optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:557 msgid "Obfuscation Password" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:552 msgid "Obfuscation Type" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:106 msgid "Only Common Ports" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:316 msgid "Only when Socks5 Auth Mode is password valid, Mandatory." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:321 msgid "Only when Socks5 Auth Mode is password valid, Not mandatory." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:135 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:158 msgid "OpenDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:120 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:201 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:139 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:225 msgid "OpenDNS (208.67.220.220)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:119 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:200 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:138 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:224 msgid "OpenDNS (208.67.222.222)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:101 msgid "Oversea Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:147 msgid "Oversea Mode DNS-1 (114.114.114.114)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:148 msgid "Oversea Mode DNS-2 (114.114.115.115)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:416 msgid "Packet" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:409 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:114 msgid "Password" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:90 msgid "Paste sharing link here" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1119 msgid "Peer public key" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:14 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:23 msgid "Perform reset" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1012 msgid "Permit Without Stream" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:243 msgid "Ping Latency" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1443 msgid "Please confirm the current certificate path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:5 msgid "Please fill in reset" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:483 msgid "Plugin Opts" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:536 msgid "Port Hopping Interval(Unit:Second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:519 msgid "Port hopping range" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1123 msgid "Pre-shared key" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1114 msgid "Private key" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:487 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:132 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:128 msgid "Protocol" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:494 msgid "Protocol param (optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:104 msgid "Proxy Ports" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1160 msgid "Public key" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1025 msgid "QUIC Key" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1018 msgid "QUIC Security" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:586 msgid "QUIC initConnReceiveWindow" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:574 msgid "QUIC initStreamReceiveWindow" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:592 msgid "QUIC maxConnReceiveWindow" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:598 msgid "QUIC maxIdleTimeout(Unit:second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:580 msgid "QUIC maxStreamReceiveWindow" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:168 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:191 msgid "Quad9 DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1155 msgid "REALITY" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:11 msgid "RST Backup" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:7 msgid "RUNNING" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1077 msgid "Read Buffer Size" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:5 msgid "Really reset all changes?" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:253 msgid "Reapply" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:181 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:186 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:192 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:199 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:206 msgid "Records" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:315 msgid "Redirect traffic to this network interface" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:29 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:35 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:11 msgid "Refresh Data" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:24 msgid "Refresh Error!" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:18 msgid "Refresh OK!" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:6 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:5 msgid "Refresh..." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1386 msgid "Reno" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1109 msgid "Reserved bytes(optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:17 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:18 msgid "Reset complete" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:251 msgid "Reset to defaults" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:113 msgid "Resolve Dns Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:163 msgid "Restart Service" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:162 msgid "Restart ShadowSocksR Plus+" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:9 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:24 msgid "Restore Backup File" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:16 msgid "Restore to default configuration" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:110 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:118 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:127 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:136 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:144 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:156 msgid "Running" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:97 msgid "Running Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:255 msgid "SS URL base64 sstr format not recognized." msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:13 msgid "SSR Client" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:17 msgid "SSR Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:269 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:63 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:71 msgid "Same as Global Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:139 msgid "Save Words splited by /" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:149 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:172 msgid "Select DNS parse Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:319 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:109 msgid "Selection ShadowSocks Node Use Version." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1396 msgid "Self-signed Certificate" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:268 msgid "Server" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:369 msgid "Server Address" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:170 msgid "Server Count" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:272 msgid "Server Node Type" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:382 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:96 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:112 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:226 msgid "Server Port" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:88 msgid "Server Setting" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:86 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:107 msgid "Server Type" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:47 msgid "Server failsafe auto swith and custom update settings" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:14 msgid "Servers Nodes" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:67 msgid "Servers subscription and manage" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1149 msgid "Session Ticket" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:158 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:181 msgid "Set Single DNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:295 msgid "Shadow-TLS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:643 msgid "Shadow-TLS ChainPoxy type" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:280 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:361 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:89 msgid "ShadowSocks" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:318 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:108 msgid "ShadowSocks Node Use Version" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:326 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:51 msgid "ShadowSocks-libev Version" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:323 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:646 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:48 msgid "ShadowSocks-rust Version" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:10 msgid "ShadowSocksR Plus+" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:30 msgid "ShadowSocksR Plus+ Settings" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:654 msgid "Shadowsocks password" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:277 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:92 msgid "ShadowsocksR" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1164 msgid "Short ID" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:231 msgid "Socket Connected" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:365 msgid "Socks" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:804 msgid "Socks Version" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:302 msgid "Socks protocol auth methods, default:noauth." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:298 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:87 msgid "Socks5" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:302 msgid "Socks5 Auth Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:321 msgid "Socks5 Password" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:316 msgid "Socks5 User" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:151 msgid "Specifically for edit dnsproxy DNS parse files." msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:18 msgid "Status" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:155 msgid "Subscribe Default Auto-Switch" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:133 msgid "Subscribe Filter Words" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:137 msgid "Subscribe Save Words" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:130 msgid "Subscribe URL" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:157 msgid "Subscribe new add server default Auto-Switch on" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:152 msgid "Subscribe nodes allows insecure connection as TLS client (insecure)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:249 msgid "Support AdGuardHome and DNSMASQ format list" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:58 msgid "Switch check cycly(second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:626 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1363 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1446 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:149 msgid "TCP Fast Open" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:350 msgid "" "TCP fragments, which can deceive the censorship system in some cases, such " "as bypassing SNI blacklists." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:219 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:243 msgid "TCP upstream" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1136 msgid "TLS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:621 msgid "TLS 1.3 Strict mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1271 msgid "TLS ALPN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1263 msgid "TLS Host" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1057 msgid "TTI" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:292 msgid "TUIC" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1284 msgid "TUIC ALPN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:686 msgid "TUIC Server IP Address" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:693 msgid "TUIC User Password" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:679 msgid "TUIC User UUID" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:744 msgid "TUIC receive window" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:738 msgid "TUIC send window" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:166 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:189 msgid "TWNIC-101 DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1250 msgid "" "The client has not configured mldsa65Verify, but it will not perform the " "\"additional verification\" step and can still connect normally, see:" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:10 msgid "The content entered is incorrect!" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:604 msgid "The keep-alive period.(Unit:second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:160 msgid "Through proxy update" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:162 msgid "Through proxy update list, Not Recommended" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:720 msgid "Timeout for establishing a connection to server(second)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:153 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:176 msgid "Tips: Dnsproxy DNS Parse List Path:" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:379 msgid "To send noise packets, select \"Noise\" in Xray Settings." msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:18 msgid "Total Records:" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:813 msgid "Transport" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:530 msgid "Transport Protocol" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:283 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:360 msgid "Trojan" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:400 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:216 msgid "Type" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:532 msgid "UDP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:374 msgid "" "UDP noise, Under some circumstances it can bypass some UDP based protocol " "restrictions." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:443 msgid "UDP over TCP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:699 msgid "UDP relay mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:220 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:244 msgid "UDP upstream" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:218 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:242 msgid "UDP/TCP upstream" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:30 msgid "UL Restore" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:80 msgid "Unable to copy SSR to clipboard." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:25 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:35 msgid "Unknown" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:164 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:16 msgid "Update All Subscribe Servers" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:98 msgid "Update Interval (min)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:141 msgid "Update Subscribe List" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:77 msgid "Update Time (Every Week)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:143 msgid "Update subscribe url list first" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:90 msgid "Update time (every day)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1063 msgid "Uplink Capacity(Default:Mbps)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1406 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/certupload.htm:3 msgid "Upload" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:111 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:130 msgid "Use ChinaDNS-NG query and cache" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:159 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:182 msgid "Use DNS List File" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:250 msgid "Use DNS from WAN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:251 msgid "Use DNS from WAN and 114DNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:99 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:118 msgid "Use DNS2SOCKS query and cache" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:102 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:121 msgid "Use DNS2SOCKS-RUST query and cache" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:115 msgid "Use DNS2TCP query" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:108 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:127 msgid "Use DNSPROXY query and cache" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:132 msgid "Use Local DNS Service listen port 5335" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:124 msgid "Use MOSDNS query (Not Support Oversea Mode)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:105 msgid "Use MosDNS query" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:92 msgid "User cancelled." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:188 msgid "User-Agent" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:210 msgid "Userinfo format error." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:402 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:110 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:117 msgid "Username" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:509 msgid "Users Authentication" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:304 msgid "Using incorrect encryption mothod may causes service fail to start" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:274 msgid "V2Ray/XRay" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:357 msgid "V2Ray/XRay protocol" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:358 msgid "VLESS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:789 msgid "VLESS Encryption" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:359 msgid "VMess" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1033 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1043 msgid "VideoCall (SRTP)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1099 msgid "" "Virtual NIC TUN of Linux kernel can be used only when system supports and " "have root permission. If used, IPv6 routing table 1023 is occupied." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:649 msgid "Vmess Protocol" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:664 msgid "Vmess UUID" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:781 msgid "Vmess/VLESS ID (UUID)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:30 msgid "WAN Force Proxy IP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:25 msgid "WAN IP AC" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:27 msgid "WAN White List IP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:850 msgid "WebSocket Host" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:856 msgid "WebSocket Path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1035 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1045 msgid "WechatVideo" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:87 msgid "When disabled shunt mode, will same time stopped shunt service." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:189 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:213 msgid "When disabled, all AAAA requests are not resolved." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:178 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:202 msgid "When two or more DNS servers are deployed, enable this function." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:152 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:175 msgid "" "When use DNS list file, please ensure list file exists and is formatted " "correctly." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:363 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1037 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1047 msgid "WireGuard" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1129 msgid "Wireguard allows only traffic from specific source IP." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1110 msgid "Wireguard reserved bytes." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1083 msgid "Write Buffer Size" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:911 msgid "XHTTP Extra" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:899 msgid "XHTTP Host" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:890 msgid "XHTTP Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:905 msgid "XHTTP Path" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:347 msgid "Xray Fragment Settings" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:377 msgid "Xray Noise Packets" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:243 msgid "adblock_url" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1021 msgid "aes-128-gcm" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1358 msgid "allow" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1352 msgid "allow: Allows use Mux connection." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1293 msgid "allowInsecure" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1128 msgid "allowedIPs(optional)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1206 msgid "android" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:246 msgid "anti-AD" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1022 msgid "chacha20-poly1305" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:83 msgid "china-operator-ip" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1202 msgid "chrome" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:171 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:194 msgid "cloudflare-dns.com DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1383 msgid "comment_tcpcongestion_disable" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1322 msgid "concurrency" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1380 msgid "custom_tcpcongestion" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1212 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1330 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1343 msgid "disable" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:167 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:190 msgid "dns.sb DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1207 msgid "edge" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:183 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:207 msgid "fastest_addr" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:230 msgid "felixonmars/dnsmasq-china-list" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1203 msgid "firefox" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1000 msgid "gRPC Idle Timeout" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:973 msgid "gRPC Mode" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:967 msgid "gRPC Service Name" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:73 msgid "gfwlist Update url" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:77 msgid "gfwlist/gfwlist" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1205 msgid "ios" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:181 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:205 msgid "load_balance" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:702 msgid "lossless UDP relay using QUIC streams" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:701 msgid "native UDP characteristics" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:90 msgid "nfip_url" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:434 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1177 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1190 msgid "none" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:464 msgid "obfs-local" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:182 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:206 msgid "parallel" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1209 msgid "qq" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1210 msgid "random" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1211 msgid "randomized" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1357 msgid "reject" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1204 msgid "safari" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:636 msgid "shadow-TLS SNI" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:473 msgid "shadow-tls" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:614 msgid "shadowTLS protocol Version" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1359 msgid "skip" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1353 msgid "" "skip: Not use Mux module to carry UDP 443 traffic, Use original UDP " "transmission method of proxy protocol." msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1168 msgid "spiderX" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:74 msgid "v2fly/domain-list-community" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:467 msgid "v2ray-plugin" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:275 msgid "valid address:port" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:101 msgid "warning! Please do not reuse the port!" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:470 msgid "xray-plugin" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1192 msgid "xtls-rprx-vision" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1335 msgid "xudpConcurrency" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1348 msgid "xudpProxyUDP443" msgstr ""
2929004360/ruoyi-sign
976
ruoyi-work/src/main/java/com/ruoyi/work/domain/WorkSignature.java
package com.ruoyi.work.domain; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * 签名对象 work_signature * * @author fengcheng * @date 2025-03-18 */ @Data @NoArgsConstructor @AllArgsConstructor public class WorkSignature extends BaseEntity { private static final long serialVersionUID = 1L; /** * 签名id */ private Long signatureId; /** * 部门id */ private Long deptId; /** * 用户id */ private Long userId; /** * 部门名称 */ @Excel(name = "部门名称") private String deptName; /** * 创建人 */ @Excel(name = "创建人") private String userName; /** * 签名名称 */ @Excel(name = "签名名称") private String name; /** * 签名图片 */ @Excel(name = "签名图片", cellType = Excel.ColumnType.IMAGE, height = 50) private String imgUrl; }
2929004360/ruoyi-sign
1,299
ruoyi-work/src/main/java/com/ruoyi/work/domain/KeywordInfo.java
package com.ruoyi.work.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * 关键字信息 * * @author fengcheng */ @Data @AllArgsConstructor public class KeywordInfo { private int page; private float centreX; private float centreY; /** * 默认构造函数 */ public KeywordInfo() { super(); } /** * 构造函数 * * @param page 页码 */ public KeywordInfo(int page) { super(); this.page = page; } /** * copy * * @return KeywordInfo */ public KeywordInfo copy() { return new KeywordInfo(this.page); } public int getPage() { return page; } public void setPage(int page) { this.page = page; } public float getCentreX() { return centreX; } public void setCentreX(float centreX) { this.centreX = centreX; } public float getCentreY() { return centreY; } public void setCentreY(float centreY) { this.centreY = centreY; } @Override public String toString() { return "KeywordInfo{" + "page=" + page + ", centreX=" + centreX + ", centreY=" + centreY + '}'; } }
28harishkumar/blog
3,583
public/js/tinymce/plugins/jbimages/ci/system/core/Utf8.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 2.0 * @filesource */ // ------------------------------------------------------------------------ /** * Utf8 Class * * Provides support for UTF-8 environments * * @package CodeIgniter * @subpackage Libraries * @category UTF-8 * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/utf8.html */ class CI_Utf8 { /** * Constructor * * Determines if UTF-8 support is to be enabled * */ function __construct() { log_message('debug', "Utf8 Class Initialized"); global $CFG; if ( preg_match('/./u', 'é') === 1 // PCRE must support UTF-8 AND function_exists('iconv') // iconv must be installed AND ini_get('mbstring.func_overload') != 1 // Multibyte string function overloading cannot be enabled AND $CFG->item('charset') == 'UTF-8' // Application charset must be UTF-8 ) { log_message('debug', "UTF-8 Support Enabled"); define('UTF8_ENABLED', TRUE); // set internal encoding for multibyte string functions if necessary // and set a flag so we don't have to repeatedly use extension_loaded() // or function_exists() if (extension_loaded('mbstring')) { define('MB_ENABLED', TRUE); mb_internal_encoding('UTF-8'); } else { define('MB_ENABLED', FALSE); } } else { log_message('debug', "UTF-8 Support Disabled"); define('UTF8_ENABLED', FALSE); } } // -------------------------------------------------------------------- /** * Clean UTF-8 strings * * Ensures strings are UTF-8 * * @access public * @param string * @return string */ function clean_string($str) { if ($this->_is_ascii($str) === FALSE) { $str = @iconv('UTF-8', 'UTF-8//IGNORE', $str); } return $str; } // -------------------------------------------------------------------- /** * Remove ASCII control characters * * Removes all ASCII control characters except horizontal tabs, * line feeds, and carriage returns, as all others can cause * problems in XML * * @access public * @param string * @return string */ function safe_ascii_for_xml($str) { return remove_invisible_characters($str, FALSE); } // -------------------------------------------------------------------- /** * Convert to UTF-8 * * Attempts to convert a string to UTF-8 * * @access public * @param string * @param string - input encoding * @return string */ function convert_to_utf8($str, $encoding) { if (function_exists('iconv')) { $str = @iconv($encoding, 'UTF-8', $str); } elseif (function_exists('mb_convert_encoding')) { $str = @mb_convert_encoding($str, 'UTF-8', $encoding); } else { return FALSE; } return $str; } // -------------------------------------------------------------------- /** * Is ASCII? * * Tests if a string is standard 7-bit ASCII or not * * @access public * @param string * @return bool */ function _is_ascii($str) { return (preg_match('/[^\x00-\x7F]/S', $str) == 0); } // -------------------------------------------------------------------- } // End Utf8 Class /* End of file Utf8.php */ /* Location: ./system/core/Utf8.php */
28harishkumar/blog
2,949
public/js/tinymce/plugins/jbimages/ci/system/core/Benchmark.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * CodeIgniter Benchmark Class * * This class enables you to mark points and calculate the time difference * between them. Memory consumption can also be displayed. * * @package CodeIgniter * @subpackage Libraries * @category Libraries * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/benchmark.html */ class CI_Benchmark { /** * List of all benchmark markers and when they were added * * @var array */ var $marker = array(); // -------------------------------------------------------------------- /** * Set a benchmark marker * * Multiple calls to this function can be made so that several * execution points can be timed * * @access public * @param string $name name of the marker * @return void */ function mark($name) { $this->marker[$name] = microtime(); } // -------------------------------------------------------------------- /** * Calculates the time difference between two marked points. * * If the first parameter is empty this function instead returns the * {elapsed_time} pseudo-variable. This permits the full system * execution time to be shown in a template. The output class will * swap the real value for this variable. * * @access public * @param string a particular marked point * @param string a particular marked point * @param integer the number of decimal places * @return mixed */ function elapsed_time($point1 = '', $point2 = '', $decimals = 4) { if ($point1 == '') { return '{elapsed_time}'; } if ( ! isset($this->marker[$point1])) { return ''; } if ( ! isset($this->marker[$point2])) { $this->marker[$point2] = microtime(); } list($sm, $ss) = explode(' ', $this->marker[$point1]); list($em, $es) = explode(' ', $this->marker[$point2]); return number_format(($em + $es) - ($sm + $ss), $decimals); } // -------------------------------------------------------------------- /** * Memory Usage * * This function returns the {memory_usage} pseudo-variable. * This permits it to be put it anywhere in a template * without the memory being calculated until the end. * The output class will swap the real value for this variable. * * @access public * @return string */ function memory_usage() { return '{memory_usage}'; } } // END CI_Benchmark class /* End of file Benchmark.php */ /* Location: ./system/core/Benchmark.php */
28harishkumar/blog
12,935
public/js/tinymce/plugins/jbimages/ci/system/core/Output.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * Output Class * * Responsible for sending final output to browser * * @package CodeIgniter * @subpackage Libraries * @category Output * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/output.html */ class CI_Output { /** * Current output string * * @var string * @access protected */ protected $final_output; /** * Cache expiration time * * @var int * @access protected */ protected $cache_expiration = 0; /** * List of server headers * * @var array * @access protected */ protected $headers = array(); /** * List of mime types * * @var array * @access protected */ protected $mime_types = array(); /** * Determines wether profiler is enabled * * @var book * @access protected */ protected $enable_profiler = FALSE; /** * Determines if output compression is enabled * * @var bool * @access protected */ protected $_zlib_oc = FALSE; /** * List of profiler sections * * @var array * @access protected */ protected $_profiler_sections = array(); /** * Whether or not to parse variables like {elapsed_time} and {memory_usage} * * @var bool * @access protected */ protected $parse_exec_vars = TRUE; /** * Constructor * */ function __construct() { $this->_zlib_oc = @ini_get('zlib.output_compression'); // Get mime types for later if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) { include APPPATH.'config/'.ENVIRONMENT.'/mimes.php'; } else { include APPPATH.'config/mimes.php'; } $this->mime_types = $mimes; log_message('debug', "Output Class Initialized"); } // -------------------------------------------------------------------- /** * Get Output * * Returns the current output string * * @access public * @return string */ function get_output() { return $this->final_output; } // -------------------------------------------------------------------- /** * Set Output * * Sets the output string * * @access public * @param string * @return void */ function set_output($output) { $this->final_output = $output; return $this; } // -------------------------------------------------------------------- /** * Append Output * * Appends data onto the output string * * @access public * @param string * @return void */ function append_output($output) { if ($this->final_output == '') { $this->final_output = $output; } else { $this->final_output .= $output; } return $this; } // -------------------------------------------------------------------- /** * Set Header * * Lets you set a server header which will be outputted with the final display. * * Note: If a file is cached, headers will not be sent. We need to figure out * how to permit header data to be saved with the cache data... * * @access public * @param string * @param bool * @return void */ function set_header($header, $replace = TRUE) { // If zlib.output_compression is enabled it will compress the output, // but it will not modify the content-length header to compensate for // the reduction, causing the browser to hang waiting for more data. // We'll just skip content-length in those cases. if ($this->_zlib_oc && strncasecmp($header, 'content-length', 14) == 0) { return; } $this->headers[] = array($header, $replace); return $this; } // -------------------------------------------------------------------- /** * Set Content Type Header * * @access public * @param string extension of the file we're outputting * @return void */ function set_content_type($mime_type) { if (strpos($mime_type, '/') === FALSE) { $extension = ltrim($mime_type, '.'); // Is this extension supported? if (isset($this->mime_types[$extension])) { $mime_type =& $this->mime_types[$extension]; if (is_array($mime_type)) { $mime_type = current($mime_type); } } } $header = 'Content-Type: '.$mime_type; $this->headers[] = array($header, TRUE); return $this; } // -------------------------------------------------------------------- /** * Set HTTP Status Header * moved to Common procedural functions in 1.7.2 * * @access public * @param int the status code * @param string * @return void */ function set_status_header($code = 200, $text = '') { set_status_header($code, $text); return $this; } // -------------------------------------------------------------------- /** * Enable/disable Profiler * * @access public * @param bool * @return void */ function enable_profiler($val = TRUE) { $this->enable_profiler = (is_bool($val)) ? $val : TRUE; return $this; } // -------------------------------------------------------------------- /** * Set Profiler Sections * * Allows override of default / config settings for Profiler section display * * @access public * @param array * @return void */ function set_profiler_sections($sections) { foreach ($sections as $section => $enable) { $this->_profiler_sections[$section] = ($enable !== FALSE) ? TRUE : FALSE; } return $this; } // -------------------------------------------------------------------- /** * Set Cache * * @access public * @param integer * @return void */ function cache($time) { $this->cache_expiration = ( ! is_numeric($time)) ? 0 : $time; return $this; } // -------------------------------------------------------------------- /** * Display Output * * All "view" data is automatically put into this variable by the controller class: * * $this->final_output * * This function sends the finalized output data to the browser along * with any server headers and profile data. It also stops the * benchmark timer so the page rendering speed and memory usage can be shown. * * @access public * @param string * @return mixed */ function _display($output = '') { // Note: We use globals because we can't use $CI =& get_instance() // since this function is sometimes called by the caching mechanism, // which happens before the CI super object is available. global $BM, $CFG; // Grab the super object if we can. if (class_exists('CI_Controller')) { $CI =& get_instance(); } // -------------------------------------------------------------------- // Set the output data if ($output == '') { $output =& $this->final_output; } // -------------------------------------------------------------------- // Do we need to write a cache file? Only if the controller does not have its // own _output() method and we are not dealing with a cache file, which we // can determine by the existence of the $CI object above if ($this->cache_expiration > 0 && isset($CI) && ! method_exists($CI, '_output')) { $this->_write_cache($output); } // -------------------------------------------------------------------- // Parse out the elapsed time and memory usage, // then swap the pseudo-variables with the data $elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end'); if ($this->parse_exec_vars === TRUE) { $memory = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB'; $output = str_replace('{elapsed_time}', $elapsed, $output); $output = str_replace('{memory_usage}', $memory, $output); } // -------------------------------------------------------------------- // Is compression requested? if ($CFG->item('compress_output') === TRUE && $this->_zlib_oc == FALSE) { if (extension_loaded('zlib')) { if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) AND strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) { ob_start('ob_gzhandler'); } } } // -------------------------------------------------------------------- // Are there any server headers to send? if (count($this->headers) > 0) { foreach ($this->headers as $header) { @header($header[0], $header[1]); } } // -------------------------------------------------------------------- // Does the $CI object exist? // If not we know we are dealing with a cache file so we'll // simply echo out the data and exit. if ( ! isset($CI)) { echo $output; log_message('debug', "Final output sent to browser"); log_message('debug', "Total execution time: ".$elapsed); return TRUE; } // -------------------------------------------------------------------- // Do we need to generate profile data? // If so, load the Profile class and run it. if ($this->enable_profiler == TRUE) { $CI->load->library('profiler'); if ( ! empty($this->_profiler_sections)) { $CI->profiler->set_sections($this->_profiler_sections); } // If the output data contains closing </body> and </html> tags // we will remove them and add them back after we insert the profile data if (preg_match("|</body>.*?</html>|is", $output)) { $output = preg_replace("|</body>.*?</html>|is", '', $output); $output .= $CI->profiler->run(); $output .= '</body></html>'; } else { $output .= $CI->profiler->run(); } } // -------------------------------------------------------------------- // Does the controller contain a function named _output()? // If so send the output there. Otherwise, echo it. if (method_exists($CI, '_output')) { $CI->_output($output); } else { echo $output; // Send it to the browser! } log_message('debug', "Final output sent to browser"); log_message('debug', "Total execution time: ".$elapsed); } // -------------------------------------------------------------------- /** * Write a Cache File * * @access public * @param string * @return void */ function _write_cache($output) { $CI =& get_instance(); $path = $CI->config->item('cache_path'); $cache_path = ($path == '') ? APPPATH.'cache/' : $path; if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path)) { log_message('error', "Unable to write cache file: ".$cache_path); return; } $uri = $CI->config->item('base_url'). $CI->config->item('index_page'). $CI->uri->uri_string(); $cache_path .= md5($uri); if ( ! $fp = @fopen($cache_path, FOPEN_WRITE_CREATE_DESTRUCTIVE)) { log_message('error', "Unable to write cache file: ".$cache_path); return; } $expire = time() + ($this->cache_expiration * 60); if (flock($fp, LOCK_EX)) { fwrite($fp, $expire.'TS--->'.$output); flock($fp, LOCK_UN); } else { log_message('error', "Unable to secure a file lock for file at: ".$cache_path); return; } fclose($fp); @chmod($cache_path, FILE_WRITE_MODE); log_message('debug', "Cache file written: ".$cache_path); } // -------------------------------------------------------------------- /** * Update/serve a cached file * * @access public * @param object config class * @param object uri class * @return void */ function _display_cache(&$CFG, &$URI) { $cache_path = ($CFG->item('cache_path') == '') ? APPPATH.'cache/' : $CFG->item('cache_path'); // Build the file path. The file name is an MD5 hash of the full URI $uri = $CFG->item('base_url'). $CFG->item('index_page'). $URI->uri_string; $filepath = $cache_path.md5($uri); if ( ! @file_exists($filepath)) { return FALSE; } if ( ! $fp = @fopen($filepath, FOPEN_READ)) { return FALSE; } flock($fp, LOCK_SH); $cache = ''; if (filesize($filepath) > 0) { $cache = fread($fp, filesize($filepath)); } flock($fp, LOCK_UN); fclose($fp); // Strip out the embedded timestamp if ( ! preg_match("/(\d+TS--->)/", $cache, $match)) { return FALSE; } // Has the file expired? If so we'll delete it. if (time() >= trim(str_replace('TS--->', '', $match['1']))) { if (is_really_writable($cache_path)) { @unlink($filepath); log_message('debug', "Cache file has expired. File deleted"); return FALSE; } } // Display the cache $this->_display(str_replace($match['0'], '', $cache)); log_message('debug', "Cache file is current. Sending it to browser."); return TRUE; } } // END Output Class /* End of file Output.php */ /* Location: ./system/core/Output.php */
2929004360/ruoyi-sign
1,407
ruoyi-work/src/main/java/com/ruoyi/work/domain/WorkSeal.java
package com.ruoyi.work.domain; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * 印章管理对象 work_seal * * @author fengcheng * @date 2025-03-17 */ @Data @NoArgsConstructor @AllArgsConstructor public class WorkSeal extends BaseEntity { private static final long serialVersionUID = 1L; /** * 印章ID */ private Long suraId; /** * 部门id */ private Long deptId; /** * 用户ID */ private Long userId; /** * 部门名称 */ @Excel(name = "部门名称") private String deptName; /** * 创建人 */ @Excel(name = "创建人") private String userName; /** * 印章名称 */ @Excel(name = "印章名称") private String name; /** * 印章类型(1=公章,2=财务章,3=合同章,4=法人章,5=私章,6=审批章,7=手印章,8=专用章,9=会议章,10=印鉴章,11=其他) */ @Excel(name = "印章类型", dictType = "work_sura_type") private String type; /** * 印章图片 */ @Excel(name = "印章图片", cellType = Excel.ColumnType.IMAGE, height = 50) private String suraUrl; /** * 印章大小(1=42mm*42mm,2=40mm*40mm.3=38mm*38mm,4=36mm*36mm,5=34mm*34mm,6=32mm*32mm,7=30mm*30mm) */ @Excel(name = "印章大小", dictType = "work_sura_size") private String suraSize; /** * 删除标志(0代表存在,1代表删除) */ private String delFlag; }
2929004360/ruoyi-sign
1,040
ruoyi-work/src/main/java/com/ruoyi/work/param/PdfAddContentParam.java
package com.ruoyi.work.param; import lombok.Data; /** * pdf添加签名实体类 * * @author fengcheng */ @Data public class PdfAddContentParam { /** * 要添加的文字 */ private String content; /** * 页码 */ private Integer pageNum; /** * 关键字 */ private String keyword; /** * 文本框坐标(左下角x,y,右上角x,y) */ private Float llx; private Float lly; private Float urx; private Float ury; public PdfAddContentParam() { } public PdfAddContentParam(String content, Integer pageNum, Float llx, Float lly, Float urx, Float ury) { this.content = content; this.pageNum = pageNum; this.llx = llx; this.lly = lly; this.urx = urx; this.ury = ury; } public PdfAddContentParam(String content, String keyword, Float llx, Float lly, Float urx, Float ury) { this.content = content; this.keyword = keyword; this.llx = llx; this.lly = lly; this.urx = urx; this.ury = ury; } }
281677160/openwrt-package
93,755
luci-app-ssr-plus/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po
msgid "" msgstr "Content-Type: text/plain; charset=UTF-8\n" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:353 msgid "" "\"1-3\" is for segmentation at TCP layer, applying to the beginning 1 to 3 " "data writes by the client. \"tlshello\" is for TLS client hello packet " "fragmentation." msgstr "" "\"1-3\" 是 TCP 的流切片,应用于客户端第 1 至第 3 次写数据。\"tlshello\" 是 " "TLS 握手包切片。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:103 msgid "0" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:86 msgid "1 Thread" msgstr "单线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:93 msgid "128 Threads" msgstr "128 线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1344 msgid "16" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:90 msgid "16 Threads" msgstr "16 线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:87 msgid "2 Threads" msgstr "2 线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:91 msgid "32 Threads" msgstr "32 线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1208 msgid "360" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:256 msgid "360 Security DNS (China Telecom) (101.226.4.6)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:257 msgid "360 Security DNS (China Unicom) (123.125.81.6)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:88 msgid "4 Threads" msgstr "4 线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:92 msgid "64 Threads" msgstr "64 线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1331 msgid "8" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:89 msgid "8 Threads" msgstr "8 线程" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:379 msgid "<font style='color:red'>" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:919 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1223 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1250 msgid "<font><b>" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:30 msgid "<h3>Support SS/SSR/V2RAY/XRAY/TROJAN/NAIVEPROXY/SOCKS5/TUN etc.</h3>" msgstr "<h3>支持 SS/SSR/V2RAY/XRAY/TROJAN/NAIVEPROXY/SOCKS5/TUN 等协议。</h3>" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:151 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:177 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:211 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1324 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1337 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1350 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:174 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:200 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:235 msgid "<ul><li>" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:15 msgid "Access Control" msgstr "访问控制" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:169 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:192 msgid "AdGuard DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:16 msgid "Advanced Settings" msgstr "高级设置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:203 msgid "Advertising Data" msgstr "【广告屏蔽】数据库" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:254 msgid "AliYun Public DNS (223.5.5.5)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:221 msgid "Alias" msgstr "别名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:306 msgid "Alias(optional)" msgstr "别名(可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:105 msgid "All Ports" msgstr "所有端口(默认)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:39 msgid "Allow all except listed" msgstr "除列表外主机皆允许" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:38 msgid "Allow listed only" msgstr "仅允许列表内主机" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:150 msgid "Allow subscribe Insecure nodes By default" msgstr "订阅节点允许不验证 TLS 证书" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:774 msgid "AlterId" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:133 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:164 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:135 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:156 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:187 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:221 msgid "Anti-pollution DNS Server" msgstr "访问国外域名 DNS 服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:116 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:197 msgid "Anti-pollution DNS Server For Shunt Mode" msgstr "分流模式下的访问国外域名 DNS 服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:234 msgid "Apple Domains DNS" msgstr "Apple 域名 DNS" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:189 msgid "Apple Domains Data" msgstr "【Apple 域名】数据库" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:229 msgid "Apple Domains Update url" msgstr "Apple 域名更新 URL" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:225 msgid "Apple domains optimization" msgstr "Apple 域名解析优化" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:249 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:255 msgid "Apply" msgstr "应用" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:32 msgid "Applying configuration changes… %ds" msgstr "正在等待配置被应用… %ds" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:133 msgid "Are you sure you want to restore the client to default settings?" msgstr "是否真的要恢复客户端默认配置?" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:266 msgid "Auto Switch" msgstr "自动切换" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:85 msgid "Auto Threads" msgstr "自动(CPU 线程数)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:73 msgid "Auto Update" msgstr "自动更新" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:75 msgid "Auto Update Server subscription, GFW list and CHN route" msgstr "自动更新服务器订阅、GFW 列表和中国大陆 IP 段" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:708 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1384 msgid "BBR" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/log.lua:25 msgid "Backup and Restore" msgstr "备份还原" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/log.lua:25 msgid "Backup or Restore Client and Server Configurations." msgstr "备份或还原客户端及服务端配置。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:174 msgid "Baidu Connectivity" msgstr "【百度】连通性检查" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:255 msgid "Baidu Public DNS (180.76.76.76)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:233 msgid "Base64 sstr failed." msgstr "Base64 解码失败。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1034 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1044 msgid "BitTorrent (uTP)" msgstr "BT 下载(uTP)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:100 msgid "Black Domain List" msgstr "强制走代理的域名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:449 msgid "Bloom Filter" msgstr "布隆过滤器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:84 msgid "Bypass Domain List" msgstr "不走代理的域名" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:31 msgid "CLOSE WIN" msgstr "关闭窗口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:258 msgid "CNNIC SDNS (1.2.4.8)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:709 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1385 msgid "CUBIC" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:832 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1040 msgid "Camouflage Type" msgstr "伪装类型" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1300 msgid "Certificate fingerprint" msgstr "证书指纹" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:21 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:27 msgid "Check Connect" msgstr "检查连通性" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm:17 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm:23 msgid "Check Server" msgstr "检查服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:209 msgid "Check Server Port" msgstr "【服务器端口】检查" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:68 msgid "Check Try Count" msgstr "切换检查重试次数" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:63 msgid "Check timout(second)" msgstr "切换检查超时时间(秒)" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:6 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/checkport.htm:6 msgid "Check..." msgstr "正在检查..." #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:183 msgid "China IP Data" msgstr "【中国大陆 IP 段】数据库" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:241 msgid "ChinaDNS-NG query protocol" msgstr "ChinaDNS-NG 查询协议" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:217 msgid "ChinaDNS-NG shunt query protocol" msgstr "ChinaDNS-NG 分流查询协议" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:80 msgid "Chnroute Update url" msgstr "中国大陆 IP 段更新 URL" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:81 msgid "Clang.CN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:82 msgid "Clang.CN.CIDR" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/log.htm:35 msgid "Clear logs" msgstr "清空日志" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:155 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:178 msgid "Click here to view or manage the DNS list file" msgstr "点击此处查看或管理 DNS 列表文件" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:382 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:921 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1225 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1252 msgid "Click to the page" msgstr "点击前往" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:139 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:162 msgid "Cloudflare DNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:127 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:208 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:146 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:232 msgid "Cloudflare DNS (1.1.1.1)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:170 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:193 msgid "Cloudflare DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:20 msgid "Collecting data..." msgstr "正在收集数据中..." #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:919 msgid "Configure XHTTP Extra Settings (JSON format), see:" msgstr "配置 XHTTP 额外设置(JSON 格式),具体请参见:" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1093 msgid "Congestion" msgstr "拥塞控制" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:706 msgid "Congestion control algorithm" msgstr "拥塞控制算法" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:18 msgid "Connect Error" msgstr "连接错误" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/check.htm:16 msgid "Connect OK" msgstr "连接正常" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:103 msgid "Connection Timeout" msgstr "连接超时" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1236 msgid "" "Controls the policy used when performing DNS queries for ECH configuration." msgstr "控制使用 DNS 查询 ECH 配置时的策略。" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:78 msgid "Copy SSR to clipboard successfully." msgstr "成功复制 SSR 网址到剪贴板。" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:2 msgid "Create Backup File" msgstr "创建备份文件" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1420 msgid "Create upload file error." msgstr "创建上传文件错误。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1440 msgid "Current Certificate Path" msgstr "当前证书路径" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:475 msgid "Custom" msgstr "自定义" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:173 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:196 msgid "" "Custom DNS Server (support: IP:Port or tls://IP:Port or https://IP/dns-query " "and other format)." msgstr "" "自定义 DNS 服务器(支持格式:IP:端口、tls://IP:端口、https://IP/dns-query 及" "其他格式)。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:141 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:164 msgid "Custom DNS Server for MosDNS" msgstr "MosDNS 自定义 DNS 服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:130 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:212 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:152 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:236 msgid "Custom DNS Server format as IP:PORT (default: 8.8.4.4:53)" msgstr "格式为 IP:Port(默认:8.8.4.4:53)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:264 msgid "Custom DNS Server format as IP:PORT (default: disabled)" msgstr "格式为 IP:PORT(默认:禁用)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:479 msgid "Custom Plugin Path" msgstr "自定义插件路径" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:107 msgid "Custom Ports" msgstr "自定义端口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:94 msgid "Customize Netflix IP Url" msgstr "" "自定义 Netflix IP 段更新 URL(默认项目地址:https://github.com/QiuSimons/" "Netflix_IP)" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:4 msgid "DL Backup" msgstr "下载备份" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:124 msgid "DNS Anti-pollution" msgstr "DNS 防污染服务" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:97 msgid "DNS Query Mode For Shunt Mode" msgstr "分流模式下的 DNS 查询模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:253 msgid "DNSPod Public DNS (119.29.29.29)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1036 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1046 msgid "DTLS 1.2" msgstr "DTLS 1.2 数据包" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1273 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1286 msgid "Default" msgstr "默认" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1351 msgid "Default reject rejects traffic." msgstr "默认 reject 拒绝流量。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:605 msgid "Default value 0 indicatesno heartbeat." msgstr "默认为 0 表示无心跳。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1325 msgid "" "Default: disable. When entering a negative number, such as -1, The Mux " "module will not be used to carry TCP traffic." msgstr "默认:禁用。填负数时,如 -1,不使用 Mux 模块承载 TCP 流量。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1338 msgid "" "Default:16. When entering a negative number, such as -1, The Mux module will " "not be used to carry UDP traffic, Use original UDP transmission method of " "proxy protocol." msgstr "" "默认值:16。填负数时,如 -1,不使用 Mux 模块承载 UDP 流量。将使用代理协议原本" "的 UDP 传输方式。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:175 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:198 msgid "Defines the upstreams logic mode" msgstr "定义上游逻辑模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:178 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:201 msgid "" "Defines the upstreams logic mode, possible values: load_balance, parallel, " "fastest_addr (default: load_balance)." msgstr "" "定义上游逻辑模式,可选择值:负载均衡、并行查询、最快响应(默认值:负载均" "衡)。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:420 msgid "Delay (ms)" msgstr "延迟(ms)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:168 msgid "Delete All Subscribe Servers" msgstr "删除所有订阅服务器节点" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:116 msgid "Deny Domain List" msgstr "禁止连接的域名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:54 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:62 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:70 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:37 msgid "Disable" msgstr "停用" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:249 msgid "Disable ChinaDNS-NG" msgstr "直通模式(禁用 ChinaDNS-NG)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:143 msgid "Disable IPv6 In MosDNS Query Mode (Shunt Mode)" msgstr "禁止 MosDNS 返回 IPv6 记录 (分流模式)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:166 msgid "Disable IPv6 in MOSDNS query mode" msgstr "禁止 MOSDNS 返回 IPv6 记录" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:188 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:212 msgid "Disable IPv6 query mode" msgstr "禁止返回 IPv6 记录" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:568 msgid "Disable QUIC path MTU discovery" msgstr "禁用 QUIC 启用 MTU 探测" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:750 msgid "Disable SNI" msgstr "关闭 SNI 服务器名称指示" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:631 msgid "Disable TCP No_delay" msgstr "禁用 TCP 无延迟" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:149 msgid "Dnsproxy Parse List" msgstr "DNSPROXY 解析列表" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:18 msgid "Do Reset" msgstr "执行重置" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:131 msgid "Do you want to restore the client to default settings?" msgstr "是否要恢复客户端默认配置?" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:221 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:245 msgid "DoT upstream (Need use wolfssl version)" msgstr "DoT 上游(需使用 wolfssl 版本)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:407 msgid "Domain Strategy" msgstr "域名解析策略" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:248 msgid "Domestic DNS Server" msgstr "国内 DNS 服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1070 msgid "Downlink Capacity(Default:Mbps)" msgstr "下行链路容量(默认:Mbps)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:761 msgid "Dual-stack Listening Socket" msgstr "双栈 Socket 监听" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1221 msgid "ECH Config" msgstr "ECH 配置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1235 msgid "ECH Query Policy" msgstr "ECH 查询策略" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:869 msgid "Early Data Header Name" msgstr "前置数据标头" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:253 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:69 msgid "Edit ShadowSocksR Server" msgstr "编辑服务器配置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:263 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:396 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:82 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:101 msgid "Enable" msgstr "启用" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:755 msgid "Enable 0-RTT QUIC handshake" msgstr "客户端启用 0-RTT QUIC 连接握手" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:395 msgid "Enable Authentication" msgstr "启用用户名/密码认证" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:54 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1454 msgid "Enable Auto Switch" msgstr "启用自动切换" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1216 msgid "Enable ECH(optional)" msgstr "启用 ECH (可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:547 msgid "Enable Lazy Mode" msgstr "启用懒狗模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1243 msgid "Enable ML-DSA-65(optional)" msgstr "启用 ML-DSA-65 (可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1369 msgid "" "Enable Multipath TCP, need to be enabled in both server and client " "configuration." msgstr "启用 Multipath TCP,需在服务端和客户端配置中同时启用。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1305 msgid "Enable Mux.Cool" msgstr "启用 Mux.Cool" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:86 msgid "Enable Netflix Mode" msgstr "启用 Netflix 分流模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:542 msgid "Enable Obfuscation" msgstr "启用混淆功能" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:455 msgid "Enable Plugin" msgstr "启用插件" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:514 msgid "Enable Port Hopping" msgstr "启用端口跳跃" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:84 msgid "Enable Server" msgstr "启动服务端" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:525 msgid "Enable Transport Protocol Settings" msgstr "启用传输协议设置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:617 msgid "Enable V2 protocol." msgstr "开启 V2 协议。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:616 msgid "Enable V3 protocol." msgstr "开启 V3 协议。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:240 msgid "Enable adblock" msgstr "启用广告屏蔽" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:444 msgid "Enable the SUoT protocol, requires server support." msgstr "启用 SUoT 协议,需要服务端支持。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:912 msgid "Enable this option to configure XHTTP Extra (JSON format)." msgstr "启用此选项配置 XHTTP 附加项(JSON 格式)。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1098 msgid "Enabled Kernel virtual NIC TUN(optional)" msgstr "启用内核的虚拟网卡 TUN(可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:327 msgid "Enabled Mixed" msgstr "启用 Mixed" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:626 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1363 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1446 msgid "Enabling TCP Fast Open Requires Server Support." msgstr "启用 TCP 快速打开需要服务端支持。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:423 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:430 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:658 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:669 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:796 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:118 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:125 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:122 msgid "Encrypt Method" msgstr "加密方式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:108 msgid "Enter Custom Ports" msgstr "输入自定义端口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:78 msgid "Every Day" msgstr "每天" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:83 msgid "Every Friday" msgstr "每周五" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:79 msgid "Every Monday" msgstr "每周一" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:84 msgid "Every Saturday" msgstr "每周六" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:85 msgid "Every Sunday" msgstr "每周日" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:82 msgid "Every Thursday" msgstr "每周四" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:80 msgid "Every Tuesday" msgstr "每周二" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:81 msgid "Every Wednesday" msgstr "每周三" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:275 msgid "Expecting: %s" msgstr "应为:%s" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:78 msgid "External Proxy Mode" msgstr "分流服务器(前置)代理" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:135 msgid "Filter Words splited by /" msgstr "命中关键字的节点将被丢弃。多个关键字用 / 分隔" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1200 msgid "Finger Print" msgstr "指纹伪造" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1173 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1186 msgid "Flow" msgstr "流控(Flow)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:225 msgid "" "For Apple domains equipped with Chinese mainland CDN, always responsive to " "Chinese CDN IP addresses" msgstr "配备中国大陆 CDN 的 Apple 域名,始终应答中国大陆 CDN 地址" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:380 msgid "For specific usage, see:" msgstr "具体使用方法,具体请参见:" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:520 msgid "" "Format as 10000:20000 or 10000-20000 Multiple groups are separated by commas " "(,)." msgstr "格式为:10000:20000 或 10000-20000 多组时用逗号(,)隔开。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:80 msgid "Forward Netflix Proxy through Main Proxy" msgstr "分流服务器流量通过主服务节点中转代理转发" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:350 msgid "Fragment" msgstr "分片" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:366 msgid "Fragment Interval" msgstr "分片间隔" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:362 msgid "Fragment Length" msgstr "分片包长" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:353 msgid "Fragment Packets" msgstr "分片方式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:366 msgid "Fragmentation interval (ms)" msgstr "分片间隔(ms)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:362 msgid "Fragmented packet length (byte)" msgstr "分片包长 (byte)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:178 msgid "GFW List Data" msgstr "【GFW 列表】数据库" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:98 msgid "GFW List Mode" msgstr "GFW 列表模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:68 msgid "Game Mode Host List" msgstr "增强游戏模式客户端 LAN IP" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:115 msgid "Game Mode UDP Relay" msgstr "游戏模式 UDP 中继" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:61 msgid "Game Mode UDP Server" msgstr "游戏模式 UDP 中继服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:726 msgid "Garbage collection interval(second)" msgstr "UDP 数据包片残片清理间隔(单位:秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:732 msgid "Garbage collection lifetime(second)" msgstr "UDP 数据包残片在服务器的保留时间(单位:秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:107 msgid "Global Client" msgstr "TCP 透明代理" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:100 msgid "Global Mode" msgstr "全局模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:259 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:133 msgid "Global SOCKS5 Proxy Server" msgstr "SOCKS5 代理服务端(全局)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:81 msgid "Global Setting" msgstr "全局设置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:170 msgid "Google Connectivity" msgstr "【谷歌】连通性检查" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:165 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:188 msgid "Google DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:134 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:157 msgid "Google Public DNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:117 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:198 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:136 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:222 msgid "Google Public DNS (8.8.4.4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:118 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:199 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:137 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:223 msgid "Google Public DNS (8.8.8.8)" msgstr "" #: applications/luci-app-ssr-plus/root/usr/share/rpcd/acl.d/luci-app-ssr-plus.json:3 msgid "Grant UCI access for luci-app-ssr-plus" msgstr "授予访问 luci-app-ssr-plus 配置的权限" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:975 msgid "Gun" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:994 msgid "H2 Read Idle Timeout" msgstr "H2 读取空闲超时" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:989 msgid "H2/gRPC Health Check" msgstr "H2/gRPC 健康检查" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:366 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:835 msgid "HTTP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:839 msgid "HTTP Host" msgstr "HTTP 主机名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:844 msgid "HTTP Path" msgstr "HTTP 路径" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:957 msgid "HTTP/2 Host" msgstr "HTTP/2 主机名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:962 msgid "HTTP/2 Path" msgstr "HTTP/2 路径" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1029 msgid "Header" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1006 msgid "Health Check Timeout" msgstr "健康检查超时" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:714 msgid "Heartbeat interval(second)" msgstr "保活心跳包发送间隔(单位:秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:878 msgid "Httpupgrade Host" msgstr "HTTPUpgrade 主机名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:883 msgid "Httpupgrade Path" msgstr "HTTPUpgrade 路径" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:289 msgid "Hysteria2" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:563 msgid "Hysterir QUIC parameters" msgstr "QUIC 参数" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:99 msgid "IP Route Mode" msgstr "绕过中国大陆 IP 模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:424 msgid "IP Type" msgstr "IP 类型" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:234 msgid "If empty, Not change Apple domains parsing DNS (Default is empty)" msgstr "如果为空,则不更改 Apple 域名解析 DNS(默认为空)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1223 msgid "" "If it is not empty, it indicates that the Client has enabled Encrypted " "Client, see:" msgstr "如果不为空,表示客户端已启用加密客户端,具体请参见:" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:762 msgid "If this option is not set, the socket behavior is platform dependent." msgstr "如果未设置此选项,则 Socket 行为依赖于平台。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1297 msgid "" "If true, allowss insecure connection at TLS client, e.g., TLS server uses " "unverifiable certificates." msgstr "" "是否允许不安全连接。当选择时,将不会检查远端主机所提供的 TLS 证书的有效性。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1404 msgid "If you have a self-signed certificate,please check the box" msgstr "如果你使用自签证书,请选择" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:819 msgid "Import" msgstr "导入配置信息" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:177 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:320 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:352 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:448 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:535 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:665 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:810 msgid "Import configuration information successfully." msgstr "导入配置信息成功。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:982 msgid "Initial Windows Size" msgstr "初始窗口大小" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:17 msgid "Interface" msgstr "接口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:16 msgid "Interface control" msgstr "接口控制" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:948 msgid "Invalid JSON format" msgstr "无效的 JSON 格式" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:813 msgid "Invalid format." msgstr "无效的格式。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:153 msgid "KcpTun" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1464 msgid "KcpTun Enable" msgstr "KcpTun 启用" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1481 msgid "KcpTun Param" msgstr "KcpTun 参数" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1476 msgid "KcpTun Password" msgstr "KcpTun 密码" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1470 msgid "KcpTun Port" msgstr "KcpTun 端口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:150 msgid "KcpTun Version" msgstr "KcpTun 版本号" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:36 msgid "LAN Access Control" msgstr "内网客户端分流代理控制" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:52 msgid "LAN Bypassed Host List" msgstr "不走代理的局域网 LAN IP" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:60 msgid "LAN Force Proxy Host List" msgstr "全局代理的 LAN IP" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:42 msgid "LAN Host List" msgstr "内网主机列表" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:34 msgid "LAN IP AC" msgstr "LAN IP 访问控制" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:121 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:202 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:140 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:226 msgid "Level 3 Public DNS (209.244.0.3)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:122 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:203 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:141 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:227 msgid "Level 3 Public DNS (209.244.0.4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:123 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:204 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:142 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:228 msgid "Level 3 Public DNS (4.2.2.1)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:124 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:205 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:143 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:229 msgid "Level 3 Public DNS (4.2.2.2)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:125 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:206 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:144 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:230 msgid "Level 3 Public DNS (4.2.2.3)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:126 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:207 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:145 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:231 msgid "Level 3 Public DNS (4.2.2.4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:136 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:159 msgid "Level 3 Public DNS-1 (209.244.0.3-4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:137 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:160 msgid "Level 3 Public DNS-2 (4.2.2.1-2)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:138 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:161 msgid "Level 3 Public DNS-3 (4.2.2.3-4)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:370 msgid "Limit the maximum number of splits." msgstr "限制分片的最大数量。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:22 msgid "Listen only on the given interface or, if unspecified, on all" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:340 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1458 msgid "Local Port" msgstr "本地端口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:141 msgid "Local Servers" msgstr "本机服务端" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1104 msgid "Local addresses" msgstr "本地地址" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:23 msgid "Log" msgstr "日志" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:76 msgid "Loukky/gfwlist-by-loukky" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:75 msgid "Loyalsoldier/v2ray-rules-dat" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1248 msgid "ML-DSA-65 Public key" msgstr "ML-DSA-65 公钥" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1369 msgid "MPTCP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1050 msgid "MTU" msgstr "最大传输单元" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:53 msgid "Main Server" msgstr "主服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:862 msgid "Max Early Data" msgstr "最大前置数据" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:370 msgid "Max Split" msgstr "最大分片数" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:767 msgid "Maximum packet size the socks5 server can receive from external" msgstr "socks5 服务器可以从外部接收的最大数据包大小(单位:字节)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1339 msgid "" "Min value is 1, Max value is 1024. When omitted or set to 0, Will same path " "as TCP traffic." msgstr "" "最小值 1,最大值 1024。 省略或者填 0 时,将与 TCP 流量走同一条路,也就是传统" "的行为。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1326 msgid "" "Min value is 1, Max value is 128. When omitted or set to 0, it equals 8." msgstr "最小值 1,最大值 128。省略或者填 0 时都等于 8。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:327 msgid "Mixed as an alias of socks, default:Enabled." msgstr "Mixed 作为 SOCKS 的别名,默认:启用。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:26 msgid "Move down" msgstr "下移" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:23 msgid "Move up" msgstr "上移" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:213 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:237 msgid "Muitiple DNS server can saperate with ','" msgstr "多个上游 DNS 服务器请用 ',' 分隔(注意用英文逗号)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:976 msgid "Multi" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:84 msgid "Multi Threads Option" msgstr "多线程并发转发" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1305 msgid "Mux" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:245 msgid "NEO DEV HOST Full" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:244 msgid "NEO DEV HOST Lite" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:10 msgid "NOT RUNNING" msgstr "未运行" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:286 msgid "NaiveProxy" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:252 msgid "Nanjing Xinfeng 114DNS (114.114.114.114)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:132 msgid "Netflix Domain List" msgstr "Netflix 分流域名列表" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:196 msgid "Netflix IP Data" msgstr "【Netflix IP 段】数据库" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:91 msgid "Netflix IP Only" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:69 msgid "Netflix Node" msgstr "Netflix 分流服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:92 msgid "Netflix and AWS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:301 msgid "Network Tunnel" msgstr "网络隧道" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:308 msgid "Network interface to use" msgstr "使用的网络接口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:710 msgid "New Reno" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:171 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:175 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:211 msgid "No Check" msgstr "未检查" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:21 msgid "No new data!" msgstr "你已经是最新数据,无需更新!" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1436 msgid "No specify upload file." msgstr "没有上传证书。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:374 msgid "Noise" msgstr "噪声" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:462 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:834 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1020 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1032 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1042 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:218 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:223 msgid "None" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:112 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:120 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:129 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:138 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:146 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:158 msgid "Not Running" msgstr "未运行" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:28 msgid "Not exist" msgstr "未安装可执行文件" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/log.lua:27 msgid "" "Note: Restoring configurations across different versions may cause " "compatibility issues." msgstr "注意:不同版本间的配置恢复可能会导致兼容性问题。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:461 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:497 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:139 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:133 msgid "Obfs" msgstr "混淆插件" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:504 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:146 msgid "Obfs param (optional)" msgstr "混淆参数(可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1089 msgid "Obfuscate password (optional)" msgstr "混淆密码(可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:557 msgid "Obfuscation Password" msgstr "混淆密码" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:552 msgid "Obfuscation Type" msgstr "混淆类型" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:106 msgid "Only Common Ports" msgstr "仅常用端口(不走 P2P 流量到代理)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:316 msgid "Only when Socks5 Auth Mode is password valid, Mandatory." msgstr "仅当 Socks5 认证方式为 Password 时有效,必填。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:321 msgid "Only when Socks5 Auth Mode is password valid, Not mandatory." msgstr "仅当 Socks5 认证方式为 Password 时有效,非必填。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:135 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:158 msgid "OpenDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:120 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:201 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:139 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:225 msgid "OpenDNS (208.67.220.220)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:119 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:200 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:138 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:224 msgid "OpenDNS (208.67.222.222)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:101 msgid "Oversea Mode" msgstr "海外用户回国模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:147 msgid "Oversea Mode DNS-1 (114.114.114.114)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:148 msgid "Oversea Mode DNS-2 (114.114.115.115)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:416 msgid "Packet" msgstr "数据包" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:409 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:114 msgid "Password" msgstr "密码" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:90 msgid "Paste sharing link here" msgstr "在此处粘贴分享链接" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1119 msgid "Peer public key" msgstr "节点公钥" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:14 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:23 msgid "Perform reset" msgstr "执行重置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1012 msgid "Permit Without Stream" msgstr "允许无数据流" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:243 msgid "Ping Latency" msgstr "Ping 延迟" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1443 msgid "Please confirm the current certificate path" msgstr "请选择确认所传证书,证书不正确将无法运行" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:5 msgid "Please fill in reset" msgstr "请填写 reset" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:483 msgid "Plugin Opts" msgstr "插件参数" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:536 msgid "Port Hopping Interval(Unit:Second)" msgstr "端口跳跃间隔(单位:秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:519 msgid "Port hopping range" msgstr "端口跳跃范围" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1123 msgid "Pre-shared key" msgstr "预共享密钥" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1114 msgid "Private key" msgstr "私钥" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:487 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:132 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:128 msgid "Protocol" msgstr "传输协议" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:494 msgid "Protocol param (optional)" msgstr "传输协议参数(可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:104 msgid "Proxy Ports" msgstr "需要代理的端口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1160 msgid "Public key" msgstr "公钥" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1025 msgid "QUIC Key" msgstr "QUIC 密钥" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1018 msgid "QUIC Security" msgstr "QUIC 加密方式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:586 msgid "QUIC initConnReceiveWindow" msgstr "QUIC 初始的连接接收窗口大小" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:574 msgid "QUIC initStreamReceiveWindow" msgstr "QUIC 初始流接收窗口大小。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:592 msgid "QUIC maxConnReceiveWindow" msgstr "QUIC 最大的连接接收窗口大小" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:598 msgid "QUIC maxIdleTimeout(Unit:second)" msgstr "QUIC 最长空闲超时时间(单位:秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:580 msgid "QUIC maxStreamReceiveWindow" msgstr "QUIC 最大的流接收窗口大小" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:168 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:191 msgid "Quad9 DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1155 msgid "REALITY" msgstr "" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:11 msgid "RST Backup" msgstr "恢复备份" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/status.htm:7 msgid "RUNNING" msgstr "运行中" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1077 msgid "Read Buffer Size" msgstr "读取缓冲区大小" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:5 msgid "Really reset all changes?" msgstr "真的重置所有更改吗?" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:253 msgid "Reapply" msgstr "重新应用" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:181 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:186 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:192 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:199 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:206 msgid "Records" msgstr "条记录" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:315 msgid "Redirect traffic to this network interface" msgstr "分流到这个网络接口" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:29 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:35 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:11 msgid "Refresh Data" msgstr "更新数据库" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:24 msgid "Refresh Error!" msgstr "更新失败!" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:18 msgid "Refresh OK!" msgstr "更新成功!" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:6 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:5 msgid "Refresh..." msgstr "正在更新,请稍候..." #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1386 msgid "Reno" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1109 msgid "Reserved bytes(optional)" msgstr "保留字节(可选)" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:17 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:18 msgid "Reset complete" msgstr "重置完成" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:251 msgid "Reset to defaults" msgstr "恢复出厂设置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:113 msgid "Resolve Dns Mode" msgstr "DNS 解析方式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:163 msgid "Restart Service" msgstr "重启服务" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:162 msgid "Restart ShadowSocksR Plus+" msgstr "重启 ShadowSocksR Plus+" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:9 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:24 msgid "Restore Backup File" msgstr "恢复备份文件" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:16 msgid "Restore to default configuration" msgstr "恢复默认配置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:110 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:118 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:127 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:136 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:144 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:156 msgid "Running" msgstr "运行中" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:97 msgid "Running Mode" msgstr "运行模式" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:255 msgid "SS URL base64 sstr format not recognized." msgstr "无法识别 SS URL 的 Base64 格式。" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:13 msgid "SSR Client" msgstr "客户端" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:17 msgid "SSR Server" msgstr "服务端" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:269 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:63 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:71 msgid "Same as Global Server" msgstr "与全局服务器相同" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:139 msgid "Save Words splited by /" msgstr "" "命中关键字的节点将被保留。多个关键字用 / 分隔。此项为空则不启用保留匹配" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:149 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:172 msgid "Select DNS parse Mode" msgstr "选择 DNS 解析方式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:319 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:109 msgid "Selection ShadowSocks Node Use Version." msgstr "选择 ShadowSocks 节点使用版本。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1396 msgid "Self-signed Certificate" msgstr "自签证书" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:268 msgid "Server" msgstr "服务器" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:369 msgid "Server Address" msgstr "服务器地址" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:170 msgid "Server Count" msgstr "服务器节点数量" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:272 msgid "Server Node Type" msgstr "服务器节点类型" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:382 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:96 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:112 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:226 msgid "Server Port" msgstr "端口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:88 msgid "Server Setting" msgstr "服务端配置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:86 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:107 msgid "Server Type" msgstr "服务端类型" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:47 msgid "Server failsafe auto swith and custom update settings" msgstr "服务器节点故障自动切换/广告屏蔽/中国大陆 IP 段数据库更新设置" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:14 msgid "Servers Nodes" msgstr "服务器节点" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:67 msgid "Servers subscription and manage" msgstr "服务器节点订阅与管理" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1149 msgid "Session Ticket" msgstr "会话凭据" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:158 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:181 msgid "Set Single DNS" msgstr "设置单个 DNS" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:295 msgid "Shadow-TLS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:643 msgid "Shadow-TLS ChainPoxy type" msgstr "代理链类型" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:280 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:361 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:89 msgid "ShadowSocks" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:318 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:108 msgid "ShadowSocks Node Use Version" msgstr "ShadowSocks 节点使用版本" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:326 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:51 msgid "ShadowSocks-libev Version" msgstr "ShadowSocks-libev 版本" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:323 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:646 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:48 msgid "ShadowSocks-rust Version" msgstr "ShadowSocks-rust 版本" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:10 msgid "ShadowSocksR Plus+" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:30 msgid "ShadowSocksR Plus+ Settings" msgstr "ShadowSocksR Plus+ 设置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:654 msgid "Shadowsocks password" msgstr "shadowsocks密码" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:277 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:92 msgid "ShadowsocksR" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1164 msgid "Short ID" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:231 msgid "Socket Connected" msgstr "连接测试" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:365 msgid "Socks" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:804 msgid "Socks Version" msgstr "Socks 版本" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:302 msgid "Socks protocol auth methods, default:noauth." msgstr "Socks 协议的认证方式,默认值:noauth。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:298 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:87 msgid "Socks5" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:302 msgid "Socks5 Auth Mode" msgstr "Socks5 认证方式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:321 msgid "Socks5 Password" msgstr "Socks5 密码" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:316 msgid "Socks5 User" msgstr "Socks5 用户名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:151 msgid "Specifically for edit dnsproxy DNS parse files." msgstr "专门用于编辑 DNSPROXY 的 DNS 解析文件。" #: applications/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua:18 msgid "Status" msgstr "状态" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:155 msgid "Subscribe Default Auto-Switch" msgstr "订阅新节点自动切换设置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:133 msgid "Subscribe Filter Words" msgstr "订阅节点关键字过滤" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:137 msgid "Subscribe Save Words" msgstr "订阅节点关键字保留检查" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:130 msgid "Subscribe URL" msgstr "SS/SSR/V2/TROJAN 订阅 URL" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:157 msgid "Subscribe new add server default Auto-Switch on" msgstr "订阅加入的新节点默认开启自动切换" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:152 msgid "Subscribe nodes allows insecure connection as TLS client (insecure)" msgstr "订阅节点强制开启 不验证TLS客户端证书 (insecure)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:249 msgid "Support AdGuardHome and DNSMASQ format list" msgstr "同时支持 AdGuard Home 和 DNSMASQ 格式的过滤列表" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:58 msgid "Switch check cycly(second)" msgstr "自动切换检查周期(秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:626 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1363 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1446 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:149 msgid "TCP Fast Open" msgstr "TCP 快速打开" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:350 msgid "" "TCP fragments, which can deceive the censorship system in some cases, such " "as bypassing SNI blacklists." msgstr "TCP 分片,在某些情况下可以欺骗审查系统,比如绕过 SNI 黑名单。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:219 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:243 msgid "TCP upstream" msgstr "TCP 上游" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1136 msgid "TLS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:621 msgid "TLS 1.3 Strict mode" msgstr "TLS 1.3 限定模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1271 msgid "TLS ALPN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1263 msgid "TLS Host" msgstr "TLS 主机名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1057 msgid "TTI" msgstr "传输时间间隔" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:292 msgid "TUIC" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1284 msgid "TUIC ALPN" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:686 msgid "TUIC Server IP Address" msgstr "TUIC 服务器 IP 地址" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:693 msgid "TUIC User Password" msgstr "TUIC 用户密钥" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:679 msgid "TUIC User UUID" msgstr "TUIC 用户 uuid" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:744 msgid "TUIC receive window" msgstr "接收窗口(无需确认即可接收的最大字节数:默认8Mb)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:738 msgid "TUIC send window" msgstr "发送窗口(无需确认即可发送的最大字节数:默认8Mb*2)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:166 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:189 msgid "TWNIC-101 DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1250 msgid "" "The client has not configured mldsa65Verify, but it will not perform the " "\"additional verification\" step and can still connect normally, see:" msgstr "" "客户端若未配置 mldsa65Verify,但它不会执行 \"附加验证\" 步骤,仍可以正常连" "接,具体请参见:" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/reset.htm:10 msgid "The content entered is incorrect!" msgstr "输入的内容不正确!" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:604 msgid "The keep-alive period.(Unit:second)" msgstr "心跳包发送间隔(单位:秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:160 msgid "Through proxy update" msgstr "通过代理更新" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:162 msgid "Through proxy update list, Not Recommended" msgstr "通过路由器自身代理更新订阅" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:720 msgid "Timeout for establishing a connection to server(second)" msgstr "连接超时时间(单位:秒)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:153 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:176 msgid "Tips: Dnsproxy DNS Parse List Path:" msgstr "提示:Dnsproxy 的 DNS 解析列表路径:" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:379 msgid "To send noise packets, select \"Noise\" in Xray Settings." msgstr "在 Xray 设置中勾选 “噪声” 以发送噪声包。" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/refresh.htm:18 msgid "Total Records:" msgstr "新的总记录数:" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:813 msgid "Transport" msgstr "传输协议" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:530 msgid "Transport Protocol" msgstr "传输协议" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:283 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:360 msgid "Trojan" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:400 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:216 msgid "Type" msgstr "类型" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:532 msgid "UDP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:374 msgid "" "UDP noise, Under some circumstances it can bypass some UDP based protocol " "restrictions." msgstr "UDP 噪声,在某些情况下可以绕过一些针对 UDP 协议的限制。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:443 msgid "UDP over TCP" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:699 msgid "UDP relay mode" msgstr "UDP 中继模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:220 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:244 msgid "UDP upstream" msgstr "UDP 上游" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:218 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:242 msgid "UDP/TCP upstream" msgstr "UDP/TCP 上游" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/backup_restore.htm:30 msgid "UL Restore" msgstr "上传恢复" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:80 msgid "Unable to copy SSR to clipboard." msgstr "无法复制 SSR 网址到剪贴板。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:25 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/status.lua:35 msgid "Unknown" msgstr "未知" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:164 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/subscribe.htm:16 msgid "Update All Subscribe Servers" msgstr "更新所有订阅服务器节点" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:98 msgid "Update Interval (min)" msgstr "更新间隔 (分钟)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:141 msgid "Update Subscribe List" msgstr "更新订阅 URL 列表" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:77 msgid "Update Time (Every Week)" msgstr "更新时间(每周)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:143 msgid "Update subscribe url list first" msgstr "修改订阅 URL 和节点关键字后,请先点击更新" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:90 msgid "Update time (every day)" msgstr "更新时间(每天)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1063 msgid "Uplink Capacity(Default:Mbps)" msgstr "上行链路容量(默认:Mbps)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1406 #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/certupload.htm:3 msgid "Upload" msgstr "上传" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:111 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:130 msgid "Use ChinaDNS-NG query and cache" msgstr "使用 ChinaDNS-NG 查询并缓存" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:159 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:182 msgid "Use DNS List File" msgstr "使用 DNS 列表文件" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:250 msgid "Use DNS from WAN" msgstr "使用 WAN 下发的 DNS" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:251 msgid "Use DNS from WAN and 114DNS" msgstr "使用 WAN 下发的 DNS 和 114DNS" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:99 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:118 msgid "Use DNS2SOCKS query and cache" msgstr "使用 DNS2SOCKS 查询并缓存" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:102 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:121 msgid "Use DNS2SOCKS-RUST query and cache" msgstr "使用 DNS2SOCKS-RUST 查询并缓存" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:115 msgid "Use DNS2TCP query" msgstr "使用 DNS2TCP 查询" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:108 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:127 msgid "Use DNSPROXY query and cache" msgstr "使用 DNSPROXY 查询并缓存" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:132 msgid "Use Local DNS Service listen port 5335" msgstr "使用本机端口为 5335 的 DNS 服务" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:124 msgid "Use MOSDNS query (Not Support Oversea Mode)" msgstr "使用 MOSDNS 查询 (不支持海外用户回国模式)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:105 msgid "Use MosDNS query" msgstr "使用 MosDNS 查询" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:92 msgid "User cancelled." msgstr "用户已取消。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua:188 msgid "User-Agent" msgstr "用户代理(User-Agent)" #: applications/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm:210 msgid "Userinfo format error." msgstr "用户信息格式错误。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:402 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:110 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server.lua:117 msgid "Username" msgstr "用户名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:509 msgid "Users Authentication" msgstr "用户验证" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:304 msgid "Using incorrect encryption mothod may causes service fail to start" msgstr "输入不正确的参数组合可能会导致服务无法启动" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:274 msgid "V2Ray/XRay" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:357 msgid "V2Ray/XRay protocol" msgstr "V2Ray/XRay 协议" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:358 msgid "VLESS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:789 msgid "VLESS Encryption" msgstr "VLESS 加密" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:359 msgid "VMess" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1033 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1043 msgid "VideoCall (SRTP)" msgstr "视频通话(SRTP)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1099 msgid "" "Virtual NIC TUN of Linux kernel can be used only when system supports and " "have root permission. If used, IPv6 routing table 1023 is occupied." msgstr "" "需要系统支持且有 root 权限才能使用 Linux 内核的虚拟网卡 TUN,使用后会占用 " "IPv6 的 1023 号路由表。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:649 msgid "Vmess Protocol" msgstr "VMESS 协议" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:664 msgid "Vmess UUID" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:781 msgid "Vmess/VLESS ID (UUID)" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:30 msgid "WAN Force Proxy IP" msgstr "强制走代理的 WAN IP" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:25 msgid "WAN IP AC" msgstr "WAN IP 访问控制" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/control.lua:27 msgid "WAN White List IP" msgstr "不走代理的 WAN IP" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:850 msgid "WebSocket Host" msgstr "WebSocket 主机名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:856 msgid "WebSocket Path" msgstr "WebSocket 路径" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1035 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1045 msgid "WechatVideo" msgstr "微信视频通话" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:87 msgid "When disabled shunt mode, will same time stopped shunt service." msgstr "当停用分流模式时,将同时停止分流服务。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:189 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:213 msgid "When disabled, all AAAA requests are not resolved." msgstr "当禁用时,不解析所有 AAAA 请求。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:178 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:202 msgid "When two or more DNS servers are deployed, enable this function." msgstr "当部署两台或两台以上 DNS 服务器时,需要启用该功能。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:152 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:175 msgid "" "When use DNS list file, please ensure list file exists and is formatted " "correctly." msgstr "当使用 DNS 列表文件时,请确保列表文件存在并且格式正确。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:363 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1037 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1047 msgid "WireGuard" msgstr "WireGuard 数据包" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1129 msgid "Wireguard allows only traffic from specific source IP." msgstr "Wireguard 仅允许特定源 IP 的流量。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1110 msgid "Wireguard reserved bytes." msgstr "Wireguard 保留字节。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1083 msgid "Write Buffer Size" msgstr "写入缓冲区大小" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:911 msgid "XHTTP Extra" msgstr "XHTTP 附加项" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:899 msgid "XHTTP Host" msgstr "XHTTP 主机名" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:890 msgid "XHTTP Mode" msgstr "XHTTP 模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:905 msgid "XHTTP Path" msgstr "XHTTP 路径" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:347 msgid "Xray Fragment Settings" msgstr "Xray 分片设置" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:377 msgid "Xray Noise Packets" msgstr "Xray 噪声数据包" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:243 msgid "adblock_url" msgstr "广告屏蔽更新 URL" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1021 msgid "aes-128-gcm" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1358 msgid "allow" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1352 msgid "allow: Allows use Mux connection." msgstr "allow:允许走 Mux 连接。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1293 msgid "allowInsecure" msgstr "允许不安全连接" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1128 msgid "allowedIPs(optional)" msgstr "allowedIPs(可选)" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1206 msgid "android" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:246 msgid "anti-AD" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1022 msgid "chacha20-poly1305" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:83 msgid "china-operator-ip" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1202 msgid "chrome" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:171 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:194 msgid "cloudflare-dns.com DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1383 msgid "comment_tcpcongestion_disable" msgstr "系统默认值" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1322 msgid "concurrency" msgstr "TCP 最大并发连接数" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1380 msgid "custom_tcpcongestion" msgstr "连接服务器节点的 TCP 拥塞控制算法" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1212 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1330 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1343 msgid "disable" msgstr "禁用" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:167 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:190 msgid "dns.sb DNSCrypt SDNS" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1207 msgid "edge" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:183 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:207 msgid "fastest_addr" msgstr "最快响应" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:230 msgid "felixonmars/dnsmasq-china-list" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1203 msgid "firefox" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1000 msgid "gRPC Idle Timeout" msgstr "gPRC 空闲超时" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:973 msgid "gRPC Mode" msgstr "gRPC 模式" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:967 msgid "gRPC Service Name" msgstr "gRPC 服务名称" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:73 msgid "gfwlist Update url" msgstr "GFW 列表更新 URL" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:77 msgid "gfwlist/gfwlist" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1205 msgid "ios" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:181 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:205 msgid "load_balance" msgstr "负载均衡" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:702 msgid "lossless UDP relay using QUIC streams" msgstr "使用 QUIC 流的无损 UDP 中继" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:701 msgid "native UDP characteristics" msgstr "原生 UDP 特性" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:90 msgid "nfip_url" msgstr "Netflix IP 段更新 URL" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:434 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1177 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1190 msgid "none" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:464 msgid "obfs-local" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:182 #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:206 msgid "parallel" msgstr "并行查询" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1209 msgid "qq" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1210 msgid "random" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1211 msgid "randomized" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1357 msgid "reject" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1204 msgid "safari" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:636 msgid "shadow-TLS SNI" msgstr "服务器名称指示" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:473 msgid "shadow-tls" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:614 msgid "shadowTLS protocol Version" msgstr "ShadowTLS 协议版本" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1359 msgid "skip" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1353 msgid "" "skip: Not use Mux module to carry UDP 443 traffic, Use original UDP " "transmission method of proxy protocol." msgstr "" "skip:不使用 Mux 模块承载 UDP 443 流量,将使用代理协议原本的 UDP 传输方式。" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1168 msgid "spiderX" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua:74 msgid "v2fly/domain-list-community" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:467 msgid "v2ray-plugin" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua:275 msgid "valid address:port" msgstr "有效的地址:端口" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/server-config.lua:101 msgid "warning! Please do not reuse the port!" msgstr "警告!请不要重复使用端口!" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:470 msgid "xray-plugin" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1192 msgid "xtls-rprx-vision" msgstr "" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1335 msgid "xudpConcurrency" msgstr "UDP 最大并发连接数" #: applications/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua:1348 msgid "xudpProxyUDP443" msgstr "对被代理的 UDP/443 流量处理方式" #~ msgid "Splithttp Host" #~ msgstr "SplitHTTP 主机名" #~ msgid "Splithttp Path" #~ msgstr "SplitHTTP 路径" #~ msgid "Custom DNS Server for mosdns" #~ msgstr "MosDNS 自定义 DNS 服务器" #~ msgid "ShadowSocksR Client" #~ msgstr "ShadowSocksR 客户端" #~ msgid "ShadowSocksR is running" #~ msgstr "ShadowSocksR 客户端运行中" #~ msgid "ShadowSocksR is not running" #~ msgstr "ShadowSocksR 客户端未运行" #~ msgid "Global Server" #~ msgstr "全局服务器" #~ msgid "ShadowSocksR SOCK5 Proxy is running" #~ msgstr "ShadowSocksR SOCK5 代理运行中" #~ msgid "UDP Relay Server" #~ msgstr "UDP 中继服务器" #~ msgid "Servers Setting" #~ msgstr "服务器配置" #~ msgid "Onetime Authentication" #~ msgstr "一次验证" #~ msgid "Authentication type" #~ msgstr "验证类型" #~ msgid "" #~ "NOTE: If the server uses the userpass authentication, the format must be " #~ "username:password." #~ msgstr "注意: 如果服务器使用 userpass 验证,格式必须是 username:password。" #~ msgid "QUIC connection receive window" #~ msgstr "QUIC 连接接收窗口" #~ msgid "QUIC stream receive window" #~ msgstr "QUIC 流接收窗口" #~ msgid "Lazy Start" #~ msgstr "延迟启动" #~ msgid "Enable Tunnel(DNS)" #~ msgstr "启用隧道(DNS)转发" #~ msgid "Tunnel Port" #~ msgstr "隧道(DNS)本地端口" #~ msgid "Forwarding Tunnel" #~ msgstr "隧道(DNS)转发地址" #~ msgid "Interfaces - WAN" #~ msgstr "接口 - WAN" #~ msgid "Bypassed IP List" #~ msgstr "被忽略 IP 列表" #~ msgid "NULL - As Global Proxy" #~ msgstr "留空 - 作为全局代理" #~ msgid "Bypassed IP" #~ msgstr "额外被忽略 IP" #~ msgid "Forwarded IP" #~ msgstr "强制走代理 IP" #~ msgid "Interfaces - LAN" #~ msgstr "接口 - LAN" #~ msgid "ShadowSocksR Server" #~ msgstr "ShadowSocksR 服务端" #~ msgid "ShadowSocksR Server is running" #~ msgstr "ShadowSocksR 服务端运行中" #~ msgid "ShadowSocksR Server is not running" #~ msgstr "ShadowSocksR 服务端未运行" #~ msgid "Enable Process Monitor" #~ msgstr "启用进程监控" #~ msgid "Running Status" #~ msgstr "运行状态" #~ msgid "Global SSR Server" #~ msgstr "SSR 服务端" #~ msgid "DNS Tunnel" #~ msgstr "DNS 隧道" #~ msgid "IPK Version" #~ msgstr "IPK 版本号" #~ msgid "IPK Installation Time" #~ msgstr "IPK 安装时间" #~ msgid "Project" #~ msgstr "项目地址" #~ msgid "Enable GFW mode" #~ msgstr "启用 GFW 模式" #~ msgid "Router Proxy" #~ msgstr "路由器访问控制" #~ msgid "Bypassed Proxy" #~ msgstr "不走代理" #~ msgid "Forwarded Proxy" #~ msgstr "强制走代理" #~ msgid "UDP Relay" #~ msgstr "UDP 中继" #~ msgid "Check" #~ msgstr "检查" #~ msgid "Proxy Check" #~ msgstr "代理检查" #~ msgid "Enable Process Deamon" #~ msgstr "启用进程自动守护" #~ msgid "DNS Server IP and Port" #~ msgstr "DNS 服务器地址和端口" #~ msgid "Use SSR DNS Tunnel" #~ msgstr "使用 SSR DNS 隧道" #~ msgid "Use Other DNS Tunnel(Need to install)" #~ msgstr "使用其他 DNS 转发(需要自己安装)" #~ msgid "Export SSR" #~ msgstr "导出 SSR 配置信息" #~ msgid "Servers Manage" #~ msgstr "服务器管理" #~ msgid "GFW List" #~ msgstr "GFW 列表" #~ msgid "Use MOSDNS query" #~ msgstr "使用 MOSDNS 查询" #~ msgid "DNS Server IP:Port" #~ msgstr "DNS 服务器 IP:Port" #~ msgid "Update" #~ msgstr "更新" #~ msgid "Router Self AC" #~ msgstr "路由器自身代理设置" #~ msgid "Router Self Proxy" #~ msgstr "路由器自身代理方式" #~ msgid "Normal Proxy" #~ msgstr "跟随全局设置" #~ msgid "GFW Custom List" #~ msgstr "GFW 用户自定义列表" #~ msgid "Please refer to the following writing" #~ msgstr "每行一个域名,无需写前面的 http(s)://,提交后即时生效" #~ msgid "Plugin" #~ msgstr "插件" #~ msgid "upload" #~ msgstr "上传" #~ msgid "SOCKS5 Proxy Server Settings" #~ msgstr "SOCKS5 代理服务端设置" #~ msgid "SOCKS5 Proxy Server" #~ msgstr "SOCKS5 代理服务端" #~ msgid "Enable SOCKS5 Proxy Server" #~ msgstr "启用 SOCKS5 代理服务" #~ msgid "Enable WAN Access" #~ msgstr "允许从 WAN 访问" #~ msgid "Netflix IP List" #~ msgstr "Netflix 分流IP列表" #~ msgid "Reset Error" #~ msgstr "重置错误"
28harishkumar/blog
14,443
public/js/tinymce/plugins/jbimages/ci/system/core/URI.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * URI Class * * Parses URIs and determines routing * * @package CodeIgniter * @subpackage Libraries * @category URI * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/uri.html */ class CI_URI { /** * List of cached uri segments * * @var array * @access public */ var $keyval = array(); /** * Current uri string * * @var string * @access public */ var $uri_string; /** * List of uri segments * * @var array * @access public */ var $segments = array(); /** * Re-indexed list of uri segments * Starts at 1 instead of 0 * * @var array * @access public */ var $rsegments = array(); /** * Constructor * * Simply globalizes the $RTR object. The front * loads the Router class early on so it's not available * normally as other classes are. * * @access public */ function __construct() { $this->config =& load_class('Config', 'core'); log_message('debug', "URI Class Initialized"); } // -------------------------------------------------------------------- /** * Get the URI String * * @access private * @return string */ function _fetch_uri_string() { if (strtoupper($this->config->item('uri_protocol')) == 'AUTO') { // Is the request coming from the command line? if (php_sapi_name() == 'cli' or defined('STDIN')) { $this->_set_uri_string($this->_parse_cli_args()); return; } // Let's try the REQUEST_URI first, this will work in most situations if ($uri = $this->_detect_uri()) { $this->_set_uri_string($uri); return; } // Is there a PATH_INFO variable? // Note: some servers seem to have trouble with getenv() so we'll test it two ways $path = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO'); if (trim($path, '/') != '' && $path != "/".SELF) { $this->_set_uri_string($path); return; } // No PATH_INFO?... What about QUERY_STRING? $path = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING'); if (trim($path, '/') != '') { $this->_set_uri_string($path); return; } // As a last ditch effort lets try using the $_GET array if (is_array($_GET) && count($_GET) == 1 && trim(key($_GET), '/') != '') { $this->_set_uri_string(key($_GET)); return; } // We've exhausted all our options... $this->uri_string = ''; return; } $uri = strtoupper($this->config->item('uri_protocol')); if ($uri == 'REQUEST_URI') { $this->_set_uri_string($this->_detect_uri()); return; } elseif ($uri == 'CLI') { $this->_set_uri_string($this->_parse_cli_args()); return; } $path = (isset($_SERVER[$uri])) ? $_SERVER[$uri] : @getenv($uri); $this->_set_uri_string($path); } // -------------------------------------------------------------------- /** * Set the URI String * * @access public * @param string * @return string */ function _set_uri_string($str) { // Filter out control characters $str = remove_invisible_characters($str, FALSE); // If the URI contains only a slash we'll kill it $this->uri_string = ($str == '/') ? '' : $str; } // -------------------------------------------------------------------- /** * Detects the URI * * This function will detect the URI automatically and fix the query string * if necessary. * * @access private * @return string */ private function _detect_uri() { if ( ! isset($_SERVER['REQUEST_URI']) OR ! isset($_SERVER['SCRIPT_NAME'])) { return ''; } $uri = $_SERVER['REQUEST_URI']; if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0) { $uri = substr($uri, strlen($_SERVER['SCRIPT_NAME'])); } elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0) { $uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME']))); } // This section ensures that even on servers that require the URI to be in the query string (Nginx) a correct // URI is found, and also fixes the QUERY_STRING server var and $_GET array. if (strncmp($uri, '?/', 2) === 0) { $uri = substr($uri, 2); } $parts = preg_split('#\?#i', $uri, 2); $uri = $parts[0]; if (isset($parts[1])) { $_SERVER['QUERY_STRING'] = $parts[1]; parse_str($_SERVER['QUERY_STRING'], $_GET); } else { $_SERVER['QUERY_STRING'] = ''; $_GET = array(); } if ($uri == '/' || empty($uri)) { return '/'; } $uri = parse_url($uri, PHP_URL_PATH); // Do some final cleaning of the URI and return it return str_replace(array('//', '../'), '/', trim($uri, '/')); } // -------------------------------------------------------------------- /** * Parse cli arguments * * Take each command line argument and assume it is a URI segment. * * @access private * @return string */ private function _parse_cli_args() { $args = array_slice($_SERVER['argv'], 1); return $args ? '/' . implode('/', $args) : ''; } // -------------------------------------------------------------------- /** * Filter segments for malicious characters * * @access private * @param string * @return string */ function _filter_uri($str) { if ($str != '' && $this->config->item('permitted_uri_chars') != '' && $this->config->item('enable_query_strings') == FALSE) { // preg_quote() in PHP 5.3 escapes -, so the str_replace() and addition of - to preg_quote() is to maintain backwards // compatibility as many are unaware of how characters in the permitted_uri_chars will be parsed as a regex pattern if ( ! preg_match("|^[".str_replace(array('\\-', '\-'), '-', preg_quote($this->config->item('permitted_uri_chars'), '-'))."]+$|i", $str)) { show_error('The URI you submitted has disallowed characters.', 400); } } // Convert programatic characters to entities $bad = array('$', '(', ')', '%28', '%29'); $good = array('&#36;', '&#40;', '&#41;', '&#40;', '&#41;'); return str_replace($bad, $good, $str); } // -------------------------------------------------------------------- /** * Remove the suffix from the URL if needed * * @access private * @return void */ function _remove_url_suffix() { if ($this->config->item('url_suffix') != "") { $this->uri_string = preg_replace("|".preg_quote($this->config->item('url_suffix'))."$|", "", $this->uri_string); } } // -------------------------------------------------------------------- /** * Explode the URI Segments. The individual segments will * be stored in the $this->segments array. * * @access private * @return void */ function _explode_segments() { foreach (explode("/", preg_replace("|/*(.+?)/*$|", "\\1", $this->uri_string)) as $val) { // Filter segments for security $val = trim($this->_filter_uri($val)); if ($val != '') { $this->segments[] = $val; } } } // -------------------------------------------------------------------- /** * Re-index Segments * * This function re-indexes the $this->segment array so that it * starts at 1 rather than 0. Doing so makes it simpler to * use functions like $this->uri->segment(n) since there is * a 1:1 relationship between the segment array and the actual segments. * * @access private * @return void */ function _reindex_segments() { array_unshift($this->segments, NULL); array_unshift($this->rsegments, NULL); unset($this->segments[0]); unset($this->rsegments[0]); } // -------------------------------------------------------------------- /** * Fetch a URI Segment * * This function returns the URI segment based on the number provided. * * @access public * @param integer * @param bool * @return string */ function segment($n, $no_result = FALSE) { return ( ! isset($this->segments[$n])) ? $no_result : $this->segments[$n]; } // -------------------------------------------------------------------- /** * Fetch a URI "routed" Segment * * This function returns the re-routed URI segment (assuming routing rules are used) * based on the number provided. If there is no routing this function returns the * same result as $this->segment() * * @access public * @param integer * @param bool * @return string */ function rsegment($n, $no_result = FALSE) { return ( ! isset($this->rsegments[$n])) ? $no_result : $this->rsegments[$n]; } // -------------------------------------------------------------------- /** * Generate a key value pair from the URI string * * This function generates and associative array of URI data starting * at the supplied segment. For example, if this is your URI: * * example.com/user/search/name/joe/location/UK/gender/male * * You can use this function to generate an array with this prototype: * * array ( * name => joe * location => UK * gender => male * ) * * @access public * @param integer the starting segment number * @param array an array of default values * @return array */ function uri_to_assoc($n = 3, $default = array()) { return $this->_uri_to_assoc($n, $default, 'segment'); } /** * Identical to above only it uses the re-routed segment array * * @access public * @param integer the starting segment number * @param array an array of default values * @return array * */ function ruri_to_assoc($n = 3, $default = array()) { return $this->_uri_to_assoc($n, $default, 'rsegment'); } // -------------------------------------------------------------------- /** * Generate a key value pair from the URI string or Re-routed URI string * * @access private * @param integer the starting segment number * @param array an array of default values * @param string which array we should use * @return array */ function _uri_to_assoc($n = 3, $default = array(), $which = 'segment') { if ($which == 'segment') { $total_segments = 'total_segments'; $segment_array = 'segment_array'; } else { $total_segments = 'total_rsegments'; $segment_array = 'rsegment_array'; } if ( ! is_numeric($n)) { return $default; } if (isset($this->keyval[$n])) { return $this->keyval[$n]; } if ($this->$total_segments() < $n) { if (count($default) == 0) { return array(); } $retval = array(); foreach ($default as $val) { $retval[$val] = FALSE; } return $retval; } $segments = array_slice($this->$segment_array(), ($n - 1)); $i = 0; $lastval = ''; $retval = array(); foreach ($segments as $seg) { if ($i % 2) { $retval[$lastval] = $seg; } else { $retval[$seg] = FALSE; $lastval = $seg; } $i++; } if (count($default) > 0) { foreach ($default as $val) { if ( ! array_key_exists($val, $retval)) { $retval[$val] = FALSE; } } } // Cache the array for reuse $this->keyval[$n] = $retval; return $retval; } // -------------------------------------------------------------------- /** * Generate a URI string from an associative array * * * @access public * @param array an associative array of key/values * @return array */ function assoc_to_uri($array) { $temp = array(); foreach ((array)$array as $key => $val) { $temp[] = $key; $temp[] = $val; } return implode('/', $temp); } // -------------------------------------------------------------------- /** * Fetch a URI Segment and add a trailing slash * * @access public * @param integer * @param string * @return string */ function slash_segment($n, $where = 'trailing') { return $this->_slash_segment($n, $where, 'segment'); } // -------------------------------------------------------------------- /** * Fetch a URI Segment and add a trailing slash * * @access public * @param integer * @param string * @return string */ function slash_rsegment($n, $where = 'trailing') { return $this->_slash_segment($n, $where, 'rsegment'); } // -------------------------------------------------------------------- /** * Fetch a URI Segment and add a trailing slash - helper function * * @access private * @param integer * @param string * @param string * @return string */ function _slash_segment($n, $where = 'trailing', $which = 'segment') { $leading = '/'; $trailing = '/'; if ($where == 'trailing') { $leading = ''; } elseif ($where == 'leading') { $trailing = ''; } return $leading.$this->$which($n).$trailing; } // -------------------------------------------------------------------- /** * Segment Array * * @access public * @return array */ function segment_array() { return $this->segments; } // -------------------------------------------------------------------- /** * Routed Segment Array * * @access public * @return array */ function rsegment_array() { return $this->rsegments; } // -------------------------------------------------------------------- /** * Total number of segments * * @access public * @return integer */ function total_segments() { return count($this->segments); } // -------------------------------------------------------------------- /** * Total number of routed segments * * @access public * @return integer */ function total_rsegments() { return count($this->rsegments); } // -------------------------------------------------------------------- /** * Fetch the entire URI string * * @access public * @return string */ function uri_string() { return $this->uri_string; } // -------------------------------------------------------------------- /** * Fetch the entire Re-routed URI string * * @access public * @return string */ function ruri_string() { return '/'.implode('/', $this->rsegment_array()); } } // END URI Class /* End of file URI.php */ /* Location: ./system/core/URI.php */
28harishkumar/blog
4,697
public/js/tinymce/plugins/jbimages/ci/system/core/Hooks.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * CodeIgniter Hooks Class * * Provides a mechanism to extend the base system without hacking. * * @package CodeIgniter * @subpackage Libraries * @category Libraries * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/encryption.html */ class CI_Hooks { /** * Determines wether hooks are enabled * * @var bool */ var $enabled = FALSE; /** * List of all hooks set in config/hooks.php * * @var array */ var $hooks = array(); /** * Determines wether hook is in progress, used to prevent infinte loops * * @var bool */ var $in_progress = FALSE; /** * Constructor * */ function __construct() { $this->_initialize(); log_message('debug', "Hooks Class Initialized"); } // -------------------------------------------------------------------- /** * Initialize the Hooks Preferences * * @access private * @return void */ function _initialize() { $CFG =& load_class('Config', 'core'); // If hooks are not enabled in the config file // there is nothing else to do if ($CFG->item('enable_hooks') == FALSE) { return; } // Grab the "hooks" definition file. // If there are no hooks, we're done. if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php')) { include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'); } elseif (is_file(APPPATH.'config/hooks.php')) { include(APPPATH.'config/hooks.php'); } if ( ! isset($hook) OR ! is_array($hook)) { return; } $this->hooks =& $hook; $this->enabled = TRUE; } // -------------------------------------------------------------------- /** * Call Hook * * Calls a particular hook * * @access private * @param string the hook name * @return mixed */ function _call_hook($which = '') { if ( ! $this->enabled OR ! isset($this->hooks[$which])) { return FALSE; } if (isset($this->hooks[$which][0]) AND is_array($this->hooks[$which][0])) { foreach ($this->hooks[$which] as $val) { $this->_run_hook($val); } } else { $this->_run_hook($this->hooks[$which]); } return TRUE; } // -------------------------------------------------------------------- /** * Run Hook * * Runs a particular hook * * @access private * @param array the hook details * @return bool */ function _run_hook($data) { if ( ! is_array($data)) { return FALSE; } // ----------------------------------- // Safety - Prevents run-away loops // ----------------------------------- // If the script being called happens to have the same // hook call within it a loop can happen if ($this->in_progress == TRUE) { return; } // ----------------------------------- // Set file path // ----------------------------------- if ( ! isset($data['filepath']) OR ! isset($data['filename'])) { return FALSE; } $filepath = APPPATH.$data['filepath'].'/'.$data['filename']; if ( ! file_exists($filepath)) { return FALSE; } // ----------------------------------- // Set class/function name // ----------------------------------- $class = FALSE; $function = FALSE; $params = ''; if (isset($data['class']) AND $data['class'] != '') { $class = $data['class']; } if (isset($data['function'])) { $function = $data['function']; } if (isset($data['params'])) { $params = $data['params']; } if ($class === FALSE AND $function === FALSE) { return FALSE; } // ----------------------------------- // Set the in_progress flag // ----------------------------------- $this->in_progress = TRUE; // ----------------------------------- // Call the requested class and/or function // ----------------------------------- if ($class !== FALSE) { if ( ! class_exists($class)) { require($filepath); } $HOOK = new $class; $HOOK->$function($params); } else { if ( ! function_exists($function)) { require($filepath); } $function($params); } $this->in_progress = FALSE; return TRUE; } } // END CI_Hooks class /* End of file Hooks.php */ /* Location: ./system/core/Hooks.php */
2929004360/ruoyi-sign
9,264
ruoyi-work/src/main/java/com/ruoyi/work/service/impl/PdfServiceImpl.java
package com.ruoyi.work.service.impl; import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.core.util.ObjectUtil; import com.itextpdf.text.DocumentException; import com.itextpdf.text.pdf.PdfReader; import com.itextpdf.text.pdf.SimpleBookmark; import com.itextpdf.text.pdf.parser.ImageRenderInfo; import com.itextpdf.text.pdf.parser.PdfReaderContentParser; import com.itextpdf.text.pdf.parser.RenderListener; import com.itextpdf.text.pdf.parser.TextRenderInfo; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.exception.DataException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.work.config.PdfSignatureConfig; import com.ruoyi.work.domain.KeywordInfo; import com.ruoyi.work.domain.Stamp; import com.ruoyi.work.service.IPdfService; import com.ruoyi.work.utils.PdfUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.IOException; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; /** * pdfService业务层实现 * * @author fengcheng */ @Service public class PdfServiceImpl implements IPdfService { @Autowired private PdfSignatureConfig pdfSignatureConfig; /** * 获取pdf大纲 * * @param downloadPath * @return */ @Override public List<HashMap<String, Object>> getPdfOutline(String downloadPath) { return parsePDFOutlines(downloadPath); } /** * 通过关键字获取xy * * @param pdfReader * @param keyword * @return */ @Override public List<KeywordInfo> getSealLocation(PdfReader pdfReader, String keyword) throws IOException { return getSealLocationKeyword(pdfReader, keyword); } /** * 完成盖章和签名 * * @param stampList */ @Override public void completeStamp(List<Stamp> stampList) { String localPath = RuoYiConfig.getProfile(); for (Stamp stamp : stampList) { if (ObjectUtil.isNull(stamp.getX())) { throw new DataException("x轴为空"); } if (ObjectUtil.isNull(stamp.getPage())) { throw new DataException("page为空"); } if (ObjectUtil.isNull(stamp.getWidth())) { throw new DataException("width为空"); } if (ObjectUtil.isNull(stamp.getHeight())) { throw new DataException("height为空"); } // 获取pdf文件路径 String pathPdf = StringUtils.substringAfter(stamp.getFilePath(), Constants.RESOURCE_PREFIX); String inputPdfPathPdf = localPath + pathPdf; String outPdfPathPdf = localPath + "/temp" + pathPdf; // 获取章图片路径 String pathSura = StringUtils.substringAfter(stamp.getImagesUrl(), Constants.RESOURCE_PREFIX); String inputPdfPathSura = localPath + pathSura; PdfSignatureConfig pdfConfig = new PdfSignatureConfig( ResourceUtil.getStream(pdfSignatureConfig.getPath()), pdfSignatureConfig.getPassword(), pdfSignatureConfig.getName(), pdfSignatureConfig.getPhone(), pdfSignatureConfig.getPlace(), pdfSignatureConfig.getCause()); PdfUtils.stamp(pdfConfig, inputPdfPathPdf, outPdfPathPdf, inputPdfPathSura, stamp.getX(), stamp.getY(), stamp.getWidth(), stamp.getHeight(), stamp.getPage()); } } /** * 获取签章位置(关键字位置) * * @param pdfReader * @param signKeyWord * @return List<KeywordInfo> * @throws GeneralSecurityException * @throws IOException * @throws DocumentException */ private List<KeywordInfo> getSealLocationKeyword(PdfReader pdfReader, String signKeyWord) throws IOException { // 读取pdf内容 int pageNum = pdfReader.getNumberOfPages(); // 签章位置对象 List<KeywordInfo> keywordList = new LinkedList<>(); // 下标从1开始 for (int page = 1; page <= pageNum; page++) { KeywordInfo rectangleCentreBase = new KeywordInfo(); rectangleCentreBase.setPage(page); PdfReaderContentParser pdfReaderContentParser = new PdfReaderContentParser(pdfReader); pdfReaderContentParser.processContent(page, new RenderListener() { StringBuilder sb = new StringBuilder(""); int maxLength = signKeyWord.length(); @Override public void renderText(TextRenderInfo textRenderInfo) { // 只适用 单字块文档 以及 关键字整个为一个块的情况 // 设置 关键字文本为单独的块,不然会错位 boolean isKeywordChunk = textRenderInfo.getText().length() == maxLength; if (isKeywordChunk) { // 文档按照 块 读取 sb.delete(0, sb.length()); sb.append(textRenderInfo.getText()); } else if (textRenderInfo.getText().length() < maxLength) { // 有些文档 单字一个块的情况 // 拼接字符串 sb.append(textRenderInfo.getText()); // 去除首部字符串,使长度等于关键字长度 if (sb.length() > maxLength) { sb.delete(0, sb.length() - maxLength); } } else if (textRenderInfo.getText().contains(signKeyWord)) { sb.delete(0, sb.length()); sb.append(signKeyWord); } // 判断是否匹配上 if (signKeyWord.equals(sb.toString())) { KeywordInfo keywordInfo = rectangleCentreBase.copy(); // 计算中心点坐标 com.itextpdf.awt.geom.Rectangle2D.Float baseFloat = textRenderInfo.getBaseline() .getBoundingRectange(); com.itextpdf.awt.geom.Rectangle2D.Float ascentFloat = textRenderInfo.getAscentLine() .getBoundingRectange(); float centreX; float centreY; if (isKeywordChunk) { centreX = baseFloat.x + ascentFloat.width / 2; centreY = baseFloat.y + ((ascentFloat.y - baseFloat.y) / 2); } else if (textRenderInfo.getText().length() < maxLength) { centreX = baseFloat.x + ascentFloat.width - (maxLength * ascentFloat.width / 2); centreY = baseFloat.y + ((ascentFloat.y - baseFloat.y) / 2); } else { int length = textRenderInfo.getText().length(); int index = textRenderInfo.getText().indexOf(signKeyWord); centreX = baseFloat.x + ascentFloat.width / length * (index + 1); centreY = baseFloat.y + ((ascentFloat.y - baseFloat.y) / 2); } keywordInfo.setCentreX(centreX); keywordInfo.setCentreY(centreY); keywordList.add(keywordInfo); // 匹配完后 清除 sb.delete(0, sb.length()); } } @Override public void renderImage(ImageRenderInfo arg0) { } @Override public void endTextBlock() { } @Override public void beginTextBlock() { } }); } return keywordList; } private List<HashMap<String, Object>> parsePDFOutlines(String filePath) { List<HashMap<String, Object>> outlines = new ArrayList<>(); try { PdfReader reader = new PdfReader(filePath); List<HashMap<String, Object>> bookmarks = SimpleBookmark.getBookmark(reader); if (bookmarks != null) { processOutlines(bookmarks, outlines); } reader.close(); } catch (Exception e) { e.printStackTrace(); } return outlines; } private void processOutlines(List<HashMap<String, Object>> bookmarks, List<HashMap<String, Object>> outlines) { for (HashMap<String, Object> bookmark : bookmarks) { HashMap<String, Object> outline = new HashMap<>(16); outline.put("title", bookmark.get("Title")); if (ObjectUtil.isNotEmpty(bookmark.get("Page"))) { outline.put("page", bookmark.get("Page").toString().split(" ")[0]); } if (bookmark.containsKey("Kids")) { List<HashMap<String, Object>> kids = (List<HashMap<String, Object>>) bookmark.get("Kids"); List<HashMap<String, Object>> children = new ArrayList<>(); outline.put("children", children); processOutlines(kids, children); } outlines.add(outline); } } }
2929004360/ruoyi-sign
2,695
ruoyi-work/src/main/java/com/ruoyi/work/service/impl/WorkSignatureServiceImpl.java
package com.ruoyi.work.service.impl; import java.util.List; import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.work.mapper.WorkSignatureMapper; import com.ruoyi.work.domain.WorkSignature; import com.ruoyi.work.service.IWorkSignatureService; /** * 签名Service业务层处理 * * @author fengcheng * @date 2025-03-18 */ @Service public class WorkSignatureServiceImpl implements IWorkSignatureService { @Autowired private WorkSignatureMapper workSignatureMapper; /** * 查询签名 * * @param signatureId 签名主键 * @return 签名 */ @Override public WorkSignature selectWorkSignatureBySignatureId(Long signatureId) { return workSignatureMapper.selectWorkSignatureBySignatureId(signatureId); } /** * 查询签名列表 * * @param workSignature 签名 * @return 签名 */ @Override @DataScope(deptAlias = "d", userAlias = "u") public List<WorkSignature> selectWorkSignatureList(WorkSignature workSignature) { return workSignatureMapper.selectWorkSignatureList(workSignature); } /** * 新增签名 * * @param workSignature 签名 * @return 结果 */ @Override public int insertWorkSignature(WorkSignature workSignature) { workSignature.setUserId(SecurityUtils.getUserId()); workSignature.setDeptId(SecurityUtils.getDeptId()); workSignature.setUserName(SecurityUtils.getUsername()); workSignature.setDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName()); workSignature.setCreateTime(DateUtils.getNowDate()); return workSignatureMapper.insertWorkSignature(workSignature); } /** * 修改签名 * * @param workSignature 签名 * @return 结果 */ @Override public int updateWorkSignature(WorkSignature workSignature) { workSignature.setUpdateTime(DateUtils.getNowDate()); return workSignatureMapper.updateWorkSignature(workSignature); } /** * 批量删除签名 * * @param signatureIds 需要删除的签名主键 * @return 结果 */ @Override public int deleteWorkSignatureBySignatureIds(Long[] signatureIds) { return workSignatureMapper.deleteWorkSignatureBySignatureIds(signatureIds); } /** * 删除签名信息 * * @param signatureId 签名主键 * @return 结果 */ @Override public int deleteWorkSignatureBySignatureId(Long signatureId) { return workSignatureMapper.deleteWorkSignatureBySignatureId(signatureId); } }
2929004360/ruoyi-sign
2,401
ruoyi-work/src/main/java/com/ruoyi/work/service/impl/WorkSealServiceImpl.java
package com.ruoyi.work.service.impl; import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.work.domain.WorkSeal; import com.ruoyi.work.mapper.WorkSealMapper; import com.ruoyi.work.service.IWorkSealService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * 印章管理Service业务层处理 * * @author fengcheng * @date 2025-03-17 */ @Service public class WorkSealServiceImpl implements IWorkSealService { @Autowired private WorkSealMapper workSealMapper; /** * 查询印章管理 * * @param suraId 印章管理主键 * @return 印章管理 */ @Override public WorkSeal selectWorkSealBySuraId(Long suraId) { return workSealMapper.selectWorkSealBySuraId(suraId); } /** * 查询印章管理列表 * * @param workSeal 印章管理 * @return 印章管理 */ @Override @DataScope(deptAlias = "d", userAlias = "u") public List<WorkSeal> selectWorkSealList(WorkSeal workSeal) { return workSealMapper.selectWorkSealList(workSeal); } /** * 新增印章管理 * * @param workSeal 印章管理 * @return 结果 */ @Override public int insertWorkSeal(WorkSeal workSeal) { workSeal.setUserId(SecurityUtils.getUserId()); workSeal.setDeptId(SecurityUtils.getDeptId()); workSeal.setUserName(SecurityUtils.getUsername()); workSeal.setDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName()); workSeal.setCreateTime(DateUtils.getNowDate()); return workSealMapper.insertWorkSeal(workSeal); } /** * 修改印章管理 * * @param workSeal 印章管理 * @return 结果 */ @Override public int updateWorkSeal(WorkSeal workSeal) { workSeal.setUpdateTime(DateUtils.getNowDate()); return workSealMapper.updateWorkSeal(workSeal); } /** * 批量删除印章管理 * * @param suraIds 需要删除的印章管理主键 * @return 结果 */ @Override public int deleteWorkSealBySuraIds(Long[] suraIds) { return workSealMapper.deleteWorkSealBySuraIds(suraIds); } /** * 删除印章管理信息 * * @param suraId 印章管理主键 * @return 结果 */ @Override public int deleteWorkSealBySuraId(Long suraId) { return workSealMapper.deleteWorkSealBySuraId(suraId); } }
2929004360/ruoyi-sign
2,728
ruoyi-work/src/main/java/com/ruoyi/work/service/impl/WorkSignFileServiceImpl.java
package com.ruoyi.work.service.impl; import com.ruoyi.flowable.api.domain.WorkSignFile; import com.ruoyi.work.mapper.WorkSignFileMapper; import com.ruoyi.work.service.IWorkSignFileService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * 签署文件Service业务层处理 * * @author fengcheng * @date 2025-03-20 */ @Service public class WorkSignFileServiceImpl implements IWorkSignFileService { @Autowired private WorkSignFileMapper workSignFileMapper; /** * 查询签署文件 * * @param signFileId 签署文件主键 * @return 签署文件 */ @Override public WorkSignFile selectWorkSignFileBySignFileId(Long signFileId) { return workSignFileMapper.selectWorkSignFileBySignFileId(signFileId); } /** * 查询签署文件列表 * * @param workSignFile 签署文件 * @return 签署文件 */ @Override public List<WorkSignFile> selectWorkSignFileList(WorkSignFile workSignFile) { return workSignFileMapper.selectWorkSignFileList(workSignFile); } /** * 新增签署文件 * * @param workSignFile 签署文件 * @return 结果 */ @Override public int insertWorkSignFile(WorkSignFile workSignFile) { return workSignFileMapper.insertWorkSignFile(workSignFile); } /** * 修改签署文件 * * @param workSignFile 签署文件 * @return 结果 */ @Override public int updateWorkSignFile(WorkSignFile workSignFile) { return workSignFileMapper.updateWorkSignFile(workSignFile); } /** * 批量删除签署文件 * * @param signFileIds 需要删除的签署文件主键 * @return 结果 */ @Override public int deleteWorkSignFileBySignFileIds(Long[] signFileIds) { return workSignFileMapper.deleteWorkSignFileBySignFileIds(signFileIds); } /** * 删除签署文件信息 * * @param signFileId 签署文件主键 * @return 结果 */ @Override public int deleteWorkSignFileBySignFileId(Long signFileId) { return workSignFileMapper.deleteWorkSignFileBySignFileId(signFileId); } /** * 根据签署id删除签署文件 * * @param signId */ @Override public void deleteWorkSignFileBySignId(Long signId) { workSignFileMapper.deleteWorkSignFileBySignId(signId); } /** * 批量新增签署文件 * * @param signFileList */ @Override public void insertWorkSignFileList(List<WorkSignFile> signFileList) { workSignFileMapper.insertWorkSignFileList(signFileList); } /** * 根据签署id查询签署文件 * * @param signId 签署id * @return */ @Override public WorkSignFile getInfoWorkSignFile(Long signId) { return workSignFileMapper.getInfoWorkSignFile(signId); } }
28harishkumar/blog
11,392
public/js/tinymce/plugins/jbimages/ci/system/core/CodeIgniter.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * System Initialization File * * Loads the base classes and executes the request. * * @package CodeIgniter * @subpackage codeigniter * @category Front-controller * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/ */ /** * CodeIgniter Version * * @var string * */ define('CI_VERSION', '2.1.3'); /** * CodeIgniter Branch (Core = TRUE, Reactor = FALSE) * * @var boolean * */ define('CI_CORE', FALSE); /* * ------------------------------------------------------ * Load the global functions * ------------------------------------------------------ */ require(BASEPATH.'core/Common.php'); /* * ------------------------------------------------------ * Load the framework constants * ------------------------------------------------------ */ if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants.php')) { require(APPPATH.'config/'.ENVIRONMENT.'/constants.php'); } else { require(APPPATH.'config/constants.php'); } /* * ------------------------------------------------------ * Define a custom error handler so we can log PHP errors * ------------------------------------------------------ */ set_error_handler('_exception_handler'); if ( ! is_php('5.3')) { @set_magic_quotes_runtime(0); // Kill magic quotes } /* * ------------------------------------------------------ * Set the subclass_prefix * ------------------------------------------------------ * * Normally the "subclass_prefix" is set in the config file. * The subclass prefix allows CI to know if a core class is * being extended via a library in the local application * "libraries" folder. Since CI allows config items to be * overriden via data set in the main index. php file, * before proceeding we need to know if a subclass_prefix * override exists. If so, we will set this value now, * before any classes are loaded * Note: Since the config file data is cached it doesn't * hurt to load it here. */ if (isset($assign_to_config['subclass_prefix']) AND $assign_to_config['subclass_prefix'] != '') { get_config(array('subclass_prefix' => $assign_to_config['subclass_prefix'])); } /* * ------------------------------------------------------ * Set a liberal script execution time limit * ------------------------------------------------------ */ if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0) { @set_time_limit(300); } /* * ------------------------------------------------------ * Start the timer... tick tock tick tock... * ------------------------------------------------------ */ $BM =& load_class('Benchmark', 'core'); $BM->mark('total_execution_time_start'); $BM->mark('loading_time:_base_classes_start'); /* * ------------------------------------------------------ * Instantiate the hooks class * ------------------------------------------------------ */ $EXT =& load_class('Hooks', 'core'); /* * ------------------------------------------------------ * Is there a "pre_system" hook? * ------------------------------------------------------ */ $EXT->_call_hook('pre_system'); /* * ------------------------------------------------------ * Instantiate the config class * ------------------------------------------------------ */ $CFG =& load_class('Config', 'core'); // Do we have any manually set config items in the index.php file? if (isset($assign_to_config)) { $CFG->_assign_to_config($assign_to_config); } /* * ------------------------------------------------------ * Instantiate the UTF-8 class * ------------------------------------------------------ * * Note: Order here is rather important as the UTF-8 * class needs to be used very early on, but it cannot * properly determine if UTf-8 can be supported until * after the Config class is instantiated. * */ $UNI =& load_class('Utf8', 'core'); /* * ------------------------------------------------------ * Instantiate the URI class * ------------------------------------------------------ */ $URI =& load_class('URI', 'core'); /* * ------------------------------------------------------ * Instantiate the routing class and set the routing * ------------------------------------------------------ */ $RTR =& load_class('Router', 'core'); $RTR->_set_routing(); // Set any routing overrides that may exist in the main index file if (isset($routing)) { $RTR->_set_overrides($routing); } /* * ------------------------------------------------------ * Instantiate the output class * ------------------------------------------------------ */ $OUT =& load_class('Output', 'core'); /* * ------------------------------------------------------ * Is there a valid cache file? If so, we're done... * ------------------------------------------------------ */ if ($EXT->_call_hook('cache_override') === FALSE) { if ($OUT->_display_cache($CFG, $URI) == TRUE) { exit; } } /* * ----------------------------------------------------- * Load the security class for xss and csrf support * ----------------------------------------------------- */ $SEC =& load_class('Security', 'core'); /* * ------------------------------------------------------ * Load the Input class and sanitize globals * ------------------------------------------------------ */ $IN =& load_class('Input', 'core'); /* * ------------------------------------------------------ * Load the Language class * ------------------------------------------------------ */ $LANG =& load_class('Lang', 'core'); /* * ------------------------------------------------------ * Load the app controller and local controller * ------------------------------------------------------ * */ // Load the base controller class require BASEPATH.'core/Controller.php'; function &get_instance() { return CI_Controller::get_instance(); } if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php')) { require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'; } // Load the local application controller // Note: The Router class automatically validates the controller path using the router->_validate_request(). // If this include fails it means that the default controller in the Routes.php file is not resolving to something valid. if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php')) { show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.'); } include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php'); // Set a mark point for benchmarking $BM->mark('loading_time:_base_classes_end'); /* * ------------------------------------------------------ * Security check * ------------------------------------------------------ * * None of the functions in the app controller or the * loader class can be called via the URI, nor can * controller functions that begin with an underscore */ $class = $RTR->fetch_class(); $method = $RTR->fetch_method(); if ( ! class_exists($class) OR strncmp($method, '_', 1) == 0 OR in_array(strtolower($method), array_map('strtolower', get_class_methods('CI_Controller'))) ) { if ( ! empty($RTR->routes['404_override'])) { $x = explode('/', $RTR->routes['404_override']); $class = $x[0]; $method = (isset($x[1]) ? $x[1] : 'index'); if ( ! class_exists($class)) { if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) { show_404("{$class}/{$method}"); } include_once(APPPATH.'controllers/'.$class.'.php'); } } else { show_404("{$class}/{$method}"); } } /* * ------------------------------------------------------ * Is there a "pre_controller" hook? * ------------------------------------------------------ */ $EXT->_call_hook('pre_controller'); /* * ------------------------------------------------------ * Instantiate the requested controller * ------------------------------------------------------ */ // Mark a start point so we can benchmark the controller $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start'); $CI = new $class(); /* * ------------------------------------------------------ * Is there a "post_controller_constructor" hook? * ------------------------------------------------------ */ $EXT->_call_hook('post_controller_constructor'); /* * ------------------------------------------------------ * Call the requested method * ------------------------------------------------------ */ // Is there a "remap" function? If so, we call it instead if (method_exists($CI, '_remap')) { $CI->_remap($method, array_slice($URI->rsegments, 2)); } else { // is_callable() returns TRUE on some versions of PHP 5 for private and protected // methods, so we'll use this workaround for consistent behavior if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($CI)))) { // Check and see if we are using a 404 override and use it. if ( ! empty($RTR->routes['404_override'])) { $x = explode('/', $RTR->routes['404_override']); $class = $x[0]; $method = (isset($x[1]) ? $x[1] : 'index'); if ( ! class_exists($class)) { if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) { show_404("{$class}/{$method}"); } include_once(APPPATH.'controllers/'.$class.'.php'); unset($CI); $CI = new $class(); } } else { show_404("{$class}/{$method}"); } } // Call the requested method. // Any URI segments present (besides the class/function) will be passed to the method for convenience call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2)); } // Mark a benchmark end point $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end'); /* * ------------------------------------------------------ * Is there a "post_controller" hook? * ------------------------------------------------------ */ $EXT->_call_hook('post_controller'); /* * ------------------------------------------------------ * Send the final rendered output to the browser * ------------------------------------------------------ */ if ($EXT->_call_hook('display_override') === FALSE) { $OUT->_display(); } /* * ------------------------------------------------------ * Is there a "post_system" hook? * ------------------------------------------------------ */ $EXT->_call_hook('post_system'); /* * ------------------------------------------------------ * Close the DB connection if one exists * ------------------------------------------------------ */ if (class_exists('CI_DB') AND isset($CI->db)) { $CI->db->close(); } /* End of file CodeIgniter.php */ /* Location: ./system/core/CodeIgniter.php */
2929004360/ruoyi-sign
10,824
ruoyi-work/src/main/java/com/ruoyi/work/service/impl/WorkSignServiceImpl.java
package com.ruoyi.work.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; import com.ruoyi.common.enums.DelFlagEnum; import com.ruoyi.common.enums.FlowMenuEnum; import com.ruoyi.common.enums.ProcessStatus; import com.ruoyi.common.exception.DataException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.flowable.api.domain.WfBusinessProcess; import com.ruoyi.flowable.api.domain.WorkSign; import com.ruoyi.flowable.api.domain.WorkSignFile; import com.ruoyi.flowable.api.domain.bo.WfTaskBo; import com.ruoyi.flowable.api.domain.vo.WorkSignVo; import com.ruoyi.flowable.api.service.IWfBusinessProcessServiceApi; import com.ruoyi.flowable.api.service.IWfProcessServiceApi; import com.ruoyi.flowable.api.service.IWfTaskServiceApi; import com.ruoyi.work.mapper.WorkSignMapper; import com.ruoyi.work.service.IWorkSignFileService; import com.ruoyi.work.service.IWorkSignService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.HashMap; import java.util.List; /** * 签署Service业务层处理 * * @author fengcheng * @date 2025-03-18 */ @Service public class WorkSignServiceImpl implements IWorkSignService { @Autowired private WorkSignMapper workSignMapper; @Autowired private IWorkSignFileService workSignFileService; @Autowired private IWfBusinessProcessServiceApi wfBusinessProcessServiceApi; @Autowired private IWfProcessServiceApi processServiceApi; @Autowired private IWfTaskServiceApi flowTaskServiceApi; /** * 查询签署 * * @param signId 签署主键 * @return 签署 */ @Override public WorkSignVo selectWorkSignBySignId(Long signId) { WorkSignVo workSignVo = workSignMapper.selectWorkSignBySignId(signId); WorkSignFile workSignFile = new WorkSignFile(); workSignFile.setSignId(signId); workSignVo.setSignFileList(workSignFileService.selectWorkSignFileList(workSignFile)); return workSignVo; } /** * 查询签署列表 * * @param workSignVo 签署 * @return 签署 */ @Override public List<WorkSign> selectWorkSignList(WorkSignVo workSignVo) { return workSignMapper.selectWorkSignList(workSignVo); } /** * 新增签署 * * @param workSignVo 签署 * @return 结果 */ @Override @Transactional(rollbackFor = Exception.class) public int insertWorkSign(WorkSignVo workSignVo) { workSignVo.setCreateTime(DateUtils.getNowDate()); int i = workSignMapper.insertWorkSign(workSignVo); insertWorkSignFile(workSignVo); workSignVo.setBusinessId(String.valueOf(workSignVo.getSignId())); workSignVo.setBusinessProcessType(FlowMenuEnum.SIGN_FLOW_MENU.getCode()); if (ProcessStatus.RUNNING.getStatus().equals(workSignVo.getSchedule())) { WorkSignVo workSign = new WorkSignVo(); workSignVo.setSignFileList(null); String processInstanceId = processServiceApi.startProcessByDefId(workSignVo.getDefinitionId(), BeanUtil.beanToMap(workSignVo, new HashMap<>(16), false, false)); WfBusinessProcess wfBusinessProcess = new WfBusinessProcess(); wfBusinessProcess.setProcessId(processInstanceId); wfBusinessProcess.setBusinessId(String.valueOf(workSignVo.getSignId())); wfBusinessProcess.setBusinessProcessType(FlowMenuEnum.SIGN_FLOW_MENU.getCode()); wfBusinessProcessServiceApi.insertWfBusinessProcess(wfBusinessProcess); workSign.setProcessId(processInstanceId); workSign.setSchedule(ProcessStatus.RUNNING.getStatus()); workSign.setSignId(workSignVo.getSignId()); return workSignMapper.updateWorkSign(workSign); } return i; } /** * 新增签署文件 * * @param workSignVo */ private void insertWorkSignFile(WorkSignVo workSignVo) { List<WorkSignFile> signFileList = workSignVo.getSignFileList(); if (ObjectUtil.isNull(signFileList) || signFileList.size() == 0) { return; } for (WorkSignFile signFile : signFileList) { signFile.setSignId(workSignVo.getSignId()); } workSignFileService.insertWorkSignFileList(signFileList); } /** * 修改签署 * * @param workSignVo 签署 * @return 结果 */ @Override @Transactional(rollbackFor = Exception.class) public int updateWorkSign(WorkSignVo workSignVo) { workSignVo.setUpdateTime(DateUtils.getNowDate()); workSignFileService.deleteWorkSignFileBySignId(workSignVo.getSignId()); insertWorkSignFile(workSignVo); if (ProcessStatus.RUNNING.getStatus().equals(workSignVo.getSchedule())) { workSignVo.setBusinessId(String.valueOf(workSignVo.getSignId())); workSignVo.setBusinessProcessType(FlowMenuEnum.SIGN_FLOW_MENU.getCode()); workSignVo.setSignFileList(null); String processInstanceId = processServiceApi.startProcessByDefId(workSignVo.getDefinitionId(), BeanUtil.beanToMap(workSignVo, new HashMap<>(16), false, false)); WfBusinessProcess wfBusinessProcess = new WfBusinessProcess(); wfBusinessProcess.setProcessId(processInstanceId); wfBusinessProcess.setBusinessId(String.valueOf(workSignVo.getSignId())); wfBusinessProcess.setBusinessProcessType(FlowMenuEnum.SIGN_FLOW_MENU.getCode()); wfBusinessProcessServiceApi.insertWfBusinessProcess(wfBusinessProcess); workSignVo.setProcessId(processInstanceId); workSignVo.setSchedule(ProcessStatus.RUNNING.getStatus()); } return workSignMapper.updateWorkSign(workSignVo); } /** * 批量删除签署 * * @param signIds 需要删除的签署主键 * @return 结果 */ @Override @Transactional(rollbackFor = Exception.class) public int deleteWorkSignBySignIds(Long[] signIds) { for (Long signId : signIds) { WorkSignVo workSignVo = checkExistence(signId); if (ProcessStatus.UNAPPROVED.getStatus().equals(workSignVo.getSchedule()) || ProcessStatus.CANCELED.getStatus().equals(workSignVo.getSchedule())) { wfBusinessProcessServiceApi.deleteWfBusinessProcessByBusinessId(String.valueOf(signId), FlowMenuEnum.SIGN_FLOW_MENU.getCode()); // WfTaskBo wfTaskBo = new WfTaskBo(); // wfTaskBo.setProcInsId(workRiskVo.getProcessId()); // flowTaskServiceApi.stopProcess(wfTaskBo); processServiceApi.deleteProcessByIds(new String[]{workSignVo.getProcessId()}); } } return workSignMapper.deleteWorkSignBySignIds(signIds); } /** * 校验签章 * * @param riskId * @return */ private WorkSignVo checkExistence(Long riskId) { WorkSignVo workSignVo = selectWorkSignBySignId(riskId); if (DelFlagEnum.DELETE.getCode().equals(workSignVo.getDelFlag())) { throw new DataException("该[[" + workSignVo.getUserName() + "]]签章已被删除"); } return workSignVo; } /** * 删除签署信息 * * @param signId 签署主键 * @return 结果 */ @Override @Transactional(rollbackFor = Exception.class) public int deleteWorkSignBySignId(Long signId) { int i = workSignMapper.deleteWorkSignBySignId(signId); WorkSignVo workSignVo = checkExistence(signId); if (ProcessStatus.UNAPPROVED.getStatus().equals(workSignVo.getSchedule()) || ProcessStatus.CANCELED.getStatus().equals(workSignVo.getSchedule())) { wfBusinessProcessServiceApi.deleteWfBusinessProcessByBusinessId(String.valueOf(signId), FlowMenuEnum.SIGN_FLOW_MENU.getCode()); // WfTaskBo wfTaskBo = new WfTaskBo(); // wfTaskBo.setProcInsId(workRiskVo.getProcessId()); // flowTaskServiceApi.stopProcess(wfTaskBo); processServiceApi.deleteProcessByIds(new String[]{workSignVo.getProcessId()}); } return i; } /** * 重新申请 * * @param signId * @return */ @Override @Transactional(rollbackFor = Exception.class) public int reapply(Long signId) { WorkSignVo workSignVo = checkExistence(signId); processServiceApi.deleteProcessByIds(new String[]{workSignVo.getProcessId()}); return submit(signId); } /** * 撤销审核 * * @param signId * @return */ @Override @Transactional(rollbackFor = Exception.class) public int revoke(Long signId) { wfBusinessProcessServiceApi.deleteWfBusinessProcessByBusinessId(String.valueOf(signId), FlowMenuEnum.SIGN_FLOW_MENU.getCode()); WorkSignVo workSignVo = checkExistence(signId); WorkSignVo workSign = new WorkSignVo(); WfTaskBo wfTaskBo = new WfTaskBo(); wfTaskBo.setProcInsId(workSignVo.getProcessId()); flowTaskServiceApi.stopProcess(wfTaskBo); processServiceApi.deleteProcessByIds(new String[]{workSignVo.getProcessId()}); workSign.setProcessId(""); workSign.setSignId(signId); workSign.setSchedule(ProcessStatus.UNAPPROVED.getStatus()); return workSignMapper.updateWorkSign(workSign); } /** * 提交审核 * * @param signId * @return */ @Override @Transactional(rollbackFor = Exception.class) public int submit(Long signId) { WorkSignVo workSignVo = checkExistence(signId); WorkSignVo workSign = new WorkSignVo(); // 启动流程 workSignVo.setBusinessId(String.valueOf(signId)); workSignVo.setBusinessProcessType(FlowMenuEnum.SIGN_FLOW_MENU.getCode()); String processInstanceId = processServiceApi.startProcessByDefId(workSignVo.getDefinitionId(), BeanUtil.beanToMap(workSignVo, new HashMap<>(16), false, false)); WfBusinessProcess wfBusinessProcess = new WfBusinessProcess(); wfBusinessProcess.setProcessId(processInstanceId); wfBusinessProcess.setBusinessId(String.valueOf(signId)); wfBusinessProcess.setBusinessProcessType(FlowMenuEnum.SIGN_FLOW_MENU.getCode()); wfBusinessProcessServiceApi.insertWfBusinessProcess(wfBusinessProcess); workSign.setProcessId(processInstanceId); workSign.setSignId(signId); workSign.setSchedule(ProcessStatus.RUNNING.getStatus()); return workSignMapper.updateWorkSign(workSign); } /** * 查询签署文件列表 * * @param signId * @return */ @Override public List<WorkSignFile> listSignFile(Long signId) { WorkSignFile workSignFile = new WorkSignFile(); workSignFile.setSignId(signId); return workSignFileService.selectWorkSignFileList(workSignFile); } }
2929004360/ruoyi-sign
997
ruoyi-work/src/main/java/com/ruoyi/work/api/impl/IWorkSignServiceApiImpl.java
package com.ruoyi.work.api.impl; import com.ruoyi.flowable.api.domain.vo.WorkSignVo; import com.ruoyi.flowable.api.service.IWorkSignServiceApi; import com.ruoyi.work.mapper.WorkSignMapper; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * 签署api接口实现类 * * @author fengcheng */ @RequiredArgsConstructor @Service public class IWorkSignServiceApiImpl implements IWorkSignServiceApi { @Autowired private WorkSignMapper workSignMapper; /** * 查询签署 * * @param signId 签署主键 * @return 签署 */ @Override public WorkSignVo selectWorkSignBySignId(String signId) { return workSignMapper.selectWorkSignBySignId(Long.valueOf(signId)); } /** * 修改签署 * * @param workSignVo 签署 * @return 结果 */ @Override public void updateWorkSign(WorkSignVo workSignVo) { workSignMapper.updateWorkSign(workSignVo); } }
28harishkumar/blog
22,006
public/js/tinymce/plugins/jbimages/ci/system/core/Security.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * Security Class * * @package CodeIgniter * @subpackage Libraries * @category Security * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/security.html */ class CI_Security { /** * Random Hash for protecting URLs * * @var string * @access protected */ protected $_xss_hash = ''; /** * Random Hash for Cross Site Request Forgery Protection Cookie * * @var string * @access protected */ protected $_csrf_hash = ''; /** * Expiration time for Cross Site Request Forgery Protection Cookie * Defaults to two hours (in seconds) * * @var int * @access protected */ protected $_csrf_expire = 7200; /** * Token name for Cross Site Request Forgery Protection Cookie * * @var string * @access protected */ protected $_csrf_token_name = 'ci_csrf_token'; /** * Cookie name for Cross Site Request Forgery Protection Cookie * * @var string * @access protected */ protected $_csrf_cookie_name = 'ci_csrf_token'; /** * List of never allowed strings * * @var array * @access protected */ protected $_never_allowed_str = array( 'document.cookie' => '[removed]', 'document.write' => '[removed]', '.parentNode' => '[removed]', '.innerHTML' => '[removed]', 'window.location' => '[removed]', '-moz-binding' => '[removed]', '<!--' => '&lt;!--', '-->' => '--&gt;', '<![CDATA[' => '&lt;![CDATA[', '<comment>' => '&lt;comment&gt;' ); /* never allowed, regex replacement */ /** * List of never allowed regex replacement * * @var array * @access protected */ protected $_never_allowed_regex = array( 'javascript\s*:', 'expression\s*(\(|&\#40;)', // CSS and IE 'vbscript\s*:', // IE, surprise! 'Redirect\s+302', "([\"'])?data\s*:[^\\1]*?base64[^\\1]*?,[^\\1]*?\\1?" ); /** * Constructor * * @return void */ public function __construct() { // Is CSRF protection enabled? if (config_item('csrf_protection') === TRUE) { // CSRF config foreach (array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key) { if (FALSE !== ($val = config_item($key))) { $this->{'_'.$key} = $val; } } // Append application specific cookie prefix if (config_item('cookie_prefix')) { $this->_csrf_cookie_name = config_item('cookie_prefix').$this->_csrf_cookie_name; } // Set the CSRF hash $this->_csrf_set_hash(); } log_message('debug', "Security Class Initialized"); } // -------------------------------------------------------------------- /** * Verify Cross Site Request Forgery Protection * * @return object */ public function csrf_verify() { // If it's not a POST request we will set the CSRF cookie if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { return $this->csrf_set_cookie(); } // Do the tokens exist in both the _POST and _COOKIE arrays? if ( ! isset($_POST[$this->_csrf_token_name], $_COOKIE[$this->_csrf_cookie_name])) { $this->csrf_show_error(); } // Do the tokens match? if ($_POST[$this->_csrf_token_name] != $_COOKIE[$this->_csrf_cookie_name]) { $this->csrf_show_error(); } // We kill this since we're done and we don't want to // polute the _POST array unset($_POST[$this->_csrf_token_name]); // Nothing should last forever unset($_COOKIE[$this->_csrf_cookie_name]); $this->_csrf_set_hash(); $this->csrf_set_cookie(); log_message('debug', 'CSRF token verified'); return $this; } // -------------------------------------------------------------------- /** * Set Cross Site Request Forgery Protection Cookie * * @return object */ public function csrf_set_cookie() { $expire = time() + $this->_csrf_expire; $secure_cookie = (config_item('cookie_secure') === TRUE) ? 1 : 0; if ($secure_cookie && (empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) === 'off')) { return FALSE; } setcookie($this->_csrf_cookie_name, $this->_csrf_hash, $expire, config_item('cookie_path'), config_item('cookie_domain'), $secure_cookie); log_message('debug', "CRSF cookie Set"); return $this; } // -------------------------------------------------------------------- /** * Show CSRF Error * * @return void */ public function csrf_show_error() { show_error('The action you have requested is not allowed.'); } // -------------------------------------------------------------------- /** * Get CSRF Hash * * Getter Method * * @return string self::_csrf_hash */ public function get_csrf_hash() { return $this->_csrf_hash; } // -------------------------------------------------------------------- /** * Get CSRF Token Name * * Getter Method * * @return string self::csrf_token_name */ public function get_csrf_token_name() { return $this->_csrf_token_name; } // -------------------------------------------------------------------- /** * XSS Clean * * Sanitizes data so that Cross Site Scripting Hacks can be * prevented. This function does a fair amount of work but * it is extremely thorough, designed to prevent even the * most obscure XSS attempts. Nothing is ever 100% foolproof, * of course, but I haven't been able to get anything passed * the filter. * * Note: This function should only be used to deal with data * upon submission. It's not something that should * be used for general runtime processing. * * This function was based in part on some code and ideas I * got from Bitflux: http://channel.bitflux.ch/wiki/XSS_Prevention * * To help develop this script I used this great list of * vulnerabilities along with a few other hacks I've * harvested from examining vulnerabilities in other programs: * http://ha.ckers.org/xss.html * * @param mixed string or array * @param bool * @return string */ public function xss_clean($str, $is_image = FALSE) { /* * Is the string an array? * */ if (is_array($str)) { while (list($key) = each($str)) { $str[$key] = $this->xss_clean($str[$key]); } return $str; } /* * Remove Invisible Characters */ $str = remove_invisible_characters($str); // Validate Entities in URLs $str = $this->_validate_entities($str); /* * URL Decode * * Just in case stuff like this is submitted: * * <a href="http://%77%77%77%2E%67%6F%6F%67%6C%65%2E%63%6F%6D">Google</a> * * Note: Use rawurldecode() so it does not remove plus signs * */ $str = rawurldecode($str); /* * Convert character entities to ASCII * * This permits our tests below to work reliably. * We only convert entities that are within tags since * these are the ones that will pose security problems. * */ $str = preg_replace_callback("/[a-z]+=([\'\"]).*?\\1/si", array($this, '_convert_attribute'), $str); $str = preg_replace_callback("/<\w+.*?(?=>|<|$)/si", array($this, '_decode_entity'), $str); /* * Remove Invisible Characters Again! */ $str = remove_invisible_characters($str); /* * Convert all tabs to spaces * * This prevents strings like this: ja vascript * NOTE: we deal with spaces between characters later. * NOTE: preg_replace was found to be amazingly slow here on * large blocks of data, so we use str_replace. */ if (strpos($str, "\t") !== FALSE) { $str = str_replace("\t", ' ', $str); } /* * Capture converted string for later comparison */ $converted_string = $str; // Remove Strings that are never allowed $str = $this->_do_never_allowed($str); /* * Makes PHP tags safe * * Note: XML tags are inadvertently replaced too: * * <?xml * * But it doesn't seem to pose a problem. */ if ($is_image === TRUE) { // Images have a tendency to have the PHP short opening and // closing tags every so often so we skip those and only // do the long opening tags. $str = preg_replace('/<\?(php)/i', "&lt;?\\1", $str); } else { $str = str_replace(array('<?', '?'.'>'), array('&lt;?', '?&gt;'), $str); } /* * Compact any exploded words * * This corrects words like: j a v a s c r i p t * These words are compacted back to their correct state. */ $words = array( 'javascript', 'expression', 'vbscript', 'script', 'base64', 'applet', 'alert', 'document', 'write', 'cookie', 'window' ); foreach ($words as $word) { $temp = ''; for ($i = 0, $wordlen = strlen($word); $i < $wordlen; $i++) { $temp .= substr($word, $i, 1)."\s*"; } // We only want to do this when it is followed by a non-word character // That way valid stuff like "dealer to" does not become "dealerto" $str = preg_replace_callback('#('.substr($temp, 0, -3).')(\W)#is', array($this, '_compact_exploded_words'), $str); } /* * Remove disallowed Javascript in links or img tags * We used to do some version comparisons and use of stripos for PHP5, * but it is dog slow compared to these simplified non-capturing * preg_match(), especially if the pattern exists in the string */ do { $original = $str; if (preg_match("/<a/i", $str)) { $str = preg_replace_callback("#<a\s+([^>]*?)(>|$)#si", array($this, '_js_link_removal'), $str); } if (preg_match("/<img/i", $str)) { $str = preg_replace_callback("#<img\s+([^>]*?)(\s?/?>|$)#si", array($this, '_js_img_removal'), $str); } if (preg_match("/script/i", $str) OR preg_match("/xss/i", $str)) { $str = preg_replace("#<(/*)(script|xss)(.*?)\>#si", '[removed]', $str); } } while($original != $str); unset($original); // Remove evil attributes such as style, onclick and xmlns $str = $this->_remove_evil_attributes($str, $is_image); /* * Sanitize naughty HTML elements * * If a tag containing any of the words in the list * below is found, the tag gets converted to entities. * * So this: <blink> * Becomes: &lt;blink&gt; */ $naughty = 'alert|applet|audio|basefont|base|behavior|bgsound|blink|body|embed|expression|form|frameset|frame|head|html|ilayer|iframe|input|isindex|layer|link|meta|object|plaintext|style|script|textarea|title|video|xml|xss'; $str = preg_replace_callback('#<(/*\s*)('.$naughty.')([^><]*)([><]*)#is', array($this, '_sanitize_naughty_html'), $str); /* * Sanitize naughty scripting elements * * Similar to above, only instead of looking for * tags it looks for PHP and JavaScript commands * that are disallowed. Rather than removing the * code, it simply converts the parenthesis to entities * rendering the code un-executable. * * For example: eval('some code') * Becomes: eval&#40;'some code'&#41; */ $str = preg_replace('#(alert|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)#si', "\\1\\2&#40;\\3&#41;", $str); // Final clean up // This adds a bit of extra precaution in case // something got through the above filters $str = $this->_do_never_allowed($str); /* * Images are Handled in a Special Way * - Essentially, we want to know that after all of the character * conversion is done whether any unwanted, likely XSS, code was found. * If not, we return TRUE, as the image is clean. * However, if the string post-conversion does not matched the * string post-removal of XSS, then it fails, as there was unwanted XSS * code found and removed/changed during processing. */ if ($is_image === TRUE) { return ($str == $converted_string) ? TRUE: FALSE; } log_message('debug', "XSS Filtering completed"); return $str; } // -------------------------------------------------------------------- /** * Random Hash for protecting URLs * * @return string */ public function xss_hash() { if ($this->_xss_hash == '') { mt_srand(); $this->_xss_hash = md5(time() + mt_rand(0, 1999999999)); } return $this->_xss_hash; } // -------------------------------------------------------------------- /** * HTML Entities Decode * * This function is a replacement for html_entity_decode() * * The reason we are not using html_entity_decode() by itself is because * while it is not technically correct to leave out the semicolon * at the end of an entity most browsers will still interpret the entity * correctly. html_entity_decode() does not convert entities without * semicolons, so we are left with our own little solution here. Bummer. * * @param string * @param string * @return string */ public function entity_decode($str, $charset='UTF-8') { if (stristr($str, '&') === FALSE) { return $str; } $str = html_entity_decode($str, ENT_COMPAT, $charset); $str = preg_replace('~&#x(0*[0-9a-f]{2,5})~ei', 'chr(hexdec("\\1"))', $str); return preg_replace('~&#([0-9]{2,4})~e', 'chr(\\1)', $str); } // -------------------------------------------------------------------- /** * Filename Security * * @param string * @param bool * @return string */ public function sanitize_filename($str, $relative_path = FALSE) { $bad = array( "../", "<!--", "-->", "<", ">", "'", '"', '&', '$', '#', '{', '}', '[', ']', '=', ';', '?', "%20", "%22", "%3c", // < "%253c", // < "%3e", // > "%0e", // > "%28", // ( "%29", // ) "%2528", // ( "%26", // & "%24", // $ "%3f", // ? "%3b", // ; "%3d" // = ); if ( ! $relative_path) { $bad[] = './'; $bad[] = '/'; } $str = remove_invisible_characters($str, FALSE); return stripslashes(str_replace($bad, '', $str)); } // ---------------------------------------------------------------- /** * Compact Exploded Words * * Callback function for xss_clean() to remove whitespace from * things like j a v a s c r i p t * * @param type * @return type */ protected function _compact_exploded_words($matches) { return preg_replace('/\s+/s', '', $matches[1]).$matches[2]; } // -------------------------------------------------------------------- /* * Remove Evil HTML Attributes (like evenhandlers and style) * * It removes the evil attribute and either: * - Everything up until a space * For example, everything between the pipes: * <a |style=document.write('hello');alert('world');| class=link> * - Everything inside the quotes * For example, everything between the pipes: * <a |style="document.write('hello'); alert('world');"| class="link"> * * @param string $str The string to check * @param boolean $is_image TRUE if this is an image * @return string The string with the evil attributes removed */ protected function _remove_evil_attributes($str, $is_image) { // All javascript event handlers (e.g. onload, onclick, onmouseover), style, and xmlns $evil_attributes = array('on\w*', 'style', 'xmlns', 'formaction'); if ($is_image === TRUE) { /* * Adobe Photoshop puts XML metadata into JFIF images, * including namespacing, so we have to allow this for images. */ unset($evil_attributes[array_search('xmlns', $evil_attributes)]); } do { $count = 0; $attribs = array(); // find occurrences of illegal attribute strings without quotes preg_match_all('/('.implode('|', $evil_attributes).')\s*=\s*([^\s>]*)/is', $str, $matches, PREG_SET_ORDER); foreach ($matches as $attr) { $attribs[] = preg_quote($attr[0], '/'); } // find occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes) preg_match_all("/(".implode('|', $evil_attributes).")\s*=\s*(\042|\047)([^\\2]*?)(\\2)/is", $str, $matches, PREG_SET_ORDER); foreach ($matches as $attr) { $attribs[] = preg_quote($attr[0], '/'); } // replace illegal attribute strings that are inside an html tag if (count($attribs) > 0) { $str = preg_replace("/<(\/?[^><]+?)([^A-Za-z<>\-])(.*?)(".implode('|', $attribs).")(.*?)([\s><])([><]*)/i", '<$1 $3$5$6$7', $str, -1, $count); } } while ($count); return $str; } // -------------------------------------------------------------------- /** * Sanitize Naughty HTML * * Callback function for xss_clean() to remove naughty HTML elements * * @param array * @return string */ protected function _sanitize_naughty_html($matches) { // encode opening brace $str = '&lt;'.$matches[1].$matches[2].$matches[3]; // encode captured opening or closing brace to prevent recursive vectors $str .= str_replace(array('>', '<'), array('&gt;', '&lt;'), $matches[4]); return $str; } // -------------------------------------------------------------------- /** * JS Link Removal * * Callback function for xss_clean() to sanitize links * This limits the PCRE backtracks, making it more performance friendly * and prevents PREG_BACKTRACK_LIMIT_ERROR from being triggered in * PHP 5.2+ on link-heavy strings * * @param array * @return string */ protected function _js_link_removal($match) { return str_replace( $match[1], preg_replace( '#href=.*?(alert\(|alert&\#40;|javascript\:|livescript\:|mocha\:|charset\=|window\.|document\.|\.cookie|<script|<xss|data\s*:)#si', '', $this->_filter_attributes(str_replace(array('<', '>'), '', $match[1])) ), $match[0] ); } // -------------------------------------------------------------------- /** * JS Image Removal * * Callback function for xss_clean() to sanitize image tags * This limits the PCRE backtracks, making it more performance friendly * and prevents PREG_BACKTRACK_LIMIT_ERROR from being triggered in * PHP 5.2+ on image tag heavy strings * * @param array * @return string */ protected function _js_img_removal($match) { return str_replace( $match[1], preg_replace( '#src=.*?(alert\(|alert&\#40;|javascript\:|livescript\:|mocha\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)#si', '', $this->_filter_attributes(str_replace(array('<', '>'), '', $match[1])) ), $match[0] ); } // -------------------------------------------------------------------- /** * Attribute Conversion * * Used as a callback for XSS Clean * * @param array * @return string */ protected function _convert_attribute($match) { return str_replace(array('>', '<', '\\'), array('&gt;', '&lt;', '\\\\'), $match[0]); } // -------------------------------------------------------------------- /** * Filter Attributes * * Filters tag attributes for consistency and safety * * @param string * @return string */ protected function _filter_attributes($str) { $out = ''; if (preg_match_all('#\s*[a-z\-]+\s*=\s*(\042|\047)([^\\1]*?)\\1#is', $str, $matches)) { foreach ($matches[0] as $match) { $out .= preg_replace("#/\*.*?\*/#s", '', $match); } } return $out; } // -------------------------------------------------------------------- /** * HTML Entity Decode Callback * * Used as a callback for XSS Clean * * @param array * @return string */ protected function _decode_entity($match) { return $this->entity_decode($match[0], strtoupper(config_item('charset'))); } // -------------------------------------------------------------------- /** * Validate URL entities * * Called by xss_clean() * * @param string * @return string */ protected function _validate_entities($str) { /* * Protect GET variables in URLs */ // 901119URL5918AMP18930PROTECT8198 $str = preg_replace('|\&([a-z\_0-9\-]+)\=([a-z\_0-9\-]+)|i', $this->xss_hash()."\\1=\\2", $str); /* * Validate standard character entities * * Add a semicolon if missing. We do this to enable * the conversion of entities to ASCII later. * */ $str = preg_replace('#(&\#?[0-9a-z]{2,})([\x00-\x20])*;?#i', "\\1;\\2", $str); /* * Validate UTF16 two byte encoding (x00) * * Just as above, adds a semicolon if missing. * */ $str = preg_replace('#(&\#x?)([0-9A-F]+);?#i',"\\1\\2;",$str); /* * Un-Protect GET variables in URLs */ $str = str_replace($this->xss_hash(), '&', $str); return $str; } // ---------------------------------------------------------------------- /** * Do Never Allowed * * A utility function for xss_clean() * * @param string * @return string */ protected function _do_never_allowed($str) { $str = str_replace(array_keys($this->_never_allowed_str), $this->_never_allowed_str, $str); foreach ($this->_never_allowed_regex as $regex) { $str = preg_replace('#'.$regex.'#is', '[removed]', $str); } return $str; } // -------------------------------------------------------------------- /** * Set Cross Site Request Forgery Protection Cookie * * @return string */ protected function _csrf_set_hash() { if ($this->_csrf_hash == '') { // If the cookie exists we will use it's value. // We don't necessarily want to regenerate it with // each page load since a page could contain embedded // sub-pages causing this feature to fail if (isset($_COOKIE[$this->_csrf_cookie_name]) && preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[$this->_csrf_cookie_name]) === 1) { return $this->_csrf_hash = $_COOKIE[$this->_csrf_cookie_name]; } return $this->_csrf_hash = md5(uniqid(rand(), TRUE)); } return $this->_csrf_hash; } } /* End of file Security.php */ /* Location: ./system/libraries/Security.php */
28harishkumar/blog
8,157
public/js/tinymce/plugins/jbimages/ci/system/core/Config.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * CodeIgniter Config Class * * This class contains functions that enable config files to be managed * * @package CodeIgniter * @subpackage Libraries * @category Libraries * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/libraries/config.html */ class CI_Config { /** * List of all loaded config values * * @var array */ var $config = array(); /** * List of all loaded config files * * @var array */ var $is_loaded = array(); /** * List of paths to search when trying to load a config file * * @var array */ var $_config_paths = array(APPPATH); /** * Constructor * * Sets the $config data from the primary config.php file as a class variable * * @access public * @param string the config file name * @param boolean if configuration values should be loaded into their own section * @param boolean true if errors should just return false, false if an error message should be displayed * @return boolean if the file was successfully loaded or not */ function __construct() { $this->config =& get_config(); log_message('debug', "Config Class Initialized"); // Set the base_url automatically if none was provided if ($this->config['base_url'] == '') { if (isset($_SERVER['HTTP_HOST'])) { $base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http'; $base_url .= '://'. $_SERVER['HTTP_HOST']; $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); } else { $base_url = 'http://localhost/'; } $this->set_item('base_url', $base_url); } } // -------------------------------------------------------------------- /** * Load Config File * * @access public * @param string the config file name * @param boolean if configuration values should be loaded into their own section * @param boolean true if errors should just return false, false if an error message should be displayed * @return boolean if the file was loaded correctly */ function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE) { $file = ($file == '') ? 'config' : str_replace('.php', '', $file); $found = FALSE; $loaded = FALSE; $check_locations = defined('ENVIRONMENT') ? array(ENVIRONMENT.'/'.$file, $file) : array($file); foreach ($this->_config_paths as $path) { foreach ($check_locations as $location) { $file_path = $path.'config/'.$location.'.php'; if (in_array($file_path, $this->is_loaded, TRUE)) { $loaded = TRUE; continue 2; } if (file_exists($file_path)) { $found = TRUE; break; } } if ($found === FALSE) { continue; } include($file_path); if ( ! isset($config) OR ! is_array($config)) { if ($fail_gracefully === TRUE) { return FALSE; } show_error('Your '.$file_path.' file does not appear to contain a valid configuration array.'); } if ($use_sections === TRUE) { if (isset($this->config[$file])) { $this->config[$file] = array_merge($this->config[$file], $config); } else { $this->config[$file] = $config; } } else { $this->config = array_merge($this->config, $config); } $this->is_loaded[] = $file_path; unset($config); $loaded = TRUE; log_message('debug', 'Config file loaded: '.$file_path); break; } if ($loaded === FALSE) { if ($fail_gracefully === TRUE) { return FALSE; } show_error('The configuration file '.$file.'.php does not exist.'); } return TRUE; } // -------------------------------------------------------------------- /** * Fetch a config file item * * * @access public * @param string the config item name * @param string the index name * @param bool * @return string */ function item($item, $index = '') { if ($index == '') { if ( ! isset($this->config[$item])) { return FALSE; } $pref = $this->config[$item]; } else { if ( ! isset($this->config[$index])) { return FALSE; } if ( ! isset($this->config[$index][$item])) { return FALSE; } $pref = $this->config[$index][$item]; } return $pref; } // -------------------------------------------------------------------- /** * Fetch a config file item - adds slash after item (if item is not empty) * * @access public * @param string the config item name * @param bool * @return string */ function slash_item($item) { if ( ! isset($this->config[$item])) { return FALSE; } if( trim($this->config[$item]) == '') { return ''; } return rtrim($this->config[$item], '/').'/'; } // -------------------------------------------------------------------- /** * Site URL * Returns base_url . index_page [. uri_string] * * @access public * @param string the URI string * @return string */ function site_url($uri = '') { if ($uri == '') { return $this->slash_item('base_url').$this->item('index_page'); } if ($this->item('enable_query_strings') == FALSE) { $suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix'); return $this->slash_item('base_url').$this->slash_item('index_page').$this->_uri_string($uri).$suffix; } else { return $this->slash_item('base_url').$this->item('index_page').'?'.$this->_uri_string($uri); } } // ------------------------------------------------------------- /** * Base URL * Returns base_url [. uri_string] * * @access public * @param string $uri * @return string */ function base_url($uri = '') { return $this->slash_item('base_url').ltrim($this->_uri_string($uri), '/'); } // ------------------------------------------------------------- /** * Build URI string for use in Config::site_url() and Config::base_url() * * @access protected * @param $uri * @return string */ protected function _uri_string($uri) { if ($this->item('enable_query_strings') == FALSE) { if (is_array($uri)) { $uri = implode('/', $uri); } $uri = trim($uri, '/'); } else { if (is_array($uri)) { $i = 0; $str = ''; foreach ($uri as $key => $val) { $prefix = ($i == 0) ? '' : '&'; $str .= $prefix.$key.'='.$val; $i++; } $uri = $str; } } return $uri; } // -------------------------------------------------------------------- /** * System URL * * @access public * @return string */ function system_url() { $x = explode("/", preg_replace("|/*(.+?)/*$|", "\\1", BASEPATH)); return $this->slash_item('base_url').end($x).'/'; } // -------------------------------------------------------------------- /** * Set a config file item * * @access public * @param string the config item key * @param string the config item value * @return void */ function set_item($item, $value) { $this->config[$item] = $value; } // -------------------------------------------------------------------- /** * Assign to Config * * This function is called by the front controller (CodeIgniter.php) * after the Config class is instantiated. It permits config items * to be assigned or overriden by variables contained in the index.php file * * @access private * @param array * @return void */ function _assign_to_config($items = array()) { if (is_array($items)) { foreach ($items as $key => $val) { $this->set_item($key, $val); } } } } // END CI_Config class /* End of file Config.php */ /* Location: ./system/core/Config.php */
281677160/openwrt-package
1,478
luci-app-ssr-plus/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config
config global option global_server 'nil' option netflix_server 'nil' option netflix_proxy '0' option threads '0' option run_mode 'router' option dports '2' option custom_ports '80,443' option pdnsd_enable '1' option tunnel_forward '8.8.4.4:53' option monitor_enable '1' option enable_switch '1' option switch_time '667' option switch_timeout '5' option switch_try_count '3' option shunt_dns '1' option gfwlist_url 'https://fastly.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt' option chnroute_url 'https://ispip.clang.cn/all_cn.txt' option nfip_url 'https://fastly.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt' option adblock_url 'https://anti-ad.net/anti-ad-for-dnsmasq.conf' config server_subscribe option proxy '0' option auto_update '1' option auto_update_week_time '*' option auto_update_day_time '2' option auto_update_min_time '0' option user_agent 'v2rayN/9.99' option filter_words '过期/套餐/剩余/QQ群/官网/防失联/回国' config access_control option lan_ac_mode '0' option router_proxy '1' list wan_fw_ips '149.154.160.0/20' list wan_fw_ips '67.198.55.0/24' list wan_fw_ips '91.108.4.0/22' list wan_fw_ips '91.108.56.0/22' list wan_fw_ips '109.239.140.0/24' list wan_fw_ips '8.8.8.8' list wan_fw_ips '1.1.1.1' list Interface 'lan' config socks5_proxy option server 'nil' option local_port '1080' config server_global option enable_server '0' config global_xray_fragment option fragment '0' option noise '0'
2929004360/ruoyi-sign
1,010
ruoyi-api/ruoyi-system-api/src/main/java/com/ruoyi/system/api/service/ISysUserServiceApi.java
package com.ruoyi.system.api.service; import com.ruoyi.common.core.domain.entity.SysUser; import java.util.List; /** * 用户API 业务层 * * @author fengcheng */ public interface ISysUserServiceApi { /** * 通过用户ID查询用户 * * @param userId 用户ID * @return 用户对象信息 */ SysUser selectUserById(Long userId); /** * 根据部门id获取下所有人的userId * * @param deptId 部门id * @return userId集合 */ List<Long> listUserIdByDeptId(Long deptId); /** * 根据部门id获取下所有人的userId * * @param userIds 用户id集合 * @return 用户列表 */ List<SysUser> selectSysUserByUserIdList(long[] userIds); /** * 获取所有用户列表 * * @return 用户列表 */ List<SysUser> getAllUser(); /** * 根据角色id获取用户列表 * * @param roleId 角色id * @return 用户列表 */ List<SysUser> getUserListByRoleId(String roleId); /** * 根据部门id获取用户列表 * * @param deptId * @return */ List<SysUser> getUserListByDeptId(long deptId); }