New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 34 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocked on:
issue v8:5904



Sign in to add a comment
link

Issue 639217: The V8 Proxy Resolver eats up all memory after a while

Reported by kaiw...@gmail.com, Aug 19 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Launch chromium with "--proxy-pac-url=file:///the_directory/OmegaProfile__.pac"
2. Open the built-in Task Manager
3. Open mail.google.com, login
4. Wait a couple of minutes
5. See the burst of memory usage of V8 Proxy Resolver

What is the expected behavior?
The system is responsive as usual.

What went wrong?
The V8 Proxy Resolver eats up almost all memory of the system

Did this work before? Yes Maybe Chrome 50 or 49

Chrome version: 52.0.2743.116  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 22.0 r0

Chrome on Windows also has this problem.
This PAC file was generated by the plugin SwitchyOmega(https://github.com/FelisCatus/SwitchyOmega). I have modified it so that it can be tested without a proxy.
In the past it can be workaround-ed by disabling chrome://flags/#v8-pac-mojo-out-of-process. But now it just leaks the Browser process according to the Task Manager.

There is a few (Chinese) bug reports on the GitHub repository of this plugin:
https://github.com/FelisCatus/SwitchyOmega/issues/797
https://github.com/FelisCatus/SwitchyOmega/issues/815
https://github.com/FelisCatus/SwitchyOmega/issues/819
https://github.com/FelisCatus/SwitchyOmega/issues/847
https://github.com/FelisCatus/SwitchyOmega/issues/851
https://github.com/FelisCatus/SwitchyOmega/issues/852
 

Comment 1 by kaiw...@gmail.com, Aug 19 2016

I'm sorry there is a little problem with that PAC file.

Also, you can just browse as usual. I guess the leak will happen when the items in the list is triggered a few times.
OmegaProfile__.pac
436 KB Download

Comment 2 by mmenke@chromium.org, Aug 19 2016

Cc: sa...@chromium.org eroman@chromium.org
Components: -Internals>Network Internals>Network>Proxy
Hrm....Don't see any obvious leaks in that PAC file.

[+sammc, +eroman]:  Any recent changes here?  Do we still respect v8-pac-mojo-out-of-process?

Comment 3 by kaiw...@gmail.com, Aug 21 2016

The developer of SwitchyOmega provided some update at https://github.com/FelisCatus/SwitchyOmega/issues/815

I observed that if I don't kill the resolver process when its CPU and memory consumption start to burst but wait a few minutes, the CPU consumption will drop to zero. The memory usage will drop a bit.

Comment 4 by eroman@chromium.org, Aug 22 2016

A couple observations:

 * This regular expression is no longer going to work in Chrome, as path information is no longer revealed for https:// URLs ( crbug.com/593759 ):

        if (/^https:\/\/github\.com\/programthink\/zhao/.test(url)) return "+Go Proxy";


As far as performance/memory problems, my first guess would be it has to do with all the regular expressions.

V8's regular expression can go O(n^2) in certain situations (mainly around bactracking), so executing it on large inputs like an unbounded URL can lead to really bad performance. At a first glance I didn't see any problematic regular expressions but something to keep in mind.

Regular expressions also can use memory for their compiled cache, which could be contibuting memory usage. But even so for this amount of patterns I wouldn't expect to see a big problem.

I also didn't see any obvious writes to global state which would be hurting memory usage.

What I recommend to debug this further is to run this code directly in the browser, and use the  Chrome Dev Tools to get a breakdown of memory usage. Roughly how that could be done is:

* Add "alert(url)" to the original script. Run it through your test case (loading gmail.com) to get a list of all the inputs that are being run through the script (open about:net-internals and search for "alert" to find this and save it).

* Run the .pac script on a regular web page. Feed it all the inputs gathered in the step above. Run with dev tools open and see where it shows the memory breakdown.


(I won't have time to debug this right now, but will see if I can reproduce if I have a chance later.)

Comment 5 by dzy201...@gmail.com, Aug 24 2016

I seem to find another way to reproduce the problem.

I wrote a HTML to run the .pac script as javascript(.js). And I try to call FindProxyForURL using:
	FindProxyForURL("http://test.test/", "test.test");
hundreds of times in a cycle. Here are what I've found:
  1. In my computer(Win10 Pro + Chrome 54.0.2832.2 dev-m (64-bit)), when the cycle times >= 395, It will lead to memery leak. 
  2. After the memery leak happens and after a while the memery begin to drop to normal and I try to run the cycle again without refresh, this time nothing will happen, even the cycle is more than one thousand times.
  3. After I refresh the page to run again, the problem will appear again just like 1.

Here is what I use to do the test. You can input a number to set cycle times and then click "run"
chrome.zip
43.8 KB Download

Comment 6 by kaiw...@gmail.com, Aug 24 2016

Many thanks to #c5 for your test case!

I took a the attached heap snapshot when its memory consumption is above 800MB
I set the loop count to 400.
timeline.png
51.4 KB View Download
Heap-20160824T211120.heapsnapshot
8.5 MB Download

Comment 7 by eroman@chromium.org, Aug 24 2016

Components: Blink>JavaScript
Labels: Performance-Memory
Can one of the Javascript folks take a look?

Summary: relatively simple script taking up lots of memory before garbage collecting -- samples given in comments #5 and #6.

Comment 8 by hablich@chromium.org, Aug 29 2016

Cc: jarin@chromium.org
Status: Available (was: Unconfirmed)
CC'ing memory sheriff to take a look.

Comment 9 by kaiw...@gmail.com, Sep 16 2016

This issue still persists in Chomium 53.0.2785.116 (32-bit, i686)

Comment 10 by devilk...@gmail.com, Nov 20 2016

also happens in windows
Win7 SP1 64bit 54.0.2840.99 m (64-bit)

Comment 11 by walkno...@gmail.com, Jan 2 2017

still have this problem in debian:
Debian version 8.5
Chrome Version 55.0.2883.75 (64-bit)
width extension: Proxy SwitchyOmega 2.3.21

V8 Proxy Resolver eats up almost all memory

Comment 12 Deleted

Comment 13 by ilyaigpe...@gmail.com, Jan 28 2017

I have a script with a cycle.
13231 iterations take 22 MB of RSS (resident set size).
13232 iterations take 1984 MB of RSS (resident set size).
Tested in NodeJS and in the page from comment #5.

Iterated function uses only booleans and `switch`es (no objects for GC to collect).
Returns no value (`undefined`).

The script is attached.

Here is terminal output from my PC (3GB RAM, Windows 10 Pro 64bit):

$ time node --expose-gc for-nodejs.js 13231
Node version: v7.4.0
{ rss: '22.208512MB',
  heapTotal: '11.309056MB',
  heapUsed: '6.394152MB',
  external: '0.933663MB' }
Elapsed: 0.116s

real    0m0.383s
user    0m0.250s
sys     0m0.125s
$ time node --expose-gc for-nodejs.js 13232
Node version: v7.4.0
{ rss: '1984.483328MB',
  heapTotal: '16.244736MB',
  heapUsed: '11.017384MB',
  external: '0.933663MB' }
Elapsed: 12.585s

real    0m19.772s
user    0m2.984s
sys     0m3.672s
for-nodejs.js
903 KB View Download

Comment 14 by jochen@chromium.org, Jan 28 2017

Cc: jochen@chromium.org hpayer@chromium.org
can you run with --trace-gc --trace-gc-verbose please?

Comment 16 by jochen@chromium.org, Jan 29 2017

ok, here's what happens. the massive FindProxyForURL method gets compiled by Crankshaft which eats up between 2-3GB of memory before it bails out due to not enough virtual registers. Then Turbofan gets a go, and actually manages to optimize the method. After Crankshaft bailed out, the memory usage drops down for me to 26mb.

Comment 17 by jochen@chromium.org, Jan 29 2017

Blockedon: v8:5904
Owner: jochen@chromium.org
Status: Assigned (was: Available)
seems the bug is that --noopt (which we pass on the PAC V8) stopped working...

Comment 19 by jochen@chromium.org, Jan 30 2017

Status: Fixed (was: Assigned)

Comment 20 Deleted

Comment 21 by ilyaigpe...@gmail.com, Jan 30 2017

Thank you, jochen, very much for a quick fix.

I kindly ask you and the team for merging it to Chromium 57,
so proxy extensions (my own, SwitchyOmega and all alike) will
be back in work in March of 2017

Comment 22 by jochen@chromium.org, Jan 30 2017

Labels: ReleaseBlock-Stable M-57 Merge-Request-57

Comment 23 by sheriffbot@chromium.org, Jan 31 2017

Project Member
Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 24 by gov...@chromium.org, Jan 31 2017

Please merge your change to M57 branch 2987 ASAP (latest before 5:00 PM PT on Wednesday, 02/01/17) so we can pick it up for M57 Beta promotion release this week. Thank you.

Comment 25 by bugdroid1@chromium.org, Jan 31 2017

Project Member

Comment 26 by gov...@chromium.org, Jan 31 2017

Labels: -Merge-Approved-57
Per comment #25, this is already merged to M57. Hence, removing "Merge-Approved-57" label. Thank you.

Comment 27 by phistuck@gmail.com, Jul 10 2017

The screenshot was taken while using Chrome 59.
Should I file a new issue?
proxy-resolver-memory.png
38.8 KB View Download

Comment 28 by ilyaigpe...@gmail.com, Jul 10 2017

phistuck@, could you, please, provide a PAC-script and steps to reproduce?

Comment 29 by phistuck@gmail.com, Jul 10 2017

I opened Google Maps in incognito as well as in normal mode and I have many intranet tabs open, however I manually ended the process of most of them. I also have GMail, WhatsApp Web, Feedly and Outlook.com open and some heavy intranet IETab pages open.
No real steps to reproduce...

Anonymized PAC file -
function FindProxyForURL(url, host)
{
var lhost = host.toLowerCase();
host = lhost;
  if (
 isInNet(myIpAddress(), "0.0.0.0", "255.255.255.0")
  )
return "DIRECT";
  if (
 shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
  )
return "PROXY fooproxy.corp.com:8080";
  if (
 shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
  )
return "PROXY fooproxy:8080";
  if (
 shExpMatch(host,"foo")  
 ||  shExpMatch(url,"foo")  
 ||  shExpMatch(host,"foo")  
  )
return "PROXY foo.corp.com:8080";
  if (
 shExpMatch(host,"*.msecnd.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
  )
return "PROXY otherfooproxy.corp.com:8080";
  else if (isPlainHostName(host)
 || shExpMatch(host,"foo") 
 || shExpMatch(host,"foo") 
 || shExpMatch(host,"foo") 
 || shExpMatch(host,"foo") 
 || shExpMatch(host,"foo") 
 || shExpMatch(host,"foo") 
 || shExpMatch(host,"foo") 
 || shExpMatch(host,"foo") 
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo*")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foop")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.fooa*")  
 ||  shExpMatch(host,"*.fooa*")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foof*")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foov*")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.fool")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.fool")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*-foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foov")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foon")  
 ||  shExpMatch(host,"fooa")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foot.*")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"*.foo")  
 ||  shExpMatch(host,"foo")  
 ||  shExpMatch(host,"foo")  
  )
return "DIRECT";
  else 
      return "PROXY fooproxy.corp.com:8080";
}

Comment 30 by xgd...@gmail.com, Nov 26 2017

Sign in to add a comment