docstring_tokens
stringlengths 0
76.5k
| code_tokens
stringlengths 75
1.81M
| label_window
sequencelengths 4
2.12k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|
macFound := clients.dhcpServer.FindMACbyIP(ip) | <mask>
<mask> if clients.dhcpServer == nil {
<mask> return Client{}, false
<mask> }
<mask> macFound := clients.dhcpServer.FindMACbyIP(ipAddr)
<mask> if macFound == nil {
<mask> return Client{}, false
<mask> }
<mask> for _, c = range clients.list {
<mask> for _, id := range c.IDs {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, ok := clients.idIndex[ip]
</s> add c, ok := clients.idIndex[ip.String()] </s> remove if ip == addr {
</s> add if ip.Equal(addr) { </s> remove func (clients *clientsContainer) FindAutoClient(ip string) (ClientHost, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) FindAutoClient(ip net.IP) (ClientHost, bool) {
if ip == nil { </s> remove func (clients *clientsContainer) findByIP(ip string) (Client, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) findByIP(ip net.IP) (Client, bool) {
if ip == nil { </s> remove return ""
</s> add return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients.go |
func (clients *clientsContainer) FindAutoClient(ip net.IP) (ClientHost, bool) {
if ip == nil { | <mask> return Client{}, false
<mask> }
<mask>
<mask> // FindAutoClient - search for an auto-client by IP
<mask> func (clients *clientsContainer) FindAutoClient(ip string) (ClientHost, bool) {
<mask> ipAddr := net.ParseIP(ip)
<mask> if ipAddr == nil {
<mask> return ClientHost{}, false
<mask> }
<mask>
<mask> clients.lock.Lock()
<mask> defer clients.lock.Unlock()
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove func (clients *clientsContainer) findByIP(ip string) (Client, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) findByIP(ip net.IP) (Client, bool) {
if ip == nil { </s> remove func (clients *clientsContainer) Find(ip string) (Client, bool) {
</s> add func (clients *clientsContainer) Find(ip net.IP) (Client, bool) { </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] </s> remove c, ok := clients.findByIP(ip)
</s> add c, ok := clients.findByIP(net.ParseIP(ip)) </s> remove c, ok := clients.idIndex[ip]
</s> add c, ok := clients.idIndex[ip.String()] | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients.go |
ch, ok := clients.ipHost[ip.String()] | <mask>
<mask> clients.lock.Lock()
<mask> defer clients.lock.Unlock()
<mask>
<mask> ch, ok := clients.ipHost[ip]
<mask> if ok {
<mask> return *ch, true
<mask> }
<mask> return ClientHost{}, false
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] </s> remove c, ok := clients.findByIP(ip)
</s> add c, ok := clients.findByIP(net.ParseIP(ip)) </s> remove func (clients *clientsContainer) FindAutoClient(ip string) (ClientHost, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) FindAutoClient(ip net.IP) (ClientHost, bool) {
if ip == nil { </s> remove ch, ok := clients.ipHost[ip]
</s> add ipStr := ip.String()
ch, ok := clients.ipHost[ipStr] </s> remove c, ok := clients.idIndex[ip]
</s> add c, ok := clients.idIndex[ip.String()] | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients.go |
func (clients *clientsContainer) SetWhoisInfo(ip net.IP, info [][]string) { | <mask> return nil
<mask> }
<mask>
<mask> // SetWhoisInfo - associate WHOIS information with a client
<mask> func (clients *clientsContainer) SetWhoisInfo(ip string, info [][]string) {
<mask> clients.lock.Lock()
<mask> defer clients.lock.Unlock()
<mask>
<mask> _, ok := clients.findByIP(ip)
<mask> if ok {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove func (clients *clientsContainer) Exists(ip string, source clientSource) bool {
</s> add func (clients *clientsContainer) Exists(ip net.IP, source clientSource) bool { </s> remove func (clients *clientsContainer) Find(ip string) (Client, bool) {
</s> add func (clients *clientsContainer) Find(ip net.IP) (Client, bool) { </s> remove c, ok := clients.findByIP(ip)
</s> add c, ok := clients.findByIP(net.ParseIP(ip)) </s> remove func (clients *clientsContainer) FindAutoClient(ip string) (ClientHost, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) FindAutoClient(ip net.IP) (ClientHost, bool) {
if ip == nil { </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients.go |
ipStr := ip.String()
ch, ok := clients.ipHost[ipStr] | <mask> log.Debug("Clients: client for %s is already created, ignore WHOIS info", ip)
<mask> return
<mask> }
<mask>
<mask> ch, ok := clients.ipHost[ip]
<mask> if ok {
<mask> ch.WhoisInfo = info
<mask> log.Debug("Clients: set WHOIS info for auto-client %s: %v", ch.Host, ch.WhoisInfo)
<mask> return
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove clients.ipHost[ip] = ch
</s> add clients.ipHost[ipStr] = ch </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] </s> remove func (clients *clientsContainer) SetWhoisInfo(ip string, info [][]string) {
</s> add func (clients *clientsContainer) SetWhoisInfo(ip net.IP, info [][]string) { </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] </s> remove resp, err := w.queryAll(ip)
</s> add resp, err := w.queryAll(ip.String()) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients.go |
clients.ipHost[ipStr] = ch | <mask> ch = &ClientHost{
<mask> Source: ClientSourceWHOIS,
<mask> }
<mask> ch.WhoisInfo = info
<mask> clients.ipHost[ip] = ch
<mask> log.Debug("Clients: set WHOIS info for auto-client with IP %s: %v", ip, ch.WhoisInfo)
<mask> }
<mask>
<mask> // AddHost adds new IP -> Host pair
<mask> // Use priority of the source (etc/hosts > ARP > rDNS)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ch, ok := clients.ipHost[ip]
</s> add ipStr := ip.String()
ch, ok := clients.ipHost[ipStr] </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] </s> remove clients.SetWhoisInfo("1.1.1.255", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 255), whois) </s> remove func (w *Whois) Begin(ip string) {
</s> add func (w *Whois) Begin(ip net.IP) { </s> remove clients.SetWhoisInfo("1.1.1.1", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 1), whois) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients.go |
c, b = clients.Find(net.IPv4(1, 1, 1, 1)) | <mask> b, err = clients.Add(c)
<mask> assert.True(t, b)
<mask> assert.Nil(t, err)
<mask>
<mask> c, b = clients.Find("1.1.1.1")
<mask> assert.True(t, b)
<mask> assert.Equal(t, c.Name, "client1")
<mask>
<mask> c, b = clients.Find("1:2:3::4")
<mask> assert.True(t, b)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, b = clients.Find("1:2:3::4")
</s> add c, b = clients.Find(net.ParseIP("1:2:3::4")) </s> remove c, b = clients.Find("2.2.2.2")
</s> add c, b = clients.Find(net.IPv4(2, 2, 2, 2)) </s> remove c, b := clients.Find("1.1.1.2")
</s> add c, b := clients.Find(net.IPv4(1, 1, 1, 2)) </s> remove assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
</s> add assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile)) </s> remove assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("2.2.2.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 2, 3, 4), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(2, 2, 2, 2), ClientSourceHostsFile)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
c, b = clients.Find(net.ParseIP("1:2:3::4")) | <mask> c, b = clients.Find("1.1.1.1")
<mask> assert.True(t, b)
<mask> assert.Equal(t, c.Name, "client1")
<mask>
<mask> c, b = clients.Find("1:2:3::4")
<mask> assert.True(t, b)
<mask> assert.Equal(t, c.Name, "client1")
<mask>
<mask> c, b = clients.Find("2.2.2.2")
<mask> assert.True(t, b)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, b = clients.Find("2.2.2.2")
</s> add c, b = clients.Find(net.IPv4(2, 2, 2, 2)) </s> remove c, b = clients.Find("1.1.1.1")
</s> add c, b = clients.Find(net.IPv4(1, 1, 1, 1)) </s> remove c, b := clients.Find("1.1.1.2")
</s> add c, b := clients.Find(net.IPv4(1, 1, 1, 2)) </s> remove assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("2.2.2.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 2, 3, 4), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(2, 2, 2, 2), ClientSourceHostsFile)) </s> remove assert.False(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
c, b = clients.Find(net.IPv4(2, 2, 2, 2)) | <mask> c, b = clients.Find("1:2:3::4")
<mask> assert.True(t, b)
<mask> assert.Equal(t, c.Name, "client1")
<mask>
<mask> c, b = clients.Find("2.2.2.2")
<mask> assert.True(t, b)
<mask> assert.Equal(t, c.Name, "client2")
<mask>
<mask> assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
<mask> assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, b = clients.Find("1:2:3::4")
</s> add c, b = clients.Find(net.ParseIP("1:2:3::4")) </s> remove assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("2.2.2.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 2, 3, 4), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(2, 2, 2, 2), ClientSourceHostsFile)) </s> remove c, b = clients.Find("1.1.1.1")
</s> add c, b = clients.Find(net.IPv4(1, 1, 1, 1)) </s> remove assert.False(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove c, b := clients.Find("1.1.1.2")
</s> add c, b := clients.Find(net.IPv4(1, 1, 1, 2)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
assert.False(t, clients.Exists(net.IPv4(1, 2, 3, 4), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(2, 2, 2, 2), ClientSourceHostsFile)) | <mask> c, b = clients.Find("2.2.2.2")
<mask> assert.True(t, b)
<mask> assert.Equal(t, c.Name, "client2")
<mask>
<mask> assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
<mask> assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
<mask> assert.True(t, clients.Exists("2.2.2.2", ClientSourceHostsFile))
<mask> })
<mask>
<mask> t.Run("add_fail_name", func(t *testing.T) {
<mask> c := Client{
<mask> IDs: []string{"1.2.3.5"},
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, b = clients.Find("2.2.2.2")
</s> add c, b = clients.Find(net.IPv4(2, 2, 2, 2)) </s> remove assert.False(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
</s> add assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile)) </s> remove assert.False(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove c, b = clients.Find("1:2:3::4")
</s> add c, b = clients.Find(net.ParseIP("1:2:3::4")) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) | <mask>
<mask> err := clients.Update("client1", c)
<mask> assert.Nil(t, err)
<mask>
<mask> assert.False(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
<mask> assert.True(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
<mask>
<mask> c = Client{
<mask> IDs: []string{"1.1.1.2"},
<mask> Name: "client1-renamed",
<mask> UseOwnSettings: true,
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("2.2.2.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 2, 3, 4), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(2, 2, 2, 2), ClientSourceHostsFile)) </s> remove assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
</s> add assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile)) </s> remove c, b := clients.Find("1.1.1.2")
</s> add c, b := clients.Find(net.IPv4(1, 1, 1, 2)) </s> remove assert.False(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove c, b = clients.Find("2.2.2.2")
</s> add c, b = clients.Find(net.IPv4(2, 2, 2, 2)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
c, b := clients.Find(net.IPv4(1, 1, 1, 2)) | <mask>
<mask> err = clients.Update("client1", c)
<mask> assert.Nil(t, err)
<mask>
<mask> c, b := clients.Find("1.1.1.2")
<mask> assert.True(t, b)
<mask> assert.Equal(t, "client1-renamed", c.Name)
<mask> assert.Equal(t, "1.1.1.2", c.IDs[0])
<mask> assert.True(t, c.UseOwnSettings)
<mask> assert.Nil(t, clients.list["client1"])
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, b = clients.Find("1.1.1.1")
</s> add c, b = clients.Find(net.IPv4(1, 1, 1, 1)) </s> remove assert.False(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove c, b = clients.Find("1:2:3::4")
</s> add c, b = clients.Find(net.ParseIP("1:2:3::4")) </s> remove c, b = clients.Find("2.2.2.2")
</s> add c, b = clients.Find(net.IPv4(2, 2, 2, 2)) </s> remove assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
</s> add assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) | <mask>
<mask> t.Run("del_success", func(t *testing.T) {
<mask> b := clients.Del("client1-renamed")
<mask> assert.True(t, b)
<mask> assert.False(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
<mask> })
<mask>
<mask> t.Run("del_fail", func(t *testing.T) {
<mask> b := clients.Del("client3")
<mask> assert.False(t, b)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("2.2.2.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 2, 3, 4), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(2, 2, 2, 2), ClientSourceHostsFile)) </s> remove assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
</s> add assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile)) </s> remove c, b = clients.Find("2.2.2.2")
</s> add c, b = clients.Find(net.IPv4(2, 2, 2, 2)) </s> remove c, b = clients.Find("1:2:3::4")
</s> add c, b = clients.Find(net.ParseIP("1:2:3::4")) </s> remove c, b = clients.Find("1.1.1.1")
</s> add c, b = clients.Find(net.IPv4(1, 1, 1, 1)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile)) | <mask> b, err = clients.AddHost("1.1.1.1", "host3", ClientSourceHostsFile)
<mask> assert.True(t, b)
<mask> assert.Nil(t, err)
<mask>
<mask> assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
<mask> })
<mask>
<mask> t.Run("addhost_fail", func(t *testing.T) {
<mask> b, err := clients.AddHost("1.1.1.1", "host1", ClientSourceRDNS)
<mask> assert.False(t, b)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove assert.False(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove assert.False(t, clients.Exists("1.2.3.4", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("2.2.2.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 2, 3, 4), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(2, 2, 2, 2), ClientSourceHostsFile)) </s> remove c, b = clients.Find("1.1.1.1")
</s> add c, b = clients.Find(net.IPv4(1, 1, 1, 1)) </s> remove assert.False(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove c, b = clients.Find("2.2.2.2")
</s> add c, b = clients.Find(net.IPv4(2, 2, 2, 2)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
clients.SetWhoisInfo(net.IPv4(1, 1, 1, 255), whois) | <mask> clients.Init(nil, nil, nil)
<mask>
<mask> whois := [][]string{{"orgname", "orgname-val"}, {"country", "country-val"}}
<mask> // set whois info on new client
<mask> clients.SetWhoisInfo("1.1.1.255", whois)
<mask> assert.Equal(t, "orgname-val", clients.ipHost["1.1.1.255"].WhoisInfo[0][1])
<mask>
<mask> // set whois info on existing auto-client
<mask> _, _ = clients.AddHost("1.1.1.1", "host", ClientSourceRDNS)
<mask> clients.SetWhoisInfo("1.1.1.1", whois)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove clients.SetWhoisInfo("1.1.1.1", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 1), whois) </s> remove ch, ok := clients.ipHost[ip]
</s> add ipStr := ip.String()
ch, ok := clients.ipHost[ipStr] </s> remove clients.ipHost[ip] = ch
</s> add clients.ipHost[ipStr] = ch </s> remove clients.SetWhoisInfo("1.1.1.2", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 2), whois) </s> remove func (clients *clientsContainer) SetWhoisInfo(ip string, info [][]string) {
</s> add func (clients *clientsContainer) SetWhoisInfo(ip net.IP, info [][]string) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
clients.SetWhoisInfo(net.IPv4(1, 1, 1, 1), whois) | <mask> assert.Equal(t, "orgname-val", clients.ipHost["1.1.1.255"].WhoisInfo[0][1])
<mask>
<mask> // set whois info on existing auto-client
<mask> _, _ = clients.AddHost("1.1.1.1", "host", ClientSourceRDNS)
<mask> clients.SetWhoisInfo("1.1.1.1", whois)
<mask> assert.Equal(t, "orgname-val", clients.ipHost["1.1.1.1"].WhoisInfo[0][1])
<mask>
<mask> // Check that we cannot set whois info on a manually-added client
<mask> c = Client{
<mask> IDs: []string{"1.1.1.2"},
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove clients.SetWhoisInfo("1.1.1.255", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 255), whois) </s> remove ch, ok := clients.ipHost[ip]
</s> add ipStr := ip.String()
ch, ok := clients.ipHost[ipStr] </s> remove clients.SetWhoisInfo("1.1.1.2", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 2), whois) </s> remove clients.ipHost[ip] = ch
</s> add clients.ipHost[ipStr] = ch </s> remove assert.False(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
clients.SetWhoisInfo(net.IPv4(1, 1, 1, 2), whois) | <mask> IDs: []string{"1.1.1.2"},
<mask> Name: "client1",
<mask> }
<mask> _, _ = clients.Add(c)
<mask> clients.SetWhoisInfo("1.1.1.2", whois)
<mask> assert.Nil(t, clients.ipHost["1.1.1.2"])
<mask> _ = clients.Del("client1")
<mask> }
<mask>
<mask> func TestClientsAddExisting(t *testing.T) {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove clients.SetWhoisInfo("1.1.1.1", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 1), whois) </s> remove _, _ = r.clients.AddHost(ip, host, ClientSourceRDNS)
</s> add _, _ = r.clients.AddHost(ip.String(), host, ClientSourceRDNS) </s> remove assert.False(t, clients.Exists("1.1.1.1", ClientSourceHostsFile))
assert.True(t, clients.Exists("1.1.1.2", ClientSourceHostsFile))
</s> add assert.False(t, clients.Exists(net.IPv4(1, 1, 1, 1), ClientSourceHostsFile))
assert.True(t, clients.Exists(net.IPv4(1, 1, 1, 2), ClientSourceHostsFile)) </s> remove clients.SetWhoisInfo("1.1.1.255", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 255), whois) </s> remove _ = r.ipAddrs.Set([]byte(ip), expire)
</s> add _ = r.ipAddrs.Set(ip, expire) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clients_test.go |
"net" | <mask>
<mask> import (
<mask> "encoding/json"
<mask> "fmt"
<mask> "net/http"
<mask> )
<mask>
<mask> type clientJSON struct {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clientshttp.go |
ipStr := q.Get(fmt.Sprintf("ip%d", i))
ip := net.ParseIP(ipStr)
if ip == nil { | <mask> func (clients *clientsContainer) handleFindClient(w http.ResponseWriter, r *http.Request) {
<mask> q := r.URL.Query()
<mask> data := []map[string]interface{}{}
<mask> for i := 0; ; i++ {
<mask> ip := q.Get(fmt.Sprintf("ip%d", i))
<mask> if len(ip) == 0 {
<mask> break
<mask> }
<mask>
<mask> el := map[string]interface{}{}
<mask> c, ok := clients.Find(ip)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, ok := clients.findByIP(ip)
</s> add c, ok := clients.findByIP(net.ParseIP(ip)) </s> remove func (clients *clientsContainer) findByIP(ip string) (Client, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) findByIP(ip net.IP) (Client, bool) {
if ip == nil { </s> remove addEntry(l, "second.example.org", "1.1.1.1", "2.2.2.1")
</s> add addEntry(l, "second.example.org", net.IPv4(1, 1, 1, 1), net.IPv4(2, 2, 2, 1)) </s> remove func (clients *clientsContainer) Find(ip string) (Client, bool) {
</s> add func (clients *clientsContainer) Find(ip net.IP) (Client, bool) { </s> remove c, ok := clients.idIndex[ip]
</s> add c, ok := clients.idIndex[ip.String()] | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clientshttp.go |
el[ipStr] = cj | <mask> cj = clientToJSON(&c)
<mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip)
<mask> }
<mask>
<mask> el[ip] = cj
<mask> data = append(data, el)
<mask> }
<mask>
<mask> js, err := json.Marshal(data)
<mask> if err != nil {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove cj = clientHostToJSON(ip, ch)
</s> add cj = clientHostToJSON(ipStr, ch) </s> remove resp, err := w.queryAll(ip)
</s> add resp, err := w.queryAll(ip.String()) </s> remove add := updateStaticIPdhcpcdConf(ifaceName, ip, gatewayIP, ip4)
</s> add add := updateStaticIPdhcpcdConf(ifaceName, ipNet.String(), gatewayIP, ipNet.IP) </s> remove ip4, _, err := net.ParseCIDR(ip)
if err != nil {
return err
}
</s> add </s> remove func (w *Whois) process(ip string) [][]string {
</s> add func (w *Whois) process(ip net.IP) [][]string { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clientshttp.go |
func (clients *clientsContainer) findTemporary(ip net.IP) (cj clientJSON, found bool) {
ipStr := ip.String() | <mask> }
<mask>
<mask> // findTemporary looks up the IP in temporary storages, like autohosts or
<mask> // blocklists.
<mask> func (clients *clientsContainer) findTemporary(ip string) (cj clientJSON, found bool) {
<mask> ch, ok := clients.FindAutoClient(ip)
<mask> if !ok {
<mask> // It is still possible that the IP used to be in the runtime
<mask> // clients list, but then the server was reloaded. So, check
<mask> // the DNS server's blocked IP list.
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove func (clients *clientsContainer) Find(ip string) (Client, bool) {
</s> add func (clients *clientsContainer) Find(ip net.IP) (Client, bool) { </s> remove func (a *accessCtx) IsBlockedIP(ip string) (bool, string) {
</s> add func (a *accessCtx) IsBlockedIP(ip net.IP) (bool, string) {
ipStr := ip.String()
</s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove func (clients *clientsContainer) findByIP(ip string) (Client, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) findByIP(ip net.IP) (Client, bool) {
if ip == nil { </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clientshttp.go |
IDs: []string{ipStr}, | <mask> return clientJSON{}, false
<mask> }
<mask>
<mask> cj = clientJSON{
<mask> IDs: []string{ip},
<mask> Disallowed: disallowed,
<mask> DisallowedRule: rule,
<mask> }
<mask>
<mask> return cj, true
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove cj = clientHostToJSON(ip, ch)
</s> add cj = clientHostToJSON(ipStr, ch) </s> remove if !c.strict && strings.Contains(entry.IP, c.value) {
</s> add if !c.strict && strings.Contains(ipStr, c.value) { </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] </s> remove c, ok := clients.idIndex[ip]
</s> add c, ok := clients.idIndex[ip.String()] | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clientshttp.go |
cj = clientHostToJSON(ipStr, ch) | <mask>
<mask> return cj, true
<mask> }
<mask>
<mask> cj = clientHostToJSON(ip, ch)
<mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip)
<mask>
<mask> return cj, true
<mask> }
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IDs: []string{ip},
</s> add IDs: []string{ipStr}, </s> remove el[ip] = cj
</s> add el[ipStr] = cj </s> remove if c.strict && entry.IP == c.value {
</s> add ipStr := entry.IP.String()
if c.strict && ipStr == c.value { </s> remove if !c.strict && strings.Contains(entry.IP, c.value) {
</s> add if !c.strict && strings.Contains(ipStr, c.value) { </s> remove ch, ok := clients.ipHost[ip]
</s> add ch, ok := clients.ipHost[ip.String()] | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/clientshttp.go |
"net" | <mask> import (
<mask> "io/ioutil"
<mask> "os"
<mask> "path/filepath"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/config.go |
BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to | <mask> // Raw file data to avoid re-reading of configuration file
<mask> // It's reset after config is parsed
<mask> fileData []byte
<mask>
<mask> BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
<mask> BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
<mask> BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
<mask> Users []User `yaml:"users"` // Users that can access HTTP server
<mask> ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
<mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove bindHost string // host address to bind HTTP server on
</s> add bindHost net.IP // host address to bind HTTP server on </s> remove BindHost string
</s> add BindHost net.IP </s> remove BindHost string `yaml:"bind_host"`
</s> add BindHost net.IP `yaml:"bind_host"` </s> remove ipChan chan string
</s> add ipChan chan net.IP </s> remove func(o options, v string) (options, error) { o.bindHost = v; return o, nil }, nil, nil,
func(o options) []string { return stringSliceOrNil(o.bindHost) },
</s> add func(o options, v string) (options, error) { o.bindHost = net.ParseIP(v); return o, nil }, nil, nil,
func(o options) []string { return ipSliceOrNil(o.bindHost) }, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/config.go |
BindHost net.IP `yaml:"bind_host"` | <mask> }
<mask>
<mask> // field ordering is important -- yaml fields will mirror ordering from here
<mask> type dnsConfig struct {
<mask> BindHost string `yaml:"bind_host"`
<mask> Port int `yaml:"port"`
<mask>
<mask> // time interval for statistics (in days)
<mask> StatsInterval uint32 `yaml:"statistics_interval"`
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove BindHost string
</s> add BindHost net.IP </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
</s> add ipChannel chan net.IP // pass data from DNS request handling thread to rDNS thread | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/config.go |
BindHost: net.IP{0, 0, 0, 0}, | <mask> // initialize to default values, will be changed later when reading config or parsing command line
<mask> var config = configuration{
<mask> BindPort: 3000,
<mask> BetaBindPort: 0,
<mask> BindHost: "0.0.0.0",
<mask> DNS: dnsConfig{
<mask> BindHost: "0.0.0.0",
<mask> Port: 53,
<mask> StatsInterval: 1,
<mask> FilteringConfig: dnsforward.FilteringConfig{
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove BindHost: "0.0.0.0",
</s> add BindHost: net.IP{0, 0, 0, 0}, </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/config.go |
BindHost: net.IP{0, 0, 0, 0}, | <mask> BindPort: 3000,
<mask> BetaBindPort: 0,
<mask> BindHost: "0.0.0.0",
<mask> DNS: dnsConfig{
<mask> BindHost: "0.0.0.0",
<mask> Port: 53,
<mask> StatsInterval: 1,
<mask> FilteringConfig: dnsforward.FilteringConfig{
<mask> ProtectionEnabled: true, // whether or not use any of dnsfilter features
<mask> BlockingMode: "default", // mode how to answer filtered requests
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove BindHost: "0.0.0.0",
</s> add BindHost: net.IP{0, 0, 0, 0}, </s> remove UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port},
</s> add UDPListenAddr: &net.UDPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port}, </s> remove bindHost := net.ParseIP(config.DNS.BindHost)
</s> add </s> remove GetTopClientsIP(limit uint) []string
</s> add GetTopClientsIP(limit uint) []net.IP </s> remove assert.Equal(t, "192.168.0.1", reply.Answer[0].(*dns.A).A.String())
</s> add assert.True(t, net.IP{192, 168, 0, 1}.Equal(reply.Answer[0].(*dns.A).A)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/config.go |
func addDNSAddress(dnsAddresses *[]string, addr net.IP) {
hostport := addr.String() | <mask>
<mask> // ---------------
<mask> // dns run control
<mask> // ---------------
<mask> func addDNSAddress(dnsAddresses *[]string, addr string) {
<mask> if config.DNS.Port != 53 {
<mask> addr = fmt.Sprintf("%s:%d", addr, config.DNS.Port)
<mask> }
<mask> *dnsAddresses = append(*dnsAddresses, addr)
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove addr = fmt.Sprintf("%s:%d", addr, config.DNS.Port)
</s> add hostport = net.JoinHostPort(hostport, strconv.Itoa(config.DNS.Port)) </s> remove *dnsAddresses = append(*dnsAddresses, addr)
</s> add *dnsAddresses = append(*dnsAddresses, hostport) </s> remove if ip == addr {
</s> add if ip.Equal(addr) { </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
</s> add hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/control.go |
hostport = net.JoinHostPort(hostport, strconv.Itoa(config.DNS.Port)) | <mask> // dns run control
<mask> // ---------------
<mask> func addDNSAddress(dnsAddresses *[]string, addr string) {
<mask> if config.DNS.Port != 53 {
<mask> addr = fmt.Sprintf("%s:%d", addr, config.DNS.Port)
<mask> }
<mask> *dnsAddresses = append(*dnsAddresses, addr)
<mask> }
<mask>
<mask> func handleStatus(w http.ResponseWriter, _ *http.Request) {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove func addDNSAddress(dnsAddresses *[]string, addr string) {
</s> add func addDNSAddress(dnsAddresses *[]string, addr net.IP) {
hostport := addr.String() </s> remove *dnsAddresses = append(*dnsAddresses, addr)
</s> add *dnsAddresses = append(*dnsAddresses, hostport) </s> remove if ip == addr {
</s> add if ip.Equal(addr) { </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
</s> add hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) </s> remove s.conf.FilterHandler = func(_ string, settings *dnsfilter.RequestFilteringSettings) {
</s> add s.conf.FilterHandler = func(_ net.IP, settings *dnsfilter.RequestFilteringSettings) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/control.go |
*dnsAddresses = append(*dnsAddresses, hostport) | <mask> func addDNSAddress(dnsAddresses *[]string, addr string) {
<mask> if config.DNS.Port != 53 {
<mask> addr = fmt.Sprintf("%s:%d", addr, config.DNS.Port)
<mask> }
<mask> *dnsAddresses = append(*dnsAddresses, addr)
<mask> }
<mask>
<mask> func handleStatus(w http.ResponseWriter, _ *http.Request) {
<mask> c := dnsforward.FilteringConfig{}
<mask> if Context.dnsServer != nil {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove addr = fmt.Sprintf("%s:%d", addr, config.DNS.Port)
</s> add hostport = net.JoinHostPort(hostport, strconv.Itoa(config.DNS.Port)) </s> remove func addDNSAddress(dnsAddresses *[]string, addr string) {
</s> add func addDNSAddress(dnsAddresses *[]string, addr net.IP) {
hostport := addr.String() </s> remove if ip == addr {
</s> add if ip.Equal(addr) { </s> remove ip := dnsforward.IPStringFromAddr(d.Addr)
if ip == "" {
</s> add ip := dnsforward.IPFromAddr(d.Addr)
if ip == nil { </s> remove func (s *statsCtx) getClientIP(clientIP string) string {
if s.conf.AnonymizeClientIP {
ip := net.ParseIP(clientIP)
if ip != nil {
ip4 := ip.To4()
const AnonymizeClientIP4Mask = 16
const AnonymizeClientIP6Mask = 112
if ip4 != nil {
clientIP = ip4.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)).String()
} else {
clientIP = ip.Mask(net.CIDRMask(AnonymizeClientIP6Mask, 128)).String()
}
</s> add func (s *statsCtx) getClientIP(ip net.IP) (clientIP net.IP) {
if s.conf.AnonymizeClientIP && ip != nil {
const AnonymizeClientIP4Mask = 16
const AnonymizeClientIP6Mask = 112
if ip.To4() != nil {
return ip.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/control.go |
Addresses []net.IP `json:"ip_addresses"` | <mask> type netInterfaceJSON struct {
<mask> Name string `json:"name"`
<mask> MTU int `json:"mtu"`
<mask> HardwareAddr string `json:"hardware_address"`
<mask> Addresses []string `json:"ip_addresses"`
<mask> Flags string `json:"flags"`
<mask> }
<mask>
<mask> // Get initial installation settings
<mask> func (web *Web) handleInstallGetAddresses(w http.ResponseWriter, r *http.Request) {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove Name string // Network interface name
MTU int // MTU
HardwareAddr string // Hardware address
Addresses []string // Array with the network interface addresses
Subnets []string // Array with CIDR addresses of this network interface
Flags string // Network interface flags (up, broadcast, etc)
</s> add Name string // Network interface name
MTU int // MTU
HardwareAddr string // Hardware address
Addresses []net.IP // Array with the network interface addresses
Subnets []*net.IPNet // Array with CIDR addresses of this network interface
Flags string // Network interface flags (up, broadcast, etc) </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove RangeStart string `json:"range_start"`
</s> add RangeStart net.IP `json:"range_start"` </s> remove IP string `json:"IP"` // Client IP
</s> add IP net.IP `json:"IP"` // Client IP | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
IP net.IP `json:"ip"` | <mask> }
<mask>
<mask> type checkConfigReqEnt struct {
<mask> Port int `json:"port"`
<mask> IP string `json:"ip"`
<mask> Autofix bool `json:"autofix"`
<mask> }
<mask>
<mask> type checkConfigReq struct {
<mask> Web checkConfigReqEnt `json:"web"`
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
} else if !reqData.DNS.IP.IsUnspecified() { | <mask> }
<mask>
<mask> if err != nil {
<mask> respData.DNS.Status = err.Error()
<mask> } else if reqData.DNS.IP != "0.0.0.0" {
<mask> respData.StaticIP = handleStaticIP(reqData.DNS.IP, reqData.SetStaticIP)
<mask> }
<mask> }
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove result.V4.StaticIP.IP = util.GetSubnet(interfaceName)
</s> add result.V4.StaticIP.IP = util.GetSubnet(interfaceName).String() </s> remove } else if config.BindHost == "0.0.0.0" {
</s> add } else if config.BindHost.IsUnspecified() { </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { </s> remove func (s *statsCtx) getClientIP(clientIP string) string {
if s.conf.AnonymizeClientIP {
ip := net.ParseIP(clientIP)
if ip != nil {
ip4 := ip.To4()
const AnonymizeClientIP4Mask = 16
const AnonymizeClientIP6Mask = 112
if ip4 != nil {
clientIP = ip4.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)).String()
} else {
clientIP = ip.Mask(net.CIDRMask(AnonymizeClientIP6Mask, 128)).String()
}
</s> add func (s *statsCtx) getClientIP(ip net.IP) (clientIP net.IP) {
if s.conf.AnonymizeClientIP && ip != nil {
const AnonymizeClientIP4Mask = 16
const AnonymizeClientIP6Mask = 112
if ip.To4() != nil {
return ip.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)) </s> remove newconfig.DNSCryptConfig, err = newDNSCrypt(bindHost, tlsConf)
</s> add newconfig.DNSCryptConfig, err = newDNSCrypt(config.DNS.BindHost, tlsConf) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
func handleStaticIP(ip net.IP, set bool) staticIPJSON { | <mask>
<mask> // handleStaticIP - handles static IP request
<mask> // It either checks if we have a static IP
<mask> // Or if set=true, it tries to set it
<mask> func handleStaticIP(ip string, set bool) staticIPJSON {
<mask> resp := staticIPJSON{}
<mask>
<mask> interfaceName := util.GetInterfaceByIP(ip)
<mask> resp.Static = "no"
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
</s> add ipChannel chan net.IP // pass data from DNS request handling thread to rDNS thread </s> remove func (clients *clientsContainer) findTemporary(ip string) (cj clientJSON, found bool) {
</s> add func (clients *clientsContainer) findTemporary(ip net.IP) (cj clientJSON, found bool) {
ipStr := ip.String() </s> remove // GetSubnet - Get IP address with netmask for the specified interface
// Returns an empty string if it fails to find it
func GetSubnet(ifaceName string) string {
</s> add // GetSubnet returns pointer to net.IPNet for the specified interface or nil if
// the search fails.
func GetSubnet(ifaceName string) *net.IPNet { </s> remove func (clients *clientsContainer) Find(ip string) (Client, bool) {
</s> add func (clients *clientsContainer) Find(ip net.IP) (Client, bool) { </s> remove ipChan chan string
</s> add ipChan chan net.IP | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
resp.IP = util.GetSubnet(interfaceName).String() | <mask> } else {
<mask> if isStaticIP {
<mask> resp.Static = "yes"
<mask> }
<mask> resp.IP = util.GetSubnet(interfaceName)
<mask> }
<mask> return resp
<mask> }
<mask>
<mask> // Check if DNSStubListener is active
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove result.V4.StaticIP.IP = util.GetSubnet(interfaceName)
</s> add result.V4.StaticIP.IP = util.GetSubnet(interfaceName).String() </s> remove } else if reqData.DNS.IP != "0.0.0.0" {
</s> add } else if !reqData.DNS.IP.IsUnspecified() { </s> remove } else if config.BindHost == "0.0.0.0" {
</s> add } else if config.BindHost.IsUnspecified() { </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove u.clients[client]++
</s> add u.clients[client.String()]++ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
IP net.IP `json:"ip"` | <mask> return nil
<mask> }
<mask>
<mask> type applyConfigReqEnt struct {
<mask> IP string `json:"ip"`
<mask> Port int `json:"port"`
<mask> }
<mask>
<mask> type applyConfigReq struct {
<mask> Web applyConfigReqEnt `json:"web"`
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
if config.BindHost.Equal(newSettings.Web.IP) && config.BindPort == newSettings.Web.Port { | <mask> return
<mask> }
<mask>
<mask> restartHTTP := true
<mask> if config.BindHost == newSettings.Web.IP && config.BindPort == newSettings.Web.Port {
<mask> // no need to rebind
<mask> restartHTTP = false
<mask> }
<mask>
<mask> // validate that hosts and ports are bindable
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if !c.strict && strings.Contains(entry.IP, c.value) {
</s> add if !c.strict && strings.Contains(ipStr, c.value) { </s> remove if c.strict && entry.IP == c.value {
</s> add ipStr := entry.IP.String()
if c.strict && ipStr == c.value { </s> remove c, ok := clients.idIndex[ip]
</s> add c, ok := clients.idIndex[ip.String()] </s> remove macFound := clients.dhcpServer.FindMACbyIP(ipAddr)
</s> add macFound := clients.dhcpServer.FindMACbyIP(ip) </s> remove net.JoinHostPort(newSettings.Web.IP, strconv.Itoa(newSettings.Web.Port)), err)
</s> add net.JoinHostPort(newSettings.Web.IP.String(), strconv.Itoa(newSettings.Web.Port)), err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
net.JoinHostPort(newSettings.Web.IP.String(), strconv.Itoa(newSettings.Web.Port)), err) | <mask> if restartHTTP {
<mask> err = util.CheckPortAvailable(newSettings.Web.IP, newSettings.Web.Port)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "Impossible to listen on IP:port %s due to %s",
<mask> net.JoinHostPort(newSettings.Web.IP, strconv.Itoa(newSettings.Web.Port)), err)
<mask> return
<mask> }
<mask>
<mask> }
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove req.Question[0].Name, err = dns.ReverseAddr(ip)
</s> add req.Question[0].Name, err = dns.ReverseAddr(ip.String()) </s> remove } else if config.BindHost == "0.0.0.0" {
</s> add } else if config.BindHost.IsUnspecified() { </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove resp, err := w.queryAll(ip)
</s> add resp, err := w.queryAll(ip.String()) </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // checkConfigReqEntBeta is a struct representing new client's config check
<mask> // request entry. It supports multiple IP values unlike the checkConfigReqEnt.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default checkConfigReqEnt.
<mask> type checkConfigReqEntBeta struct {
<mask> Port int `json:"port"`
<mask> IP []string `json:"ip"`
<mask> Autofix bool `json:"autofix"`
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
IP []net.IP `json:"ip"` | <mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default checkConfigReqEnt.
<mask> type checkConfigReqEntBeta struct {
<mask> Port int `json:"port"`
<mask> IP []string `json:"ip"`
<mask> Autofix bool `json:"autofix"`
<mask> }
<mask>
<mask> // checkConfigReqBeta is a struct representing new client's config check request
<mask> // body. It uses checkConfigReqEntBeta instead of checkConfigReqEnt.
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // checkConfigReqBeta is a struct representing new client's config check request
<mask> // body. It uses checkConfigReqEntBeta instead of checkConfigReqEnt.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default checkConfigReq.
<mask> type checkConfigReqBeta struct {
<mask> Web checkConfigReqEntBeta `json:"web"`
<mask> DNS checkConfigReqEntBeta `json:"dns"`
<mask> SetStaticIP bool `json:"set_static_ip"`
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // handleInstallCheckConfigBeta is a substitution of /install/check_config
<mask> // handler for new client.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default handleInstallCheckConfig.
<mask> func (web *Web) handleInstallCheckConfigBeta(w http.ResponseWriter, r *http.Request) {
<mask> reqData := checkConfigReqBeta{}
<mask> err := json.NewDecoder(r.Body).Decode(&reqData)
<mask> if err != nil {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // applyConfigReqEntBeta is a struct representing new client's config setting
<mask> // request entry. It supports multiple IP values unlike the applyConfigReqEnt.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default applyConfigReqEnt.
<mask> type applyConfigReqEntBeta struct {
<mask> IP []string `json:"ip"`
<mask> Port int `json:"port"`
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
IP []net.IP `json:"ip"` | <mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default applyConfigReqEnt.
<mask> type applyConfigReqEntBeta struct {
<mask> IP []string `json:"ip"`
<mask> Port int `json:"port"`
<mask> }
<mask>
<mask> // applyConfigReqBeta is a struct representing new client's config setting
<mask> // request body. It uses applyConfigReqEntBeta instead of applyConfigReqEnt.
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // applyConfigReqBeta is a struct representing new client's config setting
<mask> // request body. It uses applyConfigReqEntBeta instead of applyConfigReqEnt.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default applyConfigReq.
<mask> type applyConfigReqBeta struct {
<mask> Web applyConfigReqEntBeta `json:"web"`
<mask> DNS applyConfigReqEntBeta `json:"dns"`
<mask> Username string `json:"username"`
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // handleInstallConfigureBeta is a substitution of /install/configure handler
<mask> // for new client.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default handleInstallConfigure.
<mask> func (web *Web) handleInstallConfigureBeta(w http.ResponseWriter, r *http.Request) {
<mask> reqData := applyConfigReqBeta{}
<mask> err := json.NewDecoder(r.Body).Decode(&reqData)
<mask> if err != nil {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // firstRunDataBeta is a struct representing new client's getting addresses
<mask> // request body. It uses array of structs instead of map.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default firstRunData.
<mask> type firstRunDataBeta struct {
<mask> WebPort int `json:"web_port"`
<mask> DNSPort int `json:"dns_port"`
<mask> Interfaces []netInterfaceJSON `json:"interfaces"`
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove IP []string `json:"ip"`
</s> add IP []net.IP `json:"ip"` </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // handleInstallConfigureBeta is a substitution of /install/get_addresses
<mask> // handler for new client.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default handleInstallGetAddresses.
<mask> func (web *Web) handleInstallGetAddressesBeta(w http.ResponseWriter, r *http.Request) {
<mask> data := firstRunDataBeta{}
<mask> data.WebPort = 80
<mask> data.DNSPort = 53
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
// TODO(e.burkov): This should removed with the API v1 when the appropriate | <mask>
<mask> // registerBetaInstallHandlers registers the install handlers for new client
<mask> // with the structures it supports.
<mask> //
<mask> // TODO(e.burkov): this should removed with the API v1 when the appropriate
<mask> // functionality will appear in default handlers.
<mask> func (web *Web) registerBetaInstallHandlers() {
<mask> Context.mux.HandleFunc("/control/install/get_addresses_beta", preInstall(ensureGET(web.handleInstallGetAddressesBeta)))
<mask> Context.mux.HandleFunc("/control/install/check_config_beta", preInstall(ensurePOST(web.handleInstallCheckConfigBeta)))
<mask> Context.mux.HandleFunc("/control/install/configure_beta", preInstall(ensurePOST(web.handleInstallConfigureBeta)))
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate </s> remove // TODO(e.burkov): this should removed with the API v1 when the appropriate
</s> add // TODO(e.burkov): This should removed with the API v1 when the appropriate | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/controlinstall.go |
if config.DNS.BindHost.IsUnspecified() {
bindhost = net.IPv4(127, 0, 0, 1) | <mask> Context.queryLog = querylog.New(conf)
<mask>
<mask> filterConf := config.DNS.DnsfilterConf
<mask> bindhost := config.DNS.BindHost
<mask> if config.DNS.BindHost == "0.0.0.0" {
<mask> bindhost = "127.0.0.1"
<mask> }
<mask> filterConf.ResolverAddress = fmt.Sprintf("%s:%d", bindhost, config.DNS.Port)
<mask> filterConf.AutoHosts = &Context.autoHosts
<mask> filterConf.ConfigModified = onConfigModified
<mask> filterConf.HTTPRegister = httpRegister
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if config.DNS.BindHost == "0.0.0.0" {
</s> add if config.DNS.BindHost.IsUnspecified() { </s> remove *dnsAddresses = append(*dnsAddresses, addr)
</s> add *dnsAddresses = append(*dnsAddresses, hostport) </s> remove func addDNSAddress(dnsAddresses *[]string, addr string) {
</s> add func addDNSAddress(dnsAddresses *[]string, addr net.IP) {
hostport := addr.String() </s> remove addr = fmt.Sprintf("%s:%d", addr, config.DNS.Port)
</s> add hostport = net.JoinHostPort(hostport, strconv.Itoa(config.DNS.Port)) </s> remove macFound := clients.dhcpServer.FindMACbyIP(ipAddr)
</s> add macFound := clients.dhcpServer.FindMACbyIP(ip) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
ip := dnsforward.IPFromAddr(d.Addr)
if ip == nil { | <mask> return Context.dnsServer != nil && Context.dnsServer.IsRunning()
<mask> }
<mask>
<mask> func onDNSRequest(d *proxy.DNSContext) {
<mask> ip := dnsforward.IPStringFromAddr(d.Addr)
<mask> if ip == "" {
<mask> // This would be quite weird if we get here
<mask> return
<mask> }
<mask>
<mask> ipAddr := net.ParseIP(ip)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add if !ip.IsLoopback() { </s> remove func IPStringFromAddr(addr net.Addr) (ipstr string) {
if ip := ipFromAddr(addr); ip != nil {
</s> add func IPStringFromAddr(addr net.Addr) (ipStr string) {
if ip := IPFromAddr(addr); ip != nil { </s> remove ipAddr := net.ParseIP(ip)
</s> add </s> remove ip := util.GetSubnet(ifaceName)
if len(ip) == 0 {
</s> add ipNet := util.GetSubnet(ifaceName)
if ipNet.IP == nil { </s> remove return true, ip
</s> add return true, ipStr | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
if !ip.IsLoopback() { | <mask> // This would be quite weird if we get here
<mask> return
<mask> }
<mask>
<mask> ipAddr := net.ParseIP(ip)
<mask> if !ipAddr.IsLoopback() {
<mask> Context.rdns.Begin(ip)
<mask> }
<mask> if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
<mask> Context.whois.Begin(ip)
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ip := dnsforward.IPStringFromAddr(d.Addr)
if ip == "" {
</s> add ip := dnsforward.IPFromAddr(d.Addr)
if ip == nil { </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove topClients := Context.stats.GetTopClientsIP(topClientsNumber)
for _, ip := range topClients {
ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add for _, ip := range Context.stats.GetTopClientsIP(topClientsNumber) {
if !ip.IsLoopback() { </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
if !Context.ipDetector.detectSpecialNetwork(ip) { | <mask> ipAddr := net.ParseIP(ip)
<mask> if !ipAddr.IsLoopback() {
<mask> Context.rdns.Begin(ip)
<mask> }
<mask> if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
<mask> Context.whois.Begin(ip)
<mask> }
<mask> }
<mask>
<mask> func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add if !ip.IsLoopback() { </s> remove topClients := Context.stats.GetTopClientsIP(topClientsNumber)
for _, ip := range topClients {
ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add for _, ip := range Context.stats.GetTopClientsIP(topClientsNumber) {
if !ip.IsLoopback() { </s> remove bindHost := net.ParseIP(config.DNS.BindHost)
</s> add </s> remove UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port},
</s> add UDPListenAddr: &net.UDPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
<mask> }
<mask> }
<mask>
<mask> func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
<mask> bindHost := net.ParseIP(config.DNS.BindHost)
<mask> newconfig = dnsforward.ServerConfig{
<mask> UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
<mask> TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port},
<mask> FilteringConfig: config.DNS.FilteringConfig,
<mask> ConfigModified: onConfigModified,
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port},
</s> add UDPListenAddr: &net.UDPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port}, </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, </s> remove ip := util.GetSubnet(ifaceName)
if len(ip) == 0 {
</s> add ipNet := util.GetSubnet(ifaceName)
if ipNet.IP == nil { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
|
UDPListenAddr: &net.UDPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port}, | <mask>
<mask> func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
<mask> bindHost := net.ParseIP(config.DNS.BindHost)
<mask> newconfig = dnsforward.ServerConfig{
<mask> UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
<mask> TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port},
<mask> FilteringConfig: config.DNS.FilteringConfig,
<mask> ConfigModified: onConfigModified,
<mask> HTTPRegister: httpRegister,
<mask> OnDNSRequest: onDNSRequest,
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove bindHost := net.ParseIP(config.DNS.BindHost)
</s> add </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, </s> remove ip := util.GetSubnet(ifaceName)
if len(ip) == 0 {
</s> add ipNet := util.GetSubnet(ifaceName)
if ipNet.IP == nil { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
IP: config.DNS.BindHost, | <mask> newconfig.TLSConfig = tlsConf.TLSConfig
<mask>
<mask> if tlsConf.PortDNSOverTLS != 0 {
<mask> newconfig.TLSListenAddr = &net.TCPAddr{
<mask> IP: bindHost,
<mask> Port: tlsConf.PortDNSOverTLS,
<mask> }
<mask> }
<mask>
<mask> if tlsConf.PortDNSOverQUIC != 0 {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, </s> remove bindHost := net.ParseIP(config.DNS.BindHost)
</s> add </s> remove _, ok := a.allowedClients[ip]
</s> add _, ok := a.allowedClients[ipStr] </s> remove if args.bindHost != "" {
</s> add if args.bindHost != nil { </s> remove UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port},
</s> add UDPListenAddr: &net.UDPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: config.DNS.BindHost, Port: config.DNS.Port}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
IP: config.DNS.BindHost, | <mask> }
<mask>
<mask> if tlsConf.PortDNSOverQUIC != 0 {
<mask> newconfig.QUICListenAddr = &net.UDPAddr{
<mask> IP: bindHost,
<mask> Port: int(tlsConf.PortDNSOverQUIC),
<mask> }
<mask> }
<mask>
<mask> if tlsConf.PortDNSCrypt != 0 {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, </s> remove newconfig.DNSCryptConfig, err = newDNSCrypt(bindHost, tlsConf)
</s> add newconfig.DNSCryptConfig, err = newDNSCrypt(config.DNS.BindHost, tlsConf) </s> remove bindHost := net.ParseIP(config.DNS.BindHost)
</s> add </s> remove if args.bindHost != "" {
</s> add if args.bindHost != nil { </s> remove _, ok := a.allowedClients[ip]
</s> add _, ok := a.allowedClients[ipStr] | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
newconfig.DNSCryptConfig, err = newDNSCrypt(config.DNS.BindHost, tlsConf) | <mask> }
<mask> }
<mask>
<mask> if tlsConf.PortDNSCrypt != 0 {
<mask> newconfig.DNSCryptConfig, err = newDNSCrypt(bindHost, tlsConf)
<mask> if err != nil {
<mask> // Don't wrap the error, because it's already
<mask> // wrapped by newDNSCrypt.
<mask> return dnsforward.ServerConfig{}, err
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ip4, _, err := net.ParseCIDR(ip)
if err != nil {
return err
}
</s> add </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { </s> remove add := updateStaticIPdhcpcdConf(ifaceName, ip, gatewayIP, ip4)
</s> add add := updateStaticIPdhcpcdConf(ifaceName, ipNet.String(), gatewayIP, ipNet.IP) </s> remove // GetInterfaceByIP - Get interface name by its IP address.
func GetInterfaceByIP(ip string) string {
</s> add // GetInterfaceByIP returns the name of interface containing provided ip.
func GetInterfaceByIP(ip net.IP) string { </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
if config.DNS.BindHost.IsUnspecified() { | <mask> // Get the list of DNS addresses the server is listening on
<mask> func getDNSAddresses() []string {
<mask> dnsAddresses := []string{}
<mask>
<mask> if config.DNS.BindHost == "0.0.0.0" {
<mask> ifaces, e := util.GetValidNetInterfacesForWeb()
<mask> if e != nil {
<mask> log.Error("Couldn't get network interfaces: %v", e)
<mask> return []string{}
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove } else if config.BindHost == "0.0.0.0" {
</s> add } else if config.BindHost.IsUnspecified() { </s> remove return ""
</s> add return nil </s> remove // GetSubnet - Get IP address with netmask for the specified interface
// Returns an empty string if it fails to find it
func GetSubnet(ifaceName string) string {
</s> add // GetSubnet returns pointer to net.IPNet for the specified interface or nil if
// the search fails.
func GetSubnet(ifaceName string) *net.IPNet { </s> remove // GetInterfaceByIP - Get interface name by its IP address.
func GetInterfaceByIP(ip string) string {
</s> add // GetInterfaceByIP returns the name of interface containing provided ip.
func GetInterfaceByIP(ip net.IP) string { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
func applyAdditionalFiltering(clientAddr net.IP, setts *dnsfilter.RequestFilteringSettings) { | <mask> return dnsAddresses
<mask> }
<mask>
<mask> // If a client has his own settings, apply them
<mask> func applyAdditionalFiltering(clientAddr string, setts *dnsfilter.RequestFilteringSettings) {
<mask> Context.dnsFilter.ApplyBlockedServices(setts, nil, true)
<mask>
<mask> if len(clientAddr) == 0 {
<mask> return
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if len(clientAddr) == 0 {
</s> add if clientAddr == nil { </s> remove client := s.getClientIP(e.Client.String())
</s> add client := s.getClientIP(e.Client) </s> remove func (clients *clientsContainer) findByIP(ip string) (Client, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) findByIP(ip net.IP) (Client, bool) {
if ip == nil { </s> remove func (clients *clientsContainer) SetWhoisInfo(ip string, info [][]string) {
</s> add func (clients *clientsContainer) SetWhoisInfo(ip net.IP, info [][]string) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
if clientAddr == nil { | <mask> // If a client has his own settings, apply them
<mask> func applyAdditionalFiltering(clientAddr string, setts *dnsfilter.RequestFilteringSettings) {
<mask> Context.dnsFilter.ApplyBlockedServices(setts, nil, true)
<mask>
<mask> if len(clientAddr) == 0 {
<mask> return
<mask> }
<mask> setts.ClientIP = clientAddr
<mask>
<mask> c, ok := Context.clients.Find(clientAddr)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove func applyAdditionalFiltering(clientAddr string, setts *dnsfilter.RequestFilteringSettings) {
</s> add func applyAdditionalFiltering(clientAddr net.IP, setts *dnsfilter.RequestFilteringSettings) { </s> remove c, ok := clients.findByIP(ip)
</s> add c, ok := clients.findByIP(net.ParseIP(ip)) </s> remove func (clients *clientsContainer) findByIP(ip string) (Client, bool) {
ipAddr := net.ParseIP(ip)
if ipAddr == nil {
</s> add func (clients *clientsContainer) findByIP(ip net.IP) (Client, bool) {
if ip == nil { </s> remove c, ok := clients.idIndex[ip]
</s> add c, ok := clients.idIndex[ip.String()] </s> remove func (clients *clientsContainer) SetWhoisInfo(ip string, info [][]string) {
</s> add func (clients *clientsContainer) SetWhoisInfo(ip net.IP, info [][]string) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
for _, ip := range Context.stats.GetTopClientsIP(topClientsNumber) {
if !ip.IsLoopback() { | <mask> Context.stats.Start()
<mask> Context.queryLog.Start()
<mask>
<mask> const topClientsNumber = 100 // the number of clients to get
<mask> topClients := Context.stats.GetTopClientsIP(topClientsNumber)
<mask> for _, ip := range topClients {
<mask> ipAddr := net.ParseIP(ip)
<mask> if !ipAddr.IsLoopback() {
<mask> Context.rdns.Begin(ip)
<mask> }
<mask> if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
<mask> Context.whois.Begin(ip)
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add if !ip.IsLoopback() { </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove return true, ip
</s> add return true, ipStr </s> remove ipAddr := net.ParseIP(ip)
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
if !Context.ipDetector.detectSpecialNetwork(ip) { | <mask> ipAddr := net.ParseIP(ip)
<mask> if !ipAddr.IsLoopback() {
<mask> Context.rdns.Begin(ip)
<mask> }
<mask> if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
<mask> Context.whois.Begin(ip)
<mask> }
<mask> }
<mask>
<mask> return nil
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if !Context.ipDetector.detectSpecialNetwork(ipAddr) {
</s> add if !Context.ipDetector.detectSpecialNetwork(ip) { </s> remove ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add if !ip.IsLoopback() { </s> remove topClients := Context.stats.GetTopClientsIP(topClientsNumber)
for _, ip := range topClients {
ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add for _, ip := range Context.stats.GetTopClientsIP(topClientsNumber) {
if !ip.IsLoopback() { </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/dns.go |
if args.bindHost != nil { | <mask> sysutil.SetRlimit(config.RlimitNoFile)
<mask> }
<mask>
<mask> // override bind host/port from the console
<mask> if args.bindHost != "" {
<mask> config.BindHost = args.bindHost
<mask> }
<mask> if args.bindPort != 0 {
<mask> config.BindPort = args.bindPort
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if config.BindHost == newSettings.Web.IP && config.BindPort == newSettings.Web.Port {
</s> add if config.BindHost.Equal(newSettings.Web.IP) && config.BindPort == newSettings.Web.Port { </s> remove ipAddr := net.ParseIP(ip)
</s> add </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { </s> remove _, ok := a.allowedClients[ip]
</s> add _, ok := a.allowedClients[ipStr] </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
var hostStr string | <mask> }
<mask>
<mask> if proto == "https" && tlsConf.ServerName != "" {
<mask> if tlsConf.PortHTTPS == 443 {
<mask> log.Printf("Go to https://%s", tlsConf.ServerName)
<mask> } else {
<mask> log.Printf("Go to https://%s:%s", tlsConf.ServerName, port)
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove } else if config.BindHost == "0.0.0.0" {
</s> add } else if config.BindHost.IsUnspecified() { </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
</s> add hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
} else if config.BindHost.IsUnspecified() { | <mask> log.Printf("Go to https://%s", tlsConf.ServerName)
<mask> } else {
<mask> log.Printf("Go to https://%s:%s", tlsConf.ServerName, port)
<mask> }
<mask> } else if config.BindHost == "0.0.0.0" {
<mask> log.Println("AdGuard Home is available on the following addresses:")
<mask> ifaces, err := util.GetValidNetInterfacesForWeb()
<mask> if err != nil {
<mask> // That's weird, but we'll ignore it
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) | <mask> log.Println("AdGuard Home is available on the following addresses:")
<mask> ifaces, err := util.GetValidNetInterfacesForWeb()
<mask> if err != nil {
<mask> // That's weird, but we'll ignore it
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
<mask> if config.BetaBindPort != 0 {
<mask> log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
<mask> }
<mask> return
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove } else if config.BindHost == "0.0.0.0" {
</s> add } else if config.BindHost.IsUnspecified() { </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) | <mask> if err != nil {
<mask> // That's weird, but we'll ignore it
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
<mask> if config.BetaBindPort != 0 {
<mask> log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
<mask> }
<mask> return
<mask> }
<mask>
<mask> for _, iface := range ifaces {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
</s> add hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) | <mask> }
<mask>
<mask> for _, iface := range ifaces {
<mask> for _, addr := range iface.Addresses {
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
<mask> if config.BetaBindPort != 0 {
<mask> log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
<mask> }
<mask> }
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove if ip == addr {
</s> add if ip.Equal(addr) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) | <mask> for _, iface := range ifaces {
<mask> for _, addr := range iface.Addresses {
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
<mask> if config.BetaBindPort != 0 {
<mask> log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
<mask> }
<mask> }
<mask> }
<mask> } else {
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
</s> add hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) | <mask> }
<mask> }
<mask> }
<mask> } else {
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
<mask> if config.BetaBindPort != 0 {
<mask> log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
<mask> }
<mask> }
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
</s> add hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) | <mask> }
<mask> } else {
<mask> log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
<mask> if config.BetaBindPort != 0 {
<mask> log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
<mask> }
<mask> }
<mask> }
<mask>
<mask> // -------------------
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
</s> add log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BetaBindPort))) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
</s> add hostStr = config.BindHost.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, port)) </s> remove log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
</s> add hostStr = addr.String()
log.Printf("Go to %s://%s", proto, net.JoinHostPort(hostStr, strconv.Itoa(config.BindPort))) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home.go |
// TODO(e.burkov): Remove this weird buildtag. | <mask> // +build !race
<mask>
<mask> // TODO(e.burkov): remove this weird buildtag.
<mask>
<mask> package home
<mask>
<mask> import (
<mask> "context"
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/home_test.go |
"net" | <mask>
<mask> import (
<mask> "fmt"
<mask> "os"
<mask> "strconv"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/version"
<mask> )
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options.go |
bindHost net.IP // host address to bind HTTP server on | <mask> type options struct {
<mask> verbose bool // is verbose logging enabled
<mask> configFilename string // path to the config file
<mask> workDir string // path to the working directory where we will store the filters data and the querylog
<mask> bindHost string // host address to bind HTTP server on
<mask> bindPort int // port to serve HTTP pages on
<mask> logFile string // Path to the log file. If empty, write to stdout. If "syslog", writes to syslog
<mask> pidFile string // File name to save PID to
<mask> checkConfig bool // Check configuration and exit
<mask> disableUpdate bool // If set, don't check for updates
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove BindHost string
</s> add BindHost net.IP </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
</s> add ipChannel chan net.IP // pass data from DNS request handling thread to rDNS thread </s> remove ipChan chan string
</s> add ipChan chan net.IP </s> remove // GetSubnet - Get IP address with netmask for the specified interface
// Returns an empty string if it fails to find it
func GetSubnet(ifaceName string) string {
</s> add // GetSubnet returns pointer to net.IPNet for the specified interface or nil if
// the search fails.
func GetSubnet(ifaceName string) *net.IPNet { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options.go |
func ipSliceOrNil(ip net.IP) []string {
if ip == nil {
return nil
}
return []string{ip.String()}
}
| <mask> // zero otherwise they return a string slice of the parameter
<mask>
<mask> func stringSliceOrNil(s string) []string {
<mask> if s == "" {
<mask> return nil
<mask> }
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // GetInterfaceByIP - Get interface name by its IP address.
func GetInterfaceByIP(ip string) string {
</s> add // GetInterfaceByIP returns the name of interface containing provided ip.
func GetInterfaceByIP(ip net.IP) string { </s> remove return ""
</s> add return nil </s> remove // GetSubnet - Get IP address with netmask for the specified interface
// Returns an empty string if it fails to find it
func GetSubnet(ifaceName string) string {
</s> add // GetSubnet returns pointer to net.IPNet for the specified interface or nil if
// the search fails.
func GetSubnet(ifaceName string) *net.IPNet { </s> remove if config.DNS.BindHost == "0.0.0.0" {
</s> add if config.DNS.BindHost.IsUnspecified() { </s> remove func (s *statsCtx) GetTopClientsIP(maxCount uint) []string {
</s> add func (s *statsCtx) GetTopClientsIP(maxCount uint) []net.IP { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options.go |
func(o options, v string) (options, error) { o.bindHost = net.ParseIP(v); return o, nil }, nil, nil,
func(o options) []string { return ipSliceOrNil(o.bindHost) }, | <mask>
<mask> var hostArg = arg{
<mask> "Host address to bind HTTP server on",
<mask> "host", "h",
<mask> func(o options, v string) (options, error) { o.bindHost = v; return o, nil }, nil, nil,
<mask> func(o options) []string { return stringSliceOrNil(o.bindHost) },
<mask> }
<mask>
<mask> var portArg = arg{
<mask> "Port to serve HTTP pages on",
<mask> "port", "p",
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove bindHost string // host address to bind HTTP server on
</s> add bindHost net.IP // host address to bind HTTP server on </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove req.Question[0].Name, err = dns.ReverseAddr(ip)
</s> add req.Question[0].Name, err = dns.ReverseAddr(ip.String()) </s> remove if len(ent.IP) == 0 {
ent.IP = v
</s> add if ent.IP == nil {
ent.IP = net.ParseIP(v) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options.go |
"net" | <mask>
<mask> import (
<mask> "fmt"
<mask> "testing"
<mask> )
<mask>
<mask> func testParseOk(t *testing.T, ss ...string) options {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options_test.go |
if testParseOk(t).bindHost != nil { | <mask> testParseParamMissing(t, "--work-dir")
<mask> }
<mask>
<mask> func TestParseBindHost(t *testing.T) {
<mask> if testParseOk(t).bindHost != "" {
<mask> t.Fatal("empty is no host")
<mask> }
<mask> if testParseOk(t, "-h", "addr").bindHost != "addr" {
<mask> t.Fatal("-h is host")
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if testParseOk(t, "-h", "addr").bindHost != "addr" {
</s> add if !testParseOk(t, "-h", "1.2.3.4").bindHost.Equal(net.IP{1, 2, 3, 4}) { </s> remove if testParseOk(t, "--host", "addr").bindHost != "addr" {
</s> add if !testParseOk(t, "--host", "1.2.3.4").bindHost.Equal(net.IP{1, 2, 3, 4}) { </s> remove testSerialize(t, options{bindHost: "addr"}, "-h", "addr")
</s> add testSerialize(t, options{bindHost: net.IP{1, 2, 3, 4}}, "-h", "1.2.3.4") </s> remove ipAddr := net.ParseIP(ip)
</s> add </s> remove if args.bindHost != "" {
</s> add if args.bindHost != nil { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options_test.go |
if !testParseOk(t, "-h", "1.2.3.4").bindHost.Equal(net.IP{1, 2, 3, 4}) { | <mask> func TestParseBindHost(t *testing.T) {
<mask> if testParseOk(t).bindHost != "" {
<mask> t.Fatal("empty is no host")
<mask> }
<mask> if testParseOk(t, "-h", "addr").bindHost != "addr" {
<mask> t.Fatal("-h is host")
<mask> }
<mask> testParseParamMissing(t, "-h")
<mask> if testParseOk(t, "--host", "addr").bindHost != "addr" {
<mask> t.Fatal("--host is host")
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if testParseOk(t).bindHost != "" {
</s> add if testParseOk(t).bindHost != nil { </s> remove if testParseOk(t, "--host", "addr").bindHost != "addr" {
</s> add if !testParseOk(t, "--host", "1.2.3.4").bindHost.Equal(net.IP{1, 2, 3, 4}) { </s> remove if args.bindHost != "" {
</s> add if args.bindHost != nil { </s> remove func CheckPortAvailable(host string, port int) error {
ln, err := net.Listen("tcp", net.JoinHostPort(host, strconv.Itoa(port)))
</s> add func CheckPortAvailable(host net.IP, port int) error {
ln, err := net.Listen("tcp", net.JoinHostPort(host.String(), strconv.Itoa(port))) </s> remove ipAddr := net.ParseIP(ip)
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options_test.go |
if !testParseOk(t, "--host", "1.2.3.4").bindHost.Equal(net.IP{1, 2, 3, 4}) { | <mask> if testParseOk(t, "-h", "addr").bindHost != "addr" {
<mask> t.Fatal("-h is host")
<mask> }
<mask> testParseParamMissing(t, "-h")
<mask> if testParseOk(t, "--host", "addr").bindHost != "addr" {
<mask> t.Fatal("--host is host")
<mask> }
<mask> testParseParamMissing(t, "--host")
<mask> }
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if testParseOk(t, "-h", "addr").bindHost != "addr" {
</s> add if !testParseOk(t, "-h", "1.2.3.4").bindHost.Equal(net.IP{1, 2, 3, 4}) { </s> remove if testParseOk(t).bindHost != "" {
</s> add if testParseOk(t).bindHost != nil { </s> remove } else if reqData.DNS.IP != "0.0.0.0" {
</s> add } else if !reqData.DNS.IP.IsUnspecified() { </s> remove testSerialize(t, options{bindHost: "addr"}, "-h", "addr")
</s> add testSerialize(t, options{bindHost: net.IP{1, 2, 3, 4}}, "-h", "1.2.3.4") </s> remove resp.IP = util.GetSubnet(interfaceName)
</s> add resp.IP = util.GetSubnet(interfaceName).String() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options_test.go |
testSerialize(t, options{bindHost: net.IP{1, 2, 3, 4}}, "-h", "1.2.3.4") | <mask> testSerialize(t, options{workDir: "path"}, "-w", "path")
<mask> }
<mask>
<mask> func TestSerializeBindHost(t *testing.T) {
<mask> testSerialize(t, options{bindHost: "addr"}, "-h", "addr")
<mask> }
<mask>
<mask> func TestSerializeBindPort(t *testing.T) {
<mask> testSerialize(t, options{bindPort: 666}, "-p", "666")
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if testParseOk(t).bindHost != "" {
</s> add if testParseOk(t).bindHost != nil { </s> remove if testParseOk(t, "-h", "addr").bindHost != "addr" {
</s> add if !testParseOk(t, "-h", "1.2.3.4").bindHost.Equal(net.IP{1, 2, 3, 4}) { </s> remove clients.SetWhoisInfo("1.1.1.2", whois)
</s> add clients.SetWhoisInfo(net.IPv4(1, 1, 1, 2), whois) </s> remove RangeStart: "2001::1",
</s> add RangeStart: net.ParseIP("2001::1"), </s> remove RangeStart: "2001::2",
</s> add RangeStart: net.ParseIP("2001::2"), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/options_test.go |
"net" | <mask> package home
<mask>
<mask> import (
<mask> "encoding/binary"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): remove this weird buildtag.
</s> add // TODO(e.burkov): Remove this weird buildtag. | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
ipChannel chan net.IP // pass data from DNS request handling thread to rDNS thread | <mask> // RDNS - module context
<mask> type RDNS struct {
<mask> dnsServer *dnsforward.Server
<mask> clients *clientsContainer
<mask> ipChannel chan string // pass data from DNS request handling thread to rDNS thread
<mask>
<mask> // Contains IP addresses of clients to be resolved by rDNS
<mask> // If IP address is resolved, it stays here while it's inside Clients.
<mask> // If it's removed from Clients, this IP address will be resolved once again.
<mask> // If IP address couldn't be resolved, it stays here for some time to prevent further attempts to resolve the same IP.
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ipChan chan string
</s> add ipChan chan net.IP </s> remove bindHost string // host address to bind HTTP server on
</s> add bindHost net.IP // host address to bind HTTP server on </s> remove func (a *accessCtx) IsBlockedIP(ip string) (bool, string) {
</s> add func (a *accessCtx) IsBlockedIP(ip net.IP) (bool, string) {
ipStr := ip.String()
</s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove func (r *RDNS) resolve(ip string) string {
</s> add func (r *RDNS) resolve(ip net.IP) string { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
r.ipChannel = make(chan net.IP, 256) | <mask> cconf.EnableLRU = true
<mask> cconf.MaxCount = 10000
<mask> r.ipAddrs = cache.New(cconf)
<mask>
<mask> r.ipChannel = make(chan string, 256)
<mask> go r.workerLoop()
<mask> return &r
<mask> }
<mask>
<mask> // Begin - add IP address to rDNS queue
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove w.ipChan = make(chan string, 255)
</s> add w.ipChan = make(chan net.IP, 255) </s> remove func (r *RDNS) Begin(ip string) {
</s> add func (r *RDNS) Begin(ip net.IP) { </s> remove expire := r.ipAddrs.Get([]byte(ip))
</s> add expire := r.ipAddrs.Get(ip) </s> remove func (r *RDNS) resolve(ip string) string {
</s> add func (r *RDNS) resolve(ip net.IP) string { </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
</s> add ipChannel chan net.IP // pass data from DNS request handling thread to rDNS thread | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
func (r *RDNS) Begin(ip net.IP) { | <mask> return &r
<mask> }
<mask>
<mask> // Begin - add IP address to rDNS queue
<mask> func (r *RDNS) Begin(ip string) {
<mask> now := uint64(time.Now().Unix())
<mask> expire := r.ipAddrs.Get([]byte(ip))
<mask> if len(expire) != 0 {
<mask> exp := binary.BigEndian.Uint64(expire)
<mask> if exp > now {
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove expire := r.ipAddrs.Get([]byte(ip))
</s> add expire := r.ipAddrs.Get(ip) </s> remove func (w *Whois) Begin(ip string) {
</s> add func (w *Whois) Begin(ip net.IP) { </s> remove func (r *RDNS) resolve(ip string) string {
</s> add func (r *RDNS) resolve(ip net.IP) string { </s> remove r.ipChannel = make(chan string, 256)
</s> add r.ipChannel = make(chan net.IP, 256) </s> remove ip4, _, err := net.ParseCIDR(ip)
if err != nil {
return err
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
expire := r.ipAddrs.Get(ip) | <mask>
<mask> // Begin - add IP address to rDNS queue
<mask> func (r *RDNS) Begin(ip string) {
<mask> now := uint64(time.Now().Unix())
<mask> expire := r.ipAddrs.Get([]byte(ip))
<mask> if len(expire) != 0 {
<mask> exp := binary.BigEndian.Uint64(expire)
<mask> if exp > now {
<mask> return
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove func (r *RDNS) Begin(ip string) {
</s> add func (r *RDNS) Begin(ip net.IP) { </s> remove func (w *Whois) Begin(ip string) {
</s> add func (w *Whois) Begin(ip net.IP) { </s> remove func (r *RDNS) resolve(ip string) string {
</s> add func (r *RDNS) resolve(ip net.IP) string { </s> remove r.ipChannel = make(chan string, 256)
</s> add r.ipChannel = make(chan net.IP, 256) </s> remove ip4, _, err := net.ParseCIDR(ip)
if err != nil {
return err
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
_ = r.ipAddrs.Set(ip, expire) | <mask> }
<mask> expire = make([]byte, 8)
<mask> const ttl = 1 * 60 * 60
<mask> binary.BigEndian.PutUint64(expire, now+ttl)
<mask> _ = r.ipAddrs.Set([]byte(ip), expire)
<mask>
<mask> if r.clients.Exists(ip, ClientSourceRDNS) {
<mask> return
<mask> }
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove _, _ = r.clients.AddHost(ip, host, ClientSourceRDNS)
</s> add _, _ = r.clients.AddHost(ip.String(), host, ClientSourceRDNS) </s> remove func (s *statsCtx) getClientIP(clientIP string) string {
if s.conf.AnonymizeClientIP {
ip := net.ParseIP(clientIP)
if ip != nil {
ip4 := ip.To4()
const AnonymizeClientIP4Mask = 16
const AnonymizeClientIP6Mask = 112
if ip4 != nil {
clientIP = ip4.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)).String()
} else {
clientIP = ip.Mask(net.CIDRMask(AnonymizeClientIP6Mask, 128)).String()
}
</s> add func (s *statsCtx) getClientIP(ip net.IP) (clientIP net.IP) {
if s.conf.AnonymizeClientIP && ip != nil {
const AnonymizeClientIP4Mask = 16
const AnonymizeClientIP6Mask = 112
if ip.To4() != nil {
return ip.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)) </s> remove func (l *queryLog) getClientIP(clientIP string) string {
if l.conf.AnonymizeClientIP {
ip := net.ParseIP(clientIP)
if ip != nil {
ip4 := ip.To4()
const AnonymizeClientIP4Mask = 16
const AnonymizeClientIP6Mask = 112
if ip4 != nil {
clientIP = ip4.Mask(net.CIDRMask(AnonymizeClientIP4Mask, 32)).String()
} else {
clientIP = ip.Mask(net.CIDRMask(AnonymizeClientIP6Mask, 128)).String()
}
</s> add func (l *queryLog) getClientIP(ip net.IP) (clientIP net.IP) {
if l.conf.AnonymizeClientIP && ip != nil {
const AnonymizeClientIPv4Mask = 16
const AnonymizeClientIPv6Mask = 112
if ip.To4() != nil {
return ip.Mask(net.CIDRMask(AnonymizeClientIPv4Mask, 32)) </s> remove expire := r.ipAddrs.Get([]byte(ip))
</s> add expire := r.ipAddrs.Get(ip) </s> remove topClients := Context.stats.GetTopClientsIP(topClientsNumber)
for _, ip := range topClients {
ipAddr := net.ParseIP(ip)
if !ipAddr.IsLoopback() {
</s> add for _, ip := range Context.stats.GetTopClientsIP(topClientsNumber) {
if !ip.IsLoopback() { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
func (r *RDNS) resolve(ip net.IP) string { | <mask> }
<mask> }
<mask>
<mask> // Use rDNS to get hostname by IP address
<mask> func (r *RDNS) resolve(ip string) string {
<mask> log.Tracef("Resolving host for %s", ip)
<mask>
<mask> req := dns.Msg{}
<mask> req.Id = dns.Id()
<mask> req.RecursionDesired = true
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove func (r *RDNS) Begin(ip string) {
</s> add func (r *RDNS) Begin(ip net.IP) { </s> remove expire := r.ipAddrs.Get([]byte(ip))
</s> add expire := r.ipAddrs.Get(ip) </s> remove // GetSubnet - Get IP address with netmask for the specified interface
// Returns an empty string if it fails to find it
func GetSubnet(ifaceName string) string {
</s> add // GetSubnet returns pointer to net.IPNet for the specified interface or nil if
// the search fails.
func GetSubnet(ifaceName string) *net.IPNet { </s> remove func addEntry(l *queryLog, host, answerStr, client string) {
</s> add func addEntry(l *queryLog, host string, answerStr, client net.IP) { </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
</s> add ipChannel chan net.IP // pass data from DNS request handling thread to rDNS thread | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
req.Question[0].Name, err = dns.ReverseAddr(ip.String()) | <mask> Qclass: dns.ClassINET,
<mask> },
<mask> }
<mask> var err error
<mask> req.Question[0].Name, err = dns.ReverseAddr(ip)
<mask> if err != nil {
<mask> log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err)
<mask> return ""
<mask> }
<mask>
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove net.JoinHostPort(newSettings.Web.IP, strconv.Itoa(newSettings.Web.Port)), err)
</s> add net.JoinHostPort(newSettings.Web.IP.String(), strconv.Itoa(newSettings.Web.Port)), err) </s> remove func CheckPortAvailable(host string, port int) error {
ln, err := net.Listen("tcp", net.JoinHostPort(host, strconv.Itoa(port)))
</s> add func CheckPortAvailable(host net.IP, port int) error {
ln, err := net.Listen("tcp", net.JoinHostPort(host.String(), strconv.Itoa(port))) </s> remove add := updateStaticIPdhcpcdConf(ifaceName, ip, gatewayIP, ip4)
</s> add add := updateStaticIPdhcpcdConf(ifaceName, ipNet.String(), gatewayIP, ipNet.IP) </s> remove ip4, _, err := net.ParseCIDR(ip)
if err != nil {
return err
}
</s> add </s> remove func CheckPacketPortAvailable(host string, port int) error {
ln, err := net.ListenPacket("udp", net.JoinHostPort(host, strconv.Itoa(port)))
</s> add func CheckPacketPortAvailable(host net.IP, port int) error {
ln, err := net.ListenPacket("udp", net.JoinHostPort(host.String(), strconv.Itoa(port))) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
_, _ = r.clients.AddHost(ip.String(), host, ClientSourceRDNS) | <mask> if len(host) == 0 {
<mask> continue
<mask> }
<mask>
<mask> _, _ = r.clients.AddHost(ip, host, ClientSourceRDNS)
<mask> }
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove if ipnet.Contains(ipAddr) {
</s> add if ipnet.Contains(ip) { </s> remove if ip == addr {
</s> add if ip.Equal(addr) { </s> remove _ = r.ipAddrs.Set([]byte(ip), expire)
</s> add _ = r.ipAddrs.Set(ip, expire) </s> remove ip := util.GetSubnet(ifaceName)
if len(ip) == 0 {
</s> add ipNet := util.GetSubnet(ifaceName)
if ipNet.IP == nil { </s> remove macFound := clients.dhcpServer.FindMACbyIP(ipAddr)
</s> add macFound := clients.dhcpServer.FindMACbyIP(ip) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns.go |
"net" | <mask> package home
<mask>
<mask> import (
<mask> "testing"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
<mask> "github.com/stretchr/testify/assert"
<mask> )
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove // TODO(e.burkov): remove this weird buildtag.
</s> add // TODO(e.burkov): Remove this weird buildtag. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns_test.go |
r := rdns.resolve(net.IP{1, 1, 1, 1}) | <mask> assert.Nil(t, err)
<mask>
<mask> clients := &clientsContainer{}
<mask> rdns := InitRDNS(dns, clients)
<mask> r := rdns.resolve("1.1.1.1")
<mask> assert.Equal(t, "one.one.one.one", r, r)
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove c, b := clients.Find("1.1.1.2")
</s> add c, b := clients.Find(net.IPv4(1, 1, 1, 2)) </s> remove RangeStart: "2001::1",
</s> add RangeStart: net.ParseIP("2001::1"), </s> remove RangeStart: "2001::1",
</s> add RangeStart: net.ParseIP("2001::1"), </s> remove RangeStart: "2001::2",
</s> add RangeStart: net.ParseIP("2001::2"), </s> remove RangeStart: "2001::1",
</s> add RangeStart: net.ParseIP("2001::1"), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/rdns_test.go |
BindHost net.IP | <mask> )
<mask>
<mask> type webConfig struct {
<mask> firstRun bool
<mask> BindHost string
<mask> BindPort int
<mask> BetaBindPort int
<mask> PortHTTPS int
<mask>
<mask> // ReadTimeout is an option to pass to http.Server for setting an
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove BindHost string `yaml:"bind_host"`
</s> add BindHost net.IP `yaml:"bind_host"` </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove IP string `json:"ip"`
</s> add IP net.IP `json:"ip"` </s> remove bindHost string // host address to bind HTTP server on
</s> add bindHost net.IP // host address to bind HTTP server on | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/web.go |
hostStr := web.conf.BindHost.String() | <mask> for !web.httpsServer.shutdown {
<mask> printHTTPAddresses("http")
<mask> errs := make(chan error, 2)
<mask>
<mask> // we need to have new instance, because after Shutdown() the Server is not usable
<mask> web.httpServer = &http.Server{
<mask> ErrorLog: log.StdLog("web: http", log.DEBUG),
<mask> Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BindPort)),
<mask> Handler: withMiddlewares(Context.mux, limitRequestBody),
<mask> ReadTimeout: web.conf.ReadTimeout,
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)),
</s> add Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BindPort)), </s> remove Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BetaBindPort)),
</s> add Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BetaBindPort)), </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.PortHTTPS))
</s> add address := net.JoinHostPort(web.conf.BindHost.String(), strconv.Itoa(web.conf.PortHTTPS)) </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove newconfig.DNSCryptConfig, err = newDNSCrypt(bindHost, tlsConf)
</s> add newconfig.DNSCryptConfig, err = newDNSCrypt(config.DNS.BindHost, tlsConf) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/web.go |
Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BindPort)), | <mask>
<mask> // we need to have new instance, because after Shutdown() the Server is not usable
<mask> web.httpServer = &http.Server{
<mask> ErrorLog: log.StdLog("web: http", log.DEBUG),
<mask> Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)),
<mask> Handler: withMiddlewares(Context.mux, limitRequestBody),
<mask> ReadTimeout: web.conf.ReadTimeout,
<mask> ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
<mask> WriteTimeout: web.conf.WriteTimeout,
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BetaBindPort)),
</s> add Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BetaBindPort)), </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.PortHTTPS))
</s> add address := net.JoinHostPort(web.conf.BindHost.String(), strconv.Itoa(web.conf.PortHTTPS)) </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove func (a *accessCtx) IsBlockedIP(ip string) (bool, string) {
</s> add func (a *accessCtx) IsBlockedIP(ip net.IP) (bool, string) {
ipStr := ip.String()
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/web.go |
Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BetaBindPort)), | <mask>
<mask> if web.conf.BetaBindPort != 0 {
<mask> web.httpServerBeta = &http.Server{
<mask> ErrorLog: log.StdLog("web: http", log.DEBUG),
<mask> Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BetaBindPort)),
<mask> Handler: withMiddlewares(Context.mux, limitRequestBody, web.wrapIndexBeta),
<mask> ReadTimeout: web.conf.ReadTimeout,
<mask> ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
<mask> WriteTimeout: web.conf.WriteTimeout,
<mask> }
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)),
</s> add Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BindPort)), </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.PortHTTPS))
</s> add address := net.JoinHostPort(web.conf.BindHost.String(), strconv.Itoa(web.conf.PortHTTPS)) </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, </s> remove IP: bindHost,
</s> add IP: config.DNS.BindHost, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/web.go |
address := net.JoinHostPort(web.conf.BindHost.String(), strconv.Itoa(web.conf.PortHTTPS)) | <mask>
<mask> web.httpsServer.cond.L.Unlock()
<mask>
<mask> // prepare HTTPS server
<mask> address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.PortHTTPS))
<mask> web.httpsServer.server = &http.Server{
<mask> ErrorLog: log.StdLog("web: https", log.DEBUG),
<mask> Addr: address,
<mask> TLSConfig: &tls.Config{
<mask> Certificates: []tls.Certificate{web.httpsServer.cert},
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BetaBindPort)),
</s> add Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BetaBindPort)), </s> remove Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)),
</s> add Addr: net.JoinHostPort(hostStr, strconv.Itoa(web.conf.BindPort)), </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove bindHost string // host address to bind HTTP server on
</s> add bindHost net.IP // host address to bind HTTP server on | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/web.go |
ipChan chan net.IP | <mask>
<mask> // Whois - module context
<mask> type Whois struct {
<mask> clients *clientsContainer
<mask> ipChan chan string
<mask> timeoutMsec uint
<mask>
<mask> // Contains IP addresses of clients
<mask> // An active IP address is resolved once again after it expires.
<mask> // If IP address couldn't be resolved, it stays here for some time to prevent further attempts to resolve the same IP.
</s> Pull request: 2508 ip conversion vol.2
Merge in DNS/adguard-home from 2508-ip-conversion-vol2 to master
Closes #2508.
Squashed commit of the following:
commit 5b9d33f9cd352756831f63e34c4aea48674628c1
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:15:17 2021 +0300
util: replace net.IPNet with pointer
commit 680126de7d59464077f9edf1bbaa925dd3fcee19
Merge: d3ba6a6c 5a50efad
Author: Eugene Burkov <[email protected]>
Date: Wed Jan 20 17:02:41 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit d3ba6a6cdd01c0aa736418fdb86ed40120169fe9
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 18:29:54 2021 +0300
all: remove last conversion
commit 88b63f11a6c3f8705d7fa0c448c50dd646cc9214
Author: Eugene Burkov <[email protected]>
Date: Tue Jan 19 14:12:45 2021 +0300
all: improve code quality
commit 71af60c70a0dbaf55e2221023d6d2e4993c9e9a7
Merge: 98af3784 9f75725d
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 17:13:27 2021 +0300
Merge branch 'master' into 2508-ip-conversion-vol2
commit 98af3784ce44d0993d171653c13d6e83bb8d1e6a
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:32:53 2021 +0300
all: log changes
commit e99595a172bae1e844019d344544be84ddd65e4e
Author: Eugene Burkov <[email protected]>
Date: Mon Jan 18 16:06:49 2021 +0300
all: fix or remove remaining net.IP <-> string conversions
commit 7fd0634ce945f7e4c9b856684c5199f8a84a543e
Author: Eugene Burkov <[email protected]>
Date: Fri Jan 15 15:36:17 2021 +0300
all: remove redundant net.IP <-> string converions
commit 5df8af030421237d41b67ed659f83526cc258199
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:35:25 2021 +0300
stats: remove redundant net.IP <-> string conversion
commit fbe4e3fc015e6898063543a90c04401d76dbb18f
Author: Eugene Burkov <[email protected]>
Date: Thu Jan 14 16:20:35 2021 +0300
querylog: remove redundant net.IP <-> string conversion </s> remove ipChannel chan string // pass data from DNS request handling thread to rDNS thread
</s> add ipChannel chan net.IP // pass data from DNS request handling thread to rDNS thread </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
</s> add BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to </s> remove list map[string]*Client // name -> client
idIndex map[string]*Client // IP -> client
ipHost map[string]*ClientHost // IP -> Hostname
lock sync.Mutex
</s> add list map[string]*Client // name -> client
idIndex map[string]*Client // IP -> client
// TODO(e.burkov): Think of a way to not require string conversion for
// IP addresses.
ipHost map[string]*ClientHost // IP -> Hostname
lock sync.Mutex </s> remove // GetSubnet - Get IP address with netmask for the specified interface
// Returns an empty string if it fails to find it
func GetSubnet(ifaceName string) string {
</s> add // GetSubnet returns pointer to net.IPNet for the specified interface or nil if
// the search fails.
func GetSubnet(ifaceName string) *net.IPNet { </s> remove GetTopClientsIP(limit uint) []string
</s> add GetTopClientsIP(limit uint) []net.IP | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/7fab31beaeb8c7d1c9892746bbf37e99d4f9dc01 | internal/home/whois.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.