Настройка прокси в VirtualBox и VMware
Introduction
Virtual machines are often used for isolation and multi-accounting. Configuring proxies in VirtualBox and VMware depends on the chosen network mode and guest OS.
Basic Configuration
Network Modes
NAT — The VM accesses the internet through the host. The host's system proxy will be active.
Bridged — The VM acts as a separate device on the local network. A separate proxy configuration is required.
Host-only — No internet access. Not suitable for proxies.
NAT Network — Multiple VMs share a single NAT network.
Configuration in the Guest OS
Windows VM:
Settings → Network → Proxy → Manual
Linux VM:
Environment variables or DE settings.
Host-Level Proxy
You can configure a proxy on the host, and if the VM uses NAT, all VM traffic will automatically pass through the host's proxy.
Advanced Configuration
Environment Variables
Most tools support standard environment variables for proxies:
- HTTP_PROXY / http_proxy — Proxy for HTTP requests
- HTTPS_PROXY / https_proxy — Proxy for HTTPS requests
- NO_PROXY / no_proxy — List of exceptions (addresses that bypass the proxy)
- ALL_PROXY / all_proxy — Proxy for all protocols
SSL and Self-Signed Certificates
Corporate proxies often use their own SSL certificates. To work through them, you need to:
1. Obtain the proxy's CA certificate from the administrator
2. Add it to the system certificate store
3. Or disable SSL verification (for testing only)
Authentication
Two main authentication methods are supported:
By Username and Password — Standard HTTP Basic authentication. Credentials are sent with each request. URL format: http://user:pass@proxy_ip:port
By IP Address (Whitelist) — Your IP is added to a whitelist. No credentials need to be sent.
Verification
After configuration, verify:
1. Perform a test request through the proxy
2. Ensure the IP address has changed
3. Check the connection speed
4. Ensure there are no DNS leaks
Troubleshooting
Proxy Not Connecting
- Verify the address and port are correct
- Ensure the firewall is not blocking the connection
- Check if the proxy is accessible from your network
SSL Errors
- For corporate proxies, add the CA certificate
- For testing, temporarily disable SSL verification
- Update SSL libraries to the latest version
Authentication Errors
- Verify the username and password
- Ensure the credentials format is correct
- Try URL encoding special characters in the password
Best Practices
- Use Environment Variables — For flexibility and security
- Avoid Hardcoding Credentials — Use environment variables or configuration files
- Configure Exceptions — Do not proxy localhost and internal addresses
- Document Settings — In the project's README or team wiki
- Test After Changes — Any configuration change requires verification
Conclusion
Proper proxy configuration ensures stable tool operation and secure connections. Follow the recommendations in this guide and always verify functionality after setup.