Time Machine external drive connection

Can Time Machine back up to an external drive connected to the Mac through a hub, or does this require a direct connection to the computer?

I have two Macs backing up to Time Machine external disks through hubs. Both have no issues.

The Time Machine for my desktop iMac is connected via a USB3 hub with no problems whatsoever. I’ve had this arrangement for at least 6 years with a2 different iMacs as the desktop machine.

Same here. Have both a TM disk hooked up through a TB2 hub, and another one hooked up over a USB3 hub. Never had any problems with this setup.

Also works through a Firewire hub. My TM volume is attached to a 6 port FW400 hub which is connected (via an adapter) to my Mac mini’s FW800 port.