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