Custom build with disabled webrtc branch 3497

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.

Custom build with disabled webrtc branch 3497

Postby dima054 » Wed Aug 29, 2018 10:00 pm

Hey guys. I'm trying to build latest branch of CEF(cefsharp) for windows with disabled webrtc
Following this guide: https://bitbucket.org/chromiumembedded/ ... dows-setup

In step 6 i created a .bat with the following:
Code: Select all
set "GN_DEFINES=use_jumbo_build=true is_component_build=true enable_webrtc=false symbol_level=1 remove_webcore_debug_symbols=true use_lld=true"
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
c:\Python27\python.exe ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --no-distrib --no-build --branch=3497


In step 7 i created create.bat with this:
Code: Select all
set "GN_DEFINES=use_jumbo_build=true is_component_build=true enable_webrtc=false symbol_level=1 remove_webcore_debug_symbols=true use_lld=true"
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_MSVS_OVERRIDE_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
call cef_create_projects.bat


But while running it i see the following error:
WARNING at build arg file (use "gn args <out_dir>" to edit):5:15: Build argument has no effect.
enable_webrtc=false
^----
The variable "enable_webrtc" was set as a build argument
but never appeared in a declare_args() block in any buildfile.

Stuff builds and works, but webrtc is still on. I saw few posts here that webrtc is disabled by default, which is not true apparently. If you go to a site like whoer.net it shows that webrtc is on. What is the correct way to disable it please?
dima054
Newbie
 
Posts: 3
Joined: Wed Aug 29, 2018 9:03 pm

Re: Custom build with disabled webrtc branch 3497

Postby magreenblatt » Wed Aug 29, 2018 10:12 pm

WebRTC is functionally disabled by default, but still compiled in. The compilation cannot be disabled currently. See https://groups.google.com/a/chromium.or ... _4lvgWFoCg
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Custom build with disabled webrtc branch 3497

Postby dima054 » Thu Aug 30, 2018 9:16 am

So i built 3497 x86 and x64 Release branch overnight. Ran cefsimple.exe, went to few WebRTC testing websites and they all tell me that RTCPeerConnection and RTCDataChannel are enabled. I'm sorry, but what do i miss?
dima054
Newbie
 
Posts: 3
Joined: Wed Aug 29, 2018 9:03 pm

Re: Custom build with disabled webrtc branch 3497

Postby Czarek » Thu Aug 30, 2018 9:24 am

Have you tested whether it actually works?
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: Custom build with disabled webrtc branch 3497

Postby dima054 » Thu Aug 30, 2018 3:26 pm

Yes, used few good private proxies from multiple suppliers and it leaked my IP via webrtc.
But managed to apply the following and it disabled webrtc leaking.

Code: Select all
rc.SetPreference("webrtc.multiple_routes_enabled", ON, out error);
rc.SetPreference("webrtc.nonproxied_udp_enabled", ON, out error);
rc.SetPreference("webrtc.ip_handling_policy", "disable_non_proxied_udp", out error);
dima054
Newbie
 
Posts: 3
Joined: Wed Aug 29, 2018 9:03 pm

Re: Custom build with disabled webrtc branch 3497

Postby tech5678 » Mon Nov 02, 2020 1:19 pm

Do you recall where you made those changes? I added the following code in project CefSharp.WinForms.Example, BrowserTabUserControl.cs (CefSharp3-master), in OnIsBrowserInitializedChanged, where other such preferences are set, and got the same result you described above with WebRTC still working. I provided for error handling and reporting but got not errors:
Code: Select all
            string err1 = "";
            string err2 = "";
            string err3 = "";
            var multiroutes = requestContext.SetPreference("webrtc.multiple_routes_enabled", true, out err1);
            var nonproxied = requestContext.SetPreference("webrtc.nonproxied_udp_enabled", true, out err2);
            var disableudp = requestContext.SetPreference("webrtc.ip_handling_policy", "disable_non_proxied_udp", out err3);
            string finalerr = "";
            if (!multiroutes)
                finalerr += $"Multiroutes preference failed\r\n:{err1}\r\n";
            if (!nonproxied)
                finalerr += $"Nonproxied udp preference failed\r\n{err2}\r\n";
            if (!disableudp)
                finalerr += $"Disable nonproxied udp failed\r\n{err3}\r\n";
            if (finalerr != "")
            {
                this.InvokeOnUiThreadIfRequired(() => MessageBox.Show($"Unable to set WebRTC preferences:\r\n{finalerr}"));
            }
            else
            {
                this.InvokeOnUiThreadIfRequired(() => MessageBox.Show($"No errors durring set WebRTC preferences"));
            }

There aren't any other requestcontext references in project, so I'm reasonably sure that I've got it where it needs to go but have clearly missed something.

EDIT:
I added an ELSE on that final message that notifies me that it at least thinks that the preferences are being set without error, so I know that (a) the code is executing, and (b) no errors are occurring.

UPDATE:
When running create.bat, get the following output:

Code: Select all
WARNING at build arg file (use "gn args <out_dir>" to edit):8:15: Build argument has no effect.
enable_webrtc=false
              ^----
The variable "enable_webrtc" was set as a build argument
but never appeared in a declare_args() block in any buildfile.

To view all possible args, run "gn args --list <out_dir>"

The build continued as if that argument was unspecified.
tech5678
Techie
 
Posts: 10
Joined: Fri Aug 14, 2020 11:01 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 28 guests

cron