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

Function XUDP

Script/Parser.js:2949–2958  ·  view source on GitHub ↗
(cnt,pudp)

Source from the content-addressed store, hash-verified

2947
2948// UDP/TFO 参数 (强制 surge/quanx 类型转换)
2949function XUDP(cnt,pudp) {
2950 var udp = pudp == 1 && /^(shadowsocks|trojan|vmess)/.test(cnt.trim()) ? "udp-relay=true, " : "udp-relay=false, "
2951 if(cnt.indexOf("udp-relay") != -1){
2952 var cnt0 = cnt.replace(RegExp("udp\-relay.*?\,", "gmi"), udp)
2953 }else{
2954 var cnt0 = cnt.replace(new RegExp("tag.*?\=", "gmi"), udp+"tag=")
2955 }
2956 //console.log("UDP-Handle","",cnt0)
2957 return cnt0
2958}
2959
2960function XTFO(cnt,ptfo) {
2961 var tfo = ptfo == 1? "fast-open=true, " : "fast-open=false, "

Callers 3

Subs2QXFunction · 0.85
Surge2QXFunction · 0.85
Clash2QXFunction · 0.85

Calls 1

indexOfMethod · 0.45

Tested by

no test coverage detected