Setting the http-proxy appears to do nothing

This forum is about all development around libVLC.
LeetSamurai
New Cone
New Cone
Posts: 4
Joined: 17 Sep 2018 13:00

Setting the http-proxy appears to do nothing

Postby LeetSamurai » 17 Sep 2018 23:00

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Setting the http-proxy appears to do nothing

Postby Rémi Denis-Courmont » 18 Sep 2018 03:33

It must be set in the configuration file - the GUI preferences is one way to achieve that.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

LeetSamurai
New Cone
New Cone
Posts: 4
Joined: 17 Sep 2018 13:00

Re: Setting the http-proxy appears to do nothing

Postby LeetSamurai » 18 Sep 2018 09:42

Thanks Rémi. Is this a known issue or by design?

LeetSamurai
New Cone
New Cone
Posts: 4
Joined: 17 Sep 2018 13:00

Re: Setting the http-proxy appears to do nothing

Postby LeetSamurai » 18 Sep 2018 11:23

I have just tried passing a config file using the --config arg instead. This too seems to be ignored :-|

LeetSamurai
New Cone
New Cone
Posts: 4
Joined: 17 Sep 2018 13:00

Re: Setting the http-proxy appears to do nothing

Postby LeetSamurai » 18 Sep 2018 15:06

Found the solution to setting the config path in another thread:

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

Bill_V
New Cone
New Cone
Posts: 3
Joined: 29 Jul 2021 08:23

Re: Setting the http-proxy appears to do nothing

Postby Bill_V » 06 Aug 2021 02:38

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
...

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Setting the http-proxy appears to do nothing

Postby Rémi Denis-Courmont » 07 Aug 2021 17:14

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests