forked from PerformanC/NodeLink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.default.js
More file actions
291 lines (291 loc) · 8.03 KB
/
config.default.js
File metadata and controls
291 lines (291 loc) · 8.03 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
export default {
server: {
host: '0.0.0.0',
port: 3000,
password: 'youshallnotpass',
useBunServer: false // set to true to use Bun.serve websocket (experimental)
},
cluster: {
enabled: true, // active cluster (or use env CLUSTER_ENABLED)
workers: 0, // 0 => uses os.cpus().length, or specify a number (1 = 2 processes total: master + 1 worker)
minWorkers: 1, // Minimum workers to keep alive (improves availability during bursts)
commandTimeout: 6000, // Timeout for heavy operations like loadTracks (6s)
fastCommandTimeout: 4000, // Timeout for player commands like play/pause (4s)
maxRetries: 2, // Number of retry attempts on timeout or worker failure
scaling: {
// New object to group scaling configurations
maxPlayersPerWorker: 20, // Reference capacity for utilization calculation
targetUtilization: 0.7, // Target utilization for scaling up/down
scaleUpThreshold: 0.75, // Utilization threshold to scale up
scaleDownThreshold: 0.3, // Utilization threshold to scale down
checkIntervalMs: 5000, // Interval to check for scaling needs
idleWorkerTimeoutMs: 60000, // Time in ms an idle worker should wait before being removed
queueLengthScaleUpFactor: 5 // How many commands in queue per active worker trigger scale up
}
},
logging: {
level: 'debug',
file: {
enabled: false,
path: 'logs',
rotation: 'daily',
ttlDays: 7
},
debug: {
all: false,
request: true,
session: true,
player: true,
filters: true,
sources: true,
lyrics: true,
youtube: true,
'youtube-cipher': true
}
},
connection: {
logAllChecks: false,
interval: 300000, // 5 minutes
timeout: 10000, // 10 seconds
thresholds: {
bad: 1, // Mbps
average: 5 // Mbps
}
},
maxSearchResults: 10,
maxAlbumPlaylistLength: 100,
playerUpdateInterval: 2000,
trackStuckThresholdMs: 10000,
zombieThresholdMs: 60000,
enableHoloTracks: false,
enableTrackStreamEndpoint: false,
resolveExternalLinks: false,
fetchChannelInfo: false,
filters: {
enabled: {
tremolo: true,
vibrato: true,
lowpass: true,
highpass: true,
rotation: true,
karaoke: true,
distortion: true,
channelMix: true,
equalizer: true,
chorus: true,
compressor: true,
echo: true,
phaser: true,
timescale: true
}
},
defaultSearchSource: 'youtube',
unifiedSearchSources: ['youtube', 'soundcloud'],
sources: {
deezer: {
// arl: '',
// decryptionKey: '',
enabled: true
},
bandcamp: {
enabled: true
},
soundcloud: {
enabled: true
},
local: {
enabled: true,
basePath: './local-music/'
},
http: {
enabled: true
},
vimeo: {
// Note: not 100% of the songs are currently working (but most should.), because i need to code a different extractor for every year (2010, 2011, etc. not all are done)
enabled: true,
},
flowery: {
enabled: true,
voice: 'Salli',
translate: false,
silence: 0,
speed: 1.0,
enforceConfig: false
},
jiosaavn: {
enabled: true,
playlistLoadLimit: 50,
artistLoadLimit: 20
// "secretKey": "38346591" // Optional, defaults to standard key
},
"google-tts": {
enabled: true,
language: 'en-US'
},
youtube: {
enabled: true,
allowItag: [], // additional itags for audio streams, e.g., [140, 141]
targetItag: null, // force a specific itag for audio streams, overriding the quality option
getOAuthToken: false,
hl: 'en',
gl: 'US',
clients: {
search: ['Android'], // Clients used for searching tracks
playback: ['AndroidVR', 'TV', 'TVEmbedded', 'IOS'], // Clients used for playback/streaming
resolve: ['AndroidVR', 'TV', 'TVEmbedded', 'IOS', 'Web'], // Clients used for resolving detailed track information (channel, external links, etc.)
settings: {
TV: {
refreshToken: [""] // You can use a string "token" or an array ["token1", "token2"] for rotation/fallback
}
}
},
cipher: {
url: 'https://cipher.kikkia.dev/api',
token: null
}
},
instagram: {
enabled: true
},
kwai: {
enabled: true
},
twitch: {
enabled: true
},
spotify: {
enabled: true,
clientId: '',
clientSecret: '',
market: 'US',
playlistLoadLimit: 1, // 0 means no limit (loads all tracks), 1 = 100 tracks, 2 = 100 and so on!
playlistPageLoadConcurrency: 10, // How many pages to load simultaneously
albumLoadLimit: 1, // 0 means no limit (loads all tracks), 1 = 50 tracks, 2 = 100 tracks, etc.
albumPageLoadConcurrency: 5, // How many pages to load simultaneously
allowExplicit: true // If true plays the explicit version of the song, If false plays the Non-Explicit version of the song. Normal songs are not affected.
},
applemusic: {
enabled: true,
mediaApiToken: 'token_here', //manually | or "token_here" to get a token automatically
market: 'US',
playlistLoadLimit: 0,
albumLoadLimit: 0,
playlistPageLoadConcurrency: 5,
albumPageLoadConcurrency: 5,
allowExplicit: true
},
tidal: {
enabled: true,
token: 'token_here', //manually | or "token_here" to get a token automatically, get from tidal web player devtools; using login google account
countryCode: 'US',
playlistLoadLimit: 2, // 0 = no limit, 1 = 50 tracks, 2 = 100 tracks, etc.
playlistPageLoadConcurrency: 5 // How many pages to load simultaneously
},
pandora: {
enabled: true,
// Optional, setting this manually can help unblocking countries (since pandora is US only.). May need to be updated periodically.
// fetching manually: use a vpn connected to US, go on pandora.com, open devtools, Network tab, first request to appear and copy the 2nd csrfToken= value.
// csrfToken: ''
},
nicovideo: {
enabled: true
},
reddit: {
enabled: true
},
lastfm: {
enabled: true
}
},
lyrics: {
fallbackSource: 'genius',
youtube: {
enabled: true
},
genius: {
enabled: true
},
musixmatch: {
enabled: true
// signatureSecret: ''
},
lrclib: {
enabled: true
},
applemusic: {
enabled: true,
advanceSearch: true // Uses YTMusic to fetch the correct title and artists instead of relying on messy YouTube video titles, improving lyrics accuracy
}
},
audio: {
quality: 'high', // high, medium, low, lowest
encryption: 'aead_aes256_gcm_rtpsize',
resamplingQuality: 'best' // best, medium, fastest, zero order holder, linear
},
routePlanner: {
strategy: 'RotateOnBan', // RotateOnBan, RoundRobin, LoadBalance
bannedIpCooldown: 600000, // 10 minutes
ipBlocks: []
},
rateLimit: {
enabled: true,
global: {
maxRequests: 1000,
timeWindowMs: 60000 // 1 minute
},
perIp: {
maxRequests: 100,
timeWindowMs: 10000 // 10 seconds
},
perUserId: {
maxRequests: 50,
timeWindowMs: 5000 // 5 seconds
},
perGuildId: {
maxRequests: 20,
timeWindowMs: 5000 // 5 seconds
},
ignorePaths: [],
ignore: {
userIds: [],
guildIds: [],
ips: []
}
},
dosProtection: {
enabled: true,
thresholds: {
burstRequests: 50,
timeWindowMs: 10000 // 10 seconds
},
mitigation: {
delayMs: 500,
blockDurationMs: 300000 // 5 minutes
},
ignore: {
userIds: [],
guildIds: [],
ips: []
}
},
metrics: {
enabled: true,
authorization: {
type: 'Bearer', // Bearer or Basic.
password: '' // If empty, uses server.password
}
},
mix: {
enabled: true,
defaultVolume: 0.8,
maxLayersMix: 5,
autoCleanup: true
},
plugins: [
/* {
name: 'nodelink-sample-plugin',
source: 'local'
} */
],
pluginConfig: {}
}