Now, the Toolbox works through docker-machine. The way the docker client is directed to the virtual machine is via a number of environment variables which you can see by running docker-machine env default
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://192.168.99.100:2376
SET DOCKER_CERT_PATH=/user/.docker/machine/machines/default
SET DOCKER_MACHINE_NAME=default
REM Run this command to configure your shell:
REM @FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd default') DO @%i
Docker for Mac connects directly to the /var/run/docker.sock socket which is mapped into the Docker VM so this is easy to detect by the lack of environment variables.
I believe Docker for Windows uses a named pipe in the same way (//./pipe/docker_engine) so you should also be able to tell by the lack of DOCKER_HOSTin the environment.
If Docker for Windows does still use the environment, there will be differences between the Toolbox and Docker for Windows variables. DOCKER_HOST would be on a different range. DOCKER_CERT_PATH won't include machine etc.