0

I am working on an extension where proxy is set through my extension using chrome extension proxy api(chrome.proxy.settings). Everything works fine and I get all traffic on my proxy server. However, I am having trouble with the intranet traffic.

If I try to access any ip on my local network, my printer or any other system, I cannot. Is there a way to bypass the intranet requests so that they do not go through proxy? I found <local> but is not what I need.

Anyone faced a similar problem? Any direct method to bypass the same or any work around would be appreciated.

ankit.vic
  • 101
  • 3
  • 10
  • You could make the notion of "intranet" configurable, e.g. let the user input something like `192.168.0.0/16` that goes to the bypass list. – Xan Oct 17 '16 at 17:45

1 Answers1

1

Is there a way to bypass the intranet requests so that they do not go through proxy?

As far as I understand, not automatically. The notion of "intranet" is something not easily guessed - it depends on how your network is organized.

Perhaps you could allow the user to input network blocks that they consider intranet - in CIDR notation that Chrome API accepts. The list of private addresses seems like a good default.

var intranet_list = [
  "fd00::/8",
  "10.0.0.0/8",
  "172.16.0.0/12",
  "192.168.0.0/16",
  "<local>"
]; // Make this configurable

var config = {
  /* ... */
  rules: {
    /* ... */
    bypassList: intranet_list
  }
};
chrome.proxy.settings.set({
  value: config,
  scope: "regular"
});
Xan
  • 74,770
  • 16
  • 179
  • 206
  • Appreciate such a quick and detailed response @Xan. This can be a good solution with the defaults. However, the extension intents to monitor the web browsing traffic and allowing the user to make bypass list configurable is something I need to think on. Have been browsing a lot but do not seem to find any direct bypass technique which could be put in bypass list without having to make it user configurable. – ankit.vic Oct 17 '16 at 18:44
  • If we're talking about enterprise deployment, you could use `chrome.storage.managed` for administrator-defined config. – Xan Oct 17 '16 at 18:56
  • yes that helps for enterprise deployment. I am trying to concern with retail users too. The private addresses list is a good default too. Appreciate the help @Xan. – ankit.vic Oct 17 '16 at 19:10
  • what if ip is 192.168.1.* ?? 192.168.1.0/20? @xan – crapthings Aug 23 '19 at 06:09