Ignore:
Timestamp:
Oct 31, 2010, 5:05:31 PM (12 years ago)
Author:
charles
Message:

(trunk) #3688 "remove proxy support" -- remove from libtransmission

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r11350 r11367  
    125125#endif
    126126
    127 static int
    128 getCurlProxyType( tr_proxy_type t )
    129 {
    130     if( t == TR_PROXY_SOCKS4 ) return CURLPROXY_SOCKS4;
    131     if( t == TR_PROXY_SOCKS5 ) return CURLPROXY_SOCKS5;
    132     return CURLPROXY_HTTP;
    133 }
    134 
    135127static long
    136128getTimeoutFromURL( const struct tr_web_task * task )
     
    154146    const long verbose = getenv( "TR_CURL_VERBOSE" ) != NULL;
    155147    char * cookie_filename = tr_buildPath( s->configDir, "cookies.txt", NULL );         
    156 
    157     if( !task->range && s->isProxyEnabled ) {
    158         const long proxyType = getCurlProxyType( s->proxyType );
    159         curl_easy_setopt( e, CURLOPT_PROXY, s->proxy );
    160         curl_easy_setopt( e, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
    161         curl_easy_setopt( e, CURLOPT_PROXYPORT, s->proxyPort );
    162         curl_easy_setopt( e, CURLOPT_PROXYTYPE, proxyType );
    163     }
    164 
    165     if( !task->range && s->isProxyAuthEnabled ) {
    166         char * str = tr_strdup_printf( "%s:%s", s->proxyUsername,
    167                                                 s->proxyPassword );
    168         curl_easy_setopt( e, CURLOPT_PROXYUSERPWD, str );
    169         tr_free( str );
    170     }
    171148
    172149    curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L );
Note: See TracChangeset for help on using the changeset viewer.