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

Function SIP2QuanX

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

Source from the content-addressed store, hash-verified

1577
1578//将sip008格式的订阅转换成quanx格式
1579function SIP2QuanX (cnt) {
1580 cnt = JSON.parse(cnt)
1581 ll =cnt.length
1582 nodes =[]
1583 for (i=0; i<ll; i++) {
1584 node = "shadowsocks= "
1585 cnti = cnt[i]
1586 ip = cnti.server + ":" + cnti.server_port
1587 mtd = "method=" + cnti.method
1588 pwd = "password=" + cnti.password
1589 obfs = cnti.plugin_opts? cnti.plugin_opts.replace(";", ", "):""
1590 tag = "tag="+cnti.remarks
1591 node = node +[ip,pwd, mtd, obfs, tag].filter(Boolean).join(", ")
1592 nodes.push(node)
1593 }
1594 return nodes.join("\n")
1595 //console.log(nodes)
1596}
1597
1598//http=example.com:443, username=name, password=pwd, over-tls=true, tls-host=example.com, tls-verification=true, tls13=true, fast-open=false, udp-relay=false, tag=http-tls-02
1599//HTTPS 类型 URI 转换成 QUANX 格式

Callers 1

Type_CheckFunction · 0.85

Calls 3

parseMethod · 0.45
joinMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected