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

Function SHA256_Handle

Script/Parser.js:884–892  ·  view source on GitHub ↗
(cnt,pcsha256,ppsha256)

Source from the content-addressed store, hash-verified

882
883// 指定 cert-sha256 pubkey-sha256 参数
884function SHA256_Handle(cnt,pcsha256,ppsha256) {
885 if (cnt.indexOf("over-tls=true")!=-1 || cnt.indexOf("obfs=wss")!=-1) {
886 cnt = cnt.replace(/tls-verification\s*\=\s*false(\s*)\,/,"") //去除 tls-verification=false
887 //$notify("SHA256",cnt,Pcsha256+Ppsha256)
888 cnt = pcsha256!=""? cnt.replace(/tag\s*\=/,"tls-cert-sha256="+pcsha256+", tag=") : cnt
889 cnt = ppsha256!=""? cnt.replace(/tag\s*\=/,"tls-pubkey-sha256="+ppsha256+", tag=") : cnt
890 }
891 return cnt
892}
893
894// 指定alpn参数,over-tls类型?
895function ALPN_Handle(cnt,palpn) {

Callers 1

Subs2QXFunction · 0.85

Calls 1

indexOfMethod · 0.45

Tested by

no test coverage detected