@@ -89,6 +89,13 @@ External data store for Statsig values.
89
89
- ** ` global_custom_fields ` ** : Option\< HashMap\< String, DynamicValue\>\>
90
90
Global custom fields to include with all evaluations.
91
91
92
+ - ** ` proxy_config ` ** : Option\< ProxyConfig\>
93
+ Configuration for connecting through a proxy server. The ` ProxyConfig ` struct has the following properties:
94
+ - ` proxy_host ` : Option\< String\> - Specifies the proxy server host
95
+ - ` proxy_port ` : Option\< u16\> - Specifies the proxy server port
96
+ - ` proxy_auth ` : Option\< String\> - For proxy authentication (format: ` "username:password" ` )
97
+ - ` proxy_protocol ` : Option\< String\> - Specifies the protocol (e.g., ` "http" ` , ` "https" ` )
98
+
92
99
93
100
### Example Usage
94
101
@@ -115,9 +122,16 @@ let options = StatsigOptions::builder()
115
122
. disable_all_logging (Some (false ))
116
123
. enable_id_lists (Some (true ))
117
124
. specs_sync_interval_ms (Some (30000 ))
125
+ // Configure proxy settings
126
+ . proxy_config (Some (ProxyConfig {
127
+ proxy_host : Some (" proxy.example.com" . to_string ()),
128
+ proxy_port : Some (8080 ),
129
+ proxy_protocol : Some (" https" . to_string ()),
130
+ proxy_auth : None , // Use Some("username:password".to_string()) if authentication is required
131
+ }))
118
132
. build ();
119
133
120
134
// Pass the options object into Statsig::new()
121
135
let statsig = Statsig :: new (" server-secret-key" , Some (Arc :: new (options )));
122
136
statsig . initialize (). await ? ;
123
- ```
137
+ ```
0 commit comments