typedef enum {
/**
* Do not attempt to connect through a proxy
+ *
+ * If built against lbicurl, it itself may attempt to connect
+ * to a proxy if the environment variables specify it.
*/
GIT_PROXY_NONE,
/**
*/
GIT_PROXY_AUTO,
/**
- * Connect through a HTTP proxy
- */
- GIT_PROXY_HTTP,
- /**
- * Connect through a SOCKS v4 proxy
- */
- GIT_PROXY_SOCKS4,
- /**
- * Connect through a SOCKS v5 proxy
+ * Connect via the URL given in the options
*/
- GIT_PROXY_SOCKS5,
+ GIT_PROXY_SPECIFIED,
} git_proxy_t;
/**
if ((error = git_remote__get_http_proxy(t->owner->owner, !!t->connection_data.use_ssl, &url)) < 0)
return error;
- opts.type = GIT_PROXY_HTTP;
+ opts.type = GIT_PROXY_SPECIFIED;
opts.url = url;
error = git_stream_set_proxy(t->io, &opts);
git__free(url);
if (git_remote__get_http_proxy(t->owner->owner, !!t->connection_data.use_ssl, &proxy_url) < 0)
goto on_error;
}
- else if (proxy_opts->type == GIT_PROXY_HTTP) {
+ else if (proxy_opts->type == GIT_PROXY_SPECIFIED) {
proxy_url = git__strdup(proxy_opts->url);
GITERR_CHECK_ALLOC(proxy_url);
}
if (!_remote_proxy_url || !_remote_proxy_user || !_remote_proxy_pass)
cl_skip();
- g_options.fetch_opts.proxy_opts.type = GIT_PROXY_HTTP;
+ g_options.fetch_opts.proxy_opts.type = GIT_PROXY_SPECIFIED;
g_options.fetch_opts.proxy_opts.url = _remote_proxy_url;
g_options.fetch_opts.proxy_opts.credentials = proxy_creds;
called_proxy_creds = 0;
if (!_remote_proxy_url)
cl_skip();
- g_options.fetch_opts.proxy_opts.type = GIT_PROXY_HTTP;
+ g_options.fetch_opts.proxy_opts.type = GIT_PROXY_SPECIFIED;
g_options.fetch_opts.proxy_opts.url = _remote_proxy_url;
called_proxy_creds = 0;
cl_git_pass(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options));