A lot has been written about redirectors. Here are a few references:
Redirect rules: https://github.com/0xZDH/redirect.rules
Hosting and hiding your C2 with Docker and Socat: https://khast3x.club/posts/2020-02-09-C2-Protection-Socat-Docker/
Introduction to Modern Routing For Red Team Infrastructure - using Traefik, Matasploit, Covenant, and Docker: https://khast3x.club/posts/2020-02-14-Intro-Modern-Routing-Traefik-Metasploit-Docker/
AWS Lambda Redirector: https://blog.xpnsec.com/aws-lambda-redirector/
Hiding in the Cloud: Cobalt Strike Beacon C2 using Amazon APIs: https://rhinosecuritylabs.com/aws/hiding-cloudcobalt-strike-beacon-c2-using-amazon-apis/