docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
sequencelengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
hosts = []netip.Addr{aghnet.IPv4Localhost()}
<mask> func generateServerConfig() (newConf dnsforward.ServerConfig, err error) { <mask> dnsConf := config.DNS <mask> hosts := dnsConf.BindHosts <mask> if len(hosts) == 0 { <mask> hosts = []net.IP{{127, 0, 0, 1}} <mask> } <mask> <mask> newConf = dnsforward.ServerConfig{ <mask> UDPListenAddrs: ipsToUDPAddrs(hosts, dnsConf.Port), <mask> TCPListenAddrs: ipsToTCPAddrs(hosts, dnsConf.Port), </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove addrs = appendDNSAddrs(addrs, net.IP{127, 0, 0, 1}) </s> add addr := aghnet.IPv4Localhost() addrs = appendDNSAddrs(addrs, addr) </s> remove err := CheckPort("udp", net.IP{0, 0, 0, 0}, 0) </s> add err := CheckPort("udp", netip.AddrPortFrom(netip.IPv4Unspecified(), 0)) </s> remove if len(v4Conf.RangeStart) == 0 { </s> add if !v4Conf.RangeStart.IsValid() { </s> remove func newDNSCrypt(hosts []net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) { </s> add func newDNSCrypt(hosts []netip.Addr, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) { </s> remove restartHTTP = !config.BindHost.Equal(req.Web.IP) || config.BindPort != req.Web.Port </s> add restartHTTP = config.BindHost != req.Web.IP || config.BindPort != req.Web.Port
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/dns.go
func newDNSCrypt(hosts []netip.Addr, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
<mask> <mask> return newConf, nil <mask> } <mask> <mask> func newDNSCrypt(hosts []net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) { <mask> if tlsConf.DNSCryptConfigFile == "" { <mask> return dnscc, errors.Error("no dnscrypt_config_file") <mask> } <mask> <mask> f, err := os.Open(tlsConf.DNSCryptConfigFile) </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove return Context.web.httpsServer.server != nil || aghnet.CheckPort("tcp", config.BindHost, port) == nil </s> add if Context.web.httpsServer.server != nil { return true } return aghnet.CheckPort("tcp", netip.AddrPortFrom(config.BindHost, uint16(port))) == nil </s> remove func ipsToUDPAddrs(ips []net.IP, port int) (udpAddrs []*net.UDPAddr) { </s> add func ipsToUDPAddrs(ips []netip.Addr, port int) (udpAddrs []*net.UDPAddr) { </s> remove func ipsToTCPAddrs(ips []net.IP, port int) (tcpAddrs []*net.TCPAddr) { </s> add func ipsToTCPAddrs(ips []netip.Addr, port int) (tcpAddrs []*net.TCPAddr) { </s> remove func ifaceIPv4Subnet(iface *net.Interface) (subnet *net.IPNet, err error) { </s> add func ifaceIPv4Subnet(iface *net.Interface) (subnet netip.Prefix, err error) { </s> remove if ipNet.IP == nil { </s> add if !ipNet.Addr().IsValid() {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/dns.go
"net/netip"
<mask> "net" <mask> "net/http" <mask> "net/http/pprof" <mask> "net/url" <mask> "os" <mask> "os/signal" <mask> "path/filepath" </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "net" </s> add </s> remove "net" </s> add </s> remove "net" </s> add "net/netip"
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/home.go
if opts.bindHost.IsValid() {
<mask> config.BindPort = opts.bindPort <mask> } <mask> <mask> // override bind host/port from the console <mask> if opts.bindHost != nil { <mask> config.BindHost = opts.bindHost <mask> } <mask> if len(opts.pidFile) != 0 && writePIDFile(opts.pidFile) { <mask> Context.pidFileName = opts.pidFile <mask> } </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove restartHTTP = !config.BindHost.Equal(req.Web.IP) || config.BindPort != req.Web.Port </s> add restartHTTP = config.BindHost != req.Web.IP || config.BindPort != req.Web.Port </s> remove v4conf.Enabled = s.conf.Enabled && len(v4conf.RangeStart) != 0 </s> add v4conf.Enabled = s.conf.Enabled && v4conf.RangeStart.IsValid() </s> remove if ipnet.IP.To4() != nil { jsonIface.Addrs4 = append(jsonIface.Addrs4, ipnet.IP) </s> add if ip4 := ipnet.IP.To4(); ip4 != nil { addr := netip.AddrFrom4(*(*[4]byte)(ip4)) jsonIface.Addrs4 = append(jsonIface.Addrs4, addr) </s> remove err = aghnet.CheckPort("tcp", req.Web.IP, req.Web.Port) </s> add err = aghnet.CheckPort("tcp", netip.AddrPortFrom(req.Web.IP, uint16(req.Web.Port))) </s> remove jsonIface.Addrs6 = append(jsonIface.Addrs6, ipnet.IP) </s> add addr := netip.AddrFrom16(*(*[16]byte)(ipnet.IP)) jsonIface.Addrs6 = append(jsonIface.Addrs6, addr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/home.go
err := aghnet.CheckPort("tcp", netip.AddrPortFrom(aghnet.IPv4Localhost(), defaultPortDNS))
<mask> log.Fatal("This is the first launch of AdGuard Home. You must run it as Administrator.") <mask> } <mask> <mask> // We should check if AdGuard Home is able to bind to port 53 <mask> err := aghnet.CheckPort("tcp", net.IP{127, 0, 0, 1}, defaultPortDNS) <mask> if err != nil { <mask> if errors.Is(err, os.ErrPermission) { <mask> log.Fatal(`Permission check failed. <mask> <mask> AdGuard Home is not allowed to bind to privileged ports (for instance, port 53). </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove return aghnet.CheckPort("tcp", req.Web.IP, portInt) </s> add return aghnet.CheckPort("tcp", netip.AddrPortFrom(req.Web.IP, uint16(portInt))) </s> remove bindHost net.IP </s> add bindHost netip.Addr </s> remove return net.ParseIP(string(fields[2])) </s> add ip, err = netip.ParseAddr(string(fields[2])) if err != nil { return netip.Addr{} } return ip </s> remove BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client Users []webUser `yaml:"users"` // Users that can access HTTP server </s> add // BindHost is the address for the web interface server to listen on. BindHost netip.Addr `yaml:"bind_host"` // BindPort is the port for the web interface server to listen on. BindPort int `yaml:"bind_port"` // BetaBindPort is the port for the new client's web interface server to // listen on. BetaBindPort int `yaml:"beta_bind_port"` // Users are the clients capable for accessing the web interface. Users []webUser `yaml:"users"` </s> remove return nil </s> add return p
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/home.go
<mask> <mask> import ( <mask> "bytes" <mask> "encoding/json" <mask> "net" <mask> "net/http" <mask> "net/http/httptest" <mask> "testing" <mask> <mask> "github.com/AdguardTeam/golibs/netutil" </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "github.com/AdguardTeam/golibs/netutil" </s> add </s> remove "net" </s> add "net/netip" </s> remove "net" </s> add "net/netip"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/mobileconfig_test.go
"net/netip"
<mask> "net/http" <mask> "net/http/httptest" <mask> "testing" <mask> <mask> "github.com/stretchr/testify/assert" <mask> "github.com/stretchr/testify/require" </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "github.com/AdguardTeam/golibs/netutil" </s> add </s> remove "net" </s> add "net/netip" </s> remove "net" </s> add
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/mobileconfig_test.go
<mask> "net/http" <mask> "net/http/httptest" <mask> "testing" <mask> <mask> "github.com/AdguardTeam/golibs/netutil" <mask> "github.com/stretchr/testify/assert" <mask> "github.com/stretchr/testify/require" <mask> "howett.net/plist" <mask> ) <mask> </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "net" </s> add </s> remove "net" </s> add "net/netip" </s> remove "github.com/AdguardTeam/golibs/netutil" </s> add </s> remove "github.com/AdguardTeam/golibs/netutil" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/mobileconfig_test.go
BindHosts: []netip.Addr{netip.IPv4Unspecified()},
<mask> }) <mask> <mask> config = &configuration{ <mask> DNS: dnsConfig{ <mask> BindHosts: []net.IP{netutil.IPv4Zero()}, <mask> Port: defaultPortDNS, <mask> }, <mask> } <mask> <mask> Context.tls = &TLSMod{} </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove BindHosts: []net.IP{{0, 0, 0, 0}}, </s> add BindHosts: []netip.Addr{netip.IPv4Unspecified()}, </s> remove BindHost: net.IP{0, 0, 0, 0}, </s> add BindHost: netip.IPv4Unspecified(), </s> remove IP: anotherIP, </s> add IP: anotherIP.AsSlice(), </s> remove IP: anotherIP, </s> add IP: anotherIP.AsSlice(), </s> remove tcpAddrs = make([]*net.TCPAddr, len(ips)) for i, ip := range ips { tcpAddrs[i] = &net.TCPAddr{ IP: ip, Port: port, } </s> add tcpAddrs = make([]*net.TCPAddr, 0, len(ips)) for _, ip := range ips { tcpAddrs = append(tcpAddrs, net.TCPAddrFromAddrPort(netip.AddrPortFrom(ip, uint16(port))))
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/mobileconfig_test.go
"net/netip"
<mask> package home <mask> <mask> import ( <mask> "fmt" <mask> "net" <mask> "os" <mask> "strconv" <mask> "strings" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/version" </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "net" </s> add </s> remove "net" </s> add "net/netip" </s> remove "net" </s> add "net/netip"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options.go
bindHost netip.Addr
<mask> // [service.ControlAction] and [handleServiceControlAction]. <mask> serviceControlAction string <mask> <mask> // bindHost is the address on which to serve the HTTP UI. <mask> bindHost net.IP <mask> <mask> // bindPort is the port on which to serve the HTTP UI. <mask> bindPort int <mask> <mask> // checkConfig is true if the current invocation is only required to check </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client Users []webUser `yaml:"users"` // Users that can access HTTP server </s> add // BindHost is the address for the web interface server to listen on. BindHost netip.Addr `yaml:"bind_host"` // BindPort is the port for the web interface server to listen on. BindPort int `yaml:"bind_port"` // BetaBindPort is the port for the new client's web interface server to // listen on. BetaBindPort int `yaml:"beta_bind_port"` // Users are the clients capable for accessing the web interface. Users []webUser `yaml:"users"` </s> remove AuthBlockMin uint `yaml:"block_auth_min"` ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client Language string `yaml:"language"` // two-letter ISO 639-1 language code DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> add AuthBlockMin uint `yaml:"block_auth_min"` // ProxyURL is the address of proxy server for the internal HTTP client. ProxyURL string `yaml:"http_proxy"` // Language is a two-letter ISO 639-1 language code. Language string `yaml:"language"` // DebugPProf defines if the profiling HTTP handler will listen on :6060. DebugPProf bool `yaml:"debug_pprof"` </s> remove return aghnet.CheckPort("tcp", req.Web.IP, portInt) </s> add return aghnet.CheckPort("tcp", netip.AddrPortFrom(req.Web.IP, uint16(portInt))) </s> remove dnsIPAddrs []net.IP // IPv4 addresses to return to DHCP clients as DNS server addresses </s> add dnsIPAddrs []netip.Addr // IPv4 addresses to return to DHCP clients as DNS server addresses
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options.go
updateWithValue: func(o options, v string) (oo options, err error) { o.bindHost, err = netip.ParseAddr(v) return o, err
<mask> description: "Path to the working directory.", <mask> longName: "work-dir", <mask> shortName: "w", <mask> }, { <mask> updateWithValue: func(o options, v string) (options, error) { <mask> o.bindHost = net.ParseIP(v) <mask> return o, nil <mask> }, <mask> updateNoValue: nil, <mask> effect: nil, <mask> serialize: func(o options) (val string, ok bool) { <mask> if o.bindHost == nil { </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove if o.bindHost == nil { </s> add if !o.bindHost.IsValid() { </s> remove return nil, fmt.Errorf("couldn't get interfaces: %w", err) } else if len(ifaces) == 0 { return nil, errors.Error("couldn't find any legible interface") </s> add return nil, fmt.Errorf("failed to get addresses for interface %s: %w", iface.Name, err) </s> remove want: nil, </s> add want: netip.Addr{}, name: "bad_output", </s> remove if ipNet.IP == nil { </s> add if !ipNet.Addr().IsValid() { </s> remove for _, iface := range ifaces { var addrs []net.Addr addrs, err = iface.Addrs() if err != nil { return nil, fmt.Errorf("failed to get addresses for interface %s: %w", iface.Name, err) </s> add // Collect network interface addresses. for _, addr := range addrs { n, ok := addr.(*net.IPNet) if !ok { // Should be *net.IPNet, this is weird. return nil, fmt.Errorf("expected %[2]s to be %[1]T, got %[2]T", n, addr) } else if ip4 := n.IP.To4(); ip4 != nil { n.IP = ip4
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options.go
if !o.bindHost.IsValid() {
<mask> }, <mask> updateNoValue: nil, <mask> effect: nil, <mask> serialize: func(o options) (val string, ok bool) { <mask> if o.bindHost == nil { <mask> return "", false <mask> } <mask> <mask> return o.bindHost.String(), true <mask> }, </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove updateWithValue: func(o options, v string) (options, error) { o.bindHost = net.ParseIP(v) return o, nil </s> add updateWithValue: func(o options, v string) (oo options, err error) { o.bindHost, err = netip.ParseAddr(v) return o, err </s> remove want: nil, </s> add want: netip.Addr{}, name: "err_runcmd", </s> remove want: nil, </s> add want: netip.Addr{}, name: "bad_output", </s> remove name: "err_runcmd", </s> add </s> remove name: "bad_code", </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options.go
"net/netip"
<mask> package home <mask> <mask> import ( <mask> "fmt" <mask> "net" <mask> "testing" <mask> <mask> "github.com/stretchr/testify/assert" <mask> "github.com/stretchr/testify/require" <mask> ) </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "net" </s> add </s> remove "net" </s> add "net/netip" </s> remove "github.com/AdguardTeam/golibs/netutil" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options_test.go
wantAddr := netip.MustParseAddr("1.2.3.4") assert.Zero(t, testParseOK(t).bindHost, "empty is not host") assert.Equal(t, wantAddr, testParseOK(t, "-h", "1.2.3.4").bindHost, "-h is host")
<mask> testParseParamMissing(t, "--work-dir") <mask> } <mask> <mask> func TestParseBindHost(t *testing.T) { <mask> assert.Nil(t, testParseOK(t).bindHost, "empty is not host") <mask> assert.Equal(t, net.IPv4(1, 2, 3, 4), testParseOK(t, "-h", "1.2.3.4").bindHost, "-h is host") <mask> testParseParamMissing(t, "-h") <mask> <mask> assert.Equal(t, net.IPv4(1, 2, 3, 4), testParseOK(t, "--host", "1.2.3.4").bindHost, "--host is host") <mask> testParseParamMissing(t, "--host") <mask> } </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove assert.Equal(t, net.IPv4(1, 2, 3, 4), testParseOK(t, "--host", "1.2.3.4").bindHost, "--host is host") </s> add assert.Equal(t, wantAddr, testParseOK(t, "--host", "1.2.3.4").bindHost, "--host is host") </s> remove GatewayIP: net.IP{1, 2, 3, 1}, SubnetMask: net.IP{255, 255, 255, 0}, RangeStart: net.IP{1, 2, 3, 2}, RangeEnd: net.IP{1, 2, 3, 10}, </s> add GatewayIP: netip.MustParseAddr("1.2.3.1"), SubnetMask: netip.MustParseAddr("255.255.255.0"), RangeStart: netip.MustParseAddr("1.2.3.2"), RangeEnd: netip.MustParseAddr("1.2.3.10"), </s> remove known6 := net.IP{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, } </s> add known4 := netip.MustParseAddr("192.168.0.1") fullBroadcast4 := netip.MustParseAddr("255.255.255.255") known6 := netip.MustParseAddr("102:304:506:708:90a:b0c:d0e:f10") </s> remove opts: options{bindHost: net.IP{1, 2, 3, 4}}, </s> add </s> remove assert.True(t, s.conf.GatewayIP.Equal(resp.Router()[0])) assert.True(t, s.conf.GatewayIP.Equal(resp.ServerIdentifier())) assert.Equal(t, s.conf.subnet.Mask, resp.SubnetMask()) </s> add assert.True(t, resp.Router()[0].Equal(s.conf.GatewayIP.AsSlice())) assert.True(t, resp.ServerIdentifier().Equal(s.conf.GatewayIP.AsSlice())) ones, _ := resp.SubnetMask().Size() assert.Equal(t, s.conf.subnet.Bits(), ones)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options_test.go
assert.Equal(t, wantAddr, testParseOK(t, "--host", "1.2.3.4").bindHost, "--host is host")
<mask> assert.Nil(t, testParseOK(t).bindHost, "empty is not host") <mask> assert.Equal(t, net.IPv4(1, 2, 3, 4), testParseOK(t, "-h", "1.2.3.4").bindHost, "-h is host") <mask> testParseParamMissing(t, "-h") <mask> <mask> assert.Equal(t, net.IPv4(1, 2, 3, 4), testParseOK(t, "--host", "1.2.3.4").bindHost, "--host is host") <mask> testParseParamMissing(t, "--host") <mask> } <mask> <mask> func TestParseBindPort(t *testing.T) { <mask> assert.Equal(t, 0, testParseOK(t).bindPort, "empty is port 0") </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove assert.Nil(t, testParseOK(t).bindHost, "empty is not host") assert.Equal(t, net.IPv4(1, 2, 3, 4), testParseOK(t, "-h", "1.2.3.4").bindHost, "-h is host") </s> add wantAddr := netip.MustParseAddr("1.2.3.4") assert.Zero(t, testParseOK(t).bindHost, "empty is not host") assert.Equal(t, wantAddr, testParseOK(t, "-h", "1.2.3.4").bindHost, "-h is host") </s> remove assert.Equal(t, s.conf.RangeStart, resp.YourIPAddr) assert.Equal(t, s.conf.GatewayIP, resp.ServerIdentifier()) </s> add assert.True(t, resp.YourIPAddr.Equal(s.conf.RangeStart.AsSlice())) assert.True(t, resp.ServerIdentifier().Equal(s.conf.GatewayIP.AsSlice())) </s> remove assert.True(t, s.conf.GatewayIP.Equal(resp.Router()[0])) assert.True(t, s.conf.GatewayIP.Equal(resp.ServerIdentifier())) assert.Equal(t, s.conf.subnet.Mask, resp.SubnetMask()) </s> add assert.True(t, resp.Router()[0].Equal(s.conf.GatewayIP.AsSlice())) assert.True(t, resp.ServerIdentifier().Equal(s.conf.GatewayIP.AsSlice())) ones, _ := resp.SubnetMask().Size() assert.Equal(t, s.conf.subnet.Bits(), ones) </s> remove assert.True(t, s.conf.RangeStart.Equal(resp.YourIPAddr)) </s> add assert.True(t, resp.YourIPAddr.Equal(s.conf.RangeStart.AsSlice())) </s> remove assert.True(t, s.conf.GatewayIP.Equal(resp.Router()[0])) assert.True(t, s.conf.GatewayIP.Equal(resp.ServerIdentifier())) assert.Equal(t, s.conf.subnet.Mask, resp.SubnetMask()) </s> add assert.True(t, resp.Router()[0].Equal(s.conf.GatewayIP.AsSlice())) assert.True(t, resp.ServerIdentifier().Equal(s.conf.GatewayIP.AsSlice())) ones, _ := resp.SubnetMask().Size() assert.Equal(t, s.conf.subnet.Bits(), ones)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options_test.go
opts: options{bindHost: netip.MustParseAddr("1.2.3.4")},
<mask> opts: options{workDir: "path"}, <mask> }, { <mask> name: "bind_host", <mask> args: []string{"-h", "1.2.3.4"}, <mask> }, { <mask> name: "bind_port", <mask> args: []string{"-p", "666"}, <mask> opts: options{bindPort: 666}, <mask> }, { </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove opts: options{bindHost: net.IP{1, 2, 3, 4}}, </s> add </s> remove want: nil, </s> add want: netip.Addr{}, name: "bad_output",
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options_test.go
<mask> opts: options{workDir: "path"}, <mask> }, { <mask> name: "bind_host", <mask> args: []string{"-h", "1.2.3.4"}, <mask> opts: options{bindHost: net.IP{1, 2, 3, 4}}, <mask> }, { <mask> name: "bind_port", <mask> args: []string{"-p", "666"}, <mask> opts: options{bindPort: 666}, <mask> }, { </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove want: net.IP{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0xFF, }, </s> add want: netip.MustParseAddr("::ffff"), name: "success_v6", </s> remove want net.IP </s> add want netip.Addr name string </s> remove name: "success_v4", </s> add </s> remove want: net.IP{1, 2, 3, 4}.To16(), </s> add want: netip.MustParseAddr("1.2.3.4"), name: "success_v4",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/options_test.go
<mask> import ( <mask> "context" <mask> "crypto/tls" <mask> "io/fs" <mask> "net" <mask> "net/http" <mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghhttp" </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "net" </s> add </s> remove "net" </s> add "net/netip"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/web.go
"net/netip"
<mask> "io/fs" <mask> "net/http" <mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghhttp" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtls" </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove "net" </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/web.go
BindHost netip.Addr
<mask> type webConfig struct { <mask> clientFS fs.FS <mask> clientBetaFS fs.FS <mask> <mask> BindHost net.IP <mask> BindPort int <mask> BetaBindPort int <mask> PortHTTPS int <mask> <mask> // ReadTimeout is an option to pass to http.Server for setting an </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove BindHost net.IP `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client Users []webUser `yaml:"users"` // Users that can access HTTP server </s> add // BindHost is the address for the web interface server to listen on. BindHost netip.Addr `yaml:"bind_host"` // BindPort is the port for the web interface server to listen on. BindPort int `yaml:"bind_port"` // BetaBindPort is the port for the new client's web interface server to // listen on. BetaBindPort int `yaml:"beta_bind_port"` // Users are the clients capable for accessing the web interface. Users []webUser `yaml:"users"` </s> remove IP net.IP `json:"ip"` Port int `json:"port"` </s> add IP netip.Addr `json:"ip"` Port int `json:"port"` </s> remove IP net.IP `json:"ip"` Port int `json:"port"` Autofix bool `json:"autofix"` </s> add IP netip.Addr `json:"ip"` Port int `json:"port"` Autofix bool `json:"autofix"` </s> remove IP []net.IP `json:"ip"` Port int `json:"port"` </s> add IP []netip.Addr `json:"ip"` Port int `json:"port"` </s> remove BindHosts []net.IP `yaml:"bind_hosts"` Port int `yaml:"port"` </s> add BindHosts []netip.Addr `yaml:"bind_hosts"` Port int `yaml:"port"`
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/web.go
if Context.web.httpsServer.server != nil { return true } return aghnet.CheckPort("tcp", netip.AddrPortFrom(config.BindHost, uint16(port))) == nil
<mask> // available, unless the HTTPS server isn't active. <mask> // <mask> // TODO(a.garipov): Adapt for HTTP/3. <mask> func webCheckPortAvailable(port int) (ok bool) { <mask> return Context.web.httpsServer.server != nil || <mask> aghnet.CheckPort("tcp", config.BindHost, port) == nil <mask> } <mask> <mask> // TLSConfigChanged updates the TLS configuration and restarts the HTTPS server <mask> // if necessary. <mask> func (web *Web) TLSConfigChanged(ctx context.Context, tlsConf tlsConfigSettings) { </s> Pull request: Migrate to netip.Addr vol.1 Merge in DNS/adguard-home from 2926-lla-v6 to master Updates #2926. Updates #5035. Squashed commit of the following: commit 2e770d4b6d4e1ec3f7762f2f2466662983bf146c Merge: 25c1afc5 893358ea Author: Eugene Burkov <[email protected]> Date: Fri Oct 14 15:14:56 2022 +0300 Merge branch 'master' into 2926-lla-v6 commit 25c1afc5f0a5027fafac9dee77618886aefee29c Author: Eugene Burkov <[email protected]> Date: Thu Oct 13 18:24:20 2022 +0300 all: imp code, docs commit 59549c4f74ee17b10eae542d1f1828d4e59894c9 Author: Eugene Burkov <[email protected]> Date: Tue Oct 11 18:49:09 2022 +0300 dhcpd: use netip initially commit 1af623096b0517d07752385540f2f750f7f5b3bb Author: Eugene Burkov <[email protected]> Date: Fri Sep 30 18:03:52 2022 +0300 all: imp docs, code commit e9faeb71dbc0e887b25a7f3d5b33a401805f2ae7 Author: Eugene Burkov <[email protected]> Date: Thu Sep 29 14:56:37 2022 +0300 all: use netip for web commit 38305e555a6884c3bd1b0839330b942ce0e59093 Author: Eugene Burkov <[email protected]> Date: Wed Sep 28 19:13:58 2022 +0300 add basic lla </s> remove func newDNSCrypt(hosts []net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) { </s> add func newDNSCrypt(hosts []netip.Addr, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) { </s> remove if !sid.Equal(s.conf.dnsIPAddrs[0]) { </s> add if !sid.Equal(s.conf.dnsIPAddrs[0].AsSlice()) { </s> remove config.DNS.BindHosts = []net.IP{req.DNS.IP} </s> add config.DNS.BindHosts = []netip.Addr{req.DNS.IP} </s> remove defaultIP := net.IP{192, 168, 1, 1} </s> add defaultIP := netip.MustParseAddr("192.168.1.1") </s> remove if !s.conf.subnet.Contains(reqIP) { </s> add if !s.conf.subnet.Contains(netip.AddrFrom4(*(*[4]byte)(ip4))) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4582b1c9198dcbc1927b74080839e81ba347265a
internal/home/web.go
import { Trans, withNamespaces } from 'react-i18next';
<mask> import React, { Component } from 'react'; <mask> import PropTypes from 'prop-types'; <mask> import Card from '../ui/Card'; <mask> <mask> class UserRules extends Component { <mask> handleChange = (e) => { <mask> const { value } = e.currentTarget; </s> Complete translate client to Vietnamese </s> remove export default class UserRules extends Component { </s> add class UserRules extends Component {
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
class UserRules extends Component {
<mask> import React, { Component } from 'react'; <mask> import PropTypes from 'prop-types'; <mask> import Card from '../ui/Card'; <mask> <mask> export default class UserRules extends Component { <mask> handleChange = (e) => { <mask> const { value } = e.currentTarget; <mask> this.props.handleRulesChange(value); <mask> }; <mask> </s> Complete translate client to Vietnamese
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
const { t } = this.props;
<mask> <mask> render() { <mask> return ( <mask> <Card <mask> title={ t('Custom filtering rules') } <mask> subtitle={ t('Enter one rule on a line. You can use either adblock rules or hosts files syntax.') } </s> Complete translate client to Vietnamese </s> remove title="Custom filtering rules" subtitle="Enter one rule on a line. You can use either adblock rules or hosts files syntax." </s> add title={ t('Custom filtering rules') } subtitle={ t('Enter one rule on a line. You can use either adblock rules or hosts files syntax.') } </s> remove title="Filters and hosts blocklists" subtitle="AdGuard Home understands basic adblock rules and hosts files syntax." </s> add title={ t('Filters and hosts blocklists') } subtitle={ t('AdGuard Home understands basic adblock rules and hosts files syntax.') } </s> remove title="New filter subscription" inputDescription="Enter a valid URL to a filter subscription or a hosts file." </s> add title={ t('New filter subscription') } inputDescription={ t('Enter a valid URL to a filter subscription or a hosts file.') } </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } />
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
title={ t('Custom filtering rules') } subtitle={ t('Enter one rule on a line. You can use either adblock rules or hosts files syntax.') }
<mask> <mask> render() { <mask> return ( <mask> <Card <mask> title="Custom filtering rules" <mask> subtitle="Enter one rule on a line. You can use either adblock rules or hosts files syntax." <mask> > <mask> <form onSubmit={this.handleSubmit}> <mask> <textarea className="form-control form-control--textarea-large" value={this.props.userRules} onChange={this.handleChange} /> <mask> <div className="card-actions"> <mask> <button </s> Complete translate client to Vietnamese </s> remove title="Filters and hosts blocklists" subtitle="AdGuard Home understands basic adblock rules and hosts files syntax." </s> add title={ t('Filters and hosts blocklists') } subtitle={ t('AdGuard Home understands basic adblock rules and hosts files syntax.') } </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } /> </s> remove title="New filter subscription" inputDescription="Enter a valid URL to a filter subscription or a hosts file." </s> add title={ t('New filter subscription') } inputDescription={ t('Enter a valid URL to a filter subscription or a hosts file.') }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
<Trans>Apply</Trans>
<mask> className="btn btn-success btn-standart" <mask> type="submit" <mask> onClick={this.handleSubmit} <mask> > <mask> Apply <mask> </button> <mask> </div> <mask> </form> <mask> <hr/> <mask> <div className="list leading-loose"> </s> Complete translate client to Vietnamese </s> remove Examples: </s> add <Trans>Examples</Trans>: </s> remove <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> add <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button> </s> remove noDataText="No filters added" </s> add noDataText={ t('No filters added') } </s> remove {buttonText} </s> add <Trans>{buttonText}</Trans> </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
<Trans>Examples</Trans>:
<mask> </div> <mask> </form> <mask> <hr/> <mask> <div className="list leading-loose"> <mask> Examples: <mask> <ol className="leading-loose"> <mask> <li> <mask> <code>||example.org^</code> - block access to the example.org domain <mask> and all its subdomains <mask> </li> </s> Complete translate client to Vietnamese </s> remove <code>||example.org^</code> - block access to the example.org domain and all its subdomains </s> add <code>||example.org^</code> - { t('block access to the example.org domain and all its subdomains') } </s> remove <code> @@||example.org^</code> - unblock access to the example.org domain and all its subdomains </s> add <code> @@||example.org^</code> - { t('unblock access to the example.org domain and all its subdomains') } </s> remove <code>127.0.0.1 example.org</code> - AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains). </s> add <code>127.0.0.1 example.org</code> - { t('AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains).') } </s> remove Apply </s> add <Trans>Apply</Trans> </s> remove <code>! Here goes a comment</code> - just a comment </s> add <code>{ t('! Here goes a comment') }</code> - { t('just a comment') }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
<code>||example.org^</code> - { t('block access to the example.org domain and all its subdomains') }
<mask> <div className="list leading-loose"> <mask> Examples: <mask> <ol className="leading-loose"> <mask> <li> <mask> <code>||example.org^</code> - block access to the example.org domain <mask> and all its subdomains <mask> </li> <mask> <li> <mask> <code> @@||example.org^</code> - unblock access to the example.org <mask> domain and all its subdomains <mask> </li> </s> Complete translate client to Vietnamese </s> remove <code> @@||example.org^</code> - unblock access to the example.org domain and all its subdomains </s> add <code> @@||example.org^</code> - { t('unblock access to the example.org domain and all its subdomains') } </s> remove Examples: </s> add <Trans>Examples</Trans>: </s> remove <code>127.0.0.1 example.org</code> - AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains). </s> add <code>127.0.0.1 example.org</code> - { t('AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains).') } </s> remove <code>! Here goes a comment</code> - just a comment </s> add <code>{ t('! Here goes a comment') }</code> - { t('just a comment') } </s> remove <code># Also a comment</code> - just a comment </s> add <code>{ t('# Also a comment') }</code> - { t('just a comment') }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
<code> @@||example.org^</code> - { t('unblock access to the example.org domain and all its subdomains') }
<mask> <code>||example.org^</code> - block access to the example.org domain <mask> and all its subdomains <mask> </li> <mask> <li> <mask> <code> @@||example.org^</code> - unblock access to the example.org <mask> domain and all its subdomains <mask> </li> <mask> <li> <mask> <code>127.0.0.1 example.org</code> - AdGuard Home will now return <mask> 127.0.0.1 address for the example.org domain (but not its subdomains). <mask> </li> </s> Complete translate client to Vietnamese </s> remove <code>127.0.0.1 example.org</code> - AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains). </s> add <code>127.0.0.1 example.org</code> - { t('AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains).') } </s> remove <code>||example.org^</code> - block access to the example.org domain and all its subdomains </s> add <code>||example.org^</code> - { t('block access to the example.org domain and all its subdomains') } </s> remove Examples: </s> add <Trans>Examples</Trans>: </s> remove <code>! Here goes a comment</code> - just a comment </s> add <code>{ t('! Here goes a comment') }</code> - { t('just a comment') } </s> remove <code># Also a comment</code> - just a comment </s> add <code>{ t('# Also a comment') }</code> - { t('just a comment') }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
<code>127.0.0.1 example.org</code> - { t('AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains).') }
<mask> <code> @@||example.org^</code> - unblock access to the example.org <mask> domain and all its subdomains <mask> </li> <mask> <li> <mask> <code>127.0.0.1 example.org</code> - AdGuard Home will now return <mask> 127.0.0.1 address for the example.org domain (but not its subdomains). <mask> </li> <mask> <li> <mask> <code>! Here goes a comment</code> - just a comment <mask> </li> <mask> <li> </s> Complete translate client to Vietnamese </s> remove <code> @@||example.org^</code> - unblock access to the example.org domain and all its subdomains </s> add <code> @@||example.org^</code> - { t('unblock access to the example.org domain and all its subdomains') } </s> remove <code>! Here goes a comment</code> - just a comment </s> add <code>{ t('! Here goes a comment') }</code> - { t('just a comment') } </s> remove <code>||example.org^</code> - block access to the example.org domain and all its subdomains </s> add <code>||example.org^</code> - { t('block access to the example.org domain and all its subdomains') } </s> remove Examples: </s> add <Trans>Examples</Trans>: </s> remove <code># Also a comment</code> - just a comment </s> add <code>{ t('# Also a comment') }</code> - { t('just a comment') }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
<code>{ t('! Here goes a comment') }</code> - { t('just a comment') }
<mask> <code>127.0.0.1 example.org</code> - AdGuard Home will now return <mask> 127.0.0.1 address for the example.org domain (but not its subdomains). <mask> </li> <mask> <li> <mask> <code>! Here goes a comment</code> - just a comment <mask> </li> <mask> <li> <mask> <code># Also a comment</code> - just a comment <mask> </li> <mask> </ol> </s> Complete translate client to Vietnamese </s> remove <code>127.0.0.1 example.org</code> - AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains). </s> add <code>127.0.0.1 example.org</code> - { t('AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains).') } </s> remove <code># Also a comment</code> - just a comment </s> add <code>{ t('# Also a comment') }</code> - { t('just a comment') } </s> remove <code> @@||example.org^</code> - unblock access to the example.org domain and all its subdomains </s> add <code> @@||example.org^</code> - { t('unblock access to the example.org domain and all its subdomains') } </s> remove <code>||example.org^</code> - block access to the example.org domain and all its subdomains </s> add <code>||example.org^</code> - { t('block access to the example.org domain and all its subdomains') } </s> remove Examples: </s> add <Trans>Examples</Trans>:
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
<code>{ t('# Also a comment') }</code> - { t('just a comment') }
<mask> <li> <mask> <code>! Here goes a comment</code> - just a comment <mask> </li> <mask> <li> <mask> <code># Also a comment</code> - just a comment <mask> </li> <mask> </ol> <mask> </div> <mask> </Card> <mask> ); </s> Complete translate client to Vietnamese </s> remove <code>! Here goes a comment</code> - just a comment </s> add <code>{ t('! Here goes a comment') }</code> - { t('just a comment') } </s> remove <code>127.0.0.1 example.org</code> - AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains). </s> add <code>127.0.0.1 example.org</code> - { t('AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains).') } </s> remove title="New filter subscription" inputDescription="Enter a valid URL to a filter subscription or a hosts file." </s> add title={ t('New filter subscription') } inputDescription={ t('Enter a valid URL to a filter subscription or a hosts file.') } </s> remove <code> @@||example.org^</code> - unblock access to the example.org domain and all its subdomains </s> add <code> @@||example.org^</code> - { t('unblock access to the example.org domain and all its subdomains') } </s> remove <code>||example.org^</code> - block access to the example.org domain and all its subdomains </s> add <code>||example.org^</code> - { t('block access to the example.org domain and all its subdomains') }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
t: PropTypes.func,
<mask> userRules: PropTypes.string, <mask> handleRulesChange: PropTypes.func, <mask> handleRulesSubmit: PropTypes.func, <mask> }; <mask> <mask> export default withNamespaces()(UserRules); </s> Complete translate client to Vietnamese </s> remove export default Logs; </s> add export default withNamespaces()(Logs); </s> remove export default Filters; </s> add export default withNamespaces()(Filters);
[ "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/UserRules.js
import { Trans, withNamespaces } from 'react-i18next';
<mask> import React, { Component } from 'react'; <mask> import ReactTable from 'react-table'; <mask> import PropTypes from 'prop-types'; <mask> import Modal from '../ui/Modal'; <mask> import PageTitle from '../ui/PageTitle'; <mask> import Card from '../ui/Card'; <mask> import UserRules from './UserRules'; <mask> import './Filters.css'; </s> Complete translate client to Vietnamese </s> remove export default class UserRules extends Component { </s> add class UserRules extends Component {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
Header: this.props.t('Enabled'),
<mask> ); <mask> }; <mask> <mask> columns = [{ <mask> Header: 'Enabled', <mask> accessor: 'enabled', <mask> Cell: this.renderCheckbox, <mask> width: 90, <mask> className: 'text-center', <mask> }, { </s> Complete translate client to Vietnamese </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Header: 'Actions', </s> add Header: this.props.t('Actions'), </s> remove Header: 'Last time updated', </s> add Header: this.props.t('Last time updated'), </s> remove Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> add Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> remove Header: 'Time', </s> add Header: t('Time'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
Header: this.props.t('Name'),
<mask> Cell: this.renderCheckbox, <mask> width: 90, <mask> className: 'text-center', <mask> }, { <mask> Header: 'Name', <mask> accessor: 'name', <mask> Cell: ({ value }) => (<div className="logs__row logs__row--overflow"><span className="logs__text" title={value}>{value}</span></div>), <mask> }, { <mask> Header: 'Filter URL', <mask> accessor: 'url', </s> Complete translate client to Vietnamese </s> remove Header: 'Filter URL', </s> add Header: this.props.t('Filter URL'), </s> remove Header: 'Rules count', </s> add Header: this.props.t('Rules count'), </s> remove Header: 'Enabled', </s> add Header: this.props.t('Enabled'), </s> remove Header: 'Actions', </s> add Header: this.props.t('Actions'), </s> remove Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> add Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
Header: this.props.t('Filter URL'),
<mask> Header: 'Name', <mask> accessor: 'name', <mask> Cell: ({ value }) => (<div className="logs__row logs__row--overflow"><span className="logs__text" title={value}>{value}</span></div>), <mask> }, { <mask> Header: 'Filter URL', <mask> accessor: 'url', <mask> Cell: ({ value }) => (<div className="logs__row logs__row--overflow"><a href={value} target='_blank' rel='noopener noreferrer' className="link logs__text">{value}</a></div>), <mask> }, { <mask> Header: 'Rules count', <mask> accessor: 'rulesCount', </s> Complete translate client to Vietnamese </s> remove Header: 'Rules count', </s> add Header: this.props.t('Rules count'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Header: 'Time', </s> add Header: t('Time'), </s> remove Header: 'Domain name', </s> add Header: t('Domain name'), </s> remove Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> add Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
Header: this.props.t('Rules count'),
<mask> Header: 'Filter URL', <mask> accessor: 'url', <mask> Cell: ({ value }) => (<div className="logs__row logs__row--overflow"><a href={value} target='_blank' rel='noopener noreferrer' className="link logs__text">{value}</a></div>), <mask> }, { <mask> Header: 'Rules count', <mask> accessor: 'rulesCount', <mask> className: 'text-center', <mask> Cell: props => props.value.toLocaleString(), <mask> }, { <mask> Header: 'Last time updated', </s> Complete translate client to Vietnamese </s> remove Header: 'Filter URL', </s> add Header: this.props.t('Filter URL'), </s> remove Header: 'Last time updated', </s> add Header: this.props.t('Last time updated'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Header: 'Actions', </s> add Header: this.props.t('Actions'), </s> remove Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> add Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
Header: this.props.t('Last time updated'),
<mask> accessor: 'rulesCount', <mask> className: 'text-center', <mask> Cell: props => props.value.toLocaleString(), <mask> }, { <mask> Header: 'Last time updated', <mask> accessor: 'lastUpdated', <mask> className: 'text-center', <mask> }, { <mask> Header: 'Actions', <mask> accessor: 'url', </s> Complete translate client to Vietnamese </s> remove Header: 'Actions', </s> add Header: this.props.t('Actions'), </s> remove Header: 'Rules count', </s> add Header: this.props.t('Rules count'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> add Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> remove Header: 'Enabled', </s> add Header: this.props.t('Enabled'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
Header: this.props.t('Actions'),
<mask> Header: 'Last time updated', <mask> accessor: 'lastUpdated', <mask> className: 'text-center', <mask> }, { <mask> Header: 'Actions', <mask> accessor: 'url', <mask> Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), <mask> className: 'text-center', <mask> width: 75, <mask> sortable: false, </s> Complete translate client to Vietnamese </s> remove Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> add Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> remove Header: 'Last time updated', </s> add Header: this.props.t('Last time updated'), </s> remove Header: 'Rules count', </s> add Header: this.props.t('Rules count'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Header: 'Enabled', </s> add Header: this.props.t('Enabled'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>),
<mask> className: 'text-center', <mask> }, { <mask> Header: 'Actions', <mask> accessor: 'url', <mask> Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), <mask> className: 'text-center', <mask> width: 75, <mask> sortable: false, <mask> }, <mask> ]; </s> Complete translate client to Vietnamese </s> remove Header: 'Actions', </s> add Header: this.props.t('Actions'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Header: 'Last time updated', </s> add Header: this.props.t('Last time updated'), </s> remove Header: 'Rules count', </s> add Header: this.props.t('Rules count'), </s> remove Header: 'Enabled', </s> add Header: this.props.t('Enabled'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
const { t } = this.props;
<mask> }, <mask> ]; <mask> <mask> render() { <mask> const { filters, userRules } = this.props.filtering; <mask> return ( <mask> <div> <mask> <PageTitle title={ t('Filters') } /> <mask> <div className="content"> </s> Complete translate client to Vietnamese </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } /> </s> remove const { queryLogs, dashboard } = this.props; </s> add const { queryLogs, dashboard, t } = this.props; </s> remove <PageTitle title="Query Log" subtitle="Last 5000 DNS queries"> </s> add <PageTitle title={ t('Query Log') } subtitle={ t('Last 5000 DNS queries') }> </s> remove <input type="text" className={inputNameClass} placeholder="Enter name" onChange={this.handleNameChange} /> <input type="text" className={inputUrlClass} placeholder="Enter URL" onChange={this.handleUrlChange} /> </s> add <input type="text" className={inputNameClass} placeholder={ this.props.t('Enter name') } onChange={this.handleNameChange} /> <input type="text" className={inputUrlClass} placeholder={ this.props.t('Enter URL') } onChange={this.handleUrlChange} />
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
<PageTitle title={ t('Filters') } />
<mask> render() { <mask> const { filters, userRules } = this.props.filtering; <mask> return ( <mask> <div> <mask> <PageTitle title="Filters" /> <mask> <div className="content"> <mask> <div className="row"> <mask> <div className="col-md-12"> <mask> <Card <mask> title="Filters and hosts blocklists" </s> Complete translate client to Vietnamese </s> remove title="Filters and hosts blocklists" subtitle="AdGuard Home understands basic adblock rules and hosts files syntax." </s> add title={ t('Filters and hosts blocklists') } subtitle={ t('AdGuard Home understands basic adblock rules and hosts files syntax.') } </s> remove const { queryLogs, dashboard } = this.props; </s> add const { queryLogs, dashboard, t } = this.props; </s> remove title="Custom filtering rules" subtitle="Enter one rule on a line. You can use either adblock rules or hosts files syntax." </s> add title={ t('Custom filtering rules') } subtitle={ t('Enter one rule on a line. You can use either adblock rules or hosts files syntax.') }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
title={ t('Filters and hosts blocklists') } subtitle={ t('AdGuard Home understands basic adblock rules and hosts files syntax.') }
<mask> <div className="content"> <mask> <div className="row"> <mask> <div className="col-md-12"> <mask> <Card <mask> title="Filters and hosts blocklists" <mask> subtitle="AdGuard Home understands basic adblock rules and hosts files syntax." <mask> > <mask> <ReactTable <mask> data={filters} <mask> columns={this.columns} <mask> showPagination={false} </s> Complete translate client to Vietnamese </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } /> </s> remove title="Custom filtering rules" subtitle="Enter one rule on a line. You can use either adblock rules or hosts files syntax." </s> add title={ t('Custom filtering rules') } subtitle={ t('Enter one rule on a line. You can use either adblock rules or hosts files syntax.') } </s> remove noDataText="No filters added" </s> add noDataText={ t('No filters added') } </s> remove <code>||example.org^</code> - block access to the example.org domain and all its subdomains </s> add <code>||example.org^</code> - { t('block access to the example.org domain and all its subdomains') }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
noDataText={ t('No filters added') }
<mask> <ReactTable <mask> data={filters} <mask> columns={this.columns} <mask> showPagination={false} <mask> noDataText="No filters added" <mask> minRows={4} // TODO find out what to show if rules.length is 0 <mask> /> <mask> <div className="card-actions"> <mask> <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <mask> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> Complete translate client to Vietnamese </s> remove <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> add <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button> </s> remove >Disable log</button> </s> add ><Trans>Disable log</Trans></button> </s> remove >Download log file</button> </s> add ><Trans>Download log file</Trans></button> </s> remove Apply </s> add <Trans>Apply</Trans> </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
<button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button>
<mask> noDataText="No filters added" <mask> minRows={4} // TODO find out what to show if rules.length is 0 <mask> /> <mask> <div className="card-actions"> <mask> <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <mask> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> <mask> </div> <mask> </Card> <mask> </div> <mask> <div className="col-md-12"> <mask> <UserRules </s> Complete translate client to Vietnamese </s> remove noDataText="No filters added" </s> add noDataText={ t('No filters added') } </s> remove >Disable log</button> </s> add ><Trans>Disable log</Trans></button> </s> remove >Download log file</button> </s> add ><Trans>Download log file</Trans></button> </s> remove Apply </s> add <Trans>Apply</Trans> </s> remove <button type="button" className="btn btn-secondary" onClick={this.closeModal}>Cancel</button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}>Add filter</button> </s> add <button type="button" className="btn btn-secondary" onClick={this.closeModal}><Trans>Cancel</Trans></button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}><Trans>Add filter</Trans></button>
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
title={ t('New filter subscription') } inputDescription={ t('Enter a valid URL to a filter subscription or a hosts file.') }
<mask> isOpen={this.props.filtering.isFilteringModalOpen} <mask> toggleModal={this.props.toggleFilteringModal} <mask> addFilter={this.props.addFilter} <mask> isFilterAdded={this.props.filtering.isFilterAdded} <mask> title="New filter subscription" <mask> inputDescription="Enter a valid URL to a filter subscription or a hosts file." <mask> /> <mask> </div> <mask> ); <mask> } <mask> } </s> Complete translate client to Vietnamese </s> remove <code># Also a comment</code> - just a comment </s> add <code>{ t('# Also a comment') }</code> - { t('just a comment') } </s> remove title="Custom filtering rules" subtitle="Enter one rule on a line. You can use either adblock rules or hosts files syntax." </s> add title={ t('Custom filtering rules') } subtitle={ t('Enter one rule on a line. You can use either adblock rules or hosts files syntax.') } </s> remove <code>! Here goes a comment</code> - just a comment </s> add <code>{ t('! Here goes a comment') }</code> - { t('just a comment') } </s> remove <code>127.0.0.1 example.org</code> - AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains). </s> add <code>127.0.0.1 example.org</code> - { t('AdGuard Home will now return 127.0.0.1 address for the example.org domain (but not its subdomains).') }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
t: PropTypes.func,
<mask> addFilter: PropTypes.func.isRequired, <mask> toggleFilteringModal: PropTypes.func.isRequired, <mask> handleRulesChange: PropTypes.func.isRequired, <mask> refreshFilters: PropTypes.func.isRequired, <mask> }; <mask> <mask> <mask> export default withNamespaces()(Filters); </s> Complete translate client to Vietnamese </s> remove export default Filters; </s> add export default withNamespaces()(Filters); </s> remove export default Logs; </s> add export default withNamespaces()(Logs);
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
export default withNamespaces()(Filters);
<mask> refreshFilters: PropTypes.func.isRequired, <mask> }; <mask> <mask> <mask> export default Filters; </s> Complete translate client to Vietnamese </s> remove export default Logs; </s> add export default withNamespaces()(Logs);
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Filters/index.js
import { Trans, withNamespaces } from 'react-i18next';
<mask> import { saveAs } from 'file-saver/FileSaver'; <mask> import escapeRegExp from 'lodash/escapeRegExp'; <mask> import endsWith from 'lodash/endsWith'; <mask> <mask> import { formatTime } from '../../helpers/helpers'; <mask> import { getTrackerData } from '../../helpers/trackers/trackers'; <mask> import PageTitle from '../ui/PageTitle'; <mask> import Card from '../ui/Card'; <mask> import Loading from '../ui/Loading'; </s> Complete translate client to Vietnamese </s> remove export default class UserRules extends Component { </s> add class UserRules extends Component {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
<Trans>{buttonText}</Trans>
<mask> type="button" <mask> className={`btn btn-sm ${buttonClass}`} <mask> onClick={() => this.toggleBlocking(buttonText.toLowerCase(), domain)} <mask> > <mask> {buttonText} <mask> </button> <mask> </div> <mask> ); <mask> } <mask> </s> Complete translate client to Vietnamese </s> remove <button type="button" className="btn btn-secondary" onClick={this.closeModal}>Cancel</button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}>Add filter</button> </s> add <button type="button" className="btn btn-secondary" onClick={this.closeModal}><Trans>Cancel</Trans></button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}><Trans>Add filter</Trans></button> </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button> </s> remove Apply </s> add <Trans>Apply</Trans> </s> remove Url added successfully </s> add <Trans>Url added successfully</Trans> </s> remove >Disable log</button> </s> add ><Trans>Disable log</Trans></button>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
const { t } = this.props;
<mask> ); <mask> } <mask> <mask> renderLogs(logs) { <mask> const columns = [{ <mask> Header: t('Time'), <mask> accessor: 'time', <mask> maxWidth: 110, <mask> filterable: false, </s> Complete translate client to Vietnamese </s> remove Header: 'Time', </s> add Header: t('Time'), </s> remove Header: 'Domain name', </s> add Header: t('Domain name'), </s> remove Header: 'Enabled', </s> add Header: this.props.t('Enabled'), </s> remove Header: 'Response', </s> add Header: t('Response'), </s> remove Header: 'Type', </s> add Header: t('Type'),
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
Header: t('Time'),
<mask> } <mask> <mask> renderLogs(logs) { <mask> const columns = [{ <mask> Header: 'Time', <mask> accessor: 'time', <mask> maxWidth: 110, <mask> filterable: false, <mask> Cell: ({ value }) => (<div className="logs__row"><span className="logs__text" title={value}>{formatTime(value)}</span></div>), <mask> }, { </s> Complete translate client to Vietnamese </s> remove Header: 'Domain name', </s> add Header: t('Domain name'), </s> remove Header: 'Filter URL', </s> add Header: this.props.t('Filter URL'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Cell: ({ value }) => (<span className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>), </s> add Cell: ({ value }) => (<span title={ this.props.t('Delete') } className='remove-icon fe fe-trash-2' onClick={() => this.props.removeFilter(value)}/>),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
Header: t('Domain name'),
<mask> maxWidth: 110, <mask> filterable: false, <mask> Cell: ({ value }) => (<div className="logs__row"><span className="logs__text" title={value}>{formatTime(value)}</span></div>), <mask> }, { <mask> Header: 'Domain name', <mask> accessor: 'domain', <mask> Cell: (row) => { <mask> const response = row.value; <mask> const trackerData = getTrackerData(response); <mask> </s> Complete translate client to Vietnamese </s> remove Header: 'Time', </s> add Header: t('Time'), </s> remove Header: 'Filter URL', </s> add Header: this.props.t('Filter URL'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Header: 'Response', </s> add Header: t('Response'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
Header: t('Type'),
<mask> </div> <mask> ); <mask> }, <mask> }, { <mask> Header: 'Type', <mask> accessor: 'type', <mask> maxWidth: 60, <mask> }, { <mask> Header: 'Response', <mask> accessor: 'response', </s> Complete translate client to Vietnamese </s> remove Header: 'Response', </s> add Header: t('Response'), </s> remove Header: 'Last time updated', </s> add Header: this.props.t('Last time updated'), </s> remove Header: 'Enabled', </s> add Header: this.props.t('Enabled'), </s> remove Header: 'Name', </s> add Header: this.props.t('Name'), </s> remove Header: 'Time', </s> add Header: t('Time'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
Header: t('Response'),
<mask> Header: 'Type', <mask> accessor: 'type', <mask> maxWidth: 60, <mask> }, { <mask> Header: 'Response', <mask> accessor: 'response', <mask> Cell: (row) => { <mask> const responses = row.value; <mask> const { reason } = row.original; <mask> const isFiltered = row ? reason.indexOf('Filtered') === 0 : false; </s> Complete translate client to Vietnamese </s> remove Header: 'Client', </s> add Header: t('Client'), </s> remove Header: 'Type', </s> add Header: t('Type'), </s> remove Header: 'Domain name', </s> add Header: t('Domain name'), </s> remove Header: 'Time', </s> add Header: t('Time'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
<span><Trans>Empty</Trans></span>
<mask> } <mask> return ( <mask> <div className="logs__row"> <mask> {this.renderTooltip(isFiltered, rule)} <mask> <span>Empty</span> <mask> </div> <mask> ); <mask> }, <mask> filterMethod: (filter, row) => { <mask> if (filter.value === 'filtered') { </s> Complete translate client to Vietnamese </s> remove const { queryLogs, dashboard } = this.props; </s> add const { queryLogs, dashboard, t } = this.props; </s> remove <input type="text" className={inputNameClass} placeholder="Enter name" onChange={this.handleNameChange} /> <input type="text" className={inputUrlClass} placeholder="Enter URL" onChange={this.handleUrlChange} /> </s> add <input type="text" className={inputNameClass} placeholder={ this.props.t('Enter name') } onChange={this.handleNameChange} /> <input type="text" className={inputUrlClass} placeholder={ this.props.t('Enter URL') } onChange={this.handleUrlChange} /> </s> remove Url added successfully </s> add <Trans>Url added successfully</Trans> </s> remove Header: 'Type', </s> add Header: t('Type'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
<option value="all">{ t('Show all') }</option> <option value="filtered">{ t('Show filtered') }</option>
<mask> onChange={event => onChange(event.target.value)} <mask> className="form-control" <mask> value={filter ? filter.value : 'all'} <mask> > <mask> <option value="all">Show all</option> <mask> <option value="filtered">Show filtered</option> <mask> </select>, <mask> }, { <mask> Header: 'Client', <mask> accessor: 'client', <mask> maxWidth: 250, </s> Complete translate client to Vietnamese </s> remove Header: 'Client', </s> add Header: t('Client'), </s> remove Header: 'Response', </s> add Header: t('Response'), </s> remove Header: 'Type', </s> add Header: t('Type'), </s> remove Header: 'Time', </s> add Header: t('Time'), </s> remove Header: 'Domain name', </s> add Header: t('Domain name'),
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
Header: t('Client'),
<mask> <option value="all">Show all</option> <mask> <option value="filtered">Show filtered</option> <mask> </select>, <mask> }, { <mask> Header: 'Client', <mask> accessor: 'client', <mask> maxWidth: 250, <mask> Cell: (row) => { <mask> const { reason } = row.original; <mask> const isFiltered = row ? reason.indexOf('Filtered') === 0 : false; </s> Complete translate client to Vietnamese </s> remove <option value="all">Show all</option> <option value="filtered">Show filtered</option> </s> add <option value="all">{ t('Show all') }</option> <option value="filtered">{ t('Show filtered') }</option> </s> remove Header: 'Response', </s> add Header: t('Response'), </s> remove Header: 'Domain name', </s> add Header: t('Domain name'), </s> remove Header: 'Time', </s> add Header: t('Time'),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
// Text previousText={ t('Previous') } nextText={ t('Next') } loadingText={ t('Loading...') } pageText={ t('Page') } ofText={ t('of') } rowsText={ t('rows') } noDataText={ t('No logs found') }
<mask> columns={columns} <mask> showPagination={true} <mask> defaultPageSize={50} <mask> minRows={7} <mask> noDataText="No logs found" <mask> defaultFilterMethod={(filter, row) => { <mask> const id = filter.pivotId || filter.id; <mask> return row[id] !== undefined ? <mask> String(row[id]).indexOf(filter.value) !== -1 : true; <mask> }} </s> Complete translate client to Vietnamese </s> remove Header: 'Response', </s> add Header: t('Response'), </s> remove Header: 'Client', </s> add Header: t('Client'), </s> remove <span>Empty</span> </s> add <span><Trans>Empty</Trans></span> </s> remove <option value="all">Show all</option> <option value="filtered">Show filtered</option> </s> add <option value="all">{ t('Show all') }</option> <option value="filtered">{ t('Show filtered') }</option>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
><Trans>Disable log</Trans></button>
<mask> <button <mask> className="btn btn-gray btn-sm mr-2" <mask> type="submit" <mask> onClick={() => this.props.toggleLogStatus(queryLogEnabled)} <mask> >Disable log</button> <mask> <button <mask> className="btn btn-primary btn-sm mr-2" <mask> type="submit" <mask> onClick={this.handleDownloadButton} <mask> >Download log file</button> </s> Complete translate client to Vietnamese </s> remove >Download log file</button> </s> add ><Trans>Download log file</Trans></button> </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button> </s> remove <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> add <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button> </s> remove noDataText="No filters added" </s> add noDataText={ t('No filters added') } </s> remove >Refresh</button> </s> add ><Trans>Refresh</Trans></button>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
><Trans>Download log file</Trans></button>
<mask> <button <mask> className="btn btn-primary btn-sm mr-2" <mask> type="submit" <mask> onClick={this.handleDownloadButton} <mask> >Download log file</button> <mask> <button <mask> className="btn btn-outline-primary btn-sm" <mask> type="submit" <mask> onClick={this.getLogs} <mask> >Refresh</button> </s> Complete translate client to Vietnamese </s> remove >Disable log</button> </s> add ><Trans>Disable log</Trans></button> </s> remove >Refresh</button> </s> add ><Trans>Refresh</Trans></button> </s> remove <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> add <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button> </s> remove noDataText="No filters added" </s> add noDataText={ t('No filters added') } </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
><Trans>Refresh</Trans></button>
<mask> <button <mask> className="btn btn-outline-primary btn-sm" <mask> type="submit" <mask> onClick={this.getLogs} <mask> >Refresh</button> <mask> </Fragment> <mask> ); <mask> } <mask> <mask> return ( </s> Complete translate client to Vietnamese </s> remove >Download log file</button> </s> add ><Trans>Download log file</Trans></button> </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button> </s> remove <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> add <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button> </s> remove >Disable log</button> </s> add ><Trans>Disable log</Trans></button> </s> remove <button type="button" className="btn btn-secondary" onClick={this.closeModal}>Cancel</button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}>Add filter</button> </s> add <button type="button" className="btn btn-secondary" onClick={this.closeModal}><Trans>Cancel</Trans></button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}><Trans>Add filter</Trans></button>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
><Trans>Enable log</Trans></button>
<mask> <button <mask> className="btn btn-success btn-sm mr-2" <mask> type="submit" <mask> onClick={() => this.props.toggleLogStatus(queryLogEnabled)} <mask> >Enable log</button> <mask> ); <mask> } <mask> <mask> render() { <mask> const { queryLogs, dashboard } = this.props; </s> Complete translate client to Vietnamese </s> remove >Disable log</button> </s> add ><Trans>Disable log</Trans></button> </s> remove const { queryLogs, dashboard } = this.props; </s> add const { queryLogs, dashboard, t } = this.props; </s> remove >Download log file</button> </s> add ><Trans>Download log file</Trans></button> </s> remove <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> add <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button> </s> remove <PageTitle title="Query Log" subtitle="Last 5000 DNS queries"> </s> add <PageTitle title={ t('Query Log') } subtitle={ t('Last 5000 DNS queries') }>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
const { queryLogs, dashboard, t } = this.props;
<mask> ); <mask> } <mask> <mask> render() { <mask> const { queryLogs, dashboard } = this.props; <mask> const { queryLogEnabled } = dashboard; <mask> return ( <mask> <Fragment> <mask> <PageTitle title="Query Log" subtitle="Last 5000 DNS queries"> <mask> <div className="page-title__actions"> </s> Complete translate client to Vietnamese </s> remove <PageTitle title="Query Log" subtitle="Last 5000 DNS queries"> </s> add <PageTitle title={ t('Query Log') } subtitle={ t('Last 5000 DNS queries') }> </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button> </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
<PageTitle title={ t('Query Log') } subtitle={ t('Last 5000 DNS queries') }>
<mask> const { queryLogs, dashboard } = this.props; <mask> const { queryLogEnabled } = dashboard; <mask> return ( <mask> <Fragment> <mask> <PageTitle title="Query Log" subtitle="Last 5000 DNS queries"> <mask> <div className="page-title__actions"> <mask> {this.renderButtons(queryLogEnabled)} <mask> </div> <mask> </PageTitle> <mask> <Card> </s> Complete translate client to Vietnamese </s> remove const { queryLogs, dashboard } = this.props; </s> add const { queryLogs, dashboard, t } = this.props; </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button> </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
t: PropTypes.func,
<mask> setRules: PropTypes.func, <mask> addSuccessToast: PropTypes.func, <mask> }; <mask> <mask> export default withNamespaces()(Logs); </s> Complete translate client to Vietnamese </s> remove export default Logs; </s> add export default withNamespaces()(Logs); </s> remove export default Filters; </s> add export default withNamespaces()(Filters);
[ "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
export default withNamespaces()(Logs);
<mask> setRules: PropTypes.func, <mask> addSuccessToast: PropTypes.func, <mask> }; <mask> <mask> export default Logs; </s> Complete translate client to Vietnamese </s> remove export default Filters; </s> add export default withNamespaces()(Filters);
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Logs/index.js
import { Trans } from 'react-i18next';
<mask> import React, { Component } from 'react'; <mask> import PropTypes from 'prop-types'; <mask> <mask> class Toast extends Component { <mask> componentDidMount() { <mask> const timeout = this.props.type === 'error' ? 30000 : 5000; </s> Complete translate client to Vietnamese </s> remove export default class UserRules extends Component { </s> add class UserRules extends Component {
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Toasts/Toast.js
<Trans>{this.props.message}</Trans>
<mask> render() { <mask> return ( <mask> <div className={`toast toast--${this.props.type}`}> <mask> <p className="toast__content"> <mask> {this.props.message} <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> </s> Complete translate client to Vietnamese </s> remove {buttonText} </s> add <Trans>{buttonText}</Trans> </s> remove >Enable log</button> </s> add ><Trans>Enable log</Trans></button> </s> remove Url added successfully </s> add <Trans>Url added successfully</Trans> </s> remove <span>Empty</span> </s> add <span><Trans>Empty</Trans></span> </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/Toasts/Toast.js
import { Trans, withNamespaces } from 'react-i18next';
<mask> import ReactModal from 'react-modal'; <mask> import classnames from 'classnames'; <mask> import { R_URL_REQUIRES_PROTOCOL } from '../../helpers/constants'; <mask> import './Modal.css'; <mask> <mask> ReactModal.setAppElement('#root'); <mask> <mask> const initialState = { </s> Complete translate client to Vietnamese </s> remove export default class UserRules extends Component { </s> add class UserRules extends Component {
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/ui/Modal.js
class Modal extends Component {
<mask> name: '', <mask> isUrlValid: false, <mask> }; <mask> <mask> export default class Modal extends Component { <mask> state = initialState; <mask> <mask> // eslint-disable-next-line <mask> isUrlValid = url => { <mask> return R_URL_REQUIRES_PROTOCOL.test(url); </s> Complete translate client to Vietnamese </s> remove export default class UserRules extends Component { </s> add class UserRules extends Component { </s> remove export default Filters; </s> add export default withNamespaces()(Filters); </s> remove export default Logs; </s> add export default withNamespaces()(Logs);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/ui/Modal.js
<input type="text" className={inputNameClass} placeholder={ this.props.t('Enter name') } onChange={this.handleNameChange} /> <input type="text" className={inputUrlClass} placeholder={ this.props.t('Enter URL') } onChange={this.handleUrlChange} />
<mask> const renderBody = () => { <mask> if (!this.props.isFilterAdded) { <mask> return ( <mask> <React.Fragment> <mask> <input type="text" className={inputNameClass} placeholder="Enter name" onChange={this.handleNameChange} /> <mask> <input type="text" className={inputUrlClass} placeholder="Enter URL" onChange={this.handleUrlChange} /> <mask> {inputDescription && <mask> <div className="description"> <mask> {inputDescription} <mask> </div>} <mask> </React.Fragment> </s> Complete translate client to Vietnamese </s> remove <PageTitle title="Filters" /> </s> add <PageTitle title={ t('Filters') } /> </s> remove Url added successfully </s> add <Trans>Url added successfully</Trans> </s> remove <span>Empty</span> </s> add <span><Trans>Empty</Trans></span> </s> remove const { queryLogs, dashboard } = this.props; </s> add const { queryLogs, dashboard, t } = this.props;
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/ui/Modal.js
<Trans>Url added successfully</Trans>
<mask> ); <mask> } <mask> return ( <mask> <div className="description"> <mask> Url added successfully <mask> </div> <mask> ); <mask> }; <mask> <mask> const isValidForSubmit = !(url.length > 0 && isUrlValid && name.length > 0); </s> Complete translate client to Vietnamese </s> remove {buttonText} </s> add <Trans>{buttonText}</Trans> </s> remove <button type="button" className="btn btn-secondary" onClick={this.closeModal}>Cancel</button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}>Add filter</button> </s> add <button type="button" className="btn btn-secondary" onClick={this.closeModal}><Trans>Cancel</Trans></button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}><Trans>Add filter</Trans></button> </s> remove <input type="text" className={inputNameClass} placeholder="Enter name" onChange={this.handleNameChange} /> <input type="text" className={inputUrlClass} placeholder="Enter URL" onChange={this.handleUrlChange} /> </s> add <input type="text" className={inputNameClass} placeholder={ this.props.t('Enter name') } onChange={this.handleNameChange} /> <input type="text" className={inputUrlClass} placeholder={ this.props.t('Enter URL') } onChange={this.handleUrlChange} /> </s> remove <span>Empty</span> </s> add <span><Trans>Empty</Trans></span> </s> remove const { queryLogs, dashboard } = this.props; </s> add const { queryLogs, dashboard, t } = this.props;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/ui/Modal.js
<button type="button" className="btn btn-secondary" onClick={this.closeModal}><Trans>Cancel</Trans></button> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}><Trans>Add filter</Trans></button>
<mask> </div> <mask> { <mask> !this.props.isFilterAdded && <mask> <div className="modal-footer"> <mask> <button type="button" className="btn btn-secondary" onClick={this.closeModal}>Cancel</button> <mask> <button type="button" className="btn btn-success" onClick={this.handleNext} disabled={isValidForSubmit}>Add filter</button> <mask> </div> <mask> } <mask> </div> <mask> </ReactModal> <mask> ); </s> Complete translate client to Vietnamese </s> remove <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}>Add filter</button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}>Check updates</button> </s> add <button className="btn btn-success btn-standart mr-2" type="submit" onClick={this.props.toggleFilteringModal}><Trans>Add filter</Trans></button> <button className="btn btn-primary btn-standart" type="submit" onClick={this.props.refreshFilters}><Trans>Check updates</Trans></button> </s> remove {buttonText} </s> add <Trans>{buttonText}</Trans> </s> remove noDataText="No filters added" </s> add noDataText={ t('No filters added') } </s> remove >Refresh</button> </s> add ><Trans>Refresh</Trans></button> </s> remove Url added successfully </s> add <Trans>Url added successfully</Trans>
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/ui/Modal.js
t: PropTypes.func,
<mask> inputDescription: PropTypes.string, <mask> addFilter: PropTypes.func.isRequired, <mask> isFilterAdded: PropTypes.bool, <mask> }; <mask> <mask> export default withNamespaces()(Modal); </s> Complete translate client to Vietnamese </s> remove export default Filters; </s> add export default withNamespaces()(Filters); </s> remove export default Logs; </s> add export default withNamespaces()(Logs);
[ "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/4590564fea78b4aa247db0e2bd0ac400c60c8252
client/src/components/ui/Modal.js
err := config.write()
<mask> // Update filters we've just loaded right away, don't wait for periodic update timer <mask> go func() { <mask> refreshFiltersIfNeccessary(false) <mask> // Save the updated config <mask> err := writeConfig() <mask> if err != nil { <mask> log.Fatal(err) <mask> } <mask> }() <mask> </s> Fix incorrect cherry-pick in previous commit. </s> remove err := writeConfig() </s> add err := config.write() </s> remove err := writeConfig() </s> add err := config.write() </s> remove func writeConfig() error { </s> add func (c *configuration) write() error {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/45ae984f3bd7bad1f21c1e8f9910558cc2986cba
app.go
err := config.write()
<mask> os.Args = os.Args[:1] <mask> } <mask> <mask> // Save the updated config <mask> err := writeConfig() <mask> if err != nil { <mask> log.Fatal(err) <mask> } <mask> <mask> address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort)) </s> Fix incorrect cherry-pick in previous commit. </s> remove err := writeConfig() </s> add err := config.write() </s> remove err := writeConfig() </s> add err := config.write() </s> remove func writeConfig() error { </s> add func (c *configuration) write() error {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/45ae984f3bd7bad1f21c1e8f9910558cc2986cba
app.go
func (c *configuration) write() error {
<mask> return nil <mask> } <mask> <mask> // Saves configuration to the YAML file and also saves the user filter contents to a file <mask> func writeConfig() error { <mask> c.Lock() <mask> defer c.Unlock() <mask> configFile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename) <mask> log.Printf("Writing YAML file: %s", configFile) <mask> yamlText, err := yaml.Marshal(&config) </s> Fix incorrect cherry-pick in previous commit. </s> remove err := writeConfig() </s> add err := config.write() </s> remove err := writeConfig() </s> add err := config.write() </s> remove err := writeConfig() </s> add err := config.write()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/45ae984f3bd7bad1f21c1e8f9910558cc2986cba
config.go
err := config.write()
<mask> return nil <mask> } <mask> <mask> func writeAllConfigs() error { <mask> err := writeConfig() <mask> if err != nil { <mask> log.Printf("Couldn't write our config: %s", err) <mask> return err <mask> } <mask> err = writeCoreDNSConfig() </s> Fix incorrect cherry-pick in previous commit. </s> remove err := writeConfig() </s> add err := config.write() </s> remove err := writeConfig() </s> add err := config.write() </s> remove func writeConfig() error { </s> add func (c *configuration) write() error {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/45ae984f3bd7bad1f21c1e8f9910558cc2986cba
config.go
// upstreamConfig is the custom upstream config for this client. If // it's nil, it has not been initialized yet. If it's non-nil and // empty, there are no valid upstreams. If it's non-nil and non-empty, // these upstream must be used.
<mask> var webHandlersRegistered = false <mask> <mask> // Client contains information about persistent clients. <mask> type Client struct { <mask> IDs []string <mask> Tags []string <mask> Name string <mask> UseOwnSettings bool // false: use global settings <mask> FilteringEnabled bool <mask> SafeSearchEnabled bool <mask> SafeBrowsingEnabled bool <mask> ParentalEnabled bool <mask> <mask> UseOwnBlockedServices bool // false: use global settings <mask> BlockedServices []string <mask> <mask> Upstreams []string // list of upstream servers to be used for the client's requests <mask> <mask> // Custom upstream config for this client <mask> // nil: not yet initialized <mask> // not nil, but empty: initialized, no good upstreams <mask> // not nil, not empty: Upstreams ready to be used <mask> upstreamConfig *proxy.UpstreamConfig <mask> } <mask> <mask> type clientSource uint <mask> </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove IDs []string `json:"ids"` Tags []string `json:"tags"` Name string `json:"name"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` // Disallowed - if true -- client's IP is not disallowed // Otherwise, it is blocked. Disallowed bool `json:"disallowed"` // DisallowedRule - the rule due to which the client is disallowed // If Disallowed is true, and this string is empty - it means that the client IP // is disallowed by the "allowed IP list", i.e. it is not included in allowed. DisallowedRule string `json:"disallowed_rule"` </s> add // Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"` </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add
[ "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" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clients.go
Name string IDs []string Tags []string BlockedServices []string Upstreams []string UseOwnSettings bool FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool
<mask> // it's nil, it has not been initialized yet. If it's non-nil and <mask> // empty, there are no valid upstreams. If it's non-nil and non-empty, <mask> // these upstream must be used. <mask> upstreamConfig *proxy.UpstreamConfig <mask> } <mask> <mask> type clientSource uint <mask> <mask> // Client sources. The order determines the priority. </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove IDs []string Tags []string Name string UseOwnSettings bool // false: use global settings FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool // false: use global settings BlockedServices []string Upstreams []string // list of upstream servers to be used for the client's requests // Custom upstream config for this client // nil: not yet initialized // not nil, but empty: initialized, no good upstreams // not nil, not empty: Upstreams ready to be used </s> add // upstreamConfig is the custom upstream config for this client. If // it's nil, it has not been initialized yet. If it's non-nil and // empty, there are no valid upstreams. If it's non-nil and non-empty, // these upstream must be used. </s> remove IDs []string `json:"ids"` Tags []string `json:"tags"` Name string `json:"name"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` // Disallowed - if true -- client's IP is not disallowed // Otherwise, it is blocked. Disallowed bool `json:"disallowed"` // DisallowedRule - the rule due to which the client is disallowed // If Disallowed is true, and this string is empty - it means that the client IP // is disallowed by the "allowed IP list", i.e. it is not included in allowed. DisallowedRule string `json:"disallowed_rule"` </s> add // Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"` </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clients.go
WhoisInfo *RuntimeClientWhoisInfo
<mask> ) <mask> <mask> // RuntimeClient information <mask> type RuntimeClient struct { <mask> Host string <mask> Source clientSource <mask> } <mask> <mask> // RuntimeClientWhoisInfo is the filtered WHOIS data for a runtime client. </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add </s> remove IDs []string Tags []string Name string UseOwnSettings bool // false: use global settings FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool // false: use global settings BlockedServices []string Upstreams []string // list of upstream servers to be used for the client's requests // Custom upstream config for this client // nil: not yet initialized // not nil, but empty: initialized, no good upstreams // not nil, not empty: Upstreams ready to be used </s> add // upstreamConfig is the custom upstream config for this client. If // it's nil, it has not been initialized yet. If it's non-nil and // empty, there are no valid upstreams. If it's non-nil and non-empty, // these upstream must be used. </s> remove IDs []string `json:"ids"` Tags []string `json:"tags"` Name string `json:"name"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` // Disallowed - if true -- client's IP is not disallowed // Otherwise, it is blocked. Disallowed bool `json:"disallowed"` // DisallowedRule - the rule due to which the client is disallowed // If Disallowed is true, and this string is empty - it means that the client IP // is disallowed by the "allowed IP list", i.e. it is not included in allowed. DisallowedRule string `json:"disallowed_rule"` </s> add // Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"`
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clients.go
<mask> // RuntimeClient information <mask> type RuntimeClient struct { <mask> Host string <mask> Source clientSource <mask> WhoisInfo *RuntimeClientWhoisInfo <mask> } <mask> <mask> // RuntimeClientWhoisInfo is the filtered WHOIS data for a runtime client. <mask> type RuntimeClientWhoisInfo struct { <mask> City string `json:"city,omitempty"` </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove IDs []string Tags []string Name string UseOwnSettings bool // false: use global settings FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool // false: use global settings BlockedServices []string Upstreams []string // list of upstream servers to be used for the client's requests // Custom upstream config for this client // nil: not yet initialized // not nil, but empty: initialized, no good upstreams // not nil, not empty: Upstreams ready to be used </s> add // upstreamConfig is the custom upstream config for this client. If // it's nil, it has not been initialized yet. If it's non-nil and // empty, there are no valid upstreams. If it's non-nil and non-empty, // these upstream must be used. </s> remove IDs []string `json:"ids"` Tags []string `json:"tags"` Name string `json:"name"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` // Disallowed - if true -- client's IP is not disallowed // Otherwise, it is blocked. Disallowed bool `json:"disallowed"` // DisallowedRule - the rule due to which the client is disallowed // If Disallowed is true, and this string is empty - it means that the client IP // is disallowed by the "allowed IP list", i.e. it is not included in allowed. DisallowedRule string `json:"disallowed_rule"` </s> add // Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"`
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clients.go
// clientJSON is a common structure used by several handlers to deal with // clients. Some of the fields are only necessary in one or two handlers and // are thus made pointers with an omitempty tag. // // TODO(a.garipov): Consider using nullbool and an optional string here? Or // split into several structs?
<mask> "net" <mask> "net/http" <mask> ) <mask> <mask> type clientJSON struct { <mask> // Disallowed, if non-nil and false, means that the client's IP is <mask> // allowed. Otherwise, the IP is blocked. <mask> Disallowed *bool `json:"disallowed,omitempty"` </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove IDs []string `json:"ids"` Tags []string `json:"tags"` Name string `json:"name"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` // Disallowed - if true -- client's IP is not disallowed // Otherwise, it is blocked. Disallowed bool `json:"disallowed"` // DisallowedRule - the rule due to which the client is disallowed // If Disallowed is true, and this string is empty - it means that the client IP // is disallowed by the "allowed IP list", i.e. it is not included in allowed. DisallowedRule string `json:"disallowed_rule"` </s> add // Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"` </s> remove IDs []string Tags []string Name string UseOwnSettings bool // false: use global settings FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool // false: use global settings BlockedServices []string Upstreams []string // list of upstream servers to be used for the client's requests // Custom upstream config for this client // nil: not yet initialized // not nil, but empty: initialized, no good upstreams // not nil, not empty: Upstreams ready to be used </s> add // upstreamConfig is the custom upstream config for this client. If // it's nil, it has not been initialized yet. If it's non-nil and // empty, there are no valid upstreams. If it's non-nil and non-empty, // these upstream must be used. </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clientshttp.go
// Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"`
<mask> "net/http" <mask> ) <mask> <mask> type clientJSON struct { <mask> IDs []string `json:"ids"` <mask> Tags []string `json:"tags"` <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"` <mask> <mask> UseGlobalBlockedServices bool `json:"use_global_blocked_services"` <mask> BlockedServices []string `json:"blocked_services"` <mask> <mask> Upstreams []string `json:"upstreams"` <mask> <mask> WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` <mask> <mask> // Disallowed - if true -- client's IP is not disallowed <mask> // Otherwise, it is blocked. <mask> Disallowed bool `json:"disallowed"` <mask> <mask> // DisallowedRule - the rule due to which the client is disallowed <mask> // If Disallowed is true, and this string is empty - it means that the client IP <mask> // is disallowed by the "allowed IP list", i.e. it is not included in allowed. <mask> DisallowedRule string `json:"disallowed_rule"` <mask> } <mask> <mask> type runtimeClientJSON struct { <mask> WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` <mask> </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove IDs []string Tags []string Name string UseOwnSettings bool // false: use global settings FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool // false: use global settings BlockedServices []string Upstreams []string // list of upstream servers to be used for the client's requests // Custom upstream config for this client // nil: not yet initialized // not nil, but empty: initialized, no good upstreams // not nil, not empty: Upstreams ready to be used </s> add // upstreamConfig is the custom upstream config for this client. If // it's nil, it has not been initialized yet. If it's non-nil and // empty, there are no valid upstreams. If it's non-nil and non-empty, // these upstream must be used. </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add
[ "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", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clientshttp.go
<mask> UseGlobalBlockedServices: !c.UseOwnBlockedServices, <mask> BlockedServices: c.BlockedServices, <mask> <mask> Upstreams: c.Upstreams, <mask> <mask> WhoisInfo: &RuntimeClientWhoisInfo{}, <mask> } <mask> <mask> return cj <mask> } <mask> </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove Disallowed: disallowed, DisallowedRule: rule, </s> add Disallowed: &disallowed, DisallowedRule: &rule, </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clientshttp.go
disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule
<mask> continue <mask> } <mask> } else { <mask> cj = clientToJSON(c) <mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) <mask> } <mask> <mask> data = append(data, map[string]clientJSON{ <mask> idStr: cj, <mask> }) </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove Disallowed: disallowed, DisallowedRule: rule, </s> add Disallowed: &disallowed, DisallowedRule: &rule, </s> remove WhoisInfo: &RuntimeClientWhoisInfo{}, </s> add </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clientshttp.go
Disallowed: &disallowed, DisallowedRule: &rule,
<mask> } <mask> <mask> cj = clientJSON{ <mask> IDs: []string{idStr}, <mask> Disallowed: disallowed, <mask> DisallowedRule: rule, <mask> WhoisInfo: &RuntimeClientWhoisInfo{}, <mask> } <mask> <mask> return cj, true <mask> } </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove WhoisInfo: &RuntimeClientWhoisInfo{}, </s> add </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove WhoisInfo *RuntimeClientWhoisInfo </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clientshttp.go
disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule
<mask> return cj, true <mask> } <mask> <mask> cj = runtimeClientToJSON(idStr, rc) <mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) <mask> <mask> return cj, true <mask> } <mask> <mask> // RegisterClientsHandlers registers HTTP handlers </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove Disallowed: disallowed, DisallowedRule: rule, </s> add Disallowed: &disallowed, DisallowedRule: &rule, </s> remove WhoisInfo: &RuntimeClientWhoisInfo{}, </s> add </s> remove IDs []string `json:"ids"` Tags []string `json:"tags"` Name string `json:"name"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` // Disallowed - if true -- client's IP is not disallowed // Otherwise, it is blocked. Disallowed bool `json:"disallowed"` // DisallowedRule - the rule due to which the client is disallowed // If Disallowed is true, and this string is empty - it means that the client IP // is disallowed by the "allowed IP list", i.e. it is not included in allowed. DisallowedRule string `json:"disallowed_rule"` </s> add // Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"`
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
internal/home/clientshttp.go
'tags': 'items': 'type': 'string' 'type': 'array'
<mask> 'type': 'array' <mask> 'items': <mask> 'type': 'string' <mask> 'ClientAuto': <mask> 'type': 'object' <mask> 'description': 'Auto-Client information' <mask> 'properties': <mask> 'ip': <mask> 'type': 'string' </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove Disallowed: disallowed, DisallowedRule: rule, </s> add Disallowed: &disallowed, DisallowedRule: &rule, </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
openapi/openapi.yaml
'whois_info': '$ref': '#/components/schemas/WhoisInfo'
<mask> 'source': <mask> 'type': 'string' <mask> 'description': 'The source of this information' <mask> 'example': 'etc/hosts' <mask> 'ClientUpdate': <mask> 'type': 'object' <mask> 'description': 'Client update request' <mask> 'properties': <mask> 'name': <mask> 'type': 'string' </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove IDs []string Tags []string Name string UseOwnSettings bool // false: use global settings FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool // false: use global settings BlockedServices []string Upstreams []string // list of upstream servers to be used for the client's requests // Custom upstream config for this client // nil: not yet initialized // not nil, but empty: initialized, no good upstreams // not nil, not empty: Upstreams ready to be used </s> add // upstreamConfig is the custom upstream config for this client. If // it's nil, it has not been initialized yet. If it's non-nil and // empty, there are no valid upstreams. If it's non-nil and non-empty, // these upstream must be used. </s> remove IDs []string `json:"ids"` Tags []string `json:"tags"` Name string `json:"name"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info"` // Disallowed - if true -- client's IP is not disallowed // Otherwise, it is blocked. Disallowed bool `json:"disallowed"` // DisallowedRule - the rule due to which the client is disallowed // If Disallowed is true, and this string is empty - it means that the client IP // is disallowed by the "allowed IP list", i.e. it is not included in allowed. DisallowedRule string `json:"disallowed_rule"` </s> add // Disallowed, if non-nil and false, means that the client's IP is // allowed. Otherwise, the IP is blocked. Disallowed *bool `json:"disallowed,omitempty"` // DisallowedRule is the rule due to which the client is disallowed. // If Disallowed is true and this string is empty, the client IP is // disallowed by the "allowed IP list", that is it is not included in // the allowlist. DisallowedRule *string `json:"disallowed_rule,omitempty"` WhoisInfo *RuntimeClientWhoisInfo `json:"whois_info,omitempty"` Name string `json:"name"` BlockedServices []string `json:"blocked_services"` IDs []string `json:"ids"` Tags []string `json:"tags"` Upstreams []string `json:"upstreams"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafeBrowsingEnabled bool `json:"safebrowsing_enabled"` SafeSearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` UseGlobalSettings bool `json:"use_global_settings"`
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
openapi/openapi.yaml
'supported_tags': 'items': 'type': 'string' 'type': 'array'
<mask> '$ref': '#/components/schemas/ClientsArray' <mask> 'auto_clients': <mask> '$ref': '#/components/schemas/ClientsAutoArray' <mask> 'ClientsArray': <mask> 'type': 'array' <mask> 'items': <mask> '$ref': '#/components/schemas/Client' <mask> 'description': 'Clients array' <mask> 'ClientsAutoArray': </s> Pull request: home: imp client http api, docs Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <[email protected]> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <[email protected]> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule </s> remove Disallowed: disallowed, DisallowedRule: rule, </s> add Disallowed: &disallowed, DisallowedRule: &rule, </s> remove cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip) </s> add disallowed, rule := clients.dnsServer.IsBlockedIP(ip) cj.Disallowed, cj.DisallowedRule = &disallowed, &rule
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/460aa1a5ba4409a2fccb596b2156922532bab5b3
openapi/openapi.yaml
--black: #131313;
<mask> :root { <mask> --bgcolor: #f5f7fb; <mask> --mcolor: #495057; <mask> --scolor: rgba(74, 74, 74, 0.7); <mask> --border-color: rgba(0, 40, 100, 0.12); <mask> --header-bgcolor: #fff; </s> Fix dark theme bugs Updates #5375 Squashed commit of the following: commit 40666b010697381e11b3a36d9c2ed1c1507f27ed Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 18:34:06 2023 +0200 Review fix commit 44f3d6095bc9b426e8142f8c9d915a1441f3d791 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 17:02:38 2023 +0200 Clear commit 44274ba54c9ff2bd2caf5fa69bf06c587f8858e5 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 13:25:01 2023 +0200 Clear commit 8b48c523cbbe3f73160331a9c516388c7965a7a2 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 12:14:37 2023 +0200 Review fix commit 3b8cd94cdd8d3fc90cdc27053964489414055cc9 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 16:13:15 2023 +0200 Fix query log popup bg commit 14d4c87164200f7c918bac02c9cc5f1cffb83932 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 15:03:06 2023 +0200 revert icons commit 98b042726e1510f85c9cf5a4caba2d56885f120b Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 14:45:35 2023 +0200 Fix dark theme bugs </s> remove background-color: #fff; </s> add background-color: var(--card-bgcolor); </s> remove border-color: #5eba00; </s> add border-color: var(--btn-success-bgcolor); </s> remove border-color: #3e7a00; </s> add border-color: #448700;
[ "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/46382e88250d9734a6e634fa79376334ee1fbe24
client/src/components/App/index.css
--loading-bg: rgba(255, 255, 255, 0.48);
<mask> --green79: #67b279; <mask> --gray-a5: #a5a5a5; <mask> --gray-d8: #d8d8d8; <mask> --gray-f3: #f3f3f3; <mask> --font-family-monospace: Monaco, Menlo, "Ubuntu Mono", Consolas, source-code-pro, monospace; <mask> --font-size-disable-autozoom: 1rem; <mask> } <mask> <mask> [data-theme="dark"] { <mask> --black: #ffffff; </s> Fix dark theme bugs Updates #5375 Squashed commit of the following: commit 40666b010697381e11b3a36d9c2ed1c1507f27ed Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 18:34:06 2023 +0200 Review fix commit 44f3d6095bc9b426e8142f8c9d915a1441f3d791 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 17:02:38 2023 +0200 Clear commit 44274ba54c9ff2bd2caf5fa69bf06c587f8858e5 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 13:25:01 2023 +0200 Clear commit 8b48c523cbbe3f73160331a9c516388c7965a7a2 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 12:14:37 2023 +0200 Review fix commit 3b8cd94cdd8d3fc90cdc27053964489414055cc9 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 16:13:15 2023 +0200 Fix query log popup bg commit 14d4c87164200f7c918bac02c9cc5f1cffb83932 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 15:03:06 2023 +0200 revert icons commit 98b042726e1510f85c9cf5a4caba2d56885f120b Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 14:45:35 2023 +0200 Fix dark theme bugs </s> remove --form-disabled-bgcolor: #3d3d3d; </s> add --form-disabled-bgcolor: #2d2d2d; </s> remove --modal-overlay-bgcolor: #1c1c1c; </s> add --modal-overlay-bgcolor: rgba(19, 19, 19, 0.75);
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/46382e88250d9734a6e634fa79376334ee1fbe24
client/src/components/App/index.css
--black: #ffffff;
<mask> --font-size-disable-autozoom: 1rem; <mask> } <mask> <mask> [data-theme="dark"] { <mask> --bgcolor: #131313; <mask> --mcolor: #e6e6e6; <mask> --scolor: #a5a5a5; <mask> --header-bgcolor: #131313; <mask> --border-color: #222; <mask> --card-bgcolor: #1c1c1c; </s> Fix dark theme bugs Updates #5375 Squashed commit of the following: commit 40666b010697381e11b3a36d9c2ed1c1507f27ed Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 18:34:06 2023 +0200 Review fix commit 44f3d6095bc9b426e8142f8c9d915a1441f3d791 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 17:02:38 2023 +0200 Clear commit 44274ba54c9ff2bd2caf5fa69bf06c587f8858e5 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 13:25:01 2023 +0200 Clear commit 8b48c523cbbe3f73160331a9c516388c7965a7a2 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 12:14:37 2023 +0200 Review fix commit 3b8cd94cdd8d3fc90cdc27053964489414055cc9 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 16:13:15 2023 +0200 Fix query log popup bg commit 14d4c87164200f7c918bac02c9cc5f1cffb83932 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 15:03:06 2023 +0200 revert icons commit 98b042726e1510f85c9cf5a4caba2d56885f120b Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 14:45:35 2023 +0200 Fix dark theme bugs </s> remove --modal-overlay-bgcolor: #1c1c1c; </s> add --modal-overlay-bgcolor: rgba(19, 19, 19, 0.75); </s> remove --form-disabled-bgcolor: #3d3d3d; </s> add --form-disabled-bgcolor: #2d2d2d;
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/46382e88250d9734a6e634fa79376334ee1fbe24
client/src/components/App/index.css
--form-disabled-bgcolor: #2d2d2d;
<mask> --ctrl-dropdown-color: #fff; <mask> --ctrl-dropdown-bgcolor-focus: #000; <mask> --ctrl-dropdown-color-focus: #fff; <mask> --btn-success-bgcolor: #67b279; <mask> --form-disabled-bgcolor: #3d3d3d; <mask> --form-disabled-color: #a5a5a5; <mask> --logs__text-color: #f3f3f3; <mask> --rt-nodata-bgcolor: #1c1c1c; <mask> --rt-nodata-color: #fff; <mask> --modal-overlay-bgcolor: #1c1c1c; </s> Fix dark theme bugs Updates #5375 Squashed commit of the following: commit 40666b010697381e11b3a36d9c2ed1c1507f27ed Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 18:34:06 2023 +0200 Review fix commit 44f3d6095bc9b426e8142f8c9d915a1441f3d791 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 17:02:38 2023 +0200 Clear commit 44274ba54c9ff2bd2caf5fa69bf06c587f8858e5 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 13:25:01 2023 +0200 Clear commit 8b48c523cbbe3f73160331a9c516388c7965a7a2 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 12:14:37 2023 +0200 Review fix commit 3b8cd94cdd8d3fc90cdc27053964489414055cc9 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 16:13:15 2023 +0200 Fix query log popup bg commit 14d4c87164200f7c918bac02c9cc5f1cffb83932 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 15:03:06 2023 +0200 revert icons commit 98b042726e1510f85c9cf5a4caba2d56885f120b Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 14:45:35 2023 +0200 Fix dark theme bugs </s> remove --modal-overlay-bgcolor: #1c1c1c; </s> add --modal-overlay-bgcolor: rgba(19, 19, 19, 0.75); </s> remove border-color: #5eba00; </s> add border-color: var(--btn-success-bgcolor);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/46382e88250d9734a6e634fa79376334ee1fbe24
client/src/components/App/index.css
--modal-overlay-bgcolor: rgba(19, 19, 19, 0.75);
<mask> --form-disabled-color: #a5a5a5; <mask> --logs__text-color: #f3f3f3; <mask> --rt-nodata-bgcolor: #1c1c1c; <mask> --rt-nodata-color: #fff; <mask> --modal-overlay-bgcolor: #1c1c1c; <mask> --logs__table-bgcolor: #3d3d3d; <mask> --logs__row--blue-bgcolor: #467fcf; <mask> --logs__row--white-bgcolor: #1c1c1c; <mask> --detailed-info-color: #fff; <mask> } </s> Fix dark theme bugs Updates #5375 Squashed commit of the following: commit 40666b010697381e11b3a36d9c2ed1c1507f27ed Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 18:34:06 2023 +0200 Review fix commit 44f3d6095bc9b426e8142f8c9d915a1441f3d791 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 17:02:38 2023 +0200 Clear commit 44274ba54c9ff2bd2caf5fa69bf06c587f8858e5 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 13:25:01 2023 +0200 Clear commit 8b48c523cbbe3f73160331a9c516388c7965a7a2 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 12:14:37 2023 +0200 Review fix commit 3b8cd94cdd8d3fc90cdc27053964489414055cc9 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 16:13:15 2023 +0200 Fix query log popup bg commit 14d4c87164200f7c918bac02c9cc5f1cffb83932 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 15:03:06 2023 +0200 revert icons commit 98b042726e1510f85c9cf5a4caba2d56885f120b Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 14:45:35 2023 +0200 Fix dark theme bugs </s> remove --form-disabled-bgcolor: #3d3d3d; </s> add --form-disabled-bgcolor: #2d2d2d; </s> remove border-color: #5eba00; </s> add border-color: var(--btn-success-bgcolor);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/46382e88250d9734a6e634fa79376334ee1fbe24
client/src/components/App/index.css
--gray300: #f3f3f3; --loading-bg: #131313;
<mask> --logs__row--blue-bgcolor: #467fcf; <mask> --logs__row--white-bgcolor: #1c1c1c; <mask> --detailed-info-color: #fff; <mask> } <mask> <mask> body { <mask> margin: 0; <mask> padding: 0; <mask> font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; </s> Fix dark theme bugs Updates #5375 Squashed commit of the following: commit 40666b010697381e11b3a36d9c2ed1c1507f27ed Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 18:34:06 2023 +0200 Review fix commit 44f3d6095bc9b426e8142f8c9d915a1441f3d791 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 17:02:38 2023 +0200 Clear commit 44274ba54c9ff2bd2caf5fa69bf06c587f8858e5 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 13:25:01 2023 +0200 Clear commit 8b48c523cbbe3f73160331a9c516388c7965a7a2 Author: Arseny Lisin <[email protected]> Date: Tue Jan 31 12:14:37 2023 +0200 Review fix commit 3b8cd94cdd8d3fc90cdc27053964489414055cc9 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 16:13:15 2023 +0200 Fix query log popup bg commit 14d4c87164200f7c918bac02c9cc5f1cffb83932 Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 15:03:06 2023 +0200 revert icons commit 98b042726e1510f85c9cf5a4caba2d56885f120b Author: Arseny Lisin <[email protected]> Date: Mon Jan 30 14:45:35 2023 +0200 Fix dark theme bugs </s> remove --modal-overlay-bgcolor: #1c1c1c; </s> add --modal-overlay-bgcolor: rgba(19, 19, 19, 0.75); </s> remove border-top: 1px solid #dee2e6; </s> add border-top: 1px solid var(--card-border-color);
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/46382e88250d9734a6e634fa79376334ee1fbe24
client/src/components/App/index.css