mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-16 20:24:15 +03:00
Merge: + querylog,stats: anonymize client ip: /16
Close #1741 * commit '1b5fb97a023e79721e08a7ecedf1f2b36d7ebce6': + querylog,stats: anonymize client ip: /16
This commit is contained in:
commit
539ccb2bf0
@ -16,7 +16,7 @@ func (l *queryLog) getClientIP(clientIP string) string {
|
||||
ip := net.ParseIP(clientIP)
|
||||
if ip != nil {
|
||||
ip4 := ip.To4()
|
||||
const AnonymizeClientIP4Mask = 24
|
||||
const AnonymizeClientIP4Mask = 16
|
||||
const AnonymizeClientIP6Mask = 112
|
||||
if ip4 != nil {
|
||||
clientIP = ip4.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)).String()
|
||||
|
@ -449,7 +449,7 @@ func (s *statsCtx) getClientIP(clientIP string) string {
|
||||
ip := net.ParseIP(clientIP)
|
||||
if ip != nil {
|
||||
ip4 := ip.To4()
|
||||
const AnonymizeClientIP4Mask = 24
|
||||
const AnonymizeClientIP4Mask = 16
|
||||
const AnonymizeClientIP6Mask = 112
|
||||
if ip4 != nil {
|
||||
clientIP = ip4.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)).String()
|
||||
|
Loading…
Reference in New Issue
Block a user