[vlc-devel] [PATCH] HTTP: introduce an option to use (or not) the system (IE) proxy

Jean-Baptiste Kempf jb at videolan.org
Fri Apr 6 02:00:57 CEST 2012


Should Close #5782
---
 modules/access/http.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index 507143e..2925c38 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -79,6 +79,8 @@ static void Close( vlc_object_t * );
 #define PROXY_PASS_LONGTEXT N_( \
     "If your HTTP proxy requires a password, set it here." )
 
+#define PROXY_SYSTEM_TEXT N_("Use proxy parameters from the system.")
+
 #define RECONNECT_TEXT N_("Auto re-connect")
 #define RECONNECT_LONGTEXT N_( \
     "Automatically try to reconnect to the stream in case of a sudden " \
@@ -110,6 +112,9 @@ vlc_module_begin ()
                 false )
     add_password( "http-proxy-pwd", NULL,
                   PROXY_PASS_TEXT, PROXY_PASS_LONGTEXT, false )
+#ifdef WIN32
+    add_bool( "http-system-proxy", false, PROXY_SYSTEM_TEXT, PROXY_SYSTEM_TEXT, false )
+#endif
     add_string( "http-referrer", NULL, REFERER_TEXT, REFERER_LONGTEXT, false )
         change_safe()
     add_string( "http-user-agent", NULL, UA_TEXT, UA_LONGTEXT, false )
@@ -402,7 +407,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
         }
     }
 #elif defined( WIN32 )
-    else
+    else if( var_InheritBool( p_access, "http-system-proxy" ) )
     {
         /* Try to get the proxy server address from Windows internet settings using registry. */
         HKEY h_key;
-- 
1.7.9.6




More information about the vlc-devel mailing list