docstring_tokens stringlengths 18 16.9k | code_tokens stringlengths 75 1.81M | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask> SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
<mask> UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
<mask> }
<mask>
<mask> cy.IDs = make([]string, len(cli.IDs))
<mask> copy(cy.IDs, cli.IDs)
<mask>
<mask> cy.BlockedServices = make([]string, len(cli.BlockedServices))
<mask> copy(cy.BlockedServices, cli.BlockedServices)
<mask>
<mask> cy.Upstreams = make([]string, len(cli.Upstreams))
<mask> copy(cy.Upstreams, cli.Upstreams)
<mask>
<mask> *objects = append(*objects, cy)
<mask> }
<mask> clients.lock.Unlock()
<mask> }
</s> + clients: support per-client tags </s> add func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> add setts.ClientTags = c.Tags
</s> remove return clients.findByIP(ip)
</s> add c, ok := clients.findByIP(ip)
if !ok {
return Client{}, false
}
c.IDs = stringArrayDup(c.IDs)
c.Tags = stringArrayDup(c.Tags)
c.BlockedServices = stringArrayDup(c.BlockedServices)
c.Upstreams = stringArrayDup(c.Upstreams)
return c, true </s> add clients.allTags = make(map[string]bool)
for _, t := range clientTags {
clients.allTags[t] = false
}
</s> remove result, err = d.matchHost(host, qtype)
</s> add result, err = d.matchHost(host, qtype, setts.ClientTags) </s> add for _, t := range cy.Tags {
if !clients.tagKnown(t) {
log.Debug("Clients: skipping unknown tag '%s'", t)
continue
}
cli.Tags = append(cli.Tags, t)
}
sort.Strings(cli.Tags)
| https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients.go |
keep keep add keep keep keep keep | <mask> return true
<mask> }
<mask>
<mask> // Find searches for a client by IP
<mask> func (clients *clientsContainer) Find(ip string) (Client, bool) {
<mask> clients.lock.Lock()
<mask> defer clients.lock.Unlock()
</s> + clients: support per-client tags </s> remove return clients.findByIP(ip)
</s> add c, ok := clients.findByIP(ip)
if !ok {
return Client{}, false
}
c.IDs = stringArrayDup(c.IDs)
c.Tags = stringArrayDup(c.Tags)
c.BlockedServices = stringArrayDup(c.BlockedServices)
c.Upstreams = stringArrayDup(c.Upstreams)
return c, true </s> remove err := c.check()
</s> add err := clients.check(&c) </s> remove e := c.check()
</s> add e := clients.check(&c) </s> add func (clients *clientsContainer) tagKnown(tag string) bool {
_, ok := clients.allTags[tag]
return ok
}
</s> add allTags map[string]bool
</s> remove func (d *Dnsfilter) matchHost(host string, qtype uint16) (Result, error) {
</s> add func (d *Dnsfilter) matchHost(host string, qtype uint16, ctags []string) (Result, error) { | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients.go |
keep keep keep keep replace keep keep keep keep keep | <mask> func (clients *clientsContainer) Find(ip string) (Client, bool) {
<mask> clients.lock.Lock()
<mask> defer clients.lock.Unlock()
<mask>
<mask> return clients.findByIP(ip)
<mask> }
<mask>
<mask> func upstreamArrayCopy(a []upstream.Upstream) []upstream.Upstream {
<mask> a2 := make([]upstream.Upstream, len(a))
<mask> copy(a2, a)
</s> + clients: support per-client tags </s> add func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> add func (clients *clientsContainer) tagKnown(tag string) bool {
_, ok := clients.allTags[tag]
return ok
}
</s> remove err := c.check()
</s> add err := clients.check(&c) </s> remove e := c.check()
</s> add e := clients.check(&c) </s> remove func (c *Client) check() error {
</s> add func (clients *clientsContainer) check(c *Client) error { </s> add Tags []string `json:"supported_tags"` | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients.go |
keep keep keep keep replace keep keep keep keep keep | <mask> return ClientHost{}, false
<mask> }
<mask>
<mask> // Check if Client object's fields are correct
<mask> func (c *Client) check() error {
<mask> if len(c.Name) == 0 {
<mask> return fmt.Errorf("Invalid Name")
<mask> }
<mask>
<mask> if len(c.IDs) == 0 {
</s> + clients: support per-client tags </s> add for _, t := range c.Tags {
if !clients.tagKnown(t) {
return fmt.Errorf("Invalid tag: %s", t)
}
}
sort.Strings(c.Tags)
</s> remove frules, ok := d.filteringEngine.Match(host)
</s> add frules, ok := d.filteringEngine.Match(host, ctags) </s> remove func (d *Dnsfilter) matchHost(host string, qtype uint16) (Result, error) {
</s> add func (d *Dnsfilter) matchHost(host string, qtype uint16, ctags []string) (Result, error) { </s> remove err := c.check()
</s> add err := clients.check(&c) </s> remove return d.matchHost(host, qtype)
</s> add return d.matchHost(host, qtype, setts.ClientTags) </s> remove result, err = d.matchHost(host, qtype)
</s> add result, err = d.matchHost(host, qtype, setts.ClientTags) | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients.go |
keep add keep keep keep keep | <mask> }
<mask>
<mask> if len(c.Upstreams) != 0 {
<mask> err := dnsforward.ValidateUpstreams(c.Upstreams)
<mask> if err != nil {
<mask> return fmt.Errorf("Invalid upstream servers: %s", err)
</s> + clients: support per-client tags </s> add for _, t := range cy.Tags {
if !clients.tagKnown(t) {
log.Debug("Clients: skipping unknown tag '%s'", t)
continue
}
cli.Tags = append(cli.Tags, t)
}
sort.Strings(cli.Tags)
</s> remove result, err = d.matchHost(host, qtype)
</s> add result, err = d.matchHost(host, qtype, setts.ClientTags) </s> remove err := c.check()
</s> add err := clients.check(&c) </s> remove func (c *Client) check() error {
</s> add func (clients *clientsContainer) check(c *Client) error { </s> remove e := c.check()
</s> add e := clients.check(&c) </s> add data.Tags = clientTags
| https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients.go |
keep keep keep keep replace keep keep keep keep keep | <mask>
<mask> // Add a new client object
<mask> // Return true: success; false: client exists.
<mask> func (clients *clientsContainer) Add(c Client) (bool, error) {
<mask> e := c.check()
<mask> if e != nil {
<mask> return false, e
<mask> }
<mask>
<mask> clients.lock.Lock()
</s> + clients: support per-client tags </s> remove err := c.check()
</s> add err := clients.check(&c) </s> add data.Tags = clientTags
</s> add func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> remove func (d *Dnsfilter) matchHost(host string, qtype uint16) (Result, error) {
</s> add func (d *Dnsfilter) matchHost(host string, qtype uint16, ctags []string) (Result, error) { </s> remove return clients.findByIP(ip)
</s> add c, ok := clients.findByIP(ip)
if !ok {
return Client{}, false
}
c.IDs = stringArrayDup(c.IDs)
c.Tags = stringArrayDup(c.Tags)
c.BlockedServices = stringArrayDup(c.BlockedServices)
c.Upstreams = stringArrayDup(c.Upstreams)
return c, true </s> remove func (c *Client) check() error {
</s> add func (clients *clientsContainer) check(c *Client) error { | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }
<mask>
<mask> // Update a client
<mask> func (clients *clientsContainer) Update(name string, c Client) error {
<mask> err := c.check()
<mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> clients.lock.Lock()
</s> + clients: support per-client tags </s> remove e := c.check()
</s> add e := clients.check(&c) </s> remove result, err = d.matchHost(host, qtype)
</s> add result, err = d.matchHost(host, qtype, setts.ClientTags) </s> add for _, t := range c.Tags {
if !clients.tagKnown(t) {
return fmt.Errorf("Invalid tag: %s", t)
}
}
sort.Strings(c.Tags)
</s> add for _, t := range cy.Tags {
if !clients.tagKnown(t) {
log.Debug("Clients: skipping unknown tag '%s'", t)
continue
}
cli.Tags = append(cli.Tags, t)
}
sort.Strings(cli.Tags)
</s> add func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> remove func (c *Client) check() error {
</s> add func (clients *clientsContainer) check(c *Client) error { | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients.go |
keep keep add keep keep keep keep keep keep | <mask>
<mask> type clientJSON struct {
<mask> IDs []string `json:"ids"`
<mask> Name string `json:"name"`
<mask> UseGlobalSettings bool `json:"use_global_settings"`
<mask> FilteringEnabled bool `json:"filtering_enabled"`
<mask> ParentalEnabled bool `json:"parental_enabled"`
<mask> SafeSearchEnabled bool `json:"safesearch_enabled"`
<mask> SafeBrowsingEnabled bool `json:"safebrowsing_enabled"`
</s> + clients: support per-client tags </s> add Tags []string `yaml:"tags"` </s> add Tags []string </s> add ClientTags []string </s> add func (clients *clientsContainer) tagKnown(tag string) bool {
_, ok := clients.allTags[tag]
return ok
}
</s> add allTags map[string]bool
</s> add Tags []string `json:"supported_tags"` | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients_http.go |
keep keep keep add keep keep keep keep keep | <mask>
<mask> type clientListJSON struct {
<mask> Clients []clientJSON `json:"clients"`
<mask> AutoClients []clientHostJSON `json:"auto_clients"`
<mask> }
<mask>
<mask> // respond with information about configured clients
<mask> func (clients *clientsContainer) handleGetClients(w http.ResponseWriter, r *http.Request) {
<mask> data := clientListJSON{}
</s> + clients: support per-client tags </s> add ClientTags []string </s> add func (clients *clientsContainer) tagKnown(tag string) bool {
_, ok := clients.allTags[tag]
return ok
}
</s> remove err := c.check()
</s> add err := clients.check(&c) </s> remove func (c *Client) check() error {
</s> add func (clients *clientsContainer) check(c *Client) error { </s> add func stringArrayDup(a []string) []string {
a2 := make([]string, len(a))
copy(a2, a)
return a2
}
</s> remove e := c.check()
</s> add e := clients.check(&c) | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients_http.go |
keep add keep keep keep keep | <mask> clients.lock.Unlock()
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> e := json.NewEncoder(w).Encode(data)
<mask> if e != nil {
<mask> httpError(w, http.StatusInternalServerError, "Failed to encode to json: %v", e)
</s> + clients: support per-client tags </s> remove e := c.check()
</s> add e := clients.check(&c) </s> remove func (d *Dnsfilter) matchHost(host string, qtype uint16) (Result, error) {
</s> add func (d *Dnsfilter) matchHost(host string, qtype uint16, ctags []string) (Result, error) { </s> remove return d.matchHost(host, qtype)
</s> add return d.matchHost(host, qtype, setts.ClientTags) </s> add for _, t := range c.Tags {
if !clients.tagKnown(t) {
return fmt.Errorf("Invalid tag: %s", t)
}
}
sort.Strings(c.Tags)
</s> remove result, err = d.matchHost(host, qtype)
</s> add result, err = d.matchHost(host, qtype, setts.ClientTags) </s> remove err := c.check()
</s> add err := clients.check(&c) | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients_http.go |
keep add keep keep keep keep keep | <mask> Name: cj.Name,
<mask> IDs: cj.IDs,
<mask> UseOwnSettings: !cj.UseGlobalSettings,
<mask> FilteringEnabled: cj.FilteringEnabled,
<mask> ParentalEnabled: cj.ParentalEnabled,
<mask> SafeSearchEnabled: cj.SafeSearchEnabled,
<mask> SafeBrowsingEnabled: cj.SafeBrowsingEnabled,
</s> + clients: support per-client tags </s> add Tags: c.Tags, </s> add func (clients *clientsContainer) tagKnown(tag string) bool {
_, ok := clients.allTags[tag]
return ok
}
</s> remove cy.IDs = make([]string, len(cli.IDs))
copy(cy.IDs, cli.IDs)
cy.BlockedServices = make([]string, len(cli.BlockedServices))
copy(cy.BlockedServices, cli.BlockedServices)
cy.Upstreams = make([]string, len(cli.Upstreams))
copy(cy.Upstreams, cli.Upstreams)
</s> add cy.Tags = stringArrayDup(cli.Tags)
cy.IDs = stringArrayDup(cli.IDs)
cy.BlockedServices = stringArrayDup(cli.BlockedServices)
cy.Upstreams = stringArrayDup(cli.Upstreams) </s> add setts.ClientTags = c.Tags
</s> add clients.allTags = make(map[string]bool)
for _, t := range clientTags {
clients.allTags[t] = false
}
</s> remove return d.matchHost(host, qtype)
</s> add return d.matchHost(host, qtype, setts.ClientTags) | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients_http.go |
keep add keep keep keep keep keep keep | <mask> Name: c.Name,
<mask> IDs: c.IDs,
<mask> UseGlobalSettings: !c.UseOwnSettings,
<mask> FilteringEnabled: c.FilteringEnabled,
<mask> ParentalEnabled: c.ParentalEnabled,
<mask> SafeSearchEnabled: c.SafeSearchEnabled,
<mask> SafeBrowsingEnabled: c.SafeBrowsingEnabled,
<mask>
</s> + clients: support per-client tags </s> add Tags: cj.Tags, </s> add func (clients *clientsContainer) tagKnown(tag string) bool {
_, ok := clients.allTags[tag]
return ok
}
</s> remove cy.IDs = make([]string, len(cli.IDs))
copy(cy.IDs, cli.IDs)
cy.BlockedServices = make([]string, len(cli.BlockedServices))
copy(cy.BlockedServices, cli.BlockedServices)
cy.Upstreams = make([]string, len(cli.Upstreams))
copy(cy.Upstreams, cli.Upstreams)
</s> add cy.Tags = stringArrayDup(cli.Tags)
cy.IDs = stringArrayDup(cli.IDs)
cy.BlockedServices = stringArrayDup(cli.BlockedServices)
cy.Upstreams = stringArrayDup(cli.Upstreams) </s> add setts.ClientTags = c.Tags
</s> add clients.allTags = make(map[string]bool)
for _, t := range clientTags {
clients.allTags[t] = false
}
</s> remove return d.matchHost(host, qtype)
</s> add return d.matchHost(host, qtype, setts.ClientTags) | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/clients_http.go |
keep add keep keep keep keep keep | <mask> }
<mask>
<mask> if !c.UseOwnSettings {
<mask> return
<mask> }
<mask>
<mask> setts.FilteringEnabled = c.FilteringEnabled
</s> + clients: support per-client tags </s> remove result, err = d.matchHost(host, qtype)
</s> add result, err = d.matchHost(host, qtype, setts.ClientTags) </s> add clients.allTags = make(map[string]bool)
for _, t := range clientTags {
clients.allTags[t] = false
}
</s> add for _, t := range cy.Tags {
if !clients.tagKnown(t) {
log.Debug("Clients: skipping unknown tag '%s'", t)
continue
}
cli.Tags = append(cli.Tags, t)
}
sort.Strings(cli.Tags)
</s> remove return clients.findByIP(ip)
</s> add c, ok := clients.findByIP(ip)
if !ok {
return Client{}, false
}
c.IDs = stringArrayDup(c.IDs)
c.Tags = stringArrayDup(c.Tags)
c.BlockedServices = stringArrayDup(c.BlockedServices)
c.Upstreams = stringArrayDup(c.Upstreams)
return c, true </s> add for _, t := range c.Tags {
if !clients.tagKnown(t) {
return fmt.Errorf("Invalid tag: %s", t)
}
}
sort.Strings(c.Tags)
</s> remove func (c *Client) check() error {
</s> add func (clients *clientsContainer) check(c *Client) error { | https://github.com/AdguardTeam/AdGuardHome/commit/91c271236605b3e4c22a1d673c25f91536223b7f | home/dns.go |
keep add keep keep keep keep | <mask> "path/filepath"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/dnsforward"
<mask> "gopkg.in/yaml.v2"
</s> Add DHCP API stubs for JS development. </s> add http.HandleFunc("/control/dhcp/status", optionalAuth(ensureGET(handleDHCPStatus)))
http.HandleFunc("/control/dhcp/set_config", optionalAuth(ensurePOST(handleDHCPSetConfig)))
http.HandleFunc("/control/dhcp/find_active_dhcp", optionalAuth(ensurePOST(handleDHCPFindActiveServer))) </s> add DHCP: dhcpState{dhcpConfig: dhcpConfig{
LeaseDuration: time.Hour * 12,
}}, </s> add DHCP dhcpState `yaml:"dhcp"` | https://github.com/AdguardTeam/AdGuardHome/commit/9294c9ecb2db05dab83b3e168df80c27be15f000 | config.go |
keep keep add keep keep keep keep keep | <mask> DNS dnsConfig `yaml:"dns"`
<mask> Filters []filter `yaml:"filters"`
<mask> UserRules []string `yaml:"user_rules"`
<mask>
<mask> sync.RWMutex `yaml:"-"`
<mask>
<mask> SchemaVersion int `yaml:"schema_version"` // keeping last so that users will be less tempted to change it -- used when upgrading between versions
<mask> }
</s> Add DHCP API stubs for JS development. </s> add http.HandleFunc("/control/dhcp/status", optionalAuth(ensureGET(handleDHCPStatus)))
http.HandleFunc("/control/dhcp/set_config", optionalAuth(ensurePOST(handleDHCPSetConfig)))
http.HandleFunc("/control/dhcp/find_active_dhcp", optionalAuth(ensurePOST(handleDHCPFindActiveServer))) </s> add DHCP: dhcpState{dhcpConfig: dhcpConfig{
LeaseDuration: time.Hour * 12,
}}, </s> add "time" | https://github.com/AdguardTeam/AdGuardHome/commit/9294c9ecb2db05dab83b3e168df80c27be15f000 | config.go |
keep keep keep add keep keep keep keep | <mask> {Filter: dnsfilter.Filter{ID: 2}, Enabled: false, URL: "https://adaway.org/hosts.txt", Name: "AdAway"},
<mask> {Filter: dnsfilter.Filter{ID: 3}, Enabled: false, URL: "https://hosts-file.net/ad_servers.txt", Name: "hpHosts - Ad and Tracking servers only"},
<mask> {Filter: dnsfilter.Filter{ID: 4}, Enabled: false, URL: "http://www.malwaredomainlist.com/hostslist/hosts.txt", Name: "MalwareDomainList.com Hosts List"},
<mask> },
<mask> SchemaVersion: currentSchemaVersion,
<mask> }
<mask>
<mask> // Loads configuration from the YAML file
</s> Add DHCP API stubs for JS development. </s> add http.HandleFunc("/control/dhcp/status", optionalAuth(ensureGET(handleDHCPStatus)))
http.HandleFunc("/control/dhcp/set_config", optionalAuth(ensurePOST(handleDHCPSetConfig)))
http.HandleFunc("/control/dhcp/find_active_dhcp", optionalAuth(ensurePOST(handleDHCPFindActiveServer))) </s> add DHCP dhcpState `yaml:"dhcp"` </s> add "time" | https://github.com/AdguardTeam/AdGuardHome/commit/9294c9ecb2db05dab83b3e168df80c27be15f000 | config.go |
keep keep add keep | <mask> http.HandleFunc("/control/safesearch/enable", optionalAuth(ensurePOST(handleSafeSearchEnable)))
<mask> http.HandleFunc("/control/safesearch/disable", optionalAuth(ensurePOST(handleSafeSearchDisable)))
<mask> http.HandleFunc("/control/safesearch/status", optionalAuth(ensureGET(handleSafeSearchStatus)))
<mask> }
</s> Add DHCP API stubs for JS development. </s> add DHCP dhcpState `yaml:"dhcp"` </s> add DHCP: dhcpState{dhcpConfig: dhcpConfig{
LeaseDuration: time.Hour * 12,
}}, </s> add "time" | https://github.com/AdguardTeam/AdGuardHome/commit/9294c9ecb2db05dab83b3e168df80c27be15f000 | control.go |
keep keep add keep keep keep keep keep keep | <mask> Object.values(DHCP_FORM_NAMES)
<mask> .forEach((formName) => dispatch(destroy(formName)));
<mask> dispatch(resetDhcp());
<mask> }
<mask> };
<mask>
<mask> const handleSubmit = (values) => {
<mask> dispatch(setDhcpConfig({
<mask> interface_name,
</s> Pull request: 3824 fix DHCP empty form validation
Closes #3824
Squashed commit of the following:
commit 24d5770e2f276f710c011bf94e36702881ccbf1a
Merge: 8f539900 32294407
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Nov 24 12:21:23 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 8f539900489c940c6d7068d672420a553a1da299
Merge: 4be77268 51f11d2f
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 19:06:44 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 4be77268ab1b3dc99b754b8002320a615db2d99e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 19:04:06 2021 +0300
all: use new consts
commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 18:58:03 2021 +0300
client: get status on reset
commit a20734cbf26a57ec96fdb6e0f868a8656751e80a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 18:31:59 2021 +0300
dhcpd: fix reset defaults
commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 17:33:22 2021 +0300
client: fix DHCP empty form validation </s> add if (!allValues.v4) {
return undefined;
}
</s> add const (
// DefaultDHCPLeaseTTL is the default time-to-live for leases.
DefaultDHCPLeaseTTL = uint32(timeutil.Day / time.Second)
// DefaultDHCPTimeoutICMP is the default timeout for waiting ICMP responses.
DefaultDHCPTimeoutICMP = 1000
)
</s> remove config.DHCP.Conf4.LeaseDuration = 86400
config.DHCP.Conf4.ICMPTimeout = 1000
config.DHCP.Conf6.LeaseDuration = 86400
</s> add config.DHCP.Conf4.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL
config.DHCP.Conf4.ICMPTimeout = dhcpd.DefaultDHCPTimeoutICMP
config.DHCP.Conf6.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL </s> remove v6conf := V6ServerConf{}
v6conf.notify = s.onNotify
</s> add v6conf := V6ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
notify: s.onNotify,
} </s> remove s.conf = ServerConfig{}
s.conf.WorkDir = oldconf.WorkDir
s.conf.HTTPRegister = oldconf.HTTPRegister
s.conf.ConfigModified = oldconf.ConfigModified
s.conf.DBFilePath = oldconf.DBFilePath
v4conf := V4ServerConf{}
v4conf.ICMPTimeout = 1000
v4conf.notify = s.onNotify
</s> add s.conf = ServerConfig{
WorkDir: oldconf.WorkDir,
HTTPRegister: oldconf.HTTPRegister,
ConfigModified: oldconf.ConfigModified,
DBFilePath: oldconf.DBFilePath,
}
v4conf := V4ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
ICMPTimeout: DefaultDHCPTimeoutICMP,
notify: s.onNotify,
} </s> add "github.com/AdguardTeam/golibs/timeutil" | https://github.com/AdguardTeam/AdGuardHome/commit/936a7057fd17809bb3c8e49ec590abd48a12c0b3 | client/src/components/Settings/Dhcp/index.js |
keep keep add keep keep keep keep keep | <mask> * @param allValues
<mask> */
<mask> export const validateNotInRange = (value, allValues) => {
<mask> const { range_start, range_end } = allValues.v4;
<mask>
<mask> if (range_start && validateIpv4(range_start)) {
<mask> return 'form_error_ip4_range_start_format';
<mask> }
</s> Pull request: 3824 fix DHCP empty form validation
Closes #3824
Squashed commit of the following:
commit 24d5770e2f276f710c011bf94e36702881ccbf1a
Merge: 8f539900 32294407
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Nov 24 12:21:23 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 8f539900489c940c6d7068d672420a553a1da299
Merge: 4be77268 51f11d2f
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 19:06:44 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 4be77268ab1b3dc99b754b8002320a615db2d99e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 19:04:06 2021 +0300
all: use new consts
commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 18:58:03 2021 +0300
client: get status on reset
commit a20734cbf26a57ec96fdb6e0f868a8656751e80a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 18:31:59 2021 +0300
dhcpd: fix reset defaults
commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 17:33:22 2021 +0300
client: fix DHCP empty form validation </s> add dispatch(getDhcpStatus()); </s> remove config.DHCP.Conf4.LeaseDuration = 86400
config.DHCP.Conf4.ICMPTimeout = 1000
config.DHCP.Conf6.LeaseDuration = 86400
</s> add config.DHCP.Conf4.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL
config.DHCP.Conf4.ICMPTimeout = dhcpd.DefaultDHCPTimeoutICMP
config.DHCP.Conf6.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL </s> add const (
// DefaultDHCPLeaseTTL is the default time-to-live for leases.
DefaultDHCPLeaseTTL = uint32(timeutil.Day / time.Second)
// DefaultDHCPTimeoutICMP is the default timeout for waiting ICMP responses.
DefaultDHCPTimeoutICMP = 1000
)
</s> remove v6conf := V6ServerConf{}
v6conf.notify = s.onNotify
</s> add v6conf := V6ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
notify: s.onNotify,
} </s> remove s.conf = ServerConfig{}
s.conf.WorkDir = oldconf.WorkDir
s.conf.HTTPRegister = oldconf.HTTPRegister
s.conf.ConfigModified = oldconf.ConfigModified
s.conf.DBFilePath = oldconf.DBFilePath
v4conf := V4ServerConf{}
v4conf.ICMPTimeout = 1000
v4conf.notify = s.onNotify
</s> add s.conf = ServerConfig{
WorkDir: oldconf.WorkDir,
HTTPRegister: oldconf.HTTPRegister,
ConfigModified: oldconf.ConfigModified,
DBFilePath: oldconf.DBFilePath,
}
v4conf := V4ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
ICMPTimeout: DefaultDHCPTimeoutICMP,
notify: s.onNotify,
} </s> add "github.com/AdguardTeam/golibs/timeutil" | https://github.com/AdguardTeam/AdGuardHome/commit/936a7057fd17809bb3c8e49ec590abd48a12c0b3 | client/src/helpers/validators.js |
keep add keep keep keep keep | <mask> "os"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
</s> Pull request: 3824 fix DHCP empty form validation
Closes #3824
Squashed commit of the following:
commit 24d5770e2f276f710c011bf94e36702881ccbf1a
Merge: 8f539900 32294407
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Nov 24 12:21:23 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 8f539900489c940c6d7068d672420a553a1da299
Merge: 4be77268 51f11d2f
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 19:06:44 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 4be77268ab1b3dc99b754b8002320a615db2d99e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 19:04:06 2021 +0300
all: use new consts
commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 18:58:03 2021 +0300
client: get status on reset
commit a20734cbf26a57ec96fdb6e0f868a8656751e80a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 18:31:59 2021 +0300
dhcpd: fix reset defaults
commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 17:33:22 2021 +0300
client: fix DHCP empty form validation </s> add "github.com/AdguardTeam/golibs/timeutil" </s> remove config.DHCP.Conf4.LeaseDuration = 86400
config.DHCP.Conf4.ICMPTimeout = 1000
config.DHCP.Conf6.LeaseDuration = 86400
</s> add config.DHCP.Conf4.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL
config.DHCP.Conf4.ICMPTimeout = dhcpd.DefaultDHCPTimeoutICMP
config.DHCP.Conf6.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL </s> remove v6conf := V6ServerConf{}
v6conf.notify = s.onNotify
</s> add v6conf := V6ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
notify: s.onNotify,
} </s> remove s.conf = ServerConfig{}
s.conf.WorkDir = oldconf.WorkDir
s.conf.HTTPRegister = oldconf.HTTPRegister
s.conf.ConfigModified = oldconf.ConfigModified
s.conf.DBFilePath = oldconf.DBFilePath
v4conf := V4ServerConf{}
v4conf.ICMPTimeout = 1000
v4conf.notify = s.onNotify
</s> add s.conf = ServerConfig{
WorkDir: oldconf.WorkDir,
HTTPRegister: oldconf.HTTPRegister,
ConfigModified: oldconf.ConfigModified,
DBFilePath: oldconf.DBFilePath,
}
v4conf := V4ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
ICMPTimeout: DefaultDHCPTimeoutICMP,
notify: s.onNotify,
} </s> add const (
// DefaultDHCPLeaseTTL is the default time-to-live for leases.
DefaultDHCPLeaseTTL = uint32(timeutil.Day / time.Second)
// DefaultDHCPTimeoutICMP is the default timeout for waiting ICMP responses.
DefaultDHCPTimeoutICMP = 1000
)
</s> add if (!allValues.v4) {
return undefined;
}
| https://github.com/AdguardTeam/AdGuardHome/commit/936a7057fd17809bb3c8e49ec590abd48a12c0b3 | internal/dhcpd/http.go |
keep keep add keep keep keep keep | <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> func httpError(r *http.Request, w http.ResponseWriter, code int, format string, args ...interface{}) {
<mask> text := fmt.Sprintf(format, args...)
</s> Pull request: 3824 fix DHCP empty form validation
Closes #3824
Squashed commit of the following:
commit 24d5770e2f276f710c011bf94e36702881ccbf1a
Merge: 8f539900 32294407
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Nov 24 12:21:23 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 8f539900489c940c6d7068d672420a553a1da299
Merge: 4be77268 51f11d2f
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 19:06:44 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 4be77268ab1b3dc99b754b8002320a615db2d99e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 19:04:06 2021 +0300
all: use new consts
commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 18:58:03 2021 +0300
client: get status on reset
commit a20734cbf26a57ec96fdb6e0f868a8656751e80a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 18:31:59 2021 +0300
dhcpd: fix reset defaults
commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 17:33:22 2021 +0300
client: fix DHCP empty form validation </s> add "time" </s> add const (
// DefaultDHCPLeaseTTL is the default time-to-live for leases.
DefaultDHCPLeaseTTL = uint32(timeutil.Day / time.Second)
// DefaultDHCPTimeoutICMP is the default timeout for waiting ICMP responses.
DefaultDHCPTimeoutICMP = 1000
)
</s> add if (!allValues.v4) {
return undefined;
}
</s> remove config.DHCP.Conf4.LeaseDuration = 86400
config.DHCP.Conf4.ICMPTimeout = 1000
config.DHCP.Conf6.LeaseDuration = 86400
</s> add config.DHCP.Conf4.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL
config.DHCP.Conf4.ICMPTimeout = dhcpd.DefaultDHCPTimeoutICMP
config.DHCP.Conf6.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL </s> remove s.conf = ServerConfig{}
s.conf.WorkDir = oldconf.WorkDir
s.conf.HTTPRegister = oldconf.HTTPRegister
s.conf.ConfigModified = oldconf.ConfigModified
s.conf.DBFilePath = oldconf.DBFilePath
v4conf := V4ServerConf{}
v4conf.ICMPTimeout = 1000
v4conf.notify = s.onNotify
</s> add s.conf = ServerConfig{
WorkDir: oldconf.WorkDir,
HTTPRegister: oldconf.HTTPRegister,
ConfigModified: oldconf.ConfigModified,
DBFilePath: oldconf.DBFilePath,
}
v4conf := V4ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
ICMPTimeout: DefaultDHCPTimeoutICMP,
notify: s.onNotify,
} </s> remove v6conf := V6ServerConf{}
v6conf.notify = s.onNotify
</s> add v6conf := V6ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
notify: s.onNotify,
} | https://github.com/AdguardTeam/AdGuardHome/commit/936a7057fd17809bb3c8e49ec590abd48a12c0b3 | internal/dhcpd/http.go |
keep keep keep add keep keep keep keep | <mask> return
<mask> }
<mask> }
<mask>
<mask> func (s *Server) handleReset(w http.ResponseWriter, r *http.Request) {
<mask> err := s.Stop()
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "stopping dhcp: %s", err)
</s> Pull request: 3824 fix DHCP empty form validation
Closes #3824
Squashed commit of the following:
commit 24d5770e2f276f710c011bf94e36702881ccbf1a
Merge: 8f539900 32294407
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Nov 24 12:21:23 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 8f539900489c940c6d7068d672420a553a1da299
Merge: 4be77268 51f11d2f
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 19:06:44 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 4be77268ab1b3dc99b754b8002320a615db2d99e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 19:04:06 2021 +0300
all: use new consts
commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 18:58:03 2021 +0300
client: get status on reset
commit a20734cbf26a57ec96fdb6e0f868a8656751e80a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 18:31:59 2021 +0300
dhcpd: fix reset defaults
commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 17:33:22 2021 +0300
client: fix DHCP empty form validation </s> add if (!allValues.v4) {
return undefined;
}
</s> add "github.com/AdguardTeam/golibs/timeutil" </s> remove s.conf = ServerConfig{}
s.conf.WorkDir = oldconf.WorkDir
s.conf.HTTPRegister = oldconf.HTTPRegister
s.conf.ConfigModified = oldconf.ConfigModified
s.conf.DBFilePath = oldconf.DBFilePath
v4conf := V4ServerConf{}
v4conf.ICMPTimeout = 1000
v4conf.notify = s.onNotify
</s> add s.conf = ServerConfig{
WorkDir: oldconf.WorkDir,
HTTPRegister: oldconf.HTTPRegister,
ConfigModified: oldconf.ConfigModified,
DBFilePath: oldconf.DBFilePath,
}
v4conf := V4ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
ICMPTimeout: DefaultDHCPTimeoutICMP,
notify: s.onNotify,
} </s> remove config.DHCP.Conf4.LeaseDuration = 86400
config.DHCP.Conf4.ICMPTimeout = 1000
config.DHCP.Conf6.LeaseDuration = 86400
</s> add config.DHCP.Conf4.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL
config.DHCP.Conf4.ICMPTimeout = dhcpd.DefaultDHCPTimeoutICMP
config.DHCP.Conf6.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL </s> add dispatch(getDhcpStatus()); </s> remove v6conf := V6ServerConf{}
v6conf.notify = s.onNotify
</s> add v6conf := V6ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
notify: s.onNotify,
} | https://github.com/AdguardTeam/AdGuardHome/commit/936a7057fd17809bb3c8e49ec590abd48a12c0b3 | internal/dhcpd/http.go |
keep replace replace replace replace replace replace replace replace replace keep keep replace replace keep keep | <mask> oldconf := s.conf
<mask> s.conf = ServerConfig{}
<mask> s.conf.WorkDir = oldconf.WorkDir
<mask> s.conf.HTTPRegister = oldconf.HTTPRegister
<mask> s.conf.ConfigModified = oldconf.ConfigModified
<mask> s.conf.DBFilePath = oldconf.DBFilePath
<mask>
<mask> v4conf := V4ServerConf{}
<mask> v4conf.ICMPTimeout = 1000
<mask> v4conf.notify = s.onNotify
<mask> s.srv4, _ = v4Create(v4conf)
<mask>
<mask> v6conf := V6ServerConf{}
<mask> v6conf.notify = s.onNotify
<mask> s.srv6, _ = v6Create(v6conf)
<mask>
</s> Pull request: 3824 fix DHCP empty form validation
Closes #3824
Squashed commit of the following:
commit 24d5770e2f276f710c011bf94e36702881ccbf1a
Merge: 8f539900 32294407
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Nov 24 12:21:23 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 8f539900489c940c6d7068d672420a553a1da299
Merge: 4be77268 51f11d2f
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 19:06:44 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 4be77268ab1b3dc99b754b8002320a615db2d99e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 19:04:06 2021 +0300
all: use new consts
commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 18:58:03 2021 +0300
client: get status on reset
commit a20734cbf26a57ec96fdb6e0f868a8656751e80a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 18:31:59 2021 +0300
dhcpd: fix reset defaults
commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 17:33:22 2021 +0300
client: fix DHCP empty form validation </s> remove config.DHCP.Conf4.LeaseDuration = 86400
config.DHCP.Conf4.ICMPTimeout = 1000
config.DHCP.Conf6.LeaseDuration = 86400
</s> add config.DHCP.Conf4.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL
config.DHCP.Conf4.ICMPTimeout = dhcpd.DefaultDHCPTimeoutICMP
config.DHCP.Conf6.LeaseDuration = dhcpd.DefaultDHCPLeaseTTL </s> add if (!allValues.v4) {
return undefined;
}
</s> add const (
// DefaultDHCPLeaseTTL is the default time-to-live for leases.
DefaultDHCPLeaseTTL = uint32(timeutil.Day / time.Second)
// DefaultDHCPTimeoutICMP is the default timeout for waiting ICMP responses.
DefaultDHCPTimeoutICMP = 1000
)
</s> add dispatch(getDhcpStatus()); </s> add "github.com/AdguardTeam/golibs/timeutil" | https://github.com/AdguardTeam/AdGuardHome/commit/936a7057fd17809bb3c8e49ec590abd48a12c0b3 | internal/dhcpd/http.go |
keep keep keep keep replace replace replace keep keep keep keep keep | <mask> config.DNS.DnsfilterConf.ParentalCacheSize = 1 * 1024 * 1024
<mask> config.DNS.DnsfilterConf.CacheTime = 30
<mask> config.Filters = defaultFilters()
<mask>
<mask> config.DHCP.Conf4.LeaseDuration = 86400
<mask> config.DHCP.Conf4.ICMPTimeout = 1000
<mask> config.DHCP.Conf6.LeaseDuration = 86400
<mask>
<mask> if ch := version.Channel(); ch == version.ChannelEdge || ch == version.ChannelDevelopment {
<mask> config.BetaBindPort = 3001
<mask> }
<mask> }
</s> Pull request: 3824 fix DHCP empty form validation
Closes #3824
Squashed commit of the following:
commit 24d5770e2f276f710c011bf94e36702881ccbf1a
Merge: 8f539900 32294407
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Nov 24 12:21:23 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 8f539900489c940c6d7068d672420a553a1da299
Merge: 4be77268 51f11d2f
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 19:06:44 2021 +0300
Merge branch 'master' into 3824-empty-values
commit 4be77268ab1b3dc99b754b8002320a615db2d99e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 19:04:06 2021 +0300
all: use new consts
commit 701fd9a2b82d69c6b813a4a1889c65404ac3571b
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 18:58:03 2021 +0300
client: get status on reset
commit a20734cbf26a57ec96fdb6e0f868a8656751e80a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Nov 23 18:31:59 2021 +0300
dhcpd: fix reset defaults
commit e2cb0cb0995e7b2dd3e194c5bb9fe944cf7be8f5
Author: Ildar Kamalov <ik@adguard.com>
Date: Tue Nov 23 17:33:22 2021 +0300
client: fix DHCP empty form validation </s> add if (!allValues.v4) {
return undefined;
}
</s> remove s.conf = ServerConfig{}
s.conf.WorkDir = oldconf.WorkDir
s.conf.HTTPRegister = oldconf.HTTPRegister
s.conf.ConfigModified = oldconf.ConfigModified
s.conf.DBFilePath = oldconf.DBFilePath
v4conf := V4ServerConf{}
v4conf.ICMPTimeout = 1000
v4conf.notify = s.onNotify
</s> add s.conf = ServerConfig{
WorkDir: oldconf.WorkDir,
HTTPRegister: oldconf.HTTPRegister,
ConfigModified: oldconf.ConfigModified,
DBFilePath: oldconf.DBFilePath,
}
v4conf := V4ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
ICMPTimeout: DefaultDHCPTimeoutICMP,
notify: s.onNotify,
} </s> remove v6conf := V6ServerConf{}
v6conf.notify = s.onNotify
</s> add v6conf := V6ServerConf{
LeaseDuration: DefaultDHCPLeaseTTL,
notify: s.onNotify,
} </s> add const (
// DefaultDHCPLeaseTTL is the default time-to-live for leases.
DefaultDHCPLeaseTTL = uint32(timeutil.Day / time.Second)
// DefaultDHCPTimeoutICMP is the default timeout for waiting ICMP responses.
DefaultDHCPTimeoutICMP = 1000
)
</s> add dispatch(getDhcpStatus()); </s> add "github.com/AdguardTeam/golibs/timeutil" | https://github.com/AdguardTeam/AdGuardHome/commit/936a7057fd17809bb3c8e49ec590abd48a12c0b3 | internal/home/config.go |
keep keep keep keep replace keep keep keep keep keep keep keep keep replace replace | <mask>
<mask> type clientSource uint
<mask>
<mask> const (
<mask> // Priority: etc/hosts > ARP > rDNS
<mask> ClientSourceRDNS clientSource = 0 // from rDNS
<mask> ClientSourceARP clientSource = 1 // from 'arp -a'
<mask> ClientSourceHostsFile clientSource = 2 // from /etc/hosts
<mask> )
<mask>
<mask> const (
<mask> // Priority: etc/hosts > ARP > rDNS
<mask> ClientSourceRDNS clientSource = 0 // from rDNS
<mask> ClientSourceARP clientSource = 1 // from 'arp -a'
<mask> ClientSourceHostsFile clientSource = 2 // from /etc/hosts
</s> + clients: runtime list: add clients from DHCP that have non-empty Hostname property </s> add // add clients from DHCP that have non-empty Hostname property
func (clients *clientsContainer) addFromDHCP() {
leases := config.dhcpServer.Leases()
for _, l := range leases {
if len(l.Hostname) == 0 {
continue
}
config.clients.AddHost(l.IP.String(), l.Hostname, ClientSourceDHCP)
}
}
</s> add case ClientSourceDHCP:
cj.Source = "DHCP" </s> add clients.addFromDHCP() | https://github.com/AdguardTeam/AdGuardHome/commit/93babd3e1c6a63d7434aa521d53098093d2eceda | home/clients.go |
keep keep keep add keep keep keep keep | <mask> func (clients *clientsContainer) periodicUpdate() {
<mask> for {
<mask> clients.addFromHostsFile()
<mask> clients.addFromSystemARP()
<mask> time.Sleep(clientsUpdatePeriod)
<mask> }
<mask> }
<mask>
</s> + clients: runtime list: add clients from DHCP that have non-empty Hostname property </s> add // add clients from DHCP that have non-empty Hostname property
func (clients *clientsContainer) addFromDHCP() {
leases := config.dhcpServer.Leases()
for _, l := range leases {
if len(l.Hostname) == 0 {
continue
}
config.clients.AddHost(l.IP.String(), l.Hostname, ClientSourceDHCP)
}
}
</s> add case ClientSourceDHCP:
cj.Source = "DHCP" </s> remove ClientSourceARP clientSource = 1 // from 'arp -a'
ClientSourceHostsFile clientSource = 2 // from /etc/hosts
</s> add ClientSourceDHCP clientSource = 1 // from DHCP
ClientSourceARP clientSource = 2 // from 'arp -a'
ClientSourceHostsFile clientSource = 3 // from /etc/hosts </s> remove // Priority: etc/hosts > ARP > rDNS
</s> add // Priority: etc/hosts > DHCP > ARP > rDNS | https://github.com/AdguardTeam/AdGuardHome/commit/93babd3e1c6a63d7434aa521d53098093d2eceda | home/clients.go |
keep keep keep add keep keep keep keep keep keep | <mask>
<mask> log.Info("Added %d client aliases from 'arp -a' command output", n)
<mask> }
<mask>
<mask> type clientHostJSON struct {
<mask> IP string `json:"ip"`
<mask> Name string `json:"name"`
<mask> Source string `json:"source"`
<mask> }
<mask>
</s> + clients: runtime list: add clients from DHCP that have non-empty Hostname property </s> remove ClientSourceARP clientSource = 1 // from 'arp -a'
ClientSourceHostsFile clientSource = 2 // from /etc/hosts
</s> add ClientSourceDHCP clientSource = 1 // from DHCP
ClientSourceARP clientSource = 2 // from 'arp -a'
ClientSourceHostsFile clientSource = 3 // from /etc/hosts </s> add clients.addFromDHCP() </s> remove // Priority: etc/hosts > ARP > rDNS
</s> add // Priority: etc/hosts > DHCP > ARP > rDNS </s> add case ClientSourceDHCP:
cj.Source = "DHCP" | https://github.com/AdguardTeam/AdGuardHome/commit/93babd3e1c6a63d7434aa521d53098093d2eceda | home/clients.go |
keep keep add keep keep keep keep keep keep | <mask> }
<mask> cj.Source = "etc/hosts"
<mask> switch ch.Source {
<mask> case ClientSourceRDNS:
<mask> cj.Source = "rDNS"
<mask> case ClientSourceARP:
<mask> cj.Source = "ARP"
<mask> }
<mask> data.AutoClients = append(data.AutoClients, cj)
</s> + clients: runtime list: add clients from DHCP that have non-empty Hostname property </s> remove ClientSourceARP clientSource = 1 // from 'arp -a'
ClientSourceHostsFile clientSource = 2 // from /etc/hosts
</s> add ClientSourceDHCP clientSource = 1 // from DHCP
ClientSourceARP clientSource = 2 // from 'arp -a'
ClientSourceHostsFile clientSource = 3 // from /etc/hosts </s> remove // Priority: etc/hosts > ARP > rDNS
</s> add // Priority: etc/hosts > DHCP > ARP > rDNS </s> add clients.addFromDHCP() </s> add // add clients from DHCP that have non-empty Hostname property
func (clients *clientsContainer) addFromDHCP() {
leases := config.dhcpServer.Leases()
for _, l := range leases {
if len(l.Hostname) == 0 {
continue
}
config.clients.AddHost(l.IP.String(), l.Hostname, ClientSourceDHCP)
}
}
| https://github.com/AdguardTeam/AdGuardHome/commit/93babd3e1c6a63d7434aa521d53098093d2eceda | home/clients.go |
keep keep keep keep replace keep keep keep keep keep | <mask> 'name': 'AdGuard Home - Build and publish release'
<mask> # Make sure to sync any changes with the branch overrides below.
<mask> 'variables':
<mask> 'channel': 'edge'
<mask> 'dockerGo': 'adguard/golang-ubuntu:6.5'
<mask>
<mask> 'stages':
<mask> - 'Build frontend':
<mask> 'manual': false
<mask> 'final': false
</s> Pull request 1851: upd-golang-ubuntu-2
Merge in DNS/adguard-home from upd-golang-ubuntu-2 to master
Squashed commit of the following:
commit 9fdd86a0d352cd3a046bca19d6acf0f549adfc53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon May 22 17:36:06 2023 +0300
all: upd golang-ubuntu again </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' | https://github.com/AdguardTeam/AdGuardHome/commit/941eb1dd73513d76f1b8db8413f2f0309c71c4eb | bamboo-specs/release.yaml |
keep keep keep keep replace keep keep keep keep keep | <mask> # Set the default release channel on the release branch to beta, as we may
<mask> # need to build a few of these.
<mask> 'variables':
<mask> 'channel': 'beta'
<mask> 'dockerGo': 'adguard/golang-ubuntu:6.5'
<mask> # release-vX.Y.Z branches are the branches from which the actual final release
<mask> # is built.
<mask> - '^release-v[0-9]+\.[0-9]+\.[0-9]+':
<mask> # Disable integration branches for release branches.
<mask> 'branch-config':
</s> Pull request 1851: upd-golang-ubuntu-2
Merge in DNS/adguard-home from upd-golang-ubuntu-2 to master
Squashed commit of the following:
commit 9fdd86a0d352cd3a046bca19d6acf0f549adfc53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon May 22 17:36:06 2023 +0300
all: upd golang-ubuntu again </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' | https://github.com/AdguardTeam/AdGuardHome/commit/941eb1dd73513d76f1b8db8413f2f0309c71c4eb | bamboo-specs/release.yaml |
keep keep keep keep replace | <mask> # Set the default release channel on the final branch to release, as these
<mask> # are the ones that actually get released.
<mask> 'variables':
<mask> 'channel': 'release'
<mask> 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> Pull request 1851: upd-golang-ubuntu-2
Merge in DNS/adguard-home from upd-golang-ubuntu-2 to master
Squashed commit of the following:
commit 9fdd86a0d352cd3a046bca19d6acf0f549adfc53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon May 22 17:36:06 2023 +0300
all: upd golang-ubuntu again </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' | https://github.com/AdguardTeam/AdGuardHome/commit/941eb1dd73513d76f1b8db8413f2f0309c71c4eb | bamboo-specs/release.yaml |
keep keep keep keep replace keep keep keep keep keep | <mask> 'project-key': 'AGH'
<mask> 'key': 'AHBRTSPECS'
<mask> 'name': 'AdGuard Home - Build and run tests'
<mask> 'variables':
<mask> 'dockerGo': 'adguard/golang-ubuntu:6.5'
<mask>
<mask> 'stages':
<mask> - 'Tests':
<mask> 'manual': false
<mask> 'final': false
</s> Pull request 1851: upd-golang-ubuntu-2
Merge in DNS/adguard-home from upd-golang-ubuntu-2 to master
Squashed commit of the following:
commit 9fdd86a0d352cd3a046bca19d6acf0f549adfc53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon May 22 17:36:06 2023 +0300
all: upd golang-ubuntu again </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' </s> remove 'dockerGo': 'adguard/golang-ubuntu:6.5'
</s> add 'dockerGo': 'adguard/golang-ubuntu:6.6' | https://github.com/AdguardTeam/AdGuardHome/commit/941eb1dd73513d76f1b8db8413f2f0309c71c4eb | bamboo-specs/test.yaml |
keep add keep keep keep keep keep keep | <mask>
<mask> // use dnsfilter before cache -- changed settings or filters would require cache invalidation otherwise
<mask> res, err := s.filterDNSRequest(d)
<mask> s.RUnlock()
<mask> if err != nil {
<mask> return err
<mask> }
<mask>
</s> - dnsforward: don't use dnsfilter object after it's closed </s> add s.RUnlock() </s> remove if host != origHost {
log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host)
}
</s> add </s> remove if !protectionEnabled {
</s> add if !s.conf.ProtectionEnabled { </s> remove s.RUnlock()
</s> add </s> remove s.RLock()
protectionEnabled := s.conf.ProtectionEnabled
</s> add </s> remove origHost := host
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/94552a30d7080c8471f7fca370a5905c6c420272 | dnsforward/dnsforward.go |
keep add keep keep keep keep | <mask> // (to prevent from hanging while waiting for unresponsive DNS server to respond).
<mask> res, err := s.filterDNSRequest(d)
<mask> if err != nil {
<mask> return err
<mask> }
<mask>
</s> - dnsforward: don't use dnsfilter object after it's closed </s> add s.RLock()
// Synchronize access to s.dnsFilter so it won't be suddenly uninitialized while in use.
// This could happen after proxy server has been stopped, but its workers are not yet exited.
//
// A better approach is for proxy.Stop() to wait until all its workers exit,
// but this would require the Upstream interface to have Close() function
// (to prevent from hanging while waiting for unresponsive DNS server to respond). </s> remove if host != origHost {
log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host)
}
</s> add </s> remove if !protectionEnabled {
</s> add if !s.conf.ProtectionEnabled { </s> remove s.RUnlock()
</s> add </s> remove s.RLock()
protectionEnabled := s.conf.ProtectionEnabled
</s> add </s> remove origHost := host
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/94552a30d7080c8471f7fca370a5905c6c420272 | dnsforward/dnsforward.go |
keep keep keep keep replace keep replace replace keep keep keep | <mask> func (s *Server) filterDNSRequest(d *proxy.DNSContext) (*dnsfilter.Result, error) {
<mask> var res dnsfilter.Result
<mask> req := d.Req
<mask> host := strings.TrimSuffix(req.Question[0].Name, ".")
<mask> origHost := host
<mask>
<mask> s.RLock()
<mask> protectionEnabled := s.conf.ProtectionEnabled
<mask> dnsFilter := s.dnsFilter
<mask> s.RUnlock()
<mask>
</s> - dnsforward: don't use dnsfilter object after it's closed </s> remove s.RUnlock()
</s> add </s> remove if !protectionEnabled {
</s> add if !s.conf.ProtectionEnabled { </s> remove if host != origHost {
log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host)
}
</s> add </s> add s.RUnlock() </s> add s.RLock()
// Synchronize access to s.dnsFilter so it won't be suddenly uninitialized while in use.
// This could happen after proxy server has been stopped, but its workers are not yet exited.
//
// A better approach is for proxy.Stop() to wait until all its workers exit,
// but this would require the Upstream interface to have Close() function
// (to prevent from hanging while waiting for unresponsive DNS server to respond). | https://github.com/AdguardTeam/AdGuardHome/commit/94552a30d7080c8471f7fca370a5905c6c420272 | dnsforward/dnsforward.go |
keep replace keep replace keep keep keep keep | <mask> dnsFilter := s.dnsFilter
<mask> s.RUnlock()
<mask>
<mask> if !protectionEnabled {
<mask> return &dnsfilter.Result{}, nil
<mask> }
<mask>
<mask> if host != origHost {
</s> - dnsforward: don't use dnsfilter object after it's closed </s> remove s.RLock()
protectionEnabled := s.conf.ProtectionEnabled
</s> add </s> remove if host != origHost {
log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host)
}
</s> add </s> add s.RUnlock() </s> remove origHost := host
</s> add </s> add s.RLock()
// Synchronize access to s.dnsFilter so it won't be suddenly uninitialized while in use.
// This could happen after proxy server has been stopped, but its workers are not yet exited.
//
// A better approach is for proxy.Stop() to wait until all its workers exit,
// but this would require the Upstream interface to have Close() function
// (to prevent from hanging while waiting for unresponsive DNS server to respond). | https://github.com/AdguardTeam/AdGuardHome/commit/94552a30d7080c8471f7fca370a5905c6c420272 | dnsforward/dnsforward.go |
keep keep keep keep replace replace replace replace keep keep keep keep keep | <mask> if !protectionEnabled {
<mask> return &dnsfilter.Result{}, nil
<mask> }
<mask>
<mask> if host != origHost {
<mask> log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host)
<mask> }
<mask>
<mask> var err error
<mask>
<mask> clientAddr := ""
<mask> if d.Addr != nil {
<mask> clientAddr, _, _ = net.SplitHostPort(d.Addr.String())
</s> - dnsforward: don't use dnsfilter object after it's closed </s> remove if !protectionEnabled {
</s> add if !s.conf.ProtectionEnabled { </s> remove s.RUnlock()
</s> add </s> add s.RUnlock() </s> remove s.RLock()
protectionEnabled := s.conf.ProtectionEnabled
</s> add </s> remove origHost := host
</s> add </s> add s.RLock()
// Synchronize access to s.dnsFilter so it won't be suddenly uninitialized while in use.
// This could happen after proxy server has been stopped, but its workers are not yet exited.
//
// A better approach is for proxy.Stop() to wait until all its workers exit,
// but this would require the Upstream interface to have Close() function
// (to prevent from hanging while waiting for unresponsive DNS server to respond). | https://github.com/AdguardTeam/AdGuardHome/commit/94552a30d7080c8471f7fca370a5905c6c420272 | dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask> @echo Running go linter
<mask> golangci-lint run
<mask>
<mask> test:
<mask> @echo Running unit-tests
<mask> go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
<mask>
<mask> ci: dependencies client test
<mask>
<mask> dependencies:
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add </s> add console.error(e); </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove * @param cidr {array} ipaddr.js CIDR array
</s> add * @param parsedCidr {array} ipaddr.js CIDR array | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | Makefile |
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask> netname: 'network',
<mask> descr: '',
<mask> };
<mask>
<mask> export const DNS_RECORD_TYPES = [
<mask> 'A',
<mask> 'AAAA',
<mask> 'AFSDB',
<mask> 'APL',
<mask> 'CAA',
<mask> 'CDNSKEY',
<mask> 'CDS',
<mask> 'CERT',
<mask> 'CNAME',
<mask> 'CSYNC',
<mask> 'DHCID',
<mask> 'DLV',
<mask> 'DNAME',
<mask> 'DNSKEY',
<mask> 'DS',
<mask> 'HIP',
<mask> 'IPSECKEY',
<mask> 'KEY',
<mask> 'KX',
<mask> 'LOC',
<mask> 'MX',
<mask> 'NAPTR',
<mask> 'NS',
<mask> 'NSEC',
<mask> 'NSEC3',
<mask> 'NSEC3PARAM',
<mask> 'OPENPGPKEY',
<mask> 'PTR',
<mask> 'RRSIG',
<mask> 'RP',
<mask> 'SIG',
<mask> 'SMIMEA',
<mask> 'SOA',
<mask> 'SRV',
<mask> 'SSHFP',
<mask> 'TA',
<mask> 'TKEY',
<mask> 'TLSA',
<mask> 'TSIG',
<mask> 'TXT',
<mask> 'URI',
<mask> ];
<mask>
<mask> export const DEFAULT_LOGS_FILTER = {
<mask> search: '',
<mask> response_status: '',
<mask> };
<mask>
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
</s> add </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add </s> remove /**
* @param date {string}
* @returns {boolean}
*/
export const isToday = (date) => isSameDay(new Date(date), new Date());
</s> add </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> add * @param options {string} </s> remove * @param cidr {array} ipaddr.js CIDR array
</s> add * @param parsedCidr {array} ipaddr.js CIDR array | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/constants.js |
keep keep keep keep replace keep keep keep keep keep | <mask> import subHours from 'date-fns/sub_hours';
<mask> import addHours from 'date-fns/add_hours';
<mask> import addDays from 'date-fns/add_days';
<mask> import subDays from 'date-fns/sub_days';
<mask> import isSameDay from 'date-fns/is_same_day';
<mask> import round from 'lodash/round';
<mask> import axios from 'axios';
<mask> import i18n from 'i18next';
<mask> import uniqBy from 'lodash/uniqBy';
<mask> import ipaddr from 'ipaddr.js';
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> add console.error(e); </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove * @param cidr {array} ipaddr.js CIDR array
</s> add * @param parsedCidr {array} ipaddr.js CIDR array </s> remove export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep keep keep keep replace keep keep keep keep keep | <mask> DEFAULT_DATE_FORMAT_OPTIONS,
<mask> DEFAULT_LANGUAGE,
<mask> DEFAULT_TIME_FORMAT,
<mask> DETAILED_DATE_FORMAT_OPTIONS,
<mask> DNS_RECORD_TYPES,
<mask> FILTERED,
<mask> FILTERED_STATUS,
<mask> IP_MATCH_LIST_STATUS,
<mask> STANDARD_DNS_PORT,
<mask> STANDARD_HTTPS_PORT,
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove /**
* @param date {string}
* @returns {boolean}
*/
export const isToday = (date) => isSameDay(new Date(date), new Date());
</s> add </s> add console.error(e); </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove * @param cidr {array} ipaddr.js CIDR array
</s> add * @param parsedCidr {array} ipaddr.js CIDR array | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep keep add keep keep keep keep keep | <mask>
<mask> /**
<mask> * @param time {string} The time to format
<mask> * @returns {string} Returns the time in the format HH:mm:ss
<mask> */
<mask> export const formatTime = (time, options = DEFAULT_TIME_FORMAT) => {
<mask> const parsedTime = dateParse(time);
<mask> return dateFormat(parsedTime, options);
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove /**
* @param date {string}
* @returns {boolean}
*/
export const isToday = (date) => isSameDay(new Date(date), new Date());
</s> add </s> remove * @param cidr {array} ipaddr.js CIDR array
</s> add * @param parsedCidr {array} ipaddr.js CIDR array </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add </s> remove export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep | <mask> export const formatDetailedDateTime = (dateTime) => formatDateTime(
<mask> dateTime, DETAILED_DATE_FORMAT_OPTIONS,
<mask> );
<mask>
<mask> /**
<mask> * @param date {string}
<mask> * @returns {boolean}
<mask> */
<mask> export const isToday = (date) => isSameDay(new Date(date), new Date());
<mask>
<mask> export const normalizeLogs = (logs) => logs.map((log) => {
<mask> const {
<mask> answer,
<mask> answer_dnssec,
<mask> client,
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> add * @param options {string} </s> remove * @param cidr {array} ipaddr.js CIDR array
</s> add * @param parsedCidr {array} ipaddr.js CIDR array </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
</s> add </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask> configured: {},
<mask> },
<mask> );
<mask>
<mask> export const getClientInfo = (clients, ip) => {
<mask> const client = clients
<mask> .find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
<mask>
<mask> if (!client) {
<mask> return '';
<mask> }
<mask>
<mask> const { name, whois_info } = client;
<mask> const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
<mask>
<mask> return {
<mask> name,
<mask> whois,
<mask> };
<mask> };
<mask>
<mask> export const getAutoClientInfo = (clients, ip) => {
<mask> const client = clients.find((item) => ip === item.ip);
<mask>
<mask> if (!client) {
<mask> return '';
<mask> }
<mask>
<mask> const { name, whois_info } = client;
<mask> const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
<mask>
<mask> return {
<mask> name,
<mask> whois,
<mask> };
<mask> };
<mask>
<mask> export const sortClients = (clients) => {
<mask> const compare = (a, b) => {
<mask> const nameA = a.name.toUpperCase();
<mask> const nameB = b.name.toUpperCase();
<mask>
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} </s> remove export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
</s> add </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove /**
* @param date {string}
* @returns {boolean}
*/
export const isToday = (date) => isSameDay(new Date(date), new Date());
</s> add </s> add * @param options {string} | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep keep keep keep replace replace keep keep keep keep keep | <mask>
<mask> return whois;
<mask> };
<mask>
<mask> export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
<mask>
<mask> export const getPathWithQueryString = (path, params) => {
<mask> const searchParams = new URLSearchParams(params);
<mask>
<mask> return `${path}?${searchParams.toString()}`;
<mask> };
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add </s> remove /**
* @param date {string}
* @returns {boolean}
*/
export const isToday = (date) => isSameDay(new Date(date), new Date());
</s> add </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { </s> add * @param options {string} </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep replace keep keep replace keep keep | <mask> * @param parsedIp {object} ipaddr.js IPv4 or IPv6 object
<mask> * @param cidr {array} ipaddr.js CIDR array
<mask> * @returns {boolean}
<mask> */
<mask> export const isIpMatchCidr = (parsedIp, parsedCidr) => {
<mask> try {
<mask> const cidrIpVersion = parsedCidr[0].kind();
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove /**
* @param date {string}
* @returns {boolean}
*/
export const isToday = (date) => isSameDay(new Date(date), new Date());
</s> add </s> add * @param options {string} </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep keep keep keep replace replace replace replace replace keep keep keep replace replace keep keep keep | <mask> try {
<mask> for (let i = 0; i < listArr.length; i += 1) {
<mask> const listItem = listArr[i];
<mask>
<mask> const parsedIp = ipaddr.parse(ip);
<mask> const isItemAnIp = ipaddr.isValid(listItem);
<mask> const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
<mask>
<mask> if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
<mask> return IP_MATCH_LIST_STATUS.EXACT;
<mask> }
<mask>
<mask> if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
<mask> return IP_MATCH_LIST_STATUS.CIDR;
<mask> }
<mask> }
<mask> return IP_MATCH_LIST_STATUS.NOT_FOUND;
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { </s> remove export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
</s> add </s> add console.error(e); </s> remove * @param cidr {array} ipaddr.js CIDR array
</s> add * @param parsedCidr {array} ipaddr.js CIDR array | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep add keep keep keep keep keep keep | <mask> return IP_MATCH_LIST_STATUS.NOT_FOUND;
<mask> } catch (e) {
<mask> return IP_MATCH_LIST_STATUS.NOT_FOUND;
<mask> }
<mask> };
<mask>
<mask>
<mask> /**
</s> - (ui): improved client access check performance
This is still not ideal and if the disallowed clients list is huge
enough, the slowdown is considerable. But it's at least x10 or x100
times faster than it was.
Closes: #1920 </s> remove if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
</s> add // Using ipaddr.js is quite slow so we first do a quick check
// to see if it's possible that this IP may be in the specified CIDR range
if (isIpQuickMatchCIDR(ip, listItem)) {
const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
return IP_MATCH_LIST_STATUS.EXACT;
}
if (!isItemAnIp && isIpMatchCidr(parsedIp, parsedItem)) {
return IP_MATCH_LIST_STATUS.CIDR;
} </s> remove export const getClientInfo = (clients, ip) => {
const client = clients
.find((item) => item.ip_addrs?.find((clientIp) => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
export const getAutoClientInfo = (clients, ip) => {
const client = clients.find((item) => ip === item.ip);
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return {
name,
whois,
};
};
</s> add </s> remove const parsedIp = ipaddr.parse(ip);
const isItemAnIp = ipaddr.isValid(listItem);
const parsedItem = isItemAnIp ? ipaddr.parse(listItem) : ipaddr.parseCIDR(listItem);
if (isItemAnIp && parsedIp.toString() === parsedItem.toString()) {
</s> add if (ip === listItem.trim()) { </s> remove export const isValidQuestionType = (type) => type && DNS_RECORD_TYPES.includes(type.toUpperCase());
</s> add </s> add * @param options {string} </s> remove export const isIpMatchCidr = (parsedIp, parsedCidr) => {
</s> add const isIpMatchCidr = (parsedIp, parsedCidr) => { | https://github.com/AdguardTeam/AdGuardHome/commit/946bda37a3bb06d1483c1af0c3083844c9602e58 | client/src/helpers/helpers.js |
keep keep keep replace keep keep keep keep keep | <mask> 'name': 'build'
<mask>
<mask> 'env':
<mask> 'GO_VERSION': '1.18.6'
<mask> 'NODE_VERSION': '14'
<mask>
<mask> 'on':
<mask> 'push':
<mask> 'branches':
</s> Pull request: upd-go
Merge in DNS/adguard-home from upd-go to master
Squashed commit of the following:
commit 3dffc8b5d8951216c1e695472199fc9e9d85e1c7
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:30:23 2022 +0300
all: fix chlog
commit cca70bd6cd27d04cd7cebe14a4e4bef112ce2bcb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:07:39 2022 +0300
all: upd go </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' | https://github.com/AdguardTeam/AdGuardHome/commit/960a7a75ed44637a2fd936e3b4df87e13bcb0ba0 | .github/workflows/build.yml |
keep keep keep replace keep keep keep keep keep | <mask> 'name': 'lint'
<mask>
<mask> 'env':
<mask> 'GO_VERSION': '1.18.6'
<mask>
<mask> 'on':
<mask> 'push':
<mask> 'tags':
<mask> - 'v*'
</s> Pull request: upd-go
Merge in DNS/adguard-home from upd-go to master
Squashed commit of the following:
commit 3dffc8b5d8951216c1e695472199fc9e9d85e1c7
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:30:23 2022 +0300
all: fix chlog
commit cca70bd6cd27d04cd7cebe14a4e4bef112ce2bcb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:07:39 2022 +0300
all: upd go </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' | https://github.com/AdguardTeam/AdGuardHome/commit/960a7a75ed44637a2fd936e3b4df87e13bcb0ba0 | .github/workflows/lint.yml |
keep keep keep keep replace keep keep keep keep keep | <mask> 'name': 'AdGuard Home - Build and publish release'
<mask> # Make sure to sync any changes with the branch overrides below.
<mask> 'variables':
<mask> 'channel': 'edge'
<mask> 'dockerGo': 'adguard/golang-ubuntu:5.1'
<mask>
<mask> 'stages':
<mask> - 'Build frontend':
<mask> 'manual': false
<mask> 'final': false
</s> Pull request: upd-go
Merge in DNS/adguard-home from upd-go to master
Squashed commit of the following:
commit 3dffc8b5d8951216c1e695472199fc9e9d85e1c7
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:30:23 2022 +0300
all: fix chlog
commit cca70bd6cd27d04cd7cebe14a4e4bef112ce2bcb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:07:39 2022 +0300
all: upd go </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' | https://github.com/AdguardTeam/AdGuardHome/commit/960a7a75ed44637a2fd936e3b4df87e13bcb0ba0 | bamboo-specs/release.yaml |
keep keep keep keep replace keep keep keep keep keep | <mask> # Set the default release channel on the release branch to beta, as we may
<mask> # need to build a few of these.
<mask> 'variables':
<mask> 'channel': 'beta'
<mask> 'dockerGo': 'adguard/golang-ubuntu:5.1'
<mask> # release-vX.Y.Z branches are the branches from which the actual final release
<mask> # is built.
<mask> - '^release-v[0-9]+\.[0-9]+\.[0-9]+':
<mask> # Disable integration branches for release branches.
<mask> 'branch-config':
</s> Pull request: upd-go
Merge in DNS/adguard-home from upd-go to master
Squashed commit of the following:
commit 3dffc8b5d8951216c1e695472199fc9e9d85e1c7
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:30:23 2022 +0300
all: fix chlog
commit cca70bd6cd27d04cd7cebe14a4e4bef112ce2bcb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:07:39 2022 +0300
all: upd go </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' | https://github.com/AdguardTeam/AdGuardHome/commit/960a7a75ed44637a2fd936e3b4df87e13bcb0ba0 | bamboo-specs/release.yaml |
keep keep keep keep replace | <mask> # Set the default release channel on the final branch to release, as these
<mask> # are the ones that actually get released.
<mask> 'variables':
<mask> 'channel': 'release'
<mask> 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> Pull request: upd-go
Merge in DNS/adguard-home from upd-go to master
Squashed commit of the following:
commit 3dffc8b5d8951216c1e695472199fc9e9d85e1c7
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:30:23 2022 +0300
all: fix chlog
commit cca70bd6cd27d04cd7cebe14a4e4bef112ce2bcb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:07:39 2022 +0300
all: upd go </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' | https://github.com/AdguardTeam/AdGuardHome/commit/960a7a75ed44637a2fd936e3b4df87e13bcb0ba0 | bamboo-specs/release.yaml |
keep keep keep keep replace keep keep keep keep keep | <mask> 'project-key': 'AGH'
<mask> 'key': 'AHBRTSPECS'
<mask> 'name': 'AdGuard Home - Build and run tests'
<mask> 'variables':
<mask> 'dockerGo': 'adguard/golang-ubuntu:5.1'
<mask>
<mask> 'stages':
<mask> - 'Tests':
<mask> 'manual': false
<mask> 'final': false
</s> Pull request: upd-go
Merge in DNS/adguard-home from upd-go to master
Squashed commit of the following:
commit 3dffc8b5d8951216c1e695472199fc9e9d85e1c7
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:30:23 2022 +0300
all: fix chlog
commit cca70bd6cd27d04cd7cebe14a4e4bef112ce2bcb
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Oct 7 14:07:39 2022 +0300
all: upd go </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'dockerGo': 'adguard/golang-ubuntu:5.1'
</s> add 'dockerGo': 'adguard/golang-ubuntu:5.2' </s> remove 'GO_VERSION': '1.18.6'
</s> add 'GO_VERSION': '1.18.7' | https://github.com/AdguardTeam/AdGuardHome/commit/960a7a75ed44637a2fd936e3b4df87e13bcb0ba0 | bamboo-specs/test.yaml |
keep keep keep keep replace replace keep keep keep replace replace keep keep | <mask> }
<mask>
<mask> dnsres, ok := d.filteringEngine.MatchRequest(ureq)
<mask>
<mask> // Check DNS rewrites first, because the API there is a bit
<mask> // awkward.
<mask> if dnsr := dnsres.DNSRewrites(); len(dnsr) > 0 {
<mask> res = d.processDNSRewrites(dnsr)
<mask> if res.Reason == RewrittenRule && res.CanonName == host {
<mask> // A rewrite of a host to itself. Go on and
<mask> // try matching other things.
<mask> } else {
<mask> return res, nil
</s> Pull request: dnsfilter: imp code, decr cyclo
Updates #2646.
Squashed commit of the following:
commit c153f08bcf5ade4d0fb9b59d2a0e6a21598c4127
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Mar 25 21:03:51 2021 +0300
dnsfilter: imp code, decr cyclo </s> remove if dnsres.NetworkRule != nil {
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, dnsres.NetworkRule.Text(), dnsres.NetworkRule.GetFilterListID())
reason := FilteredBlockList
if dnsres.NetworkRule.Whitelist {
reason = NotFilteredAllowList
}
return makeResult(dnsres.NetworkRule, reason), nil
}
if qtype == dns.TypeA && dnsres.HostRulesV4 != nil {
rule := dnsres.HostRulesV4[0] // note that we process only 1 matched rule
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, rule.Text(), rule.GetFilterListID())
res = makeResult(rule, FilteredBlockList)
res.Rules[0].IP = rule.IP.To4()
return res, nil
}
if qtype == dns.TypeAAAA && dnsres.HostRulesV6 != nil {
rule := dnsres.HostRulesV6[0] // note that we process only 1 matched rule
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, rule.Text(), rule.GetFilterListID())
res = makeResult(rule, FilteredBlockList)
res.Rules[0].IP = rule.IP
return res, nil
</s> add res = d.matchHostProcessDNSResult(qtype, dnsres)
if len(res.Rules) > 0 {
r := res.Rules[0]
log.Debug(
"filtering: found rule %q for host %q, filter list id: %d",
r.Text,
host,
r.FilterListID,
) </s> remove if dnsres.HostRulesV4 != nil || dnsres.HostRulesV6 != nil {
// Question Type doesn't match the host rules
// Return the first matched host rule, but without an IP address
var rule rules.Rule
if dnsres.HostRulesV4 != nil {
rule = dnsres.HostRulesV4[0]
} else if dnsres.HostRulesV6 != nil {
rule = dnsres.HostRulesV6[0]
}
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, rule.Text(), rule.GetFilterListID())
res = makeResult(rule, FilteredBlockList)
res.Rules[0].IP = net.IP{}
return res, nil
}
return Result{}, nil
</s> add return res, nil | https://github.com/AdguardTeam/AdGuardHome/commit/9631eff60862d88667eaa853ebfa3bce1e1cdd8e | internal/dnsfilter/dnsfilter.go |
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask> } else if !ok {
<mask> return Result{}, nil
<mask> }
<mask>
<mask> if dnsres.NetworkRule != nil {
<mask> log.Debug("Filtering: found rule for host %q: %q list_id: %d",
<mask> host, dnsres.NetworkRule.Text(), dnsres.NetworkRule.GetFilterListID())
<mask> reason := FilteredBlockList
<mask> if dnsres.NetworkRule.Whitelist {
<mask> reason = NotFilteredAllowList
<mask> }
<mask>
<mask> return makeResult(dnsres.NetworkRule, reason), nil
<mask> }
<mask>
<mask> if qtype == dns.TypeA && dnsres.HostRulesV4 != nil {
<mask> rule := dnsres.HostRulesV4[0] // note that we process only 1 matched rule
<mask> log.Debug("Filtering: found rule for host %q: %q list_id: %d",
<mask> host, rule.Text(), rule.GetFilterListID())
<mask> res = makeResult(rule, FilteredBlockList)
<mask> res.Rules[0].IP = rule.IP.To4()
<mask>
<mask> return res, nil
<mask> }
<mask>
<mask> if qtype == dns.TypeAAAA && dnsres.HostRulesV6 != nil {
<mask> rule := dnsres.HostRulesV6[0] // note that we process only 1 matched rule
<mask> log.Debug("Filtering: found rule for host %q: %q list_id: %d",
<mask> host, rule.Text(), rule.GetFilterListID())
<mask> res = makeResult(rule, FilteredBlockList)
<mask> res.Rules[0].IP = rule.IP
<mask>
<mask> return res, nil
<mask> }
<mask>
<mask> if dnsres.HostRulesV4 != nil || dnsres.HostRulesV6 != nil {
<mask> // Question Type doesn't match the host rules
<mask> // Return the first matched host rule, but without an IP address
</s> Pull request: dnsfilter: imp code, decr cyclo
Updates #2646.
Squashed commit of the following:
commit c153f08bcf5ade4d0fb9b59d2a0e6a21598c4127
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Mar 25 21:03:51 2021 +0300
dnsfilter: imp code, decr cyclo </s> remove if dnsres.HostRulesV4 != nil || dnsres.HostRulesV6 != nil {
// Question Type doesn't match the host rules
// Return the first matched host rule, but without an IP address
var rule rules.Rule
if dnsres.HostRulesV4 != nil {
rule = dnsres.HostRulesV4[0]
} else if dnsres.HostRulesV6 != nil {
rule = dnsres.HostRulesV6[0]
}
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, rule.Text(), rule.GetFilterListID())
res = makeResult(rule, FilteredBlockList)
res.Rules[0].IP = net.IP{}
return res, nil
}
return Result{}, nil
</s> add return res, nil </s> remove // A rewrite of a host to itself. Go on and
// try matching other things.
</s> add // A rewrite of a host to itself. Go on and try
// matching other things. </s> remove // Check DNS rewrites first, because the API there is a bit
// awkward.
</s> add // Check DNS rewrites first, because the API there is a bit awkward. | https://github.com/AdguardTeam/AdGuardHome/commit/9631eff60862d88667eaa853ebfa3bce1e1cdd8e | internal/dnsfilter/dnsfilter.go |
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask>
<mask> return res, nil
<mask> }
<mask>
<mask> if dnsres.HostRulesV4 != nil || dnsres.HostRulesV6 != nil {
<mask> // Question Type doesn't match the host rules
<mask> // Return the first matched host rule, but without an IP address
<mask> var rule rules.Rule
<mask> if dnsres.HostRulesV4 != nil {
<mask> rule = dnsres.HostRulesV4[0]
<mask> } else if dnsres.HostRulesV6 != nil {
<mask> rule = dnsres.HostRulesV6[0]
<mask> }
<mask> log.Debug("Filtering: found rule for host %q: %q list_id: %d",
<mask> host, rule.Text(), rule.GetFilterListID())
<mask> res = makeResult(rule, FilteredBlockList)
<mask> res.Rules[0].IP = net.IP{}
<mask>
<mask> return res, nil
<mask> }
<mask>
<mask> return Result{}, nil
<mask> }
<mask>
<mask> // makeResult returns a properly constructed Result.
<mask> func makeResult(rule rules.Rule, reason Reason) Result {
<mask> res := Result{
</s> Pull request: dnsfilter: imp code, decr cyclo
Updates #2646.
Squashed commit of the following:
commit c153f08bcf5ade4d0fb9b59d2a0e6a21598c4127
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Mar 25 21:03:51 2021 +0300
dnsfilter: imp code, decr cyclo </s> remove if dnsres.NetworkRule != nil {
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, dnsres.NetworkRule.Text(), dnsres.NetworkRule.GetFilterListID())
reason := FilteredBlockList
if dnsres.NetworkRule.Whitelist {
reason = NotFilteredAllowList
}
return makeResult(dnsres.NetworkRule, reason), nil
}
if qtype == dns.TypeA && dnsres.HostRulesV4 != nil {
rule := dnsres.HostRulesV4[0] // note that we process only 1 matched rule
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, rule.Text(), rule.GetFilterListID())
res = makeResult(rule, FilteredBlockList)
res.Rules[0].IP = rule.IP.To4()
return res, nil
}
if qtype == dns.TypeAAAA && dnsres.HostRulesV6 != nil {
rule := dnsres.HostRulesV6[0] // note that we process only 1 matched rule
log.Debug("Filtering: found rule for host %q: %q list_id: %d",
host, rule.Text(), rule.GetFilterListID())
res = makeResult(rule, FilteredBlockList)
res.Rules[0].IP = rule.IP
return res, nil
</s> add res = d.matchHostProcessDNSResult(qtype, dnsres)
if len(res.Rules) > 0 {
r := res.Rules[0]
log.Debug(
"filtering: found rule %q for host %q, filter list id: %d",
r.Text,
host,
r.FilterListID,
) </s> remove // A rewrite of a host to itself. Go on and
// try matching other things.
</s> add // A rewrite of a host to itself. Go on and try
// matching other things. </s> remove // Check DNS rewrites first, because the API there is a bit
// awkward.
</s> add // Check DNS rewrites first, because the API there is a bit awkward. | https://github.com/AdguardTeam/AdGuardHome/commit/9631eff60862d88667eaa853ebfa3bce1e1cdd8e | internal/dnsfilter/dnsfilter.go |
keep keep keep keep replace keep keep keep keep keep | <mask> const FILTERS_ITEMS = [
<mask> { route: FILTERS_URLS.dns_blocklists, text: 'dns_blocklists' },
<mask> { route: FILTERS_URLS.dns_allowlists, text: 'dns_allowlists' },
<mask> { route: FILTERS_URLS.dns_rewrites, text: 'dns_rewrites' },
<mask> { route: FILTERS_URLS.custom_rules, text: 'custom_filtering_rules' },
<mask> { route: FILTERS_URLS.blocked_services, text: 'blocked_services' },
<mask> ];
<mask>
<mask> class Menu extends Component {
<mask> handleClickOutside = () => {
</s> - client: Don't normalise disallowed domains
Close #1820
Squashed commit of the following:
commit 0c758ddcd738136b92e6f947a8068ecc59f7ec25
Merge: 15650db3 f5a1f311
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Fri Jul 3 11:22:00 2020 +0300
Merge branch 'master' into fix/1820
commit 15650db35323009001fd427a74a312705b54ac86
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Jun 29 12:01:51 2020 +0300
'- client: Don't normalise disallowed domains' </s> remove normalizeOnBlur={normalizeMultiline}
</s> add normalizeOnBlur={id === 'disallowed_clients' ? normalizeMultiline : undefined} </s> add { route: FILTERS_URLS.custom_rules, text: 'custom_filtering_rules' }, | https://github.com/AdguardTeam/AdGuardHome/commit/9640752d20666373165d1f8bb3f3ddb8378353c3 | client/src/components/Header/Menu.js |
keep keep keep add keep keep keep keep keep | <mask> { route: FILTERS_URLS.dns_blocklists, text: 'dns_blocklists' },
<mask> { route: FILTERS_URLS.dns_allowlists, text: 'dns_allowlists' },
<mask> { route: FILTERS_URLS.dns_rewrites, text: 'dns_rewrites' },
<mask> { route: FILTERS_URLS.blocked_services, text: 'blocked_services' },
<mask> ];
<mask>
<mask> class Menu extends Component {
<mask> handleClickOutside = () => {
<mask> this.props.closeMenu();
</s> - client: Don't normalise disallowed domains
Close #1820
Squashed commit of the following:
commit 0c758ddcd738136b92e6f947a8068ecc59f7ec25
Merge: 15650db3 f5a1f311
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Fri Jul 3 11:22:00 2020 +0300
Merge branch 'master' into fix/1820
commit 15650db35323009001fd427a74a312705b54ac86
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Jun 29 12:01:51 2020 +0300
'- client: Don't normalise disallowed domains' </s> remove normalizeOnBlur={normalizeMultiline}
</s> add normalizeOnBlur={id === 'disallowed_clients' ? normalizeMultiline : undefined} </s> remove { route: FILTERS_URLS.custom_rules, text: 'custom_filtering_rules' },
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/9640752d20666373165d1f8bb3f3ddb8378353c3 | client/src/components/Header/Menu.js |
keep keep keep keep replace keep keep keep keep keep | <mask> component={renderTextareaField}
<mask> type="text"
<mask> className="form-control form-control--textarea font-monospace"
<mask> disabled={disabled}
<mask> normalizeOnBlur={normalizeMultiline}
<mask> />
<mask> </div>;
<mask>
<mask> renderField.propTypes = {
<mask> id: PropTypes.string,
</s> - client: Don't normalise disallowed domains
Close #1820
Squashed commit of the following:
commit 0c758ddcd738136b92e6f947a8068ecc59f7ec25
Merge: 15650db3 f5a1f311
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Fri Jul 3 11:22:00 2020 +0300
Merge branch 'master' into fix/1820
commit 15650db35323009001fd427a74a312705b54ac86
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Jun 29 12:01:51 2020 +0300
'- client: Don't normalise disallowed domains' </s> add { route: FILTERS_URLS.custom_rules, text: 'custom_filtering_rules' }, </s> remove { route: FILTERS_URLS.custom_rules, text: 'custom_filtering_rules' },
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/9640752d20666373165d1f8bb3f3ddb8378353c3 | client/src/components/Settings/Dns/Access/Form.js |
keep keep keep keep replace keep keep keep keep keep | <mask> stats *stats // General server statistics
<mask> once sync.Once
<mask>
<mask> sync.RWMutex
<mask> ServerConfig
<mask> }
<mask>
<mask> // NewServer creates a new instance of the dnsforward.Server
<mask> // baseDir is the base directory for query logs
<mask> func NewServer(baseDir string) *Server {
</s> * dnsforward: use separate ServerConfig object </s> remove s.dnsFilter = dnsfilter.New(&s.Config)
</s> add s.dnsFilter = dnsfilter.New(&s.conf.Config) </s> remove s.ServerConfig = *config
</s> add s.conf = *config </s> remove Ttl: s.BlockedResponseTTL,
</s> add Ttl: s.conf.BlockedResponseTTL, </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
</s> add if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove s.UDPListenAddr = &net.UDPAddr{Port: 0}
s.TCPListenAddr = &net.TCPAddr{Port: 0}
</s> add s.conf.UDPListenAddr = &net.UDPAddr{Port: 0}
s.conf.TCPListenAddr = &net.TCPAddr{Port: 0} | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask>
<mask> // startInternal starts without locking
<mask> func (s *Server) startInternal(config *ServerConfig) error {
<mask> if config != nil {
<mask> s.ServerConfig = *config
<mask> }
<mask>
<mask> if s.dnsFilter != nil || s.dnsProxy != nil {
<mask> return errors.New("DNS server is already started")
<mask> }
</s> * dnsforward: use separate ServerConfig object </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove s.dnsFilter = dnsfilter.New(&s.Config)
</s> add s.dnsFilter = dnsfilter.New(&s.conf.Config) </s> remove if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
</s> add if s.conf.TLSListenAddr != nil && s.conf.CertificateChain != "" && s.conf.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.conf.CertificateChain), []byte(s.conf.PrivateKey)) </s> remove if s.BlockingMode == "null_ip" {
</s> add if s.conf.BlockingMode == "null_ip" { </s> remove if s.QueryLogEnabled && shouldLog {
</s> add if s.conf.QueryLogEnabled && shouldLog { </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep keep replace replace replace replace replace keep replace replace keep keep | <mask> go s.stats.statsRotator()
<mask> })
<mask>
<mask> proxyConfig := proxy.Config{
<mask> UDPListenAddr: s.UDPListenAddr,
<mask> TCPListenAddr: s.TCPListenAddr,
<mask> Ratelimit: s.Ratelimit,
<mask> RatelimitWhitelist: s.RatelimitWhitelist,
<mask> RefuseAny: s.RefuseAny,
<mask> CacheEnabled: true,
<mask> Upstreams: s.Upstreams,
<mask> DomainsReservedUpstreams: s.DomainsReservedUpstreams,
<mask> Handler: s.handleDNSRequest,
<mask> AllServers: s.AllServers,
</s> * dnsforward: use separate ServerConfig object </s> remove AllServers: s.AllServers,
</s> add AllServers: s.conf.AllServers, </s> remove if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
</s> add if s.conf.TLSListenAddr != nil && s.conf.CertificateChain != "" && s.conf.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.conf.CertificateChain), []byte(s.conf.PrivateKey)) </s> remove protectionEnabled := s.ProtectionEnabled
</s> add protectionEnabled := s.conf.ProtectionEnabled </s> remove s.TLSConfig = TLSConfig{
</s> add s.conf.TLSConfig = TLSConfig{ </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
</s> add if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep replace keep keep replace replace replace keep | <mask> Handler: s.handleDNSRequest,
<mask> AllServers: s.AllServers,
<mask> }
<mask>
<mask> if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
<mask> proxyConfig.TLSListenAddr = s.TLSListenAddr
<mask> keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
<mask> if err != nil {
</s> * dnsforward: use separate ServerConfig object </s> remove Upstreams: s.Upstreams,
DomainsReservedUpstreams: s.DomainsReservedUpstreams,
</s> add Upstreams: s.conf.Upstreams,
DomainsReservedUpstreams: s.conf.DomainsReservedUpstreams, </s> remove if s.QueryLogEnabled && shouldLog {
</s> add if s.conf.QueryLogEnabled && shouldLog { </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove s.ServerConfig = *config
</s> add s.conf = *config </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep replace keep replace replace | <mask> // Initializes the DNS filter
<mask> func (s *Server) initDNSFilter() error {
<mask> log.Tracef("Creating dnsfilter")
<mask> s.dnsFilter = dnsfilter.New(&s.Config)
<mask> // add rules only if they are enabled
<mask> if s.FilteringEnabled {
<mask> err := s.dnsFilter.AddRules(s.Filters)
</s> * dnsforward: use separate ServerConfig object </s> remove s.ServerConfig = *config
</s> add s.conf = *config </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
</s> add if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove ServerConfig
</s> add conf ServerConfig </s> remove answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.BlockedResponseTTL, ip.String()))
</s> add answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.conf.BlockedResponseTTL, ip.String())) </s> remove s.Filters = append(s.Filters, filter)
</s> add s.conf.Filters = append(s.conf.Filters, filter) | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep replace keep keep keep replace | <mask>
<mask> // don't log ANY request if refuseAny is enabled
<mask> if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
<mask> shouldLog = false
<mask> }
<mask>
<mask> if s.QueryLogEnabled && shouldLog {
</s> * dnsforward: use separate ServerConfig object </s> remove if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
</s> add if s.conf.TLSListenAddr != nil && s.conf.CertificateChain != "" && s.conf.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.conf.CertificateChain), []byte(s.conf.PrivateKey)) </s> remove AllServers: s.AllServers,
</s> add AllServers: s.conf.AllServers, </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove Upstreams: s.Upstreams,
DomainsReservedUpstreams: s.DomainsReservedUpstreams,
</s> add Upstreams: s.conf.Upstreams,
DomainsReservedUpstreams: s.conf.DomainsReservedUpstreams, </s> remove if s.BlockingMode == "null_ip" {
</s> add if s.conf.BlockingMode == "null_ip" { | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask> msg := d.Req
<mask> host := strings.TrimSuffix(msg.Question[0].Name, ".")
<mask>
<mask> s.RLock()
<mask> protectionEnabled := s.ProtectionEnabled
<mask> dnsFilter := s.dnsFilter
<mask> s.RUnlock()
<mask>
<mask> if !protectionEnabled {
<mask> return nil, nil
</s> * dnsforward: use separate ServerConfig object </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
</s> add if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.BlockedResponseTTL, ip.String()))
</s> add answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.conf.BlockedResponseTTL, ip.String())) </s> remove s.dnsFilter = dnsfilter.New(&s.Config)
</s> add s.dnsFilter = dnsfilter.New(&s.conf.Config) </s> remove if s.QueryLogEnabled && shouldLog {
</s> add if s.conf.QueryLogEnabled && shouldLog { </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask> if result.IP != nil {
<mask> return s.genARecord(m, result.IP)
<mask> }
<mask>
<mask> if s.BlockingMode == "null_ip" {
<mask> return s.genARecord(m, net.IPv4zero)
<mask> }
<mask>
<mask> return s.genNXDomain(m)
<mask> }
</s> * dnsforward: use separate ServerConfig object </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove if s.QueryLogEnabled && shouldLog {
</s> add if s.conf.QueryLogEnabled && shouldLog { </s> remove s.ServerConfig = *config
</s> add s.conf = *config </s> remove if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
</s> add if s.conf.TLSListenAddr != nil && s.conf.CertificateChain != "" && s.conf.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.conf.CertificateChain), []byte(s.conf.PrivateKey)) </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
</s> add if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask>
<mask> func (s *Server) genARecord(request *dns.Msg, ip net.IP) *dns.Msg {
<mask> resp := dns.Msg{}
<mask> resp.SetReply(request)
<mask> answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.BlockedResponseTTL, ip.String()))
<mask> if err != nil {
<mask> log.Printf("Couldn't generate A record for replacement host '%s': %s", ip.String(), err)
<mask> return s.genServerFailure(request)
<mask> }
<mask> resp.Answer = append(resp.Answer, answer)
</s> * dnsforward: use separate ServerConfig object </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" </s> remove s.SafeSearchEnabled = true
</s> add s.conf.SafeSearchEnabled = true </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove s.dnsFilter = dnsfilter.New(&s.Config)
</s> add s.dnsFilter = dnsfilter.New(&s.conf.Config) </s> remove s.ServerConfig = *config
</s> add s.conf = *config </s> remove if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
</s> add if s.conf.TLSListenAddr != nil && s.conf.CertificateChain != "" && s.conf.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.conf.CertificateChain), []byte(s.conf.PrivateKey)) | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask> // rest is request-specific
<mask> Hdr: dns.RR_Header{
<mask> Name: zone,
<mask> Rrtype: dns.TypeSOA,
<mask> Ttl: s.BlockedResponseTTL,
<mask> Class: dns.ClassINET,
<mask> },
<mask> Mbox: "hostmaster.", // zone will be appended later if it's not empty or "."
<mask> }
<mask> if soa.Hdr.Ttl == 0 {
</s> * dnsforward: use separate ServerConfig object </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
</s> add if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove s.dnsFilter = dnsfilter.New(&s.Config)
</s> add s.dnsFilter = dnsfilter.New(&s.conf.Config) </s> remove s.ServerConfig = *config
</s> add s.conf = *config </s> remove if s.BlockingMode == "null_ip" {
</s> add if s.conf.BlockingMode == "null_ip" { </s> remove ServerConfig
</s> add conf ServerConfig | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward.go |
keep keep keep keep replace keep keep keep keep keep | <mask> _, certPem, keyPem := createServerTLSConfig(t)
<mask> s := createTestServer(t)
<mask> defer removeDataDir(t)
<mask>
<mask> s.TLSConfig = TLSConfig{
<mask> TLSListenAddr: &net.TCPAddr{Port: 0},
<mask> CertificateChain: string(certPem),
<mask> PrivateKey: string(keyPem),
<mask> }
<mask>
</s> * dnsforward: use separate ServerConfig object </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" </s> remove s.SafeSearchEnabled = true
</s> add s.conf.SafeSearchEnabled = true </s> remove s.UDPListenAddr = &net.UDPAddr{Port: 0}
s.TCPListenAddr = &net.TCPAddr{Port: 0}
</s> add s.conf.UDPListenAddr = &net.UDPAddr{Port: 0}
s.conf.TCPListenAddr = &net.TCPAddr{Port: 0} </s> remove s.QueryLogEnabled = true
s.FilteringConfig.FilteringEnabled = true
s.FilteringConfig.ProtectionEnabled = true
s.FilteringConfig.SafeBrowsingEnabled = true
s.Filters = make([]dnsfilter.Filter, 0)
</s> add s.conf.QueryLogEnabled = true
s.conf.FilteringConfig.FilteringEnabled = true
s.conf.FilteringConfig.ProtectionEnabled = true
s.conf.FilteringConfig.SafeBrowsingEnabled = true
s.conf.Filters = make([]dnsfilter.Filter, 0) </s> remove s.Filters = append(s.Filters, filter)
</s> add s.conf.Filters = append(s.conf.Filters, filter) </s> remove if s.QueryLogEnabled && shouldLog {
</s> add if s.conf.QueryLogEnabled && shouldLog { | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }
<mask>
<mask> func TestSafeSearch(t *testing.T) {
<mask> s := createTestServer(t)
<mask> s.SafeSearchEnabled = true
<mask> defer removeDataDir(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
</s> * dnsforward: use separate ServerConfig object </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" </s> remove answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.BlockedResponseTTL, ip.String()))
</s> add answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.conf.BlockedResponseTTL, ip.String())) </s> remove s.TLSConfig = TLSConfig{
</s> add s.conf.TLSConfig = TLSConfig{ </s> remove if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
</s> add if s.conf.TLSListenAddr != nil && s.conf.CertificateChain != "" && s.conf.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.conf.CertificateChain), []byte(s.conf.PrivateKey)) </s> remove s.UDPListenAddr = &net.UDPAddr{Port: 0}
s.TCPListenAddr = &net.TCPAddr{Port: 0}
</s> add s.conf.UDPListenAddr = &net.UDPAddr{Port: 0}
s.conf.TCPListenAddr = &net.TCPAddr{Port: 0} </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> }
<mask>
<mask> func TestNullBlockedRequest(t *testing.T) {
<mask> s := createTestServer(t)
<mask> s.FilteringConfig.BlockingMode = "null_ip"
<mask> defer removeDataDir(t)
<mask> err := s.Start(nil)
<mask> if err != nil {
<mask> t.Fatalf("Failed to start server: %s", err)
<mask> }
</s> * dnsforward: use separate ServerConfig object </s> remove s.SafeSearchEnabled = true
</s> add s.conf.SafeSearchEnabled = true </s> remove answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.BlockedResponseTTL, ip.String()))
</s> add answer, err := dns.NewRR(fmt.Sprintf("%s %d A %s", request.Question[0].Name, s.conf.BlockedResponseTTL, ip.String())) </s> remove s.TLSConfig = TLSConfig{
</s> add s.conf.TLSConfig = TLSConfig{ </s> remove if s.TLSListenAddr != nil && s.CertificateChain != "" && s.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.CertificateChain), []byte(s.PrivateKey))
</s> add if s.conf.TLSListenAddr != nil && s.conf.CertificateChain != "" && s.conf.PrivateKey != "" {
proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
keypair, err := tls.X509KeyPair([]byte(s.conf.CertificateChain), []byte(s.conf.PrivateKey)) </s> remove if s.BlockingMode == "null_ip" {
</s> add if s.conf.BlockingMode == "null_ip" { </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward_test.go |
keep keep replace replace keep replace replace replace replace replace keep keep | <mask> func createTestServer(t *testing.T) *Server {
<mask> s := NewServer(createDataDir(t))
<mask> s.UDPListenAddr = &net.UDPAddr{Port: 0}
<mask> s.TCPListenAddr = &net.TCPAddr{Port: 0}
<mask>
<mask> s.QueryLogEnabled = true
<mask> s.FilteringConfig.FilteringEnabled = true
<mask> s.FilteringConfig.ProtectionEnabled = true
<mask> s.FilteringConfig.SafeBrowsingEnabled = true
<mask> s.Filters = make([]dnsfilter.Filter, 0)
<mask>
<mask> rules := []string{
</s> * dnsforward: use separate ServerConfig object </s> remove s.SafeSearchEnabled = true
</s> add s.conf.SafeSearchEnabled = true </s> remove s.Filters = append(s.Filters, filter)
</s> add s.conf.Filters = append(s.conf.Filters, filter) </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
</s> add if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove s.TLSConfig = TLSConfig{
</s> add s.conf.TLSConfig = TLSConfig{ </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> "||null.example.org^",
<mask> "127.0.0.1 host.example.org",
<mask> }
<mask> filter := dnsfilter.Filter{ID: 1, Rules: rules}
<mask> s.Filters = append(s.Filters, filter)
<mask> return s
<mask> }
<mask>
<mask> func createServerTLSConfig(t *testing.T) (*tls.Config, []byte, []byte) {
<mask> privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
</s> * dnsforward: use separate ServerConfig object </s> remove s.QueryLogEnabled = true
s.FilteringConfig.FilteringEnabled = true
s.FilteringConfig.ProtectionEnabled = true
s.FilteringConfig.SafeBrowsingEnabled = true
s.Filters = make([]dnsfilter.Filter, 0)
</s> add s.conf.QueryLogEnabled = true
s.conf.FilteringConfig.FilteringEnabled = true
s.conf.FilteringConfig.ProtectionEnabled = true
s.conf.FilteringConfig.SafeBrowsingEnabled = true
s.conf.Filters = make([]dnsfilter.Filter, 0) </s> remove s.FilteringConfig.BlockingMode = "null_ip"
</s> add s.conf.FilteringConfig.BlockingMode = "null_ip" </s> remove s.SafeSearchEnabled = true
</s> add s.conf.SafeSearchEnabled = true </s> remove s.UDPListenAddr = &net.UDPAddr{Port: 0}
s.TCPListenAddr = &net.TCPAddr{Port: 0}
</s> add s.conf.UDPListenAddr = &net.UDPAddr{Port: 0}
s.conf.TCPListenAddr = &net.TCPAddr{Port: 0} </s> remove if s.FilteringEnabled {
err := s.dnsFilter.AddRules(s.Filters)
</s> add if s.conf.FilteringEnabled {
err := s.dnsFilter.AddRules(s.conf.Filters) </s> remove s.dnsFilter = dnsfilter.New(&s.Config)
</s> add s.dnsFilter = dnsfilter.New(&s.conf.Config) | https://github.com/AdguardTeam/AdGuardHome/commit/9644f79a03894aab9b37a7a6813c0f51aea39d3e | dnsforward/dnsforward_test.go |
keep keep keep keep replace keep keep keep keep keep | <mask> {refreshFullButton}
<mask> </div>
<mask> </PageTitle>
<mask> {statsProcessing && <Loading />}
<mask> {!statsProcessing && <div className="row row-cards">
<mask> <div className="col-lg-12">
<mask> <Statistics
<mask> interval={stats.interval}
<mask> dnsQueries={stats.dnsQueries}
<mask> blockedFiltering={stats.blockedFiltering}
</s> - client: Make dashboard card height constant
Close #2039
Squashed commit of the following:
commit 1d6dd461558403ea0ba813d5f665ecbaab9cd8ed
Merge: 6ca80c91 2a5b0b8d
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Sep 15 10:18:19 2020 +0300
Merge branch 'master' into fix/2039
commit 6ca80c9171da61a4bc02cec409299d0cfb96da49
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Sep 14 19:58:43 2020 +0300
Fix mobile media query
commit 239c9ab29aaaef200bd2289fa116507ea5c2bf4c
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Sep 14 13:59:39 2020 +0300
- client: Make dashboard card height constant </s> add @media (min-width: 992px) {
.dashboard .card:not(.card--full) {
height: 22rem;
}
}
</s> remove .card-table-overflow--limited.clients__table {
</s> add .dashboard .card-table-overflow--limited { | https://github.com/AdguardTeam/AdGuardHome/commit/96512433477a6b32ac4e51e73899f82dc1c2a6e1 | client/src/components/Dashboard/index.js |
keep keep keep keep replace keep keep keep keep keep | <mask> overflow-y: auto;
<mask> max-height: 17.5rem;
<mask> }
<mask>
<mask> .card-table-overflow--limited.clients__table {
<mask> max-height: 18rem;
<mask> }
<mask>
<mask> .card-actions {
<mask> margin-top: 20px;
</s> - client: Make dashboard card height constant
Close #2039
Squashed commit of the following:
commit 1d6dd461558403ea0ba813d5f665ecbaab9cd8ed
Merge: 6ca80c91 2a5b0b8d
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Sep 15 10:18:19 2020 +0300
Merge branch 'master' into fix/2039
commit 6ca80c9171da61a4bc02cec409299d0cfb96da49
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Sep 14 19:58:43 2020 +0300
Fix mobile media query
commit 239c9ab29aaaef200bd2289fa116507ea5c2bf4c
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Sep 14 13:59:39 2020 +0300
- client: Make dashboard card height constant </s> add @media (min-width: 992px) {
.dashboard .card:not(.card--full) {
height: 22rem;
}
}
</s> remove {!statsProcessing && <div className="row row-cards">
</s> add {!statsProcessing && <div className="row row-cards dashboard"> | https://github.com/AdguardTeam/AdGuardHome/commit/96512433477a6b32ac4e51e73899f82dc1c2a6e1 | client/src/components/ui/Card.css |
keep keep keep add keep keep keep keep keep keep | <mask> font-size: 14px;
<mask> }
<mask> }
<mask>
<mask> .card .logs__cell--red {
<mask> background-color: #fff4f2;
<mask> }
<mask>
<mask> .card .logs__cell--green {
<mask> background-color: #f1faf3;
</s> - client: Make dashboard card height constant
Close #2039
Squashed commit of the following:
commit 1d6dd461558403ea0ba813d5f665ecbaab9cd8ed
Merge: 6ca80c91 2a5b0b8d
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Sep 15 10:18:19 2020 +0300
Merge branch 'master' into fix/2039
commit 6ca80c9171da61a4bc02cec409299d0cfb96da49
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Sep 14 19:58:43 2020 +0300
Fix mobile media query
commit 239c9ab29aaaef200bd2289fa116507ea5c2bf4c
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Sep 14 13:59:39 2020 +0300
- client: Make dashboard card height constant </s> remove .card-table-overflow--limited.clients__table {
</s> add .dashboard .card-table-overflow--limited { </s> remove {!statsProcessing && <div className="row row-cards">
</s> add {!statsProcessing && <div className="row row-cards dashboard"> | https://github.com/AdguardTeam/AdGuardHome/commit/96512433477a6b32ac4e51e73899f82dc1c2a6e1 | client/src/components/ui/Card.css |
keep add keep keep keep keep keep | <mask> - ".*generated.*"
<mask> - dnsfilter/rule_to_regexp.go
<mask> - ".*_test.go"
<mask>
<mask>
<mask> # all available settings of specific linters
<mask> linters-settings:
</s> + config: add "debug_pprof" setting
Squashed commit of the following:
commit 96d185cf4acc55b21a00d10072e0a641ef7655b8
Merge: 3b75a8cb 9b7c1181
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 15:57:50 2020 +0300
Merge remote-tracking branch 'origin/master' into add-pprof
commit 3b75a8cbec5d72be8865a56bfd7ebb8b0673c3bc
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 13:52:36 2020 +0300
* use localhost:6060 for pprof
commit f66f2fbd7409b98cd9f7d297c268fca998f85e3b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 12:46:25 2020 +0300
minor
commit 6e38712fb5542f612675858eb957efdefc38f9b0
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 11:59:39 2020 +0300
use separate HTTP server for pprof
commit 988d95b5fad22f536bf9204b6b96f3697cf9a589
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 17:04:04 2020 +0300
minor
commit 90ee6e9753be2af49467687cdf71c35b3943b78b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 16:57:38 2020 +0300
* use modified version of pprof
commit 413002220fe0717950539a8b7e6b0f31cef31bb8
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 16:35:21 2020 +0300
minor
commit d4655d3849de1d9fe97efdb7f18fc21d5ac19eda
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 15:57:57 2020 +0300
+ config: add "enable_pprof" setting </s> add - G204 </s> remove - G204 </s> add </s> add # gosec: Profiling endpoint is automatically exposed on /debug/pprof
- G108 </s> add if config.DebugPProf {
mux := http.NewServeMux()
util.PProfRegisterWebHandlers(mux)
go func() {
log.Info("pprof: listening on localhost:6060")
err := http.ListenAndServe("localhost:6060", mux)
log.Error("Error while running the pprof server: %s", err)
}()
} </s> add DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 | https://github.com/AdguardTeam/AdGuardHome/commit/9671050e5b520e3cf979b113f19e554e6402a3c6 | .golangci.yml |
keep add keep keep | <mask> # goconst
<mask> - string .forcesafesearch.google.com. has 3 occurrences
<mask> # gosec: Subprocess launched with function call as argument or cmd arguments
<mask> - G204
</s> + config: add "debug_pprof" setting
Squashed commit of the following:
commit 96d185cf4acc55b21a00d10072e0a641ef7655b8
Merge: 3b75a8cb 9b7c1181
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 15:57:50 2020 +0300
Merge remote-tracking branch 'origin/master' into add-pprof
commit 3b75a8cbec5d72be8865a56bfd7ebb8b0673c3bc
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 13:52:36 2020 +0300
* use localhost:6060 for pprof
commit f66f2fbd7409b98cd9f7d297c268fca998f85e3b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 12:46:25 2020 +0300
minor
commit 6e38712fb5542f612675858eb957efdefc38f9b0
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 11:59:39 2020 +0300
use separate HTTP server for pprof
commit 988d95b5fad22f536bf9204b6b96f3697cf9a589
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 17:04:04 2020 +0300
minor
commit 90ee6e9753be2af49467687cdf71c35b3943b78b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 16:57:38 2020 +0300
* use modified version of pprof
commit 413002220fe0717950539a8b7e6b0f31cef31bb8
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 16:35:21 2020 +0300
minor
commit d4655d3849de1d9fe97efdb7f18fc21d5ac19eda
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 15:57:57 2020 +0300
+ config: add "enable_pprof" setting </s> remove - G204 </s> add </s> add - util/pprof.go </s> add - G204 </s> add if config.DebugPProf {
mux := http.NewServeMux()
util.PProfRegisterWebHandlers(mux)
go func() {
log.Info("pprof: listening on localhost:6060")
err := http.ListenAndServe("localhost:6060", mux)
log.Error("Error while running the pprof server: %s", err)
}()
} </s> add DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 | https://github.com/AdguardTeam/AdGuardHome/commit/9671050e5b520e3cf979b113f19e554e6402a3c6 | .golangci.yml |
keep keep keep keep replace | <mask> - Error return value of ..*.Shutdown.
<mask> # goconst
<mask> - string .forcesafesearch.google.com. has 3 occurrences
<mask> # gosec: Subprocess launched with function call as argument or cmd arguments
<mask> - G204 </s> + config: add "debug_pprof" setting
Squashed commit of the following:
commit 96d185cf4acc55b21a00d10072e0a641ef7655b8
Merge: 3b75a8cb 9b7c1181
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 15:57:50 2020 +0300
Merge remote-tracking branch 'origin/master' into add-pprof
commit 3b75a8cbec5d72be8865a56bfd7ebb8b0673c3bc
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 13:52:36 2020 +0300
* use localhost:6060 for pprof
commit f66f2fbd7409b98cd9f7d297c268fca998f85e3b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 12:46:25 2020 +0300
minor
commit 6e38712fb5542f612675858eb957efdefc38f9b0
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 11:59:39 2020 +0300
use separate HTTP server for pprof
commit 988d95b5fad22f536bf9204b6b96f3697cf9a589
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 17:04:04 2020 +0300
minor
commit 90ee6e9753be2af49467687cdf71c35b3943b78b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 16:57:38 2020 +0300
* use modified version of pprof
commit 413002220fe0717950539a8b7e6b0f31cef31bb8
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 16:35:21 2020 +0300
minor
commit d4655d3849de1d9fe97efdb7f18fc21d5ac19eda
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 15:57:57 2020 +0300
+ config: add "enable_pprof" setting </s> add # gosec: Profiling endpoint is automatically exposed on /debug/pprof
- G108 </s> add - util/pprof.go </s> add - G204 </s> add if config.DebugPProf {
mux := http.NewServeMux()
util.PProfRegisterWebHandlers(mux)
go func() {
log.Info("pprof: listening on localhost:6060")
err := http.ListenAndServe("localhost:6060", mux)
log.Error("Error while running the pprof server: %s", err)
}()
} </s> add DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 | https://github.com/AdguardTeam/AdGuardHome/commit/9671050e5b520e3cf979b113f19e554e6402a3c6 | .golangci.yml |
keep keep keep add | <mask> # gosec: Profiling endpoint is automatically exposed on /debug/pprof
<mask> - G108
<mask> # gosec: Subprocess launched with function call as argument or cmd arguments
<mask> - G204
</s> + config: add "debug_pprof" setting
Squashed commit of the following:
commit 96d185cf4acc55b21a00d10072e0a641ef7655b8
Merge: 3b75a8cb 9b7c1181
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 15:57:50 2020 +0300
Merge remote-tracking branch 'origin/master' into add-pprof
commit 3b75a8cbec5d72be8865a56bfd7ebb8b0673c3bc
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 13:52:36 2020 +0300
* use localhost:6060 for pprof
commit f66f2fbd7409b98cd9f7d297c268fca998f85e3b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 12:46:25 2020 +0300
minor
commit 6e38712fb5542f612675858eb957efdefc38f9b0
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 11:59:39 2020 +0300
use separate HTTP server for pprof
commit 988d95b5fad22f536bf9204b6b96f3697cf9a589
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 17:04:04 2020 +0300
minor
commit 90ee6e9753be2af49467687cdf71c35b3943b78b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 16:57:38 2020 +0300
* use modified version of pprof
commit 413002220fe0717950539a8b7e6b0f31cef31bb8
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 16:35:21 2020 +0300
minor
commit d4655d3849de1d9fe97efdb7f18fc21d5ac19eda
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 15:57:57 2020 +0300
+ config: add "enable_pprof" setting </s> add # gosec: Profiling endpoint is automatically exposed on /debug/pprof
- G108 </s> add - util/pprof.go </s> remove - G204 </s> add </s> add if config.DebugPProf {
mux := http.NewServeMux()
util.PProfRegisterWebHandlers(mux)
go func() {
log.Info("pprof: listening on localhost:6060")
err := http.ListenAndServe("localhost:6060", mux)
log.Error("Error while running the pprof server: %s", err)
}()
} </s> add DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 | https://github.com/AdguardTeam/AdGuardHome/commit/9671050e5b520e3cf979b113f19e554e6402a3c6 | .golangci.yml |
keep keep add keep keep keep keep | <mask> ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
<mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code
<mask> RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
<mask>
<mask> // TTL for a web session (in hours)
<mask> // An active session is automatically refreshed once a day.
<mask> WebSessionTTLHours uint32 `yaml:"web_session_ttl"`
</s> + config: add "debug_pprof" setting
Squashed commit of the following:
commit 96d185cf4acc55b21a00d10072e0a641ef7655b8
Merge: 3b75a8cb 9b7c1181
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 15:57:50 2020 +0300
Merge remote-tracking branch 'origin/master' into add-pprof
commit 3b75a8cbec5d72be8865a56bfd7ebb8b0673c3bc
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 13:52:36 2020 +0300
* use localhost:6060 for pprof
commit f66f2fbd7409b98cd9f7d297c268fca998f85e3b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 12:46:25 2020 +0300
minor
commit 6e38712fb5542f612675858eb957efdefc38f9b0
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 11:59:39 2020 +0300
use separate HTTP server for pprof
commit 988d95b5fad22f536bf9204b6b96f3697cf9a589
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 17:04:04 2020 +0300
minor
commit 90ee6e9753be2af49467687cdf71c35b3943b78b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 16:57:38 2020 +0300
* use modified version of pprof
commit 413002220fe0717950539a8b7e6b0f31cef31bb8
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 16:35:21 2020 +0300
minor
commit d4655d3849de1d9fe97efdb7f18fc21d5ac19eda
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 15:57:57 2020 +0300
+ config: add "enable_pprof" setting </s> add if config.DebugPProf {
mux := http.NewServeMux()
util.PProfRegisterWebHandlers(mux)
go func() {
log.Info("pprof: listening on localhost:6060")
err := http.ListenAndServe("localhost:6060", mux)
log.Error("Error while running the pprof server: %s", err)
}()
} </s> add - G204 </s> remove - G204 </s> add </s> add # gosec: Profiling endpoint is automatically exposed on /debug/pprof
- G108 </s> add - util/pprof.go | https://github.com/AdguardTeam/AdGuardHome/commit/9671050e5b520e3cf979b113f19e554e6402a3c6 | home/config.go |
keep add keep keep keep keep keep | <mask> log.Fatal(err)
<mask> }
<mask> }
<mask>
<mask> err := os.MkdirAll(Context.getDataDir(), 0755)
<mask> if err != nil {
<mask> log.Fatalf("Cannot create DNS data dir at %s: %s", Context.getDataDir(), err)
</s> + config: add "debug_pprof" setting
Squashed commit of the following:
commit 96d185cf4acc55b21a00d10072e0a641ef7655b8
Merge: 3b75a8cb 9b7c1181
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 15:57:50 2020 +0300
Merge remote-tracking branch 'origin/master' into add-pprof
commit 3b75a8cbec5d72be8865a56bfd7ebb8b0673c3bc
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 13:52:36 2020 +0300
* use localhost:6060 for pprof
commit f66f2fbd7409b98cd9f7d297c268fca998f85e3b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 12:46:25 2020 +0300
minor
commit 6e38712fb5542f612675858eb957efdefc38f9b0
Author: Simon Zolin <s.zolin@adguard.com>
Date: Wed Apr 22 11:59:39 2020 +0300
use separate HTTP server for pprof
commit 988d95b5fad22f536bf9204b6b96f3697cf9a589
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 17:04:04 2020 +0300
minor
commit 90ee6e9753be2af49467687cdf71c35b3943b78b
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Apr 21 16:57:38 2020 +0300
* use modified version of pprof
commit 413002220fe0717950539a8b7e6b0f31cef31bb8
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 16:35:21 2020 +0300
minor
commit d4655d3849de1d9fe97efdb7f18fc21d5ac19eda
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Apr 20 15:57:57 2020 +0300
+ config: add "enable_pprof" setting </s> add DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> add - G204 </s> remove - G204 </s> add </s> add # gosec: Profiling endpoint is automatically exposed on /debug/pprof
- G108 </s> add - util/pprof.go | https://github.com/AdguardTeam/AdGuardHome/commit/9671050e5b520e3cf979b113f19e554e6402a3c6 | home/home.go |
keep keep keep keep replace replace keep keep | <mask> "down": "Down",
<mask> "fix": "Fix",
<mask> "dns_providers": "Here is a <0>list of known DNS providers</0> to choose from.",
<mask> "update_now": "Update now",
<mask> "update_failed": "Update failed",
<mask> "update_failed_try_later": "Update failed, please try again later",
<mask> "processing_update": "Please wait, AdGuard Home is being updated"
<mask> } </s> * client: add link to the update error </s> add .toast__content a {
font-weight: 600;
color: #fff;
text-decoration: underline;
}
</s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> add t: PropTypes.func.isRequired, </s> remove dispatch(addErrorToast({ error: 'update_failed' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> add const {
type, id, t, message,
} = this.props;
</s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/__locales/en.json |
keep keep add keep keep keep keep keep keep | <mask>
<mask> export const addErrorToast = createAction('ADD_ERROR_TOAST');
<mask> export const addSuccessToast = createAction('ADD_SUCCESS_TOAST');
<mask> export const removeToast = createAction('REMOVE_TOAST');
<mask>
<mask> export const toggleSettingStatus = createAction('SETTING_STATUS_TOGGLE');
<mask> export const showSettingsFailure = createAction('SETTINGS_FAILURE_SHOW');
<mask>
<mask> export const toggleSetting = (settingKey, status) => async (dispatch) => {
</s> * client: add link to the update error </s> remove dispatch(addErrorToast({ error: 'update_failed' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> remove const timeout = this.props.type === 'error' ? 30000 : 5000;
</s> add const timeout = this.props.type === 'success' ? 5000 : 30000; </s> remove dispatch(addErrorToast({ error: 'update_failed_try_later' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> add const {
type, id, t, message,
} = this.props;
| https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/actions/index.js |
keep keep keep keep replace keep keep keep keep keep | <mask> let count = attempts || 1;
<mask> let timeout;
<mask>
<mask> if (count > 60) {
<mask> dispatch(addErrorToast({ error: 'update_failed_try_later' }));
<mask> dispatch(getUpdateFailure());
<mask> return false;
<mask> }
<mask>
<mask> const rmTimeout = t => t && clearTimeout(t);
</s> * client: add link to the update error </s> remove dispatch(addErrorToast({ error: 'update_failed' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> add export const addNoticeToast = createAction('ADD_NOTICE_TOAST'); </s> remove const timeout = this.props.type === 'error' ? 30000 : 5000;
</s> add const timeout = this.props.type === 'success' ? 5000 : 30000; | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/actions/index.js |
keep keep keep keep replace replace keep keep keep keep keep | <mask> time,
<mask> ...args,
<mask> );
<mask>
<mask> console.log(count);
<mask>
<mask> axios.get('control/status')
<mask> .then((response) => {
<mask> rmTimeout(timeout);
<mask> if (response) {
<mask> dispatch(getUpdateSuccess());
</s> * client: add link to the update error </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> remove dispatch(addErrorToast({ error: 'update_failed_try_later' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> remove <button className="toast__dismiss" onClick={() => this.props.removeToast(this.props.id)}>
</s> add <button className="toast__dismiss" onClick={() => this.props.removeToast(id)}> </s> remove const timeout = this.props.type === 'error' ? 30000 : 5000;
</s> add const timeout = this.props.type === 'success' ? 5000 : 30000; | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/actions/index.js |
keep keep keep keep replace keep keep keep keep keep | <mask> };
<mask>
<mask> checkUpdate();
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error: 'update_failed' }));
<mask> dispatch(getUpdateFailure());
<mask> }
<mask> };
<mask>
<mask> export const getClientsRequest = createAction('GET_CLIENTS_REQUEST');
</s> * client: add link to the update error </s> remove dispatch(addErrorToast({ error: 'update_failed_try_later' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> add t: PropTypes.func.isRequired, </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> add export const addNoticeToast = createAction('ADD_NOTICE_TOAST'); </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
| https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/actions/index.js |
keep add keep keep keep keep keep | <mask> }
<mask>
<mask> .toast__dismiss {
<mask> display: block;
<mask> flex: 0 0 auto;
<mask> padding: 0;
<mask> background: transparent;
</s> * client: add link to the update error </s> remove <div className={`toast toast--${this.props.type}`}>
</s> add <div className={`toast toast--${type}`}> </s> remove <button className="toast__dismiss" onClick={() => this.props.removeToast(this.props.id)}>
</s> add <button className="toast__dismiss" onClick={() => this.props.removeToast(id)}> </s> remove <Trans>{this.props.message}</Trans>
</s> add {this.showMessage(t, type, message)} </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> add const {
type, id, t, message,
} = this.props;
| https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/components/Toasts/Toast.css |
keep keep keep keep replace keep keep keep keep keep | <mask> import { Trans, withNamespaces } from 'react-i18next';
<mask>
<mask> class Toast extends Component {
<mask> componentDidMount() {
<mask> const timeout = this.props.type === 'error' ? 30000 : 5000;
<mask>
<mask> setTimeout(() => {
<mask> this.props.removeToast(this.props.id);
<mask> }, timeout);
<mask> }
</s> * client: add link to the update error </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> add const {
type, id, t, message,
} = this.props;
</s> remove dispatch(addErrorToast({ error: 'update_failed' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> add t: PropTypes.func.isRequired, | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/components/Toasts/Toast.js |
keep keep add keep keep keep keep keep | <mask> return false;
<mask> }
<mask>
<mask> render() {
<mask> const {
<mask> type, id, t, message,
<mask> } = this.props;
<mask>
</s> * client: add link to the update error </s> add const {
type, id, t, message,
} = this.props;
</s> remove dispatch(addErrorToast({ error: 'update_failed_try_later' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> remove const timeout = this.props.type === 'error' ? 30000 : 5000;
</s> add const timeout = this.props.type === 'success' ? 5000 : 30000; </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> remove dispatch(addErrorToast({ error: 'update_failed' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/components/Toasts/Toast.js |
keep keep keep add keep keep keep keep keep | <mask> return <Trans>{message}</Trans>;
<mask> }
<mask>
<mask> render() {
<mask> return (
<mask> <div className={`toast toast--${type}`}>
<mask> <p className="toast__content">
<mask> {this.showMessage(t, type, message)}
<mask> </p>
</s> * client: add link to the update error </s> remove <Trans>{this.props.message}</Trans>
</s> add {this.showMessage(t, type, message)} </s> remove <div className={`toast toast--${this.props.type}`}>
</s> add <div className={`toast toast--${type}`}> </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> remove <button className="toast__dismiss" onClick={() => this.props.removeToast(this.props.id)}>
</s> add <button className="toast__dismiss" onClick={() => this.props.removeToast(id)}> </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> remove dispatch(addErrorToast({ error: 'update_failed_try_later' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/components/Toasts/Toast.js |
keep keep replace keep replace keep keep keep keep | <mask> render() {
<mask> return (
<mask> <div className={`toast toast--${this.props.type}`}>
<mask> <p className="toast__content">
<mask> <Trans>{this.props.message}</Trans>
<mask> </p>
<mask> <button className="toast__dismiss" onClick={() => this.props.removeToast(this.props.id)}>
<mask> <svg stroke="#fff" fill="none" width="20" height="20" strokeWidth="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m18 6-12 12"/><path d="m6 6 12 12"/></svg>
<mask> </button>
</s> * client: add link to the update error </s> remove <button className="toast__dismiss" onClick={() => this.props.removeToast(this.props.id)}>
</s> add <button className="toast__dismiss" onClick={() => this.props.removeToast(id)}> </s> add const {
type, id, t, message,
} = this.props;
</s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> add .toast__content a {
font-weight: 600;
color: #fff;
text-decoration: underline;
}
</s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/components/Toasts/Toast.js |
keep keep keep keep replace keep keep keep keep keep | <mask> <div className={`toast toast--${this.props.type}`}>
<mask> <p className="toast__content">
<mask> <Trans>{this.props.message}</Trans>
<mask> </p>
<mask> <button className="toast__dismiss" onClick={() => this.props.removeToast(this.props.id)}>
<mask> <svg stroke="#fff" fill="none" width="20" height="20" strokeWidth="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m18 6-12 12"/><path d="m6 6 12 12"/></svg>
<mask> </button>
<mask> </div>
<mask> );
<mask> }
</s> * client: add link to the update error </s> remove <Trans>{this.props.message}</Trans>
</s> add {this.showMessage(t, type, message)} </s> remove <div className={`toast toast--${this.props.type}`}>
</s> add <div className={`toast toast--${type}`}> </s> add const {
type, id, t, message,
} = this.props;
</s> remove console.log(count);
</s> add </s> add .toast__content a {
font-weight: 600;
color: #fff;
text-decoration: underline;
}
</s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/components/Toasts/Toast.js |
keep keep keep add keep keep keep keep keep | <mask> }
<mask> }
<mask>
<mask> Toast.propTypes = {
<mask> id: PropTypes.string.isRequired,
<mask> message: PropTypes.string.isRequired,
<mask> type: PropTypes.string.isRequired,
<mask> removeToast: PropTypes.func.isRequired,
<mask> };
</s> * client: add link to the update error </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> remove dispatch(addErrorToast({ error: 'update_failed' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> add const {
type, id, t, message,
} = this.props;
</s> remove const timeout = this.props.type === 'error' ? 30000 : 5000;
</s> add const timeout = this.props.type === 'success' ? 5000 : 30000; | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/components/Toasts/Toast.js |
keep keep keep replace keep keep keep keep keep | <mask> import { handleActions } from 'redux-actions';
<mask> import nanoid from 'nanoid';
<mask>
<mask> import { addErrorToast, addSuccessToast, removeToast } from '../actions';
<mask>
<mask> const toasts = handleActions({
<mask> [addErrorToast]: (state, { payload }) => {
<mask> const errorToast = {
<mask> id: nanoid(),
</s> * client: add link to the update error </s> remove const timeout = this.props.type === 'error' ? 30000 : 5000;
</s> add const timeout = this.props.type === 'success' ? 5000 : 30000; </s> add [addNoticeToast]: (state, { payload }) => {
const noticeToast = {
id: nanoid(),
message: payload.error.toString(),
type: 'notice',
};
const newState = { ...state, notices: [...state.notices, noticeToast] };
return newState;
}, </s> add export const addNoticeToast = createAction('ADD_NOTICE_TOAST'); </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> add t: PropTypes.func.isRequired, </s> add const {
type, id, t, message,
} = this.props;
| https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/reducers/toasts.js |
keep keep keep add keep keep keep keep keep keep | <mask>
<mask> const newState = { ...state, notices: [...state.notices, successToast] };
<mask> return newState;
<mask> },
<mask> [removeToast]: (state, { payload }) => {
<mask> const filtered = state.notices.filter(notice => notice.id !== payload);
<mask> const newState = { ...state, notices: filtered };
<mask> return newState;
<mask> },
<mask> }, { notices: [] });
</s> * client: add link to the update error </s> remove import { addErrorToast, addSuccessToast, removeToast } from '../actions';
</s> add import { addErrorToast, addSuccessToast, addNoticeToast, removeToast } from '../actions'; </s> remove const timeout = this.props.type === 'error' ? 30000 : 5000;
</s> add const timeout = this.props.type === 'success' ? 5000 : 30000; </s> remove dispatch(addErrorToast({ error: 'update_failed' }));
</s> add dispatch(addNoticeToast({ error: 'update_failed' })); </s> add export const addNoticeToast = createAction('ADD_NOTICE_TOAST'); </s> add showMessage(t, type, message) {
if (type === 'notice') {
return <span dangerouslySetInnerHTML={{ __html: t(message) }} />;
}
return <Trans>{message}</Trans>;
}
</s> add t: PropTypes.func.isRequired, | https://github.com/AdguardTeam/AdGuardHome/commit/967517316fdc926ee38ef6f356b3af592e73bf00 | client/src/reducers/toasts.js |
keep keep keep keep replace keep keep keep keep keep | <mask>
<mask> require (
<mask> github.com/AdguardTeam/dnsproxy v0.26.0
<mask> github.com/AdguardTeam/golibs v0.4.2
<mask> github.com/AdguardTeam/urlfilter v0.9.1
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/fsnotify/fsnotify v1.4.7
<mask> github.com/gobuffalo/packr v1.30.1
<mask> github.com/joomcode/errorx v1.0.1
<mask> github.com/kardianos/service v1.0.0
</s> *: upd dependencies, go mod tidy </s> remove github.com/AdguardTeam/gomitmproxy v0.1.2/go.mod h1:Mrt/3EfiXIYY2aZ7KsLuCUJzUARD/fWJ119IfzOB13M=
github.com/AdguardTeam/urlfilter v0.9.1 h1:H0q1xig3mZjIEDH0/o2U/ezydwKGwxtQ56hz6LKPN2M=
github.com/AdguardTeam/urlfilter v0.9.1/go.mod h1:GHXPzEG59ezyff22lXSQ7dicj1kFZBrH5kmZ6EvQzfk=
</s> add github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU=
github.com/AdguardTeam/urlfilter v0.10.0 h1:/YZ4w/UF3KDkL4/QLrQtqalvwBfHHGgrMhk+u3Xm8Mo=
github.com/AdguardTeam/urlfilter v0.10.0/go.mod h1:aMuejlNxpWppOVjiEV87X6z0eMf7wsXHTAIWQuylfZY= </s> remove github.com/AdguardTeam/golibs v0.2.4 h1:GUssokegKxKF13K67Pgl0ZGwqHjNN6X7sep5ik6ORdY=
github.com/AdguardTeam/golibs v0.2.4/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
</s> add </s> remove github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
</s> add </s> remove github.com/joomcode/errorx v0.8.0 h1:GhAqPtcYuo1O7TOIbtzEIDzPGQ3SrKJ3tdjXNmUtDNo=
github.com/joomcode/errorx v0.8.0/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ=
</s> add </s> remove github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
</s> add </s> remove github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 h1:UUppSQnhf4Yc6xGxSkoQpPhb7RVzuv5Nb1mwJ5VId9s=
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
</s> add github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= | https://github.com/AdguardTeam/AdGuardHome/commit/96bee3955c263d7cf78531600f9b74581cbe7c5c | go.mod |
keep replace replace keep keep keep keep replace replace replace keep | <mask> github.com/AdguardTeam/dnsproxy v0.26.0/go.mod h1:hOYFV9TW+pd5XKYz7KZf2FFD8SvSPqjyGTxUae86s58=
<mask> github.com/AdguardTeam/golibs v0.2.4 h1:GUssokegKxKF13K67Pgl0ZGwqHjNN6X7sep5ik6ORdY=
<mask> github.com/AdguardTeam/golibs v0.2.4/go.mod h1:R3M+mAg3nWG4X4Hsag5eef/TckHFH12ZYhK7AzJc8+U=
<mask> github.com/AdguardTeam/golibs v0.4.0 h1:4VX6LoOqFe9p9Gf55BeD8BvJD6M6RDYmgEiHrENE9KU=
<mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/golibs v0.4.2 h1:7M28oTZFoFwNmp8eGPb3ImmYbxGaJLyQXeIFVHjME0o=
<mask> github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/gomitmproxy v0.1.2/go.mod h1:Mrt/3EfiXIYY2aZ7KsLuCUJzUARD/fWJ119IfzOB13M=
<mask> github.com/AdguardTeam/urlfilter v0.9.1 h1:H0q1xig3mZjIEDH0/o2U/ezydwKGwxtQ56hz6LKPN2M=
<mask> github.com/AdguardTeam/urlfilter v0.9.1/go.mod h1:GHXPzEG59ezyff22lXSQ7dicj1kFZBrH5kmZ6EvQzfk=
<mask> github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
</s> *: upd dependencies, go mod tidy </s> remove github.com/AdguardTeam/urlfilter v0.9.1
</s> add github.com/AdguardTeam/urlfilter v0.10.0 </s> remove github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 h1:UUppSQnhf4Yc6xGxSkoQpPhb7RVzuv5Nb1mwJ5VId9s=
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
</s> add github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= </s> remove github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
</s> add </s> remove github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
</s> add </s> remove github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
</s> add | https://github.com/AdguardTeam/AdGuardHome/commit/96bee3955c263d7cf78531600f9b74581cbe7c5c | go.sum |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.