int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options)

{

    int port;

    const char *p;

    char buf[200], opts[50] = "";

    struct addrinfo hints = { 0 }, *ai = NULL;

    const char *proxy_path;

    int use_proxy;



    set_options(c, uri);



    if (c->listen)

        snprintf(opts, sizeof(opts), "?listen=1");



    av_url_split(NULL, 0, NULL, 0, c->host, sizeof(c->host), &port, NULL, 0, uri);



    p = strchr(uri, '?');



    if (!p) {

        p = opts;

    } else {

        if (av_find_info_tag(opts, sizeof(opts), "listen", p))

            c->listen = 1;

    }



    ff_url_join(buf, sizeof(buf), "tcp", NULL, c->host, port, "%s", p);



    hints.ai_flags = AI_NUMERICHOST;

    if (!getaddrinfo(c->host, NULL, &hints, &ai)) {

        c->numerichost = 1;

        freeaddrinfo(ai);

    }



    proxy_path = getenv("http_proxy");

    use_proxy = !ff_http_match_no_proxy(getenv("no_proxy"), c->host) &&

                proxy_path && av_strstart(proxy_path, "http://", NULL);



    if (use_proxy) {

        char proxy_host[200], proxy_auth[200], dest[200];

        int proxy_port;

        av_url_split(NULL, 0, proxy_auth, sizeof(proxy_auth),

                     proxy_host, sizeof(proxy_host), &proxy_port, NULL, 0,

                     proxy_path);

        ff_url_join(dest, sizeof(dest), NULL, NULL, c->host, port, NULL);

        ff_url_join(buf, sizeof(buf), "httpproxy", proxy_auth, proxy_host,

                    proxy_port, "/%s", dest);

    }



    return ffurl_open(&c->tcp, buf, AVIO_FLAG_READ_WRITE,

                      &parent->interrupt_callback, options);

}

int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options)

