| 882 | |
| 883 | // 指定 cert-sha256 pubkey-sha256 参数 |
| 884 | function 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类型? |
| 895 | function ALPN_Handle(cnt,palpn) { |