stream: add support for setting a proxy

If the stream claims to support this feature, we can let the transport
set the proxy.

We also set HTTPPROXYTUNNEL option so curl can create a tunnel through
the proxy which lets us create our own TLS session (if needed).
This commit is contained in:
Carlos Martín Nieto
2015-06-24 17:26:36 +02:00
parent ede517bc53
commit 1376e784c6
3 changed files with 32 additions and 0 deletions
+2
View File
@@ -29,8 +29,10 @@ typedef struct git_stream {
int version;
int encrypted;
int proxy_support;
int (*connect)(struct git_stream *);
int (*certificate)(git_cert **, struct git_stream *);
int (*set_proxy)(struct git_stream *, const char *proxy_url);
ssize_t (*read)(struct git_stream *, void *, size_t);
ssize_t (*write)(struct git_stream *, const char *, size_t, int);
int (*close)(struct git_stream *);