| 2504 | // surge2 中的 SS 类型写法(custom) |
| 2505 | //🇷🇺 俄罗斯 GIA = custom, ip, 152, aes-128-gcm, password123, https://xxx/download/SSEncrypt.module, obfs=tls, obfs-host=xxx.windows.com, udp-relay=true |
| 2506 | function SCT2QX(content) { |
| 2507 | var cnt = content; |
| 2508 | var tag = "tag=" + cnt.split("=")[0].trim(); |
| 2509 | var ipport = cnt.split(",")[1].trim() + ":" + cnt.split(",")[2].trim(); |
| 2510 | var pmtd = "method=" + cnt.split(",")[3].trim(); |
| 2511 | var pwd = "password=" + cnt.split(",")[4].trim(); |
| 2512 | if (cnt.indexOf("obfs") != -1) { |
| 2513 | pobfs = "obfs=" + cnt.replace(/obfs-host/, "").split("obfs")[1].split(",")[0].split("=")[1] |
| 2514 | } else { pobfs = "" } |
| 2515 | var phost = cnt.indexOf("obfs-host") != -1 ? "obfs-host" + cnt.split("obfs-host")[1].split(",")[0].trim() : ""; |
| 2516 | if (phost != "") { |
| 2517 | pobfs = pobfs + ", " + phost |
| 2518 | } |
| 2519 | var ptfo = paraCheck(cnt, "tfo") == "true" ? "fast-open=true" : "fast-open=false"; |
| 2520 | var pudp = paraCheck(cnt, "udp-relay") == "true" ? "udp-relay=true" : "udp-relay=false"; |
| 2521 | var nserver = pobfs != "" ? "shadowsocks= " + [ipport, pmtd, pwd, pobfs, ptfo, pudp, tag].join(", ") : "shadowsocks= " + [ipport, pmtd, pwd, ptfo, pudp, tag].join(", "); |
| 2522 | return nserver |
| 2523 | } |
| 2524 | |
| 2525 | |
| 2526 | // surge3 中的 SS 类型 |