NEW: Checkout EasyFind instead of configuring the settings below. Now everything is much easier!
For the old way (which still works) see below:
VirtualHere works by opening a single TCP port (usually 7575) between the VirtualHere USB Client and the VirtualHere USB Server for all communications.
Server discovery i.e the "Auto-Find" feature of VirtualHere, operates using the standardized Bonjour protocol and this uses UDP port 5353. When connecting to a VirtualHere Server over the Internet, you cannot use the Auto-Find functionality because UDP is not routed to the Internet. So connecting requires specifying the Server hostname or IP in the VirtualHere Client by right clicking USB Hubs -> Specify Hubs... and adding the address of your VirtualHere Server.
But what if your VirtualHere server is behind a NAT or firewall or you don't have a static IP address, or the VirtualHere Server is running on your mobile phone? How does your client know where to connect?
You can use the Reverse Clients feature of the Server. This will make the VirtualHere USB Server open a connection to your VirtualHere client, instead of the other way around. This means that a port will be opened through your NAT or firewall that the Client is then given access to, so USB communication can take place. To access the "Reverse Clients..." feature - in the VirtualHere USB Client right click USB Hubs->Specify Hubs...-> Advanced Tab and check "Enable Reverse Connections". Your Client will then begin listening on port 7573 for the Server to connect to it.
To tell the Server which Client to connect to, you right click on the Server in the VirtualHere Client and select "Reverse Clients..." and enter the IP address or hostname of the client. You will need direct TCP access to the server initially to set this, or you need to edit the server config.ini file manually on the server, and set the ReverseClients entry in there.
If your Client does not have a static IP, you can setup a dynamic DNS e.g www.ddns.net entry that will map a hostname to the Clients current IP. You would when enter this hostname into the "Reverse Clients..."