(cnt)
| 1577 | |
| 1578 | //将sip008格式的订阅转换成quanx格式 |
| 1579 | function 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 格式 |
no test coverage detected