Fix auto detection
Add proxy detection