-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
80 lines (68 loc) · 2.21 KB
/
config.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
const config = {
// Proxy setting
// 代理设置
proxy: {
// bypass government SNI blocking (for China, Korea, Iran etc.)
// 绕过防火墙的SNI封锁 (如天朝, 韩国, 伊朗等)
bypassSNI: true,
// query dns records, by www.nslookup.io
serverHost: [ // *.pixiv.net
'210.140.92.183',
'210.140.92.187',
'210.140.92.193',
'210.140.131.226',
'210.140.131.223',
'210.140.131.218',
'210.140.131.199',
'210.140.131.201'
],
// replace img url to original ip, improve access speed
// 替换图片链接为原始IP, 可在墙内通过原始IP获取图片, 使用http连接加快访问速度
useOriginIP: true,
// replace img url to local proxy
// 启动图片代理服务器 (host/proxy), 替换图片链接为本机代理
useLocalProxy: true,
imageHost: [ // i.pximg.net, direct connection by ip available
'210.140.92.141',
'210.140.92.149',
'210.140.92.142',
'210.140.92.148',
'210.140.92.146',
'210.140.92.144',
'210.140.92.147',
'210.140.92.145',
'210.140.92.143'
]
},
pixiv: {
/** @typedef {'ja'|'en'|'zh'|'zh-cn'|'zh-tw'} Lang */
/** @type {Lang} */
lang: 'zh',
// your cookie here (see README.md#Tips)
// 你的 Cookie (参考 README.md#Tips)
cookie: '',
premium: true,
followUpdate: {
// If undefined, the cookie will determine if it is enabled or not.
// 如果为undefined, 则根据cookie判断是否启用
enable: undefined,
interval: 300 * 1000
},
cachePath: './cache/'
},
httpServer: {
host: '127.0.0.1',
port: 1145
},
websocketServer: {
host: undefined,
port: 4514
}
}
if (config.pixiv.followUpdate.enable === undefined) {
config.pixiv.followUpdate.enable = !!config.pixiv.cookie
}
if (config.websocketServer.host === undefined) {
config.websocketServer.host = config.httpServer.host
}
export default config