Evaluating migration from caddy to traefik (v3)

Hi! I am currently trying to evaluate if it is viable for me to migrate from caddy to traefik in hopes of getting better traffic surveillability out of it.
So far ive managed to bring up rather similar proxy functionality to my containers with traefik, but there are a couple of features that I have no idea how I can reproduce them.

  1. Aborting requests
    I am currently able to terminate requests that I would not like / be able to handle using the abort directive. Such reasons might be that the requested hostname isnt being served or is restricted in some way or another. With the default setup, traefik seems to just respond with a 404 error which I would prefer it doesnt.

  2. Trusted proxies & client ip header
    I am currently able to specify which headers should be used to determine the clients ip address, using the client_ip_headers directive aswell as changing the parsing order from left-to-right to right-to-left using trusted_proxies_strict for more reliable results. I dont seem to find any documentation about what the behaviour of traefik is in that regard. Also is there a way to deny access if the proxy that is being used is not trusted?

  3. 'Conditional scripting' with middlewares
    Caddy offers some scripting like declarations which allows me to adjust to detail on how certain request needs to be handled, redirected and so on. Does traefik somehow offer something similar through middlewares or would i have to actively write middleware plugins to do this?

  4. Mix and match declarations beteen files and docker
    It doesnt seem to be possible to declare a middleware configuration via file and select it to be active through docker labels. Doing so in regards to the specified settings ("Apply the middleware...") seems to declare a new empty middleware instead of applying the existing one, which is visible through the dashboard but no actual assigning happens. I would intend to use this to easily apply larger configurations to individual containers without having to bloat the label declarations further.

I would highly appreciate if someone could help me out on how to get similar kind of functionality to work. Thank you!