Detecting direction of USB transfer
Signal strength is not the only reason for the USB cable length restriction.  Two other reasons are reply timing and voltage drop on the power line.

It is possible to watch the bus and know who is sending, but this requires the kind of complexity only available in a IC for any reasonable size.  However, that alone isn't good enough either.  There are passive pullups/downs at the device end to indicate the device is plugged in and what speed it supports.

In short, this would take considerable trickiness to get right, if you can make it work at all.  A USB hub is the way to extend USB another cable length.  If you need much longer, then USB isn't the appropriate communication link.  Ethernet is more appropriate for longer distances.