Change proxy at run time in delphi 7

158 views
Skip to first unread message

Abdu

unread,
Dec 25, 2017, 3:48:34 PM12/25/17
to delphichromiumembedded
hello,
I like this group I hope to have help here.
I am using CEF3 with Delphi 7 , have a list of proxies in a listbox , i want to change proxy 1 to proxy 2 ,
so please a need help,  How can i do it  in rune time in delphi?.
I  found this  code in Internet  in c++ but i need it in Delphi7.
I// Set proxy
auto hostProcess = browser->GetHost();
auto requestContext = hostProcess->GetRequestContext();
CefString error;
auto proxyDictionary = CefDictionaryValue::Create();
proxyDictionary
->SetString(L"mode", L"fixed_servers");
proxyDictionary
->SetString(L"server", L"http://127.0.0.1:8080");
auto proxyValue = CefValue::Create();
proxyValue
->SetDictionary(proxyDictionary);
if (!requestContext->SetPreference(L"proxy", proxyValue, error))
   wprintf
(L"Can not set proxy. %ls\r\n", error.c_str());
ntroducir código aquí...

Thank you very much in advance.

 
Reply all
Reply to author
Forward
0 new messages