Page 1 of 5

Re: How to set proxy settings ... especially tor network

Posted: Fri Dec 29, 2017 3:26 am
by Chinyaev
You need call Chromium.UpdatePreferences after set proxy.

Re: How to set proxy settings ... especially tor network

Posted: Fri Dec 29, 2017 9:37 am
by salvadordf
Hi,

I thought it wasn't possible to use the Tor network from a CEF based browser until I found this while searching for some background info to give you an answer :

https://www.codeproject.com/Articles/10 ... or-Browser

If you use the same kind of proxy to connect to the Tor network you would have to use these settings :

Code: Select all

TChromium.ProxyType := CEF_PROXYTYPE_FIXED_SERVERS;
TChromium.ProxyServer := '127.0.0.1';
TChromium.ProxyPort := 8182;
After setting the TChromium properties you can call TChromium.UpdatePreferences as Chinyaev said.

Re: How to set proxy settings ... especially tor network

Posted: Fri Dec 29, 2017 1:47 pm
by salvadordf
You only need to add socks5:// to the sever address. It would be like this :

Code: Select all

TChromium.ProxyType := CEF_PROXYTYPE_FIXED_SERVERS;
TChromium.ProxyServer := 'socks5://127.0.0.1';
TChromium.ProxyPort := 8182;
For more details read this :
https://bitbucket.org/chromiumembedded/ ... resolution

Re: How to set proxy settings ... especially tor network

Posted: Fri Dec 29, 2017 9:34 pm
by salvadordf
Hi,

Try this :

Code: Select all

   Chromium.ProxyType := CEF_PROXYTYPE_FIXED_SERVERS;
   Chromium.ProxyServer := 'socks5://127.0.0.1';   // <--- just the scheme and server address. 
   Chromium.ProxyPort := 9050;
   Chromium.UpdatePreferences;
I'm just "guessing" how it should be done because I don't have that proxy.

Is it available for free ?
Can you give a download link ?

Re: How to set proxy settings ... especially tor network

Posted: Sat Dec 30, 2017 9:11 am
by salvadordf
Hi,

I've updated CEF4Delphi and now the MiniBrowser demo can select SOCKS proxy servers in the preferences :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=247

I've tested a couple of SOCKS5 servers successfully.

Re: How to set proxy settings ... especially tor network

Posted: Sat Dec 30, 2017 5:10 pm
by salvadordf
Hi,

I'm afraid I can't do much more.

CEF4Delphi is just a CEF3 wrapper which includes Chromium. I can fix CEF4Delphi bugs but if there is a problem in CEF3 or Chromium we can only report the problem to the CEF3 project or to the Chromium project.

As far as I know, there's no way to change that timeout interval. It's buried in Chromium's code and it seems Google is ignoring these requests.

Read this from the official CEF3 forum :
http://magpcss.org/ceforum/viewtopic.php?f=6&t=13080

If possible, try configuring Tor to select a faster route.

Re: How to set proxy settings ... especially tor network

Posted: Sat Dec 30, 2017 6:26 pm
by salvadordf
Set TChromium.Options.ImageLoading to STATE_DISABLED

You can also use the TChromium.OnBeforeResourceLoad event and set Result to RV_CANCEL to cancel the request for the resources you don't want to load.

Re: How to set proxy settings ... especially tor network

Posted: Sat Dec 30, 2017 6:45 pm
by salvadordf
I forgot to mention that you should set TChromium.Options.ImageLoading before calling TChromium.CreateBrowser

Re: How to set proxy settings ... especially tor network

Posted: Sun Dec 31, 2017 8:10 am
by salvadordf
This web page has a list of command line switches for Chromium. Not all of them work in CEF based applications but it's worth a try :
https://peter.sh/experiments/chromium-c ... -switches/

Use the GlobalCEFApp.AddCustomCommandLine function before the GlobalCEFApp.StartMainProcess call to test them.

For example GlobalCEFApp.AddCustomCommandLine('--show-fps-counter'); will show an FPS counter in the browser.

Some of those switches are related to the proxy servers, networking, etc.

Re: How to set proxy settings ... especially tor network

Posted: Sun Dec 31, 2017 11:24 am
by salvadordf
Same to you! :D

Happy new year from Spain!
Salvado Diaz