Using localhost proxy results in ERR_CONNECTION_RESET

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Using localhost proxy results in ERR_CONNECTION_RESET

Postby JMilly » Wed Jan 08, 2020 2:48 pm

Platform : Windows x86
CEF Version: 78.3.9+gc7345f2+chromium-78.0.3904.108


When I try to set cef to use a proxy either via

Code: Select all
command_line->AppendSwitchWithValue("proxy-server", "http://localhost:64765");

or the SetPreferences function.

Any attempt to load a page fails with ERR_CONNECTION_RESET , passed down from the OnCefLoadError callbacks.

The localhost proxy works with version 72 of cef but not the version (78.03904.108) that i'm using.
Neither localhost or 127.0.0.1 work.

Also non localhost proxies work without issue using both the command line and SetPreference method.

Is there some setting i need to disable/enable to allow localhost proxy connections? (No authentication is being used).
JMilly
Newbie
 
Posts: 9
Joined: Wed Sep 25, 2019 4:28 am

Re: Using localhost proxy results in ERR_CONNECTION_RESET

Postby Czarek » Thu Jan 09, 2020 10:40 am

Does the proxy work in Google Chrome? Have you tested with cefclient?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Using localhost proxy results in ERR_CONNECTION_RESET

Postby JMilly » Fri Jan 10, 2020 2:24 pm

It is not working with Google Chrome or cefclient. Interestingly it's also not working with the 3626 cefclient. But our application using the cef 3626 build does work. I'm investigating this further.
JMilly
Newbie
 
Posts: 9
Joined: Wed Sep 25, 2019 4:28 am

Re: Using localhost proxy results in ERR_CONNECTION_RESET

Postby JMilly » Mon Jan 13, 2020 11:18 am

I have solved the issue. Our localhost proxy only accepted connections from processes that it launched itself. However, it appears that in the newer versions of Cef, the proxy connection is made in one of the sub-processes and not the main process. This caused our proxy to reject the connections resulting in the ERR_CONNECTION_RESET return code.
JMilly
Newbie
 
Posts: 9
Joined: Wed Sep 25, 2019 4:28 am

Re: Using localhost proxy results in ERR_CONNECTION_RESET

Postby amaitland » Mon Jan 13, 2020 4:34 pm

Chrome switched to using a dedicated subprocess for network access (NetworkService). CEF implemented support for NetworkService in branch 3770

See https://bitbucket.org/chromiumembedded/ ... orkservice
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 57 guests