alzhao
2
Seems there is no easy solution for this.
For the 2nd question, maybe this is difficult because a captive portal can really be customised, which it is really hard to do this job automatically.
For the 1st question. One solution is that you connect using your phone and authorise you MAC address then clone it to the router. But you will worry about your phone have unsafe connection. Another solution is that we use a script to check if there is captive portal and then only authorise connection to the captive portal for all http connections. I think this could be done. The router can control which traffic goes to VPN and which goes to normal Internet depends on protocol, ip address etc.