dbhome /var/lib/squidguard/db
logdir /var/log/squid


time LunchTime {
	weekly * 13:00 - 14:00
}

source AllDayUsers {
	userlist		users/AllDayUsers
}

source LunchTimeUsers {
	userlist		users/LunchTimeUsers
}

destination bl_warez {
    domainlist blacklists/warez/domains
    urllist blacklists/warez/urls
    log warez.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_violence {
    domainlist blacklists/violence/domains
    urllist blacklists/violence/urls
    log violence.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_proxy {
    domainlist blacklists/proxy/domains
    urllist blacklists/proxy/urls
    log proxy.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_porn {
    domainlist blacklists/porn/domains
    urllist blacklists/porn/urls
    expressionlist  blacklists/porn/expressions
    log porn.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_hacking {
    domainlist blacklists/hacking/domains
    urllist blacklists/hacking/urls
    log hacking.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_gambling {
    domainlist blacklists/gambling/domains
    urllist blacklists/gambling/urls
    log gambling.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_drugs {
    domainlist blacklists/drugs/domains
    urllist blacklists/drugs/urls
    log drugs.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_audio-video {
    domainlist blacklists/audio-video/domains
    urllist blacklists/audio-video/urls
    log audio-video.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_aggressive {
    domainlist blacklists/aggressive/domains
    urllist blacklists/aggressive/urls
    log aggressive.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination bl_ads {
    domainlist blacklists/ads/domains
    urllist blacklists/ads/urls
    log ads.log
    redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
}

destination wl_whitelist {
    domainlist blacklists/whitelist/domains
    urllist blacklists/whitelist/urls
}

acl {
	AllDayUsers {
                pass !bl_aggressive !bl_audio-video !bl_drugs !bl_gambling !bl_porn !bl_proxy !bl_violence !bl_warez all
                redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
	}

	LunchTimeUsers within LunchTime {
		pass !bl_aggressive !bl_audio-video !bl_drugs !bl_gambling !bl_porn !bl_proxy !bl_violence !bl_warez all
		redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
	} else {
		pass wl_whitelist none
		redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
	}

	default {
		pass none
		redirect http://192.168.1.250/squidGuard.php?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
	}
}
