/* Original script by NicknameGG, modified for Grasscutter by contributors. */ import System; import System.Windows.Forms; import Fiddler; import System.Text.RegularExpressions; class Handlers { static function OnBeforeRequest(oS: Session) { if(oS.uriContains("http://overseauspider.yuanshen.com:8888/log")){ oS.oRequest.FailSession(404, "Blocked", ""); } if(oS.host.EndsWith(".yuanshen.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com")|| oS.host.EndsWith(".mob.com")) { oS.host = "yspc30.gptzfx.com"; // This can also be replaced with another IP address. } } };