MCPcopy Index your code
hub / github.com/Moli-X/Resources / ServerRelay

Function ServerRelay

Script/Parser.js:799–809  ·  view source on GitHub ↗
(src,dst)

Source from the content-addressed store, hash-verified

797
798// 方便代理链的实现
799function ServerRelay(src,dst) {
800 var rsts=[]
801 for (var i=0; i<src.length; i++) {
802 serverA = src[i].indexOf("-host")==-1? src[i].split("=")[1].split(":")[0].trim() : src[i].split("-host")[1].split("=")[1].split(",")[0].trim()
803 type = /^[a-z]/.test(serverA) || /[a-z]$/.test(serverA)? "host":"ip"
804 rst = type == "ip"? "ip-cidr,"+serverA+"/32,"+dst : "host-suffix,"+serverA+","+dst
805 rsts.push(rst)
806 }
807 return rsts.join("\n")
808
809}
810
811// 用于某些奇葩用户不使用 raw 链接的问题
812function rawtest(cnt) {

Callers 1

ResourceParseFunction · 0.85

Calls 3

indexOfMethod · 0.45
pushMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…