Simultaneous Ethernet and Wifi on ESP32

I am trying to utilize both the WiFi and Ethernet (via W5500 POE shield) without duplicating nearly everything. I cannot find a library that supports both interfaces with common client and server functions.
The goal is to use WiFi for initial setup and enable the Ethernet if it is attached using the same program without re-flashing for Ethernet. Both interfaces need serve the same web setup page and communicate with a remote IP device without two copies of each.
Before writing a sub-class giant two way switch, is there a set of libraries already available?
Thanks,
John

Yes you can have both, but yiu use two libraries. Ethernet2 is better than the usual Ethernet and WiFi the W5500 shield will also need the SPI lib.

for projects involving WiFi and Ethernet I find the ESP32 based WT32-ETH01 module useful

note that an adapter is required to program the device - see Unofficial guide to the WT32-ETH01e

I found the EthernetESP32 library uses the same base NetworkInterface class as the ESP32 WiFi.
The server and client connections can be declared as NetworkServer and NetworkClient and then assigned to the proper interface at startup.
The same connection routines can either interface without two sets of code.