修改CustomRules.js
菜單: Rules->Customize Rules (ctrl+R)
在 static function OnBeforeRequest(oSession: Session) 中添加如下js:
var clientIp=oSession["X-CLIENTIP"];
var reg=/([0-9]+.)+/ig;
clientIp=clientIp.match(reg);
oSession.oRequest["X-Forwarder-For"]=clientIp;

上述改動會對所有的代理請求都添加x-forwarder-for,下面增加了一個判斷,只對特定域名的請求增加x-forwarder-for(也可以命名為其它任何自定義名稱)

