slskd
Configuration for the slskd web service.
slskd doesn't log failed login attempts, so one must read the logs of the reverse proxy configured in front of slskd.
The HTTP code sent after a failed login is 401
, Unauthorized.
The request to authenticate on slskd is a POST on /api/v0/session
.
As a pattern, we'll use ip. See here.
A regex for nginx can look like this:
@'^<ip> .* slskd.domain "POST /api/v0/session HTTP/..." 401 ',
- adjust https://slskd.domain according to your domain.
- if slskd is served on a subpath, say
/slskd
, then adjust toPOST /slskd/auth/login
Example:
{
streams: {
nginx: {
cmd: ['...'], // see ./nginx.md
filters: {
slskd: {
regex: [
@'^<ip> .* slskd.domain "POST /api/v0/session HTTP/..." 401 ',
],
retry: 3,
retryperiod: '6h',
actions: banFor('48h'),
},
},
},
},
}