summaryrefslogtreecommitdiff
path: root/libavformat/tls.h
diff options
context:
space:
mode:
authorMoritz Barsnick <barsnick@gmx.net>2020-08-23 13:53:39 +0200
committerMarton Balint <cus@passwd.hu>2021-03-19 22:43:02 +0100
commit94b63e8ae8deb218339d93a3ec0732826dba7a54 (patch)
tree0889f8502a10eede24ba633a5f9025b8a56c1ea2 /libavformat/tls.h
parent4892060f50cc91ae6b1b5a3c28346fb9a829c757 (diff)
avformat/http,tls: honor http_proxy command line variable for HTTPS
Add the "http_proxy" option and its handling to the "tls" protocol, pass the option from the "https" protocol. The "https" protocol already defines the "http_proxy" command line option, like the "http" protocol does. The "http" protocol properly honors that command line option in addition to the environment variable. The "https" protocol doesn't, because the proxy is evaluated in the underlying "tls" protocol, which doesn't have this option, and thus only handles the environment variable, which it has access to. Fixes #7223. Signed-off-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/tls.h')
-rw-r--r--libavformat/tls.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/tls.h b/libavformat/tls.h
index beb19d6d55..6c6aa01a9a 100644
--- a/libavformat/tls.h
+++ b/libavformat/tls.h
@@ -34,6 +34,7 @@ typedef struct TLSShared {
int listen;
char *host;
+ char *http_proxy;
char underlying_host[200];
int numerichost;
@@ -49,7 +50,8 @@ typedef struct TLSShared {
{"cert_file", "Certificate file", offsetof(pstruct, options_field . cert_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
{"key_file", "Private key file", offsetof(pstruct, options_field . key_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
{"listen", "Listen for incoming connections", offsetof(pstruct, options_field . listen), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
- {"verifyhost", "Verify against a specific hostname", offsetof(pstruct, options_field . host), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }
+ {"verifyhost", "Verify against a specific hostname", offsetof(pstruct, options_field . host), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
+ {"http_proxy", "Set proxy to tunnel through", offsetof(pstruct, options_field . http_proxy), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }
int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options);