Some lists have IPv4 addresses mixed with domains, others have have domains that are prepended with 127.0.0.1 alongside regular domains, etc.
Solution: Replace "rule" with a "filters" array. For each filter, apply it to the file and use the output.
New Solution: Create a map with a format as the key and a filter rule as the value. Then there can be varying operations done on a source while storing the results on a proper list.
Some lists have IPv4 addresses mixed with domains, others have have domains that are prepended with
127.0.0.1
alongside regular domains, etc.Solution: Replace "rule" with a "filters" array. For each filter, apply it to the file and use the output.
New Solution: Create a map with a format as the key and a filter rule as the value. Then there can be varying operations done on a source while storing the results on a proper list.