/file remove "Mikrotik-YouTube.rsc"
/tool fetch url="https://www.gangtikus.net/api/miktool/rsc/Mikrotik-YouTube.rsc" dst-path="Mikrotik-YouTube.rsc"
/import file-name="Mikrotik-YouTube.rsc"
/file remove "Mikrotik-YouTube.rsc"
/queue simple
add priority=8/8 max-limit="20M/20M" name="-> YouTube" packet-marks="YouTube-Up,YouTube-Down" target="192.168.0.0/16,172.16.0.0/12,10.0.0.0/8"
/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark="YouTube-conn" dst-address-list="Mikrotik-YouTube" passthrough=yes src-address-list=ip-local comment="YouTube Mangle"
add action=mark-packet chain=forward connection-mark="YouTube-conn" src-address-list=ip-local new-packet-mark="YouTube-Up" passthrough=no
add action=mark-packet chain=forward connection-mark="YouTube-conn" dst-address-list=ip-local new-packet-mark="YouTube-Down" passthrough=no
/ip firewall address-list
add address=192.168.0.0/16 list=ip-local comment="Ip Local MikTool"
add address=172.16.0.0/12 list=ip-local comment="Ip Local MikTool"
add address=10.0.0.0/8 list=ip-local comment="Ip Local MikTool"