Skip to content

Commit

Permalink
Added back deprecated http_proxy API
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMoelans committed Oct 30, 2024
1 parent 50b57fb commit f9fea04
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,22 @@ SENTRY_API void sentry_options_set_proxy_n(
*/
SENTRY_API const char *sentry_options_get_proxy(const sentry_options_t *opts);

/**
* Configures the proxy.
*
* The given proxy has to include the full scheme,
* eg. `http://some.proxy/`or 'socks5://some.proxy/'.
*/
SENTRY_API void sentry_options_set_http_proxy(
sentry_options_t *opts, const char *proxy);
SENTRY_API void sentry_options_set_http_proxy_n(
sentry_options_t *opts, const char *proxy, size_t proxy_len);

/**
* Returns the configured proxy.
*/
SENTRY_API const char *sentry_options_get_http_proxy(const sentry_options_t *opts);

/**
* Configures the path to a file containing ssl certificates for
* verification.
Expand Down
20 changes: 20 additions & 0 deletions src/sentry_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,26 @@ sentry_options_get_proxy(const sentry_options_t *opts)
return opts->proxy;
}

void
sentry_options_set_http_proxy_n(
sentry_options_t *opts, const char *proxy, size_t proxy_len)
{
sentry_options_set_proxy_n(opts, proxy, proxy_len);
}

void
sentry_options_set_http_proxy(sentry_options_t *opts, const char *proxy)
{
sentry_options_set_proxy(opts, proxy);

}

const char *
sentry_options_get_http_proxy(const sentry_options_t *opts)
{
return sentry_options_get_proxy(opts);
}

void
sentry_options_set_ca_certs(sentry_options_t *opts, const char *path)
{
Expand Down

0 comments on commit f9fea04

Please sign in to comment.