Actually, we try to do both. Most scans are done from the inside (the machine that runs avast) but our cloud servers attempt to check if the network is accessible from public internet too.