True dat, I never looked at the text and just saw that foreign looking hierglyphics and looking at it more closely does appear to be a script of some sort LOL
As to the question easy peasy.
Dedicate one VLAN to netflix use ( AKA, be it the apple tv box, or android box etc........ the device in question, on the vlan).
Use ip table, ip route, ip routing rule to send that traffic out vpn.
Done.
In other words why try and find a complicated solution when there should easy solutions!
Scripts are for kids, or Italians with nothing better to do
I avoid them until necessary.
/routing table add fib name=StreamVPN
/ip route
add dst-address=0.0.0.0/0 gateway=wireguard1 routing-table=StreamVPN
/routing rule add src-address=StreamingDevice ( or Streaming Device List ) action=lookup-only-in table table=StreamVPN
Assuming you are using a third party VPN, add this mangle rule:
add action=change-mss chain=forward comment="Clamp MSS to PMTU for Outgoing packets" new-mss=clamp-to-pmtu out-interface=wireguard1 passthrough=yes protocol=tcp tcp-flags=syn
If that mangle doesnt resolve MTU problems try a different one........
add action=change-mss chain=forward new-mss=1380 out-interface=wireguard1 protocol=tcp tcp-flags=syn tcp-mss=1381-65535