| 2782 | |
| 2783 | //Clash ss type server |
| 2784 | function CSS2QX(cnt) { |
| 2785 | tag = "tag="+cnt.name.replace(/\\U.+?\s{1}/gi,"") |
| 2786 | ipt = cnt.server+":"+cnt.port |
| 2787 | pwd = "password=" + cnt.password |
| 2788 | mtd = "method="+ cnt.cipher |
| 2789 | udp = cnt.udp ? "udp-relay=true" : "udp-relay=false" |
| 2790 | tfo = cnt.tfo ? "fast-open=true" : "fast-open=false" |
| 2791 | obfs = cnt["plugin-opts"] ? "obfs=" + cnt["plugin-opts"].mode : "" |
| 2792 | ohost = cnt["plugin-opts"] ? "obfs-host=" + cnt["plugin-opts"].host : "" |
| 2793 | ouri = "" |
| 2794 | cert = "" |
| 2795 | if (obfs.indexOf("websocket") != -1) { |
| 2796 | obfs = cnt["plugin-opts"].tls? "obfs=wss" : "obfs=ws" |
| 2797 | ohost = cnt["plugin-opts"].host? "obfs-host=" + cnt["plugin-opts"].host:"" |
| 2798 | ouri = cnt["plugin-opts"].path? "obfs-uri=" + cnt["plugin-opts"].path: "" |
| 2799 | if (obfs == "obfs=wss") { // tls verification |
| 2800 | cert = Pcert0 == 1? "" : "tls-verification =false"} |
| 2801 | } |
| 2802 | node = "shadowsocks="+[ipt, pwd, mtd, udp, tfo, obfs, ohost, ouri, cert, tag].filter(Boolean).join(", ") |
| 2803 | return node |
| 2804 | } |
| 2805 | |
| 2806 | //Clash ssr type server |
| 2807 | function CSSR2QX(cnt) { |