package main import ( "net/http" "strings" "imuslab.com/zoraxy/mod/dynamicproxy" ) /* Routing Rule This script handle special routing rules for some utilities functions */ // Register the system build-in routing rules into the core func registerBuildInRoutingRules() { //Cloudflare email decoder //It decode the email address if you are proxying a cloudflare protected site //[email-protected] -> real@email.com dynamicProxyRouter.AddRoutingRules(&dynamicproxy.RoutingRule{ ID: "cloudflare-decoder", MatchRule: func(r *http.Request) bool { return strings.HasSuffix(r.RequestURI, "cloudflare-static/email-decode.min.js") }, RoutingHandler: func(w http.ResponseWriter, r *http.Request) { decoder := "function fixObfuscatedEmails(){let t=document.getElementsByClassName(\"__cf_email__\");for(let e=0;e