refine tcp/ssl iplist algo