SeleniumProxyAuth icon indicating copy to clipboard operation
SeleniumProxyAuth copied to clipboard

bad in sll

Open avlobn opened this issue 4 years ago • 8 comments

Hello, I found your library, in fact this is what I wanted to implement but did not know how, thank you very much, but there is one problem: sites with https sll do not allow themselves to be loaded in this way Error: NET :: ERR_CERT_AUTHORITY_INVALID Can you help me fix this?

avlobn avatar Apr 29 '21 20:04 avlobn

Hello, I was using it for https sites as well. What site do you have in mind?

Erol444 avatar Apr 29 '21 22:04 Erol444

Здравствуйте, я тоже использовал его для сайтов https. Какой сайт вы имеете в виду?

https://www.youtube.com/

avlobn avatar Apr 30 '21 01:04 avlobn

friend, I racked my brains for a very long time, and even climbed to study the documentation of that library, in the end the command helped: proxyServer.CertificateManager.EnsureRootCertificate (); you need to add the tale to the dll after proxyServer.AddEndPoint (new ExplicitProxyEndPoint (IPAddress.Any, i, true));

должно получится так public int AddEndpoint(ProxyAuth auth) { IPGlobalProperties ipGlobalProperties = IPGlobalProperties.GetIPGlobalProperties(); IPEndPoint[] conArr = ipGlobalProperties.GetActiveTcpListeners();

        for (int i = 50000; i < 60000; i++)
        {
            if (conArr.Any(x => x.Port == i)) continue;

            proxyServer.AddEndPoint(new ExplicitProxyEndPoint(IPAddress.Any, i, true));
            proxyServer.CertificateManager.EnsureRootCertificate();
            proxyAuths.Add(i, auth);
            return i;
        }
        throw new Exception("Couldn't find any available tcp port!");
    }

avlobn avatar Apr 30 '21 01:04 avlobn

although of course the speed through such a double proxy leaves much to be desired, but perhaps it will be solved by some other team, I will go to read the documentation, if you have any additions, I will be glad to hear

avlobn avatar Apr 30 '21 01:04 avlobn

hey @avlobn - did you find another solution yet?

andrekat avatar Jun 04 '21 09:06 andrekat

same to me, after adding --ignore-certificate-errors I get ERR_EMPTY_RESPONSE for any site

lubgi avatar Jul 09 '21 00:07 lubgi

Hi, I searched a lot for a library like this, Thanks for your job but it doesn’t work with SSL as others said. Adding this script doesn’t make anything: options.AddExcludedArgument("ignore-certifcate-errors");

it works good with http domains, I mean: I can browse to a domain without SSL (http://example.com), but it stopped when it reaching a JS script, for example: with a page contains Google Analytics script, it get an error in console: “Failed to load resource: the server responded with a status of 499”

I liked @avlobn suggestion but I don’t know how to apply it, it will be great if you can fix this issue. Thanks.

ShoodEver avatar Feb 02 '22 15:02 ShoodEver

Also facing same problem. Added to SeleniumProxyServer.cs mentioned string:

proxyServer.CertificateManager.EnsureRootCertificate();

Upon first run Windows issued a warning about Titanium Web Proxy certificate (?), i allowed, then result is "empty response" - like mentioned here.

Described above is for non-headless mode

mbvyd avatar May 06 '23 15:05 mbvyd