| 2525 | |
| 2526 | // surge3 中的 SS 类型 |
| 2527 | function SSS2QX(content) { |
| 2528 | var cnt = content; |
| 2529 | var tag = "tag=" + cnt.split("=")[0].trim(); |
| 2530 | var ipport = cnt.split(",")[1].trim() + ":" + cnt.split(",")[2].trim(); |
| 2531 | var pmtd = "method=" + cnt.split("encrypt-method")[1].split(",")[0].split("=")[1]; |
| 2532 | var pwd = "password=" + cnt.split("password")[1].split(",")[0].split("=")[1]; |
| 2533 | if (cnt.indexOf("obfs") != -1) { |
| 2534 | pobfs = "obfs=" + cnt.replace(/obfs-host/, "").split("obfs")[1].split(",")[0].split("=")[1] |
| 2535 | } else { pobfs = "" } |
| 2536 | var phost = cnt.indexOf("obfs-host") != -1 ? "obfs-host" + cnt.split("obfs-host")[1].split(",")[0].trim() : ""; |
| 2537 | if (phost != "") { |
| 2538 | pobfs = pobfs + ", " + phost |
| 2539 | } |
| 2540 | var ptfo = paraCheck(cnt, "tfo") == "true" ? "fast-open=true" : "fast-open=false"; |
| 2541 | var pudp = paraCheck(cnt, "udp-relay") == "true" ? "udp-relay=true" : "udp-relay=false"; |
| 2542 | var nserver = pobfs != "" ? "shadowsocks= " + [ipport, pmtd, pwd, pobfs, ptfo, pudp, tag].join(", ") : "shadowsocks= " + [ipport, pmtd, pwd, ptfo, pudp, tag].join(", "); |
| 2543 | return nserver |
| 2544 | } |
| 2545 | |
| 2546 | |
| 2547 | // surge 中的 Vmess 类型 |