Whistle 代理規則使用
設定 Dns 代理
- 在 Rules 頁籤加入以下設定,設定 Domain 對應 Ip 位置  1 example.com 192.168.0.1 
設定 Http 的 StatusCode 代理
- 在 Rules 頁籤加入以下設定,設定狀態碼  1 ^https://example.com/User/Get statusCode://200 
設定 Http 的 Headers 代理
- 
在 Values 頁籤加入以下設定,命名為 corsheaders 1 
 2Access-Control-Allow-Origin: * 
 Content-Type: application/json; charset=utf8
- 
在 Rules 頁籤加入以下設定,設定 Headers 1 ^https://example.com/User/Get resHeaders://{corsheaders} 
設定 Http 的 Body 代理
- 
在 Values 頁籤加入以下設定,命名為 User.json 1 
 2
 3
 4{ 
 "Name": "張三",
 "Age": 18,
 }
- 
在 Rules 頁籤加入以下設定,設定 Headers 1 ^https://example.com/User/Get resBody://{User.json} 
設定網頁嵌入 Js 檔案
- 
在 Values 頁籤加入以下設定,命名為 test.js 1 console.log('test') 
- 
在 Rules 頁籤加入以下設定,設定 Js 檔案 1 ^https://example.com/index.html jsAppend://{test.js} 
設定 Socks 代理
搭配SSH動態端口轉發請求
- 在 Rules 頁籤加入以下設定,設定 Domain 對應 Ip 位置  1 example.com socks://127.0.0.1:8080 
📜 參考資料