0

We have a test software based on chromedriver. The test is a site check from one computer, but under different proxies. The proxy is connected via a JavaScript script. About a month ago, I had to edit the manifest settings for the script, because the version of ManiWest changed.

Since yesterday, the Chrome script has stopped working. Chrome shows a dialog for entering a login and password, there is an unusual message "Your connection is not secure".

Script template:

var config = {
    mode: "fixed_servers",
    rules: {
        singleProxy: {
            scheme: "http",
            host: "%proxy_host",
            port: parseInt(%proxy_port)
        },
        bypassList: ["foobar.com"]
    }
};
    
chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});
    
function callbackFn(details) {
    return {
        authCredentials: {
            username: "%username",
            password: "%password"
        }
    };
}
    
chrome.webRequest.onAuthRequired.addListener(
    callbackFn,
    {urls: ["<all_urls>"]},
    ['blocking'] );

manifest.json:

{
    "version": "1.0.0",
    "manifest_version": 3,
    "name": "Chrome Proxy",
    "permissions": [
        "proxy",
        "tabs",
        "unlimitedStorage",
        "storage",
        "<all_urls>",
        "webRequest",
        "webRequestBlocking",
        "webRequestAuthProvider"
    ],
    "host_permissions": [
        "<all_urls>"
    ],
    "background": {
        "service_worker": "proxy.js"
    },
    "minimum_chrome_version":"22.0.0" 
}

However, if we manually enter your login and password, the proxies work. Perhaps the proxy certificates are no longer valid. Perhaps you need to work via http without ssl. Is it possible to configure the manifest so that it works with http?

1 Answer 1

0

Try starting Chrome with the --ignore-certificate-errors flag. So when building your driver, add:

.setChromeOptions(options.addArguments('--ignore-certificate-errors'))

(where options is an instance of Chrome.Options())

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.