Skip to content

Commit 014c1e7

Browse files
Add proxy_config documentation to Rust Server SDK (#2938)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
1 parent ffc9c0c commit 014c1e7

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/server-core/rust/_options.mdx

+15-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ External data store for Statsig values.
8989
- **`global_custom_fields`**: Option\<HashMap\<String, DynamicValue\>\>
9090
Global custom fields to include with all evaluations.
9191

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+
9299

93100
### Example Usage
94101

@@ -115,9 +122,16 @@ let options = StatsigOptions::builder()
115122
.disable_all_logging(Some(false))
116123
.enable_id_lists(Some(true))
117124
.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+
}))
118132
.build();
119133

120134
// Pass the options object into Statsig::new()
121135
let statsig = Statsig::new("server-secret-key", Some(Arc::new(options)));
122136
statsig.initialize().await?;
123-
```
137+
```

0 commit comments

Comments
 (0)