Using Pi as a router

i want to use a pi as a wifi access point and thought it would be nice to use it as a pihole too.
due to the location(3 floors away from the modem) i only have 1 ethernet cable to connect the pihole and my desktop.

i was wondering if it is possible to have the pihole sit between my desktop and the router and if this would require specific features on the pi.

any help on the subject is apreciated.

@cloudshadow Have you considered simply adding an Ethernet switch instead? Then connect the single Ethernet cable from your router to the switch, and then, connect both your Pi-Hole and/or your desktop to this switch.

There is certainly more than one way to achieve this,. and there are users that have succeeded running Pi-hole on an RPi acting as wireless AP, see RaspAP && PiHole e.g., and RaspAp + Pi-Hole - #2 by Bucking_Horn might also be relevant.

However, those posts may not be up to date.
And as such a configuration is not a Pi-hole issue at all, you should specifically check alternatie sources for running an RPi as wireless AP.

Note that any AP would have to offer DHCP services to its clients, and as Pi-hole is also capable of doing this, the most likely source of trouble would lie in the configuration of dnsmasq, Pi-hole's embedded DHCP server.

If your designated AP software also runs dnsmasq, you'd have to find a way to disable that in your AP, and you'd have to deal with any configuration conflicts from files located in /etc/dnsmasq.d/.