I don't really understand what those 3 rules are trying to do, other than mark everything with the download bit 8. This is odd because they do not discriminate based on interface. I suppose if they egress the eth0 (upload) interface with a download bit set, they won't be picked up by the tc filters expecting a 4 (upload bit) and may bypass the qdisc.
I don't yet see any purpose to the first and third rules. POSTROUTING happens after OUTPUT, so I don't think it's necessary to re-mark the packets. And I don't see it useful to mark the packet in the default filter table.
Code:
iptables -A OUTPUT -p "$proto" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle -A OUTPUT -p "$proto" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle -A POSTROUTING -p "$proto" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
Did FreshJR leave a note?