Server Proxy Config¶
- class oscopilot.utils.server_config.ConfigManager[source]¶
Bases:
objectA singleton class responsible for managing configuration settings across the application.
This class implements the singleton design pattern to ensure that only one instance of the ConfigManager exists at any time. It provides methods to set, apply, and clear proxy settings for HTTP and HTTPS traffic.
- _instance¶
A private class-level attribute that holds the singleton instance.
- Type:
- http_proxy¶
The HTTP proxy URL.
- Type:
str
- https_proxy¶
The HTTPS proxy URL.
- Type:
str
- apply_proxies()[source]¶
Applies the configured proxy settings by setting them in the environments variables.
The method sets the ‘http_proxy’ and ‘https_proxy’ environments variables based on the configured proxy URLs. If no proxies are configured, the environments variables are not modified.