Skip to content

Commit 79be8c2

Browse files
committed
added socks proxy code snippet + cleanup
1 parent ea75b22 commit 79be8c2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/platforms/native/configuration/transports.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,19 @@ background thread or thread pool to avoid blocking execution.
5151
5252
## Using a Proxy
5353
54-
The Native SDK allows the configuration of an HTTP or SOCKS5 proxy through which requests can be tunneled to our backend. This proxy must allow `CONNECT` requests to establish a proxy connection. It can be configured via the following option interface:
54+
The Native SDK allows the configuration of an HTTP (CONNECT) or SOCKS5 proxy through which requests can be tunneled to our backend. It can be configured via the following option interface:
5555
5656
```c
5757
sentry_options_t *options = sentry_options_new();
58-
sentry_options_set_proxy(options, "http://my.proxy:10010");
58+
sentry_options_set_proxy(options, "http://my.proxy:8080");
59+
sentry_init(options);
60+
61+
/* ... */
62+
```
63+
The same function can also be used for the SOCKS5 proxy:
64+
```c
65+
sentry_options_t *options = sentry_options_new();
66+
sentry_options_set_proxy(options, "socks5://my.proxy:1080");
5967
sentry_init(options);
6068

6169
/* ... */

0 commit comments

Comments
 (0)