mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 00:45:14 +00:00
Update http.js
This commit is contained in:
parent
0eb1552687
commit
81f144262c
29
lib/http.js
29
lib/http.js
|
@ -741,18 +741,37 @@ var HTTPObject = function(engine) {
|
|||
this.attachDebugger = function(_debugger) {
|
||||
var _debugger = _debugger.toUpperCase();
|
||||
|
||||
console.warn("Existing proxy settings will be reset.");
|
||||
|
||||
switch(_debugger) {
|
||||
case "FIDDLER":
|
||||
this.proxy.enabled = true;
|
||||
this.proxy.port = 8866;
|
||||
this.proxy = {
|
||||
"enabled": true,
|
||||
"protocol": "http",
|
||||
"host": "127.0.0.1",
|
||||
"port": 8866,
|
||||
"credential": null
|
||||
};
|
||||
break;
|
||||
|
||||
case "MITMPROXY":
|
||||
this.proxy.enabled = true;
|
||||
this.proxy.port = 8080;
|
||||
this.proxy = {
|
||||
"enabled": true,
|
||||
"protocol": "http",
|
||||
"host": "127.0.0.1",
|
||||
"port": 8080,
|
||||
"credential": null
|
||||
};
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
this.proxy = {
|
||||
"enabled": false,
|
||||
"protocol": "http",
|
||||
"host": "127.0.0.1",
|
||||
"port": 80,
|
||||
"credential": null
|
||||
};
|
||||
console.error("Not specified debugger");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user