Refactored to make checks of server groups more generalizable closes getlantern/lantern#1787