/ip firewall layer7-protocol
add name=IPA regexp="\\.(ipa)"
add name=IPSW regexp="\\.(ipsw)"
add name=APK regexp="^.*get.+\\.apk.*\$"
add comment="PLAY STORE" name="Google Play Store" regexp=\
"^.+.c.android.clients.google.com.*\$"
/ip firewall mangle
add action=mark-connection chain=forward comment=APK connection-mark=!Game \
disabled=no layer7-protocol=APK new-connection-mark=APK packet-mark=\
!Game_pkt passthrough=yes
add action=mark-packet chain=forward connection-mark=APK disabled=no \
new-packet-mark=APK passthrough=no
add action=mark-connection chain=forward comment=IPA connection-mark=!Game \
disabled=no layer7-protocol=IPA new-connection-mark=IPA packet-mark=\
!Game_pkt passthrough=yes
add action=mark-packet chain=forward connection-mark=IPA disabled=no \
new-packet-mark=IPA passthrough=no
add action=mark-connection chain=forward comment=IPSW connection-mark=!Game \
disabled=no layer7-protocol=IPSW new-connection-mark=IPSW packet-mark=\
!Game_pkt passthrough=yes
add action=mark-packet chain=forward connection-mark=IPSW disabled=no \
new-packet-mark=IPSW passthrough=no
add action=mark-connection chain=forward connection-mark=!Game disabled=no \
layer7-protocol="Google Play Store" new-connection-mark="PLAY STORE" \
packet-mark=!Game_pkt passthrough=yes
add action=mark-packet chain=forward connection-mark="PLAY STORE" disabled=no \
new-packet-mark="PLAY STORE" passthrough=no
/queue type
add kind=pcq name=que-down pcq-burst-rate=1M pcq-burst-threshold=256k \
pcq-burst-time=30s pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=384k pcq-src-address-mask=\
32 pcq-src-address6-mask=64 pcq-total-limit=2000
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=1M name=ANDROID packet-mark="" parent=V.DOWNLOAD priority=6
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k \
max-limit=1M name=APEKA packet-mark=APK parent=ANDROID priority=6 queue=\
que-down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=186k \
max-limit=1M name=IPESWE packet-mark=IPSW parent=ANDROID priority=8 queue=\
que-down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k \
max-limit=756k name=IPS packet-mark=IPA parent=ANDROID priority=8 queue=\
que-down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=50k \
max-limit=1M name="PLAY STORE" packet-mark="PLAY STORE" parent=ANDROID \
priority=6 queue=que-down