File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class ClickHouseConfig:
2828 CLICKHOUSE_CONNECT_TIMEOUT: Connection timeout in seconds (default: 30)
2929 CLICKHOUSE_SEND_RECEIVE_TIMEOUT: Send/receive timeout in seconds (default: 300)
3030 CLICKHOUSE_DATABASE: Default database to use (default: None)
31+ CLICKHOUSE_PROXY_PATH: Path to be added to the host URL. For instance, for servers behind an HTTP proxy (default: None)
3132 CLICKHOUSE_ENABLED: Enable ClickHouse server (default: true)
3233 """
3334
@@ -106,6 +107,10 @@ def send_receive_timeout(self) -> int:
106107 Default: 300 (ClickHouse default)
107108 """
108109 return int (os .getenv ("CLICKHOUSE_SEND_RECEIVE_TIMEOUT" , "300" ))
110+
111+ @property
112+ def proxy_path (self ) -> str :
113+ return os .getenv ("CLICKHOUSE_PROXY_PATH" )
109114
110115 def get_client_config (self ) -> dict :
111116 """Get the configuration dictionary for clickhouse_connect client.
@@ -128,6 +133,9 @@ def get_client_config(self) -> dict:
128133 # Add optional database if set
129134 if self .database :
130135 config ["database" ] = self .database
136+
137+ if self .proxy_path :
138+ config ["proxy_path" ] = self .proxy_path
131139
132140 return config
133141
You can’t perform that action at this time.
0 commit comments