Skip to content

Commit

Permalink
added socks proxy code snippet + cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMoelans committed Nov 25, 2024
1 parent ea75b22 commit 79be8c2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/platforms/native/configuration/transports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,19 @@ background thread or thread pool to avoid blocking execution.
## Using a Proxy
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:
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:
```c
sentry_options_t *options = sentry_options_new();
sentry_options_set_proxy(options, "http://my.proxy:10010");
sentry_options_set_proxy(options, "http://my.proxy:8080");
sentry_init(options);
/* ... */
```
The same function can also be used for the SOCKS5 proxy:
```c
sentry_options_t *options = sentry_options_new();
sentry_options_set_proxy(options, "socks5://my.proxy:1080");
sentry_init(options);

/* ... */
Expand Down

0 comments on commit 79be8c2

Please sign in to comment.