Naunter / BT_BlockLists

Transmission block list
The Unlicense
960 stars 47 forks source link

Some lines in the blocklist have wrong format #19

Closed smol-loli closed 1 year ago

smol-loli commented 1 year ago

At the day of writing (13.04.2023 10:51 UTC+2) the current blocklist release has wrong formated lines from line 24186 to 24197 and a few other lines (see image) causing error messages in transmission. idk if this is expected or not so i just want to let you know :)

Screenshot_20230413_105526

Naunter commented 1 year ago

The error is cause by the blocklist does not compatible with the new Transmission v4.

Since Transmission support IPv6 block list rules, it will read lines with colons. If the line does not match the correct IPv6 structure (e.g. blocklist_de:2001:41d0:203:5c64::-2001:41d0:203:5c64::), it will report an error.

Look at the error line 24186 to 24197, we can see there are 2 colons in the line, "....TCP:443:64....".

24187-24197

Same error in line 45451 and others. 45451

The line 536235 is IP range issue, I don't know why...it should within 0-255. 536235

Line 698952 the SPACE problem, can be ignored. 698952

Ok, back to the colons issue, I can use sed to remove those duplicated colons. I tried and researched, also asked GPT, the result I got is sed 's/\(:.*:\)/:/' . Screenshot_2023-04-14_00-58-25

Great, problem solve. Really? Nope, the above sed command will also destroy the IPv6 rules because in a IPv6 address has multiple colons. The sed command will remove all the extra colons in a IPv6 line. For example, blocklist_de:2001:41d0:203:5c64::-2001:41d0:203:5c64:: will become blocklist_de:.

Right now I stuck here...All knowledge of sed I learned is returned to my college professor 😂

Anyway, those errors you can just ignore.

smol-loli commented 1 year ago

Okay, thank you very much :)