-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaultConf.js
62 lines (50 loc) · 1.19 KB
/
defaultConf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
module.exports = {
enableReplace : true,
enableProxyRequest : true,
replaceBase : './replaceDocs',
replaceRules : [
[ /direct.example.com\/(\w+)\.html/, '{$1}.html', '404.html' ]
],
autoBuild : [
[
/^the url to match$/i,
'the shell command to run before response',
5 * 1000 //min build interval
]
],
filter : function (url, host) {
if (!/\.(swf|jpg|jpeg|gif|bmp|png|cur)(\?|$)/i.test(url) && //no images or flash
!/^127\.0\.0\.1/i.test(host) //no local
) {
return true;
}
},
//delay : 1000,
delayFilter : function (url) {
return /\.js/i.test(url);
},
proxyRules : {
'PROXY example.com:8080' : [
'http://needproxy.example.com/*',
'needproxy2.example.com'
],
'DIRECT' : [
'127.0.0.1:*',
'http://direct.example.com/*'
]
},
allowIps : [
'127.0.0.1',
'10.211.55.*'
],
scriptBase : __dirname,
pac : 'http://example.com/path/to.pac',
pacEncoding : 'utf8',
enableLogs : true,
logFile : './runtime/logs/visit.log',
enableResponseLog : true,
responseLogFilePrefix : './runtime/logs/response_',
hostsFile : './hosts.conf',
port : 8080,
maxSockets : 10
};