forked from lijinma/wechat_spider
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
21 lines (19 loc) · 705 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var proxy = require("anyproxy");
module.exports = function () {
//create cert when you want to use https features
//please manually trust this rootCA when it is the first time you run it
!proxy.utils.certMgr.ifRootCAFileExists() && proxy.utils.certMgr.generateRootCA(function () {
});
var options = {
type: "http",
port: 8001,
webInterface: {
enable: true,
webPort: 8002
},
rule: require("./lib/rule_wechat_spider.js"),
silent: false, //optional, do not print anything into terminal. do not set it when you are still debugging.
forceProxyHttps: true
};
new proxy.ProxyServer(options).start()
};