Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
ChromeRuntime and Proxy
ChromeRuntime and Proxy
Hi, it seems like a similar question was raised, but I didn't find something.
Namely, the problem with the proxy for which authorization is required, how to solve it?
Namely, the problem with the proxy for which authorization is required, how to solve it?
Re: ChromeRuntime and Proxy
I tried to add a header, but even in normal mode it doesn't work for some reason. Error ERR_INVALID_ARGUMENT
This is how the connection of one of the VPN extensions looks like
Code: Select all
...BeforeResourceLoad
....
TempNewMap.Append('Proxy-Authorization', 'Basic ZnJlZXVzZXIxOmZyZWV1c2VyMQ==');
TempNewMap.Append('Proxy-Connection', 'keep-alive');
- salvadordf
- Posts: 4083
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: ChromeRuntime and Proxy
The Chrome runtime mode is experimental and some features don't work yet.
Try using command line switches like --proxy-server with this value http://<user>:<pass>@<host>:<port>/, for example :
That code line needs to be added before the GlobalCEFApp.StartMainProcess call.
Try using command line switches like --proxy-server with this value http://<user>:<pass>@<host>:<port>/, for example :
Code: Select all
GlobalCEFApp.AddCustomCommandLine('--proxy-server', 'http://username:password@myproxy.com:80');
Re: ChromeRuntime and Proxy
This is certainly not a solution, but it doesn't work either.
Is it possible to add headers via devtools? I tried, but I couldn't add them at all.
GlobalCEFApp.AddCustomCommandLine('--proxy-server', 'http://0401:oLEFKa@86.18.202.21:7952');ERR_NO_SUPPORTED_PROXIES
Is it possible to add headers via devtools? I tried, but I couldn't add them at all.
Code: Select all
tab.call_method("Network.setExtraHTTPHeaders", headers={"Authorization": "Basic " + context.base64_message})
Code: Select all
TempList.SetString('{"Authorization": "Basic 12345"}');
TempParams.SetValue('headers', TempList);
Chrom.ExecuteDevToolsMethod(0, 'Network.setExtraHTTPHeaders', TempParams);
Re: ChromeRuntime and Proxy
It turned out to add headers, but it still doesn't work
The problem is not only with the "Chrome runtime" in normal mode does not work either
ERR_INVALID_ARGUMENT
Code: Select all
Chrom.ExecuteDevToolsMethod(0, 'Network.enable', nil);
TempHeaders := TCefDictionaryValueRef.New;
TempHeaders.SetString('Proxy-Authorization', 'Basic ZX45645gUZLYTduM0g=');
TempHeaders.SetString('Proxy-Connection', 'keep-alive');
TempParams.SetDictionary('headers', TempHeaders);
Chrom.ExecuteDevToolsMethod(0, 'Network.setExtraHTTPHeaders', TempParams);
ERR_INVALID_ARGUMENT
Re: ChromeRuntime and Proxy
And how to load the extension in ChromeRuntime? It seemed to work before.
- salvadordf
- Posts: 4083
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: ChromeRuntime and Proxy
Try to use the command line switch with one of these Chromium builds :
https://chromium.woolyss.com/
If it works in Chromium, it should also work in CEF unless there's a new bug or a regression.
These kinds of problems happen with experimental code.
https://chromium.woolyss.com/
If it works in Chromium, it should also work in CEF unless there's a new bug or a regression.
These kinds of problems happen with experimental code.
Re: ChromeRuntime and Proxy
It doesn't work, it's probably been like this for a long time.
Thorium_AVX2_111.0.5563.111
But authorization works if you save the login \ password in the extension. Proxy Auto Auth
How do I add an extension here in Chrome Runtime mode? Previously, it was possible.
And error ERR_INVALID_ARGUMENT due to a security breach of changing headers sort of.
Thorium_AVX2_111.0.5563.111
But authorization works if you save the login \ password in the extension. Proxy Auto Auth
How do I add an extension here in Chrome Runtime mode? Previously, it was possible.
And error ERR_INVALID_ARGUMENT due to a security breach of changing headers sort of.
- salvadordf
- Posts: 4083
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: ChromeRuntime and Proxy
If an official Chromium build can't use that proxy and you need to install an extension then all you can do is try to reverse-engineer that extension to try to replicate what it does.
I have a limited experience with the Chrome runtime mode and I only installed an extension from the chrome extension store a few months ago.
Please, remember that CEF4Delphi is only a CEF wrapper, which includes Chromium. Some features are beyond the scope of the CEF4Delphi project.
Re: ChromeRuntime and Proxy
The problem is not in using a proxy, but in authorizing it.salvadordf wrote: ↑Mon Apr 24, 2023 12:44 pm If an official Chromium build can't use that proxy and you need to install an extension then all you can do is try to reverse-engineer that extension to try to replicate what it does.
As soon as the Chrome Runtime mode appeared, it was possible to install the extension, how to do it now?
91 (Mini Browser - CEF4Delphi) version of chrome on the screenshot.
There is an extension in the archive, it is definitely working.
You do not have the required permissions to view the files attached to this post.