Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Let Other Extensions Handle Proxy Settings

I need to set proxy for a specific set of urls. The chrome.proxy allows to pass a bypass list but not a whitelist (pattern to only let certain requests through the proxy).

The following code works in my case (using pac script):

var config = {
    mode: "pac_script",
    pacScript: {
        data: "function FindProxyForURL(url, host) { if (shExpMatch(url, '*get_with_proxy*')) return 'PROXY 127.0.0.1:8888'; return DIRECT }"
    }
};
chrome.proxy.settings.set({ value: config, scope: 'regular' },
    function() {});

But the problem is, a lot of my users use other extensions like Proxy Sharp or Omega Proxy to handle their proxy needs. If I use the above code, they see "another extension is handling proxy settings" when they try to change options in these other extensions.

Since I only need a few urls to go through proxy, is there a way I can let the other extensions handle proxy settings for non matching urls?

like image 288
imlokesh Avatar asked May 03 '17 04:05

imlokesh


People also ask

What is a proxy extension?

A VPN proxy extension is a lightweight version of a VPN app. Our VPN browser extension encrypts your browser's traffic, protecting your data from snoopers. The NordVPN proxy extension also changes your IP address and virtual location so you can surf the net in more privacy.

How do I bypass Chrome proxy settings?

At the bottom of the screen, click Show advanced settings… This will bring up the Windows Internet Options. Click the Connections tab and then LAN Settings. In the Proxy server settings, uncheck the box that says Use a proxy server for your LAN.

What is a proxy extension for Chrome?

Chrome proxy extension lets you log in and instantly access our residential and datacenter proxies. Use your proxy user credentials to access proxies on multiple devices running Chrome.


1 Answers

According to the documentation you can only have either:

  • Individual fixed proxy servers
  • A PacScript to handle which proxy is used

But you can't have both or multiple of either.

Your best bet would to be to try be the last extension that configures the proxy, get the proxy settings and try to convert them all to a single PacScript proxy.

TL;DR: If you don't want to change the users other proxy settings, it's not possible.

like image 148
samfundev Avatar answered Oct 04 '22 03:10

samfundev