i have created Esp wifi repeater for both like esp32 or esp8266 and it's open source you can check it. https://github.com/esp32king/Esp32-WiFi-Repeater