{

    int port;

    const char *p;

    char buf[200], opts[50] = "";

    struct addrinfo hints = { 0 }, *ai = NULL;

    const char *proxy_path;

    int use_proxy;



    set_options(c, uri);



    if (c->listen)

        snprintf(opts, sizeof(opts), "?listen=1");



    av_url_split(NULL, 0, NULL, 0, c->host, sizeof(c->host), &port, NULL, 0, uri);



    p = strchr(uri, '?');



    if (!p) {

        p = opts;

    } else {

        if (av_find_info_tag(opts, sizeof(opts), "listen", p))

            c->listen = 1;

    }



    ff_url_join(buf, sizeof(buf), "tcp", NULL, c->host, port, "%s", p);



    hints.ai_flags = AI_NUMERICHOST;

    if (!getaddrinfo(c->host, NULL, &hints, &ai)) {

        c->numerichost = 1;

        freeaddrinfo(ai);

    }



    proxy_path = getenv("http_proxy");

    use_proxy = !ff_http_match_no_proxy(getenv("no_proxy"), c->host) &&

                proxy_path && av_strstart(proxy_path, "http:



    if (use_proxy) {

        char proxy_host[200], proxy_auth[200], dest[200];

        int proxy_port;

        av_url_split(NULL, 0, proxy_auth, sizeof(proxy_auth),

                     proxy_host, sizeof(proxy_host), &proxy_port, NULL, 0,

                     proxy_path);

        ff_url_join(dest, sizeof(dest), NULL, NULL, c->host, port, NULL);

        ff_url_join(buf, sizeof(buf), "httpproxy", proxy_auth, proxy_host,

                    proxy_port, "/%s", dest);

    }



    return ffurl_open(&c->tcp, buf, AVIO_FLAG_READ_WRITE,

                      &parent->interrupt_callback, options);

}

    av_url_split(NULL, 0, NULL, 0, c->host, sizeof(c->host), &port, NULL, 0, uri);     ff_url_join(buf, sizeof(buf), "tcp", NULL, c->host, port, "%s", p);     if (!getaddrinfo(c->host, NULL, &hints, &ai)) {     use_proxy = !ff_http_match_no_proxy(getenv("no_proxy"), c->host) &&         ff_url_join(dest, sizeof(dest), NULL, NULL, c->host, port, NULL);
int FUNC_0(TLSShared *VAR_0, URLContext *VAR_1, const char *VAR_2, AVDictionary **VAR_3)

{

    int VAR_4;

    const char *VAR_5;

    char VAR_6[200], VAR_7[50] = "";

    struct addrinfo VAR_8 = { 0 }, *VAR_9 = NULL;

    const char *VAR_10;

    int VAR_11;



    set_options(VAR_0, VAR_2);



    if (VAR_0->listen)

        snprintf(VAR_7, sizeof(VAR_7), "?listen=1");



    av_url_split(NULL, 0, NULL, 0, VAR_0->host, sizeof(VAR_0->host), &VAR_4, NULL, 0, VAR_2);



    VAR_5 = strchr(VAR_2, '?');



    if (!VAR_5) {

        VAR_5 = VAR_7;

    } else {

        if (av_find_info_tag(VAR_7, sizeof(VAR_7), "listen", VAR_5))

            VAR_0->listen = 1;

    }



    ff_url_join(VAR_6, sizeof(VAR_6), "tcp", NULL, VAR_0->host, VAR_4, "%s", VAR_5);



    VAR_8.ai_flags = AI_NUMERICHOST;

    if (!getaddrinfo(VAR_0->host, NULL, &VAR_8, &VAR_9)) {

        VAR_0->numerichost = 1;

        freeaddrinfo(VAR_9);

    }



    VAR_10 = getenv("http_proxy");

    VAR_11 = !ff_http_match_no_proxy(getenv("no_proxy"), VAR_0->host) &&

                VAR_10 && av_strstart(VAR_10, "http:



    if (VAR_11) {

        char proxy_host[200], proxy_auth[200], dest[200];

        int proxy_port;

        av_url_split(NULL, 0, proxy_auth, sizeof(proxy_auth),

                     proxy_host, sizeof(proxy_host), &proxy_port, NULL, 0,

                     VAR_10);

        ff_url_join(dest, sizeof(dest), NULL, NULL, VAR_0->host, VAR_4, NULL);

        ff_url_join(VAR_6, sizeof(VAR_6), "httpproxy", proxy_auth, proxy_host,

                    proxy_port, "/%s", dest);

    }



    return ffurl_open(&VAR_0->tcp, VAR_6, AVIO_FLAG_READ_WRITE,

                      &VAR_1->interrupt_callback, VAR_3);

}

int FUNC_0(TLSShared *VAR_0, URLContext *VAR_1, const char *VAR_2, AVDictionary **VAR_3)
{ int VAR_4; const char *VAR_5; char VAR_6[200], VAR_7[50] = ""; struct addrinfo VAR_8 = { 0 }, *VAR_9 = NULL; const char *VAR_10; int VAR_11; set_options(VAR_0, VAR_2); if (VAR_0->listen)
snprintf(VAR_7, sizeof(VAR_7), "?listen=1"); av_url_split(NULL, 0, NULL, 0, VAR_0->host, sizeof(VAR_0->host), &VAR_4, NULL, 0, VAR_2); VAR_5 = strchr(VAR_2, '?'); if (!VAR_5) { VAR_5 = VAR_7; } else { if (av_find_info_tag(VAR_7, sizeof(VAR_7), "listen", VAR_5))
VAR_0->listen = 1; } ff_url_join(VAR_6, sizeof(VAR_6), "tcp", NULL, VAR_0->host, VAR_4, "%s", VAR_5); VAR_8.ai_flags = AI_NUMERICHOST; if (!getaddrinfo(VAR_0->host, NULL, &VAR_8, &VAR_9)) { VAR_0->numerichost = 1; freeaddrinfo(VAR_9); } VAR_10 = getenv("http_proxy"); VAR_11 = !ff_http_match_no_proxy(getenv("no_proxy"), VAR_0->host) &&
VAR_10 && av_strstart(VAR_10, "http:
if (VAR_11) { char proxy_host[200], proxy_auth[200], dest[200]; int proxy_port; av_url_split(NULL, 0, proxy_auth, sizeof(proxy_auth),
proxy_host, sizeof(proxy_host), &proxy_port, NULL, 0,
VAR_10); ff_url_join(dest, sizeof(dest), NULL, NULL, VAR_0->host, VAR_4, NULL); ff_url_join(VAR_6, sizeof(VAR_6), "httpproxy", proxy_auth, proxy_host,
proxy_port, "/%s", dest); } return ffurl_open(&VAR_0->tcp, VAR_6, AVIO_FLAG_READ_WRITE,
&VAR_1->interrupt_callback, VAR_3); }