Page 1 of 1

Setting the http-proxy appears to do nothing

Posted: 17 Sep 2018 23:00
by LeetSamurai
Hello,

I have tried setting this argument in both 3.0.4 and the nightly build, but in both cases if I set it to a bogus IP libVLC ignores it and connects directly. This however works fine from the UI.

Anyone know what might be going on here? I am in a windows environment. Thanks.

Re: Setting the http-proxy appears to do nothing

Posted: 18 Sep 2018 03:33
by Rémi Denis-Courmont
It must be set in the configuration file - the GUI preferences is one way to achieve that.

Re: Setting the http-proxy appears to do nothing

Posted: 18 Sep 2018 09:42
by LeetSamurai
Thanks Rémi. Is this a known issue or by design?

Re: Setting the http-proxy appears to do nothing

Posted: 18 Sep 2018 11:23
by LeetSamurai
I have just tried passing a config file using the --config arg instead. This too seems to be ignored :-|

Re: Setting the http-proxy appears to do nothing

Posted: 18 Sep 2018 15:06
by LeetSamurai
Found the solution to setting the config path in another thread:

--no-ignore-config --config=...

Re: Setting the http-proxy appears to do nothing

Posted: 06 Aug 2021 02:38
by Bill_V
Thanks guys above.

Just to be more clear
const char* vlc_args[] =
{
"--no-ignore-config",
"--config=C:\\Users\\Bill\\AppData\\Roaming\\vlc\\vlcrc", //you have to change the path accordingly
};
m_vlc_instance = libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args);


In vlcrc file:
...
# HTTP proxy (string)
http-proxy=http://127.0.0.1:10809
...

Re: Setting the http-proxy appears to do nothing

Posted: 07 Aug 2021 17:14
by Rémi Denis-Courmont
Thanks Rémi. Is this a known issue or by design?
Once upon a time, command line flags were treated the same as configuration parameters. This turned out to be a terrible idea, as large numbers of users accidentally saved command line that were supposed to be one-time into their persistent configuration. So now they are treated as LibVLC instance variables.

However the code handling the HTTP proxy is not tied to a LibVLC instance. On Windows, it reads the proxy from the configuration at the moment, but even that's only because nobody implemented reading the Windows OS proxy settings. On MacOS and Linux, it's different.

Bottom line, it is very dangerous to rely on the http-proxy setting one way or the other.