USB repeater over WiFi

Is there any code/project available that makes two modules with each a WiFi shield to work as an extension for USB?

The main application for this, is to be able to download code to a module that is too far away from my computer that I write it for.

If a module has a wifi connection to the computer, why not just download over that? Doesn't the computer have a wifi connection?

Not really, the computer is desktop, but is connected to a WiFi router. Would that work? Otherwise I can buy an usb wifi stick to it. Would that work?

EDIT: Do I need to download any special bootloader or something in the ESP8266 or Mega2560 module to be able to do this?

What you are seeking is a wireless USB print server.

Can the Arduino IDE talk to a print server, in order to upload sketches to the remote Arduino?

The wonder chip strikes again. The esp8266 can be used to program an arduino wirelessly.

https://garyservin.wordpress.com/2014/12/16/programming-an-arduino-via-wifi-with-the-esp8266/

Keep in esp is 3.3v and most arduinos are 5v. You'll need some level shifters.

Or you could just ditch the arduino and get an esp12 if you don't need that many pins.