Skip to content

Commit d7679b2

Browse files
feat (native): update transport proxy docs (#11899)
* feat: add proxy support overview * added socks proxy code snippet + cleanup * chore: add highlighting for technical terms
1 parent 80e4a25 commit d7679b2

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

docs/platforms/native/configuration/transports.mdx

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,31 @@ The transport is invoked in the same thread as the call to
4949
`sentry_capture_event`. Consider to offload network communication to a
5050
background thread or thread pool to avoid blocking execution.
5151
52-
## Using an HTTP Proxy
52+
## Using a Proxy
5353
54-
The Native SDK allows the configuration of an HTTP 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_http_proxy(options, "http://my.proxy:10010");
58+
sentry_options_set_proxy(options, "http://my.proxy:8080");
5959
sentry_init(options);
6060
6161
/* ... */
6262
```
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");
67+
sentry_init(options);
68+
69+
/* ... */
70+
```
71+
72+
73+
We support `HTTP` proxies on all platforms, and `SOCKS5` proxies on Linux and macOS. Depending on the platform, the transport provides a fallback in case the proxy is not reachabled. The following table shows the expected behaviour.
74+
75+
| Platform | http-proxy | socks-proxy |
76+
|----------|-----------------------------------------------------|------------------------------------------------------|
77+
| Windows | Internal: fallback <br /> Crashpad: fallback | N/A |
78+
| Linux | Internal: fallback <br /> Crashpad: fallback | Internal: no fallback <br /> Crashpad: no fallback |
79+
| macOS | Internal: no fallback <br /> Crashpad: no fallback | Internal: no fallback <br /> Crashpad: fallback |

0 commit comments

Comments
 (0)