mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-01-25 10:07:14 +03:00
Update convert.py
Mikrotik fixes: - Fix `failure: bad name` for tld domains like `.ua` - it should be just `ua`.
This commit is contained in:
@@ -168,6 +168,9 @@ def mikrotik_fwd(src, out, remove={'google.com'}):
|
||||
|
||||
with open(f'{out}-mikrotik-fwd.lst', 'w') as file:
|
||||
for name in domains:
|
||||
if name.startswith('.'):
|
||||
file.write(f'/ip dns static add name=*.{name[1:]} type=FWD address-list=allow-domains forward-to=localhost\n')
|
||||
else:
|
||||
file.write(f'/ip dns static add name={name} type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost\n')
|
||||
|
||||
def domains_from_file(filepath):
|
||||
|
||||
Reference in New Issue
Block a user