fix: fix proxy setup (#227)

* fix: fix proxy setup

* feat&fix: add proxy support in setup and remove hardcoded proxy from example
This commit is contained in:
Zilong Zhou
2025-07-02 01:36:32 +08:00
committed by GitHub
parent d4273d992e
commit 595a704aff
4 changed files with 42 additions and 22 deletions

View File

@@ -21,14 +21,8 @@ def create_vm_manager_and_provider(provider_name: str, region: str, use_proxy: b
return VirtualBoxVMManager(), VirtualBoxProvider(region)
elif provider_name in ["aws", "amazon web services"]:
from desktop_env.providers.aws.manager import AWSVMManager
if use_proxy:
# Use proxy-enabled AWS provider
from desktop_env.providers.aws.provider_with_proxy import AWSProviderWithProxy
return AWSVMManager(proxy_config_file="dataimpulse_proxy_config.json"), AWSProviderWithProxy(region, proxy_config_file="dataimpulse_proxy_config.json")
else:
# Use regular AWS provider
from desktop_env.providers.aws.provider import AWSProvider
return AWSVMManager(), AWSProvider(region)
from desktop_env.providers.aws.provider import AWSProvider
return AWSVMManager(), AWSProvider(region)
elif provider_name == "azure":
from desktop_env.providers.azure.manager import AzureVMManager
from desktop_env.providers.azure.provider import AzureProvider