MCPcopy Create free account
hub / github.com/Moli-X/Resources / CSS2QX

Function CSS2QX

Script/Parser.js:2784–2804  ·  view source on GitHub ↗
(cnt)

Source from the content-addressed store, hash-verified

2782
2783//Clash ss type server
2784function 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
2807function CSSR2QX(cnt) {

Callers 1

Clash2QXFunction · 0.85

Calls 2

indexOfMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected