docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep keep keep replace replace keep keep keep keep keep
<mask> stopHTTPServer() <mask> cleanupAlways() <mask> <mask> if runtime.GOOS == "windows" { <mask> <mask> if config.runningAsService { <mask> // Note: <mask> // we can't restart the service via "kardianos/service" package - it kills the process first <mask> // we can't start a new instance - Windows doesn't allow it <mask> cmd := exec.Command("cmd", "/c", "net stop AdGuardHome & net start AdGuardHome") <mask> err := cmd.Start() </s> *(global): refactoring - moved runtime properties to Context </s> remove baseDir := config.getDataDir() </s> add baseDir := Context.getDataDir() </s> remove config.appSignalChannel <- syscall.SIGINT </s> add Context.appSignalChannel <- syscall.SIGINT </s> remove // getDataDir returns path to the directory where we store databases and filters func (c *configuration) getDataDir() string { return filepath.Join(c.ourWorkingDir, dataDir) } </s> add </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove coreFilePath := filepath.Join(config.ourWorkingDir, "Corefile") </s> add coreFilePath := filepath.Join(Context.workDir, "Corefile") </s> remove exec, err := os.Executable() </s> add execPath, err := os.Executable()
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/control_update.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> func TestDoUpdate(t *testing.T) { <mask> <mask> config.DNS.Port = 0 <mask> config.ourWorkingDir = "..." // set absolute path <mask> newver := "v0.96" <mask> <mask> data := `{ <mask> "version": "v0.96", <mask> "announcement": "AdGuard Home v0.96 is now available!", </s> *(global): refactoring - moved runtime properties to Context </s> remove config.controlLock.Lock() </s> add Context.controlLock.Lock() </s> remove config.client = &http.Client{ </s> add Context.client = &http.Client{ </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove pkgName: config.ourWorkingDir + "/agh-update-" + newver + "/AdGuardHome_linux_amd64.tar.gz", </s> add pkgName: Context.workDir + "/agh-update-" + newver + "/AdGuardHome_linux_amd64.tar.gz", </s> remove config.ourWorkingDir = filepath.Dir(exec) </s> add Context.workDir = filepath.Dir(execPath) </s> remove config.ourWorkingDir = args.workDir </s> add Context.workDir = args.workDir
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/control_update_test.go
keep keep replace keep replace replace replace replace replace replace replace keep keep
<mask> u := updateInfo{ <mask> pkgURL: "https://github.com/AdguardTeam/AdGuardHome/releases/download/" + newver + "/AdGuardHome_linux_amd64.tar.gz", <mask> pkgName: config.ourWorkingDir + "/agh-update-" + newver + "/AdGuardHome_linux_amd64.tar.gz", <mask> newVer: newver, <mask> updateDir: config.ourWorkingDir + "/agh-update-" + newver, <mask> backupDir: config.ourWorkingDir + "/agh-backup", <mask> configName: config.ourWorkingDir + "/AdGuardHome.yaml", <mask> updateConfigName: config.ourWorkingDir + "/agh-update-" + newver + "/AdGuardHome/AdGuardHome.yaml", <mask> curBinName: config.ourWorkingDir + "/AdGuardHome", <mask> bkpBinName: config.ourWorkingDir + "/agh-backup/AdGuardHome", <mask> newBinName: config.ourWorkingDir + "/agh-update-" + newver + "/AdGuardHome/AdGuardHome", <mask> } <mask> </s> *(global): refactoring - moved runtime properties to Context </s> remove log.Debug("Current working directory is %s", config.ourWorkingDir) </s> add log.Debug("Current working directory is %s", Context.workDir) </s> remove config.ourWorkingDir = "..." // set absolute path </s> add Context.workDir = "..." // set absolute path </s> remove config.ourWorkingDir = args.workDir </s> add Context.workDir = args.workDir </s> remove config.ourWorkingDir = filepath.Dir(exec) </s> add Context.workDir = filepath.Dir(execPath) </s> remove config.DHCP.WorkDir = config.ourWorkingDir </s> add config.DHCP.WorkDir = Context.workDir
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/control_update_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> // initDNSServer creates an instance of the dnsforward.Server <mask> // Please note that we must do it even if we don't start it <mask> // so that we had access to the query log and the stats <mask> func initDNSServer() error { <mask> baseDir := config.getDataDir() <mask> <mask> err := os.MkdirAll(baseDir, 0755) <mask> if err != nil { <mask> return fmt.Errorf("Cannot create DNS data dir at %s: %s", baseDir, err) <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove coreFilePath := filepath.Join(config.ourWorkingDir, "Corefile") </s> add coreFilePath := filepath.Join(Context.workDir, "Corefile") </s> remove if config.runningAsService { </s> add if Context.runningAsService { </s> remove // getDataDir returns path to the directory where we store databases and filters func (c *configuration) getDataDir() string { return filepath.Join(c.ourWorkingDir, dataDir) } </s> add </s> remove dnsFilterPath := filepath.Join(config.ourWorkingDir, "dnsfilter.txt") </s> add dnsFilterPath := filepath.Join(Context.workDir, "dnsfilter.txt") </s> remove resp, err := config.client.Get(u.pkgURL) </s> add resp, err := Context.client.Get(u.pkgURL) </s> remove // initWorkingDir initializes the ourWorkingDir </s> add // initWorkingDir initializes the workDir
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/dns.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> return fmt.Errorf("dnsServer.Prepare: %s", err) <mask> } <mask> <mask> sessFilename := filepath.Join(baseDir, "sessions.db") <mask> config.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) <mask> if config.auth == nil { <mask> closeDNSServer() <mask> return fmt.Errorf("Couldn't initialize Auth module") <mask> } <mask> config.Users = nil <mask> </s> *(global): refactoring - moved runtime properties to Context </s> remove if config.auth != nil { config.Users = config.auth.GetUsers() </s> add if Context.auth != nil { config.Users = Context.auth.GetUsers() </s> remove if config.auth != nil { config.auth.Close() config.auth = nil </s> add if Context.auth != nil { Context.auth.Close() Context.auth = nil </s> remove config.firstRun = true </s> add Context.firstRun = true </s> remove logFilePath := filepath.Join(config.ourWorkingDir, ls.LogFile) </s> add logFilePath := filepath.Join(Context.workDir, ls.LogFile) </s> remove r := config.auth.CheckSession(cookie.Value) </s> add r := Context.auth.CheckSession(cookie.Value) </s> remove config.auth = InitAuth(fn, users, 60) </s> add Context.auth = InitAuth(fn, users, 60)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/dns.go
keep keep keep keep replace replace replace keep keep keep keep
<mask> Context.queryLog.Close() <mask> Context.queryLog = nil <mask> } <mask> <mask> if config.auth != nil { <mask> config.auth.Close() <mask> config.auth = nil <mask> } <mask> <mask> log.Debug("Closed all DNS modules") <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove config.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if config.auth == nil { </s> add Context.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if Context.auth == nil { </s> remove if config.auth != nil { config.Users = config.auth.GetUsers() </s> add if Context.auth != nil { config.Users = Context.auth.GetUsers() </s> remove config.firstRun = true </s> add Context.firstRun = true </s> remove config.auth = InitAuth(fn, users, 60) </s> add Context.auth = InitAuth(fn, users, 60) </s> remove } else if config.auth != nil && config.auth.AuthRequired() { </s> add } else if Context.auth != nil && Context.auth.AuthRequired() { </s> remove configFile = config.ourConfigFilename </s> add configFile = Context.configFilename
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/dns.go
keep keep keep keep replace keep keep keep keep keep
<mask> // Perform upgrade on a filter <mask> func (filter *filter) update() (bool, error) { <mask> log.Tracef("Downloading update for filter %d from %s", filter.ID, filter.URL) <mask> <mask> resp, err := config.client.Get(filter.URL) <mask> if resp != nil && resp.Body != nil { <mask> defer resp.Body.Close() <mask> } <mask> if err != nil { <mask> log.Printf("Couldn't request filter from URL %s, skipping: %s", filter.URL, err) </s> *(global): refactoring - moved runtime properties to Context </s> remove resp, err := config.client.Get(u.pkgURL) </s> add resp, err := Context.client.Get(u.pkgURL) </s> remove return filepath.Join(config.getDataDir(), filterDir, strconv.FormatInt(filter.ID, 10)+".txt") </s> add return filepath.Join(Context.getDataDir(), filterDir, strconv.FormatInt(filter.ID, 10)+".txt") </s> remove resp, err = config.client.Get(versionCheckURL) </s> add resp, err = Context.client.Get(versionCheckURL) </s> remove for i := 0; i != 5; i++ { resp, err = h.Get("http://127.0.0.1:3000/") if err == nil && resp.StatusCode != 404 { break } time.Sleep(1 * time.Second) } </s> add resp, err = h.Get("http://127.0.0.1:3000/") </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove if config.auth != nil { config.Users = config.auth.GetUsers() </s> add if Context.auth != nil { config.Users = Context.auth.GetUsers()
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/filter.go
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> // Path to the filter contents <mask> func (filter *filter) Path() string { <mask> return filepath.Join(config.getDataDir(), filterDir, strconv.FormatInt(filter.ID, 10)+".txt") <mask> } <mask> <mask> // LastTimeUpdated returns the time when the filter was last time updated <mask> func (filter *filter) LastTimeUpdated() time.Time { <mask> filterFilePath := filter.Path() </s> *(global): refactoring - moved runtime properties to Context </s> remove resp, err := config.client.Get(filter.URL) </s> add resp, err := Context.client.Get(filter.URL) </s> remove // getDataDir returns path to the directory where we store databases and filters func (c *configuration) getDataDir() string { return filepath.Join(c.ourWorkingDir, dataDir) } </s> add </s> remove configFile, err := filepath.EvalSymlinks(config.ourConfigFilename) </s> add configFile, err := filepath.EvalSymlinks(Context.configFilename) </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html pidFileName string // PID file name. Empty if no PID file was created. // runningAsService flag is set to true when options are passed from the service runner runningAsService bool disableUpdate bool // If set, don't check for updates appSignalChannel chan os.Signal controlLock sync.Mutex transport *http.Transport client *http.Client auth *Auth // HTTP authentication module </s> add </s> remove configFile = filepath.Join(config.ourWorkingDir, configFile) </s> add configFile = filepath.Join(Context.workDir, configFile)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/filter.go
keep keep keep keep replace keep keep keep keep keep
<mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func TestFilters(t *testing.T) { <mask> config.client = &http.Client{ <mask> Timeout: time.Minute * 5, <mask> } <mask> <mask> f := filter{ <mask> URL: "https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt", </s> *(global): refactoring - moved runtime properties to Context </s> remove config.transport = &http.Transport{ DialContext: customDialContext, } config.client = &http.Client{ Timeout: time.Minute * 5, Transport: config.transport, } </s> add </s> remove config.ourConfigFilename = args.configFilename </s> add Context.configFilename = args.configFilename } else { // Default config file name Context.configFilename = "AdGuardHome.yaml" } // Init some of the Context fields right away Context.transport = &http.Transport{ DialContext: customDialContext, } Context.client = &http.Client{ Timeout: time.Minute * 5, Transport: Context.transport, </s> remove config.ourWorkingDir = "..." // set absolute path </s> add Context.workDir = "..." // set absolute path </s> add for i := 0; i < 5; i++ { // Waiting until the DNS server is up and running if !isRunning() { time.Sleep(1 * time.Second) } } </s> remove for i := 0; i != 5; i++ { resp, err = h.Get("http://127.0.0.1:3000/") if err == nil && resp.StatusCode != 404 { break } time.Sleep(1 * time.Second) } </s> add resp, err = h.Get("http://127.0.0.1:3000/") </s> remove configfile = filepath.Join(config.ourWorkingDir, config.ourConfigFilename) </s> add configfile = filepath.Join(Context.workDir, Context.configFilename)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/filter_test.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> return <mask> } <mask> <mask> if method == "POST" || method == "PUT" || method == "DELETE" { <mask> config.controlLock.Lock() <mask> defer config.controlLock.Unlock() <mask> } <mask> <mask> handler(w, r) <mask> } <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove } else if config.auth != nil && config.auth.AuthRequired() { </s> add } else if Context.auth != nil && Context.auth.AuthRequired() { </s> remove config.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if config.auth == nil { </s> add Context.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if Context.auth == nil { </s> remove if config.appSignalChannel == nil { </s> add if Context.appSignalChannel == nil { </s> remove r := config.auth.CheckSession(cookie.Value) </s> add r := Context.auth.CheckSession(cookie.Value) </s> remove config.firstRun = true </s> add Context.firstRun = true </s> remove // getDataDir returns path to the directory where we store databases and filters func (c *configuration) getDataDir() string { return filepath.Join(c.ourWorkingDir, dataDir) } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/helpers.go
keep keep keep keep replace keep replace keep keep keep
<mask> // ------------------- <mask> // first run / install <mask> // ------------------- <mask> func detectFirstRun() bool { <mask> configfile := config.ourConfigFilename <mask> if !filepath.IsAbs(configfile) { <mask> configfile = filepath.Join(config.ourWorkingDir, config.ourConfigFilename) <mask> } <mask> _, err := os.Stat(configfile) <mask> if !os.IsNotExist(err) { </s> *(global): refactoring - moved runtime properties to Context </s> remove configFile, err := filepath.EvalSymlinks(config.ourConfigFilename) </s> add configFile, err := filepath.EvalSymlinks(Context.configFilename) </s> remove coreFilePath := filepath.Join(config.ourWorkingDir, "Corefile") </s> add coreFilePath := filepath.Join(Context.workDir, "Corefile") </s> remove dnsFilterPath := filepath.Join(config.ourWorkingDir, "dnsfilter.txt") </s> add dnsFilterPath := filepath.Join(Context.workDir, "dnsfilter.txt") </s> remove configFile = config.ourConfigFilename </s> add configFile = Context.configFilename </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method!
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/helpers.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> // preInstall lets the handler run only if firstRun is true, no redirects <mask> func preInstall(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) { <mask> return func(w http.ResponseWriter, r *http.Request) { <mask> if !config.firstRun { <mask> // if it's not first run, don't let users access it (for example /install.html when configuration is done) <mask> http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden) <mask> return <mask> } <mask> handler(w, r) </s> *(global): refactoring - moved runtime properties to Context </s> remove if config.firstRun && </s> add if Context.firstRun && </s> remove if config.firstRun { </s> add if Context.firstRun { </s> remove if config.disableUpdate { </s> add if Context.disableUpdate { </s> remove config.auth = InitAuth(fn, users, 60) </s> add Context.auth = InitAuth(fn, users, 60) </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove authRequired := config.auth != nil && config.auth.AuthRequired() </s> add authRequired := Context.auth != nil && Context.auth.AuthRequired()
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/helpers.go
keep keep keep keep replace keep keep keep keep keep
<mask> // postInstall lets the handler run only if firstRun is false, and redirects to /install.html otherwise <mask> // it also enforces HTTPS if it is enabled and configured <mask> func postInstall(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request) { <mask> return func(w http.ResponseWriter, r *http.Request) { <mask> if config.firstRun && <mask> !strings.HasPrefix(r.URL.Path, "/install.") && <mask> r.URL.Path != "/favicon.png" { <mask> http.Redirect(w, r, "/install.html", http.StatusSeeOther) // should not be cacheable <mask> return <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove authRequired := config.auth != nil && config.auth.AuthRequired() </s> add authRequired := Context.auth != nil && Context.auth.AuthRequired() </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove if config.firstRun { </s> add if Context.firstRun { </s> remove resp, err := config.client.Get(u.pkgURL) </s> add resp, err := Context.client.Get(u.pkgURL) </s> remove if config.disableUpdate { </s> add if Context.disableUpdate {
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/helpers.go
keep keep add keep keep keep keep keep
<mask> <mask> // Global context <mask> type homeContext struct { <mask> clients clientsContainer // per-client-settings module <mask> stats stats.Stats // statistics module <mask> queryLog querylog.QueryLog // query log module <mask> dnsServer *dnsforward.Server // DNS module <mask> rdns *RDNS // rDNS module </s> *(global): refactoring - moved runtime properties to Context </s> add auth *Auth // HTTP authentication module </s> remove baseDir := config.getDataDir() </s> add baseDir := Context.getDataDir() </s> remove ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html pidFileName string // PID file name. Empty if no PID file was created. // runningAsService flag is set to true when options are passed from the service runner runningAsService bool disableUpdate bool // If set, don't check for updates appSignalChannel chan os.Signal controlLock sync.Mutex transport *http.Transport client *http.Client auth *Auth // HTTP authentication module </s> add </s> remove assert.Truef(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> remove configfile := config.ourConfigFilename </s> add configfile := Context.configFilename </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method!
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep add keep keep keep keep
<mask> dnsFilter *dnsfilter.Dnsfilter // DNS filtering module <mask> dhcpServer *dhcpd.Server // DHCP module <mask> httpServer *http.Server // HTTP module <mask> httpsServer HTTPSServer // HTTPS module <mask> <mask> // Runtime properties </s> *(global): refactoring - moved runtime properties to Context </s> add // Modules // -- </s> remove ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html pidFileName string // PID file name. Empty if no PID file was created. // runningAsService flag is set to true when options are passed from the service runner runningAsService bool disableUpdate bool // If set, don't check for updates appSignalChannel chan os.Signal controlLock sync.Mutex transport *http.Transport client *http.Client auth *Auth // HTTP authentication module </s> add </s> remove assert.Truef(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> remove if config.firstRun && </s> add if Context.firstRun && </s> remove baseDir := config.getDataDir() </s> add baseDir := Context.getDataDir() </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method!
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep add keep keep keep keep keep
<mask> return <mask> } <mask> <mask> // run the protection <mask> run(args) <mask> } <mask> <mask> // run initializes configuration and runs the AdGuard Home </s> *(global): refactoring - moved runtime properties to Context </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove config.pidFileName = args.pidFile </s> add Context.pidFileName = args.pidFile </s> remove // initWorkingDir initializes the ourWorkingDir </s> add // initWorkingDir initializes the workDir </s> remove // getDataDir returns path to the directory where we store databases and filters func (c *configuration) getDataDir() string { return filepath.Join(c.ourWorkingDir, dataDir) } </s> add </s> remove if config.firstRun && </s> add if Context.firstRun && </s> remove if !config.firstRun { </s> add if !Context.firstRun {
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep replace keep keep keep keep replace keep keep keep
<mask> } <mask> <mask> // run initializes configuration and runs the AdGuard Home <mask> // run is a blocking method and it won't exit until the service is stopped! <mask> // nolint <mask> func run(args options) { <mask> // config file path can be overridden by command-line arguments: <mask> if args.configFilename != "" { <mask> config.ourConfigFilename = args.configFilename <mask> } <mask> <mask> // configure working dir and config path </s> *(global): refactoring - moved runtime properties to Context </s> add Context.appSignalChannel = make(chan os.Signal) signal.Notify(Context.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT) go func() { <-Context.appSignalChannel cleanup() cleanupAlways() os.Exit(0) }() </s> remove config.ourWorkingDir = filepath.Dir(exec) </s> add Context.workDir = filepath.Dir(execPath) </s> remove // getDataDir returns path to the directory where we store databases and filters func (c *configuration) getDataDir() string { return filepath.Join(c.ourWorkingDir, dataDir) } </s> add </s> remove if config.firstRun && </s> add if Context.firstRun && </s> remove config.ourWorkingDir = args.workDir </s> add Context.workDir = args.workDir
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep replace keep keep keep replace replace keep keep keep
<mask> msg = msg + " v" + ARMVersion <mask> } <mask> log.Printf(msg, versionString, updateChannel, runtime.GOOS, runtime.GOARCH, ARMVersion) <mask> log.Debug("Current working directory is %s", config.ourWorkingDir) <mask> if args.runningAsService { <mask> log.Info("AdGuard Home is running as a service") <mask> } <mask> config.runningAsService = args.runningAsService <mask> config.disableUpdate = args.disableUpdate <mask> <mask> config.firstRun = detectFirstRun() <mask> if config.firstRun { </s> *(global): refactoring - moved runtime properties to Context </s> remove config.firstRun = detectFirstRun() if config.firstRun { </s> add Context.firstRun = detectFirstRun() if Context.firstRun { </s> remove config.ourWorkingDir = args.workDir </s> add Context.workDir = args.workDir </s> remove config.ourWorkingDir = filepath.Dir(exec) </s> add Context.workDir = filepath.Dir(execPath) </s> remove config.firstRun = true </s> add Context.firstRun = true </s> remove config.firstRun = true </s> add Context.firstRun = true
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep replace replace keep keep keep replace replace replace replace replace replace replace replace replace keep
<mask> config.disableUpdate = args.disableUpdate <mask> <mask> config.firstRun = detectFirstRun() <mask> if config.firstRun { <mask> requireAdminRights() <mask> } <mask> <mask> config.appSignalChannel = make(chan os.Signal) <mask> signal.Notify(config.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT) <mask> go func() { <mask> <-config.appSignalChannel <mask> cleanup() <mask> cleanupAlways() <mask> os.Exit(0) <mask> }() <mask> <mask> initConfig() </s> *(global): refactoring - moved runtime properties to Context </s> add Context.appSignalChannel = make(chan os.Signal) signal.Notify(Context.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT) go func() { <-Context.appSignalChannel cleanup() cleanupAlways() os.Exit(0) }() </s> remove config.runningAsService = args.runningAsService config.disableUpdate = args.disableUpdate </s> add Context.runningAsService = args.runningAsService Context.disableUpdate = args.disableUpdate </s> remove log.Debug("Current working directory is %s", config.ourWorkingDir) </s> add log.Debug("Current working directory is %s", Context.workDir) </s> remove config.auth.UserAdd(&u, newSettings.Password) </s> add Context.auth.UserAdd(&u, newSettings.Password) </s> remove config.firstRun = true </s> add Context.firstRun = true
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> initConfig() <mask> initServices() <mask> <mask> if !config.firstRun { <mask> // Do the upgrade if necessary <mask> err := upgradeConfig() <mask> if err != nil { <mask> log.Fatal(err) <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove config.appSignalChannel = make(chan os.Signal) signal.Notify(config.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT) go func() { <-config.appSignalChannel cleanup() cleanupAlways() os.Exit(0) }() </s> add </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove exec, err := os.Executable() </s> add execPath, err := os.Executable() </s> remove resp, err := config.client.Get(filter.URL) </s> add resp, err := Context.client.Get(filter.URL) </s> remove } else if config.auth != nil && config.auth.AuthRequired() { </s> add } else if Context.auth != nil && Context.auth.AuthRequired() { </s> remove if !config.firstRun { </s> add if !Context.firstRun {
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> os.Exit(0) <mask> } <mask> } <mask> <mask> config.DHCP.WorkDir = config.ourWorkingDir <mask> config.DHCP.HTTPRegister = httpRegister <mask> config.DHCP.ConfigModified = onConfigModified <mask> Context.dhcpServer = dhcpd.Create(config.DHCP) <mask> Context.clients.Init(config.Clients, Context.dhcpServer) <mask> config.Clients = nil </s> *(global): refactoring - moved runtime properties to Context </s> remove config.ourWorkingDir = args.workDir </s> add Context.workDir = args.workDir </s> remove config.ourWorkingDir = filepath.Dir(exec) </s> add Context.workDir = filepath.Dir(execPath) </s> remove config.transport = &http.Transport{ DialContext: customDialContext, } config.client = &http.Client{ Timeout: time.Minute * 5, Transport: config.transport, } </s> add </s> remove config.firstRun = detectFirstRun() if config.firstRun { </s> add Context.firstRun = detectFirstRun() if Context.firstRun { </s> remove if config.auth != nil { config.auth.Close() config.auth = nil </s> add if Context.auth != nil { Context.auth.Close() Context.auth = nil </s> remove config.runningAsService = args.runningAsService config.disableUpdate = args.disableUpdate </s> add Context.runningAsService = args.runningAsService Context.disableUpdate = args.disableUpdate
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> if args.bindPort != 0 { <mask> config.BindPort = args.bindPort <mask> } <mask> <mask> if !config.firstRun { <mask> // Save the updated config <mask> err := config.write() <mask> if err != nil { <mask> log.Fatal(err) <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove if len(config.pidFileName) != 0 { os.Remove(config.pidFileName) </s> add if len(Context.pidFileName) != 0 { _ = os.Remove(Context.pidFileName) </s> remove configFile, err := filepath.EvalSymlinks(config.ourConfigFilename) </s> add configFile, err := filepath.EvalSymlinks(Context.configFilename) </s> remove config.pidFileName = args.pidFile </s> add Context.pidFileName = args.pidFile </s> remove configFile = config.ourConfigFilename </s> add configFile = Context.configFilename </s> remove u := config.auth.UserFind(user, pass) </s> add u := Context.auth.UserFind(user, pass)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> } <mask> <mask> if len(args.pidFile) != 0 && writePIDFile(args.pidFile) { <mask> config.pidFileName = args.pidFile <mask> } <mask> <mask> // Initialize and run the admin Web interface <mask> box := packr.NewBox("../build/static") <mask> </s> *(global): refactoring - moved runtime properties to Context </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove if config.firstRun && </s> add if Context.firstRun && </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> add Context.appSignalChannel = make(chan os.Signal) signal.Notify(Context.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT) go func() { <-Context.appSignalChannel cleanup() cleanupAlways() os.Exit(0) }() </s> remove if len(config.pidFileName) != 0 { os.Remove(config.pidFileName) </s> add if len(Context.pidFileName) != 0 { _ = os.Remove(Context.pidFileName) </s> remove r := config.auth.CheckSession(cookie.Value) </s> add r := Context.auth.CheckSession(cookie.Value)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> http.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box))))) <mask> registerControlHandlers() <mask> <mask> // add handlers for /install paths, we only need them when we're not configured yet <mask> if config.firstRun { <mask> log.Info("This is the first launch of AdGuard Home, redirecting everything to /install.html ") <mask> http.Handle("/install.html", preInstallHandler(http.FileServer(box))) <mask> registerInstallHandlers() <mask> } <mask> </s> *(global): refactoring - moved runtime properties to Context </s> remove if config.firstRun && </s> add if Context.firstRun && </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html pidFileName string // PID file name. Empty if no PID file was created. // runningAsService flag is set to true when options are passed from the service runner runningAsService bool disableUpdate bool // If set, don't check for updates appSignalChannel chan os.Signal controlLock sync.Mutex transport *http.Transport client *http.Client auth *Auth // HTTP authentication module </s> add </s> remove baseDir := config.getDataDir() </s> add baseDir := Context.getDataDir() </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove if config.runningAsService { </s> add if Context.runningAsService {
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep replace keep keep replace keep keep keep
<mask> } <mask> <mask> // initWorkingDir initializes the ourWorkingDir <mask> // if no command-line arguments specified, we use the directory where our binary file is located <mask> func initWorkingDir(args options) { <mask> exec, err := os.Executable() <mask> if err != nil { <mask> panic(err) <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove config.ourWorkingDir = filepath.Dir(exec) </s> add Context.workDir = filepath.Dir(execPath) </s> remove if len(config.pidFileName) != 0 { os.Remove(config.pidFileName) </s> add if len(Context.pidFileName) != 0 { _ = os.Remove(Context.pidFileName) </s> remove config.ourWorkingDir = args.workDir </s> add Context.workDir = args.workDir </s> remove // getDataDir returns path to the directory where we store databases and filters func (c *configuration) getDataDir() string { return filepath.Join(c.ourWorkingDir, dataDir) } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep replace keep replace keep keep
<mask> if args.workDir != "" { <mask> // If there is a custom config file, use it's directory as our working dir <mask> config.ourWorkingDir = args.workDir <mask> } else { <mask> config.ourWorkingDir = filepath.Dir(exec) <mask> } <mask> } </s> *(global): refactoring - moved runtime properties to Context </s> remove exec, err := os.Executable() </s> add execPath, err := os.Executable() </s> remove log.Debug("Current working directory is %s", config.ourWorkingDir) </s> add log.Debug("Current working directory is %s", Context.workDir) </s> remove config.runningAsService = args.runningAsService config.disableUpdate = args.disableUpdate </s> add Context.runningAsService = args.runningAsService Context.disableUpdate = args.disableUpdate </s> remove config.ourConfigFilename = args.configFilename </s> add Context.configFilename = args.configFilename } else { // Default config file name Context.configFilename = "AdGuardHome.yaml" } // Init some of the Context fields right away Context.transport = &http.Transport{ DialContext: customDialContext, } Context.client = &http.Client{ Timeout: time.Minute * 5, Transport: Context.transport, </s> remove // initWorkingDir initializes the ourWorkingDir </s> add // initWorkingDir initializes the workDir
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep keep replace keep keep keep keep keep
<mask> if err != nil { <mask> log.Fatalf("cannot initialize syslog: %s", err) <mask> } <mask> } else { <mask> logFilePath := filepath.Join(config.ourWorkingDir, ls.LogFile) <mask> if filepath.IsAbs(ls.LogFile) { <mask> logFilePath = ls.LogFile <mask> } <mask> <mask> file, err := os.OpenFile(logFilePath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) </s> *(global): refactoring - moved runtime properties to Context </s> remove config.firstRun = true </s> add Context.firstRun = true </s> remove configFile = config.ourConfigFilename </s> add configFile = Context.configFilename </s> remove u := config.auth.UserFind(user, pass) </s> add u := Context.auth.UserFind(user, pass) </s> remove config.ourWorkingDir = args.workDir </s> add Context.workDir = args.workDir </s> remove config.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if config.auth == nil { </s> add Context.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if Context.auth == nil { </s> remove } else if config.auth != nil && config.auth.AuthRequired() { </s> add } else if Context.auth != nil && Context.auth.AuthRequired() {
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> <mask> // This function is called before application exits <mask> func cleanupAlways() { <mask> if len(config.pidFileName) != 0 { <mask> os.Remove(config.pidFileName) <mask> } <mask> log.Info("Stopped") <mask> } <mask> <mask> // command-line arguments </s> *(global): refactoring - moved runtime properties to Context </s> remove // initWorkingDir initializes the ourWorkingDir </s> add // initWorkingDir initializes the workDir </s> remove exec, err := os.Executable() </s> add execPath, err := os.Executable() </s> remove if !config.firstRun { </s> add if !Context.firstRun { </s> remove // run is a blocking method and it won't exit until the service is stopped! </s> add // run is a blocking method! </s> remove config.ourConfigFilename = args.configFilename </s> add Context.configFilename = args.configFilename } else { // Default config file name Context.configFilename = "AdGuardHome.yaml" } // Init some of the Context fields right away Context.transport = &http.Transport{ DialContext: customDialContext, } Context.client = &http.Client{ Timeout: time.Minute * 5, Transport: Context.transport, </s> remove config.ourWorkingDir = filepath.Dir(exec) </s> add Context.workDir = filepath.Dir(execPath)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home.go
keep add keep keep keep keep keep keep
<mask> go run(args) <mask> <mask> var err error <mask> var resp *http.Response <mask> h := http.Client{} <mask> <mask> resp, err = h.Get("http://127.0.0.1:3000/") <mask> assert.Truef(t, err == nil, "%s", err) </s> *(global): refactoring - moved runtime properties to Context </s> remove for i := 0; i != 5; i++ { resp, err = h.Get("http://127.0.0.1:3000/") if err == nil && resp.StatusCode != 404 { break } time.Sleep(1 * time.Second) } </s> add resp, err = h.Get("http://127.0.0.1:3000/") </s> remove resp, err = config.client.Get(versionCheckURL) </s> add resp, err = Context.client.Get(versionCheckURL) </s> remove assert.True(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> remove assert.Truef(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> remove workDir := config.ourWorkingDir </s> add workDir := Context.workDir </s> remove resp, err := config.client.Get(u.pkgURL) </s> add resp, err := Context.client.Get(u.pkgURL)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home_test.go
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
<mask> <mask> var err error <mask> var resp *http.Response <mask> h := http.Client{} <mask> for i := 0; i != 5; i++ { <mask> resp, err = h.Get("http://127.0.0.1:3000/") <mask> if err == nil && resp.StatusCode != 404 { <mask> break <mask> } <mask> time.Sleep(1 * time.Second) <mask> } <mask> assert.Truef(t, err == nil, "%s", err) <mask> assert.Equal(t, 200, resp.StatusCode) <mask> <mask> resp, err = h.Get("http://127.0.0.1:3000/control/status") <mask> assert.Truef(t, err == nil, "%s", err) </s> *(global): refactoring - moved runtime properties to Context </s> add for i := 0; i < 5; i++ { // Waiting until the DNS server is up and running if !isRunning() { time.Sleep(1 * time.Second) } } </s> remove resp, err = config.client.Get(versionCheckURL) </s> add resp, err = Context.client.Get(versionCheckURL) </s> remove assert.True(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> remove assert.Truef(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> remove resp, err := config.client.Get(u.pkgURL) </s> add resp, err := Context.client.Get(u.pkgURL) </s> remove resp, err := config.client.Get(filter.URL) </s> add resp, err := Context.client.Get(filter.URL)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> // test DNS over UDP <mask> r := upstream.NewResolver("127.0.0.1:5354", 3*time.Second) <mask> addrs, err := r.LookupIPAddr(context.TODO(), "static.adguard.com") <mask> assert.Truef(t, err == nil, "%s", err) <mask> haveIP := len(addrs) != 0 <mask> assert.True(t, haveIP) <mask> <mask> // test DNS over HTTP without encryption <mask> req := dns.Msg{} </s> *(global): refactoring - moved runtime properties to Context </s> remove assert.True(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> add for i := 0; i < 5; i++ { // Waiting until the DNS server is up and running if !isRunning() { time.Sleep(1 * time.Second) } } </s> remove for i := 0; i != 5; i++ { resp, err = h.Get("http://127.0.0.1:3000/") if err == nil && resp.StatusCode != 404 { break } time.Sleep(1 * time.Second) } </s> add resp, err = h.Get("http://127.0.0.1:3000/") </s> remove r := config.auth.CheckSession(cookie.Value) </s> add r := Context.auth.CheckSession(cookie.Value) </s> remove authRequired := config.auth != nil && config.auth.AuthRequired() </s> add authRequired := Context.auth != nil && Context.auth.AuthRequired() </s> remove r := config.auth.CheckSession(cookie.Value) </s> add r := Context.auth.CheckSession(cookie.Value)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> assert.True(t, err == nil, "%s", err) <mask> assert.True(t, resp.StatusCode == http.StatusOK) <mask> response := dns.Msg{} <mask> err = response.Unpack(body) <mask> assert.True(t, err == nil, "%s", err) <mask> addrs = nil <mask> proxyutil.AppendIPAddrs(&addrs, response.Answer) <mask> haveIP = len(addrs) != 0 <mask> assert.True(t, haveIP) <mask> </s> *(global): refactoring - moved runtime properties to Context </s> remove assert.Truef(t, err == nil, "%s", err) </s> add assert.Nil(t, err) </s> remove for i := 0; i != 5; i++ { resp, err = h.Get("http://127.0.0.1:3000/") if err == nil && resp.StatusCode != 404 { break } time.Sleep(1 * time.Second) } </s> add resp, err = h.Get("http://127.0.0.1:3000/") </s> remove cookie := config.auth.httpCookie(loginJSON{Name: "name", Password: "password"}) </s> add cookie := Context.auth.httpCookie(loginJSON{Name: "name", Password: "password"}) </s> add for i := 0; i < 5; i++ { // Waiting until the DNS server is up and running if !isRunning() { time.Sleep(1 * time.Second) } } </s> remove config.auth.Close() </s> add Context.auth.Close() </s> remove config.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if config.auth == nil { </s> add Context.auth = InitAuth(sessFilename, config.Users, config.WebSessionTTLHours*60*60) if Context.auth == nil {
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/home_test.go
keep replace keep keep replace keep keep keep keep
<mask> // Stop should not block. Return with a few seconds. <mask> if config.appSignalChannel == nil { <mask> os.Exit(0) <mask> } <mask> config.appSignalChannel <- syscall.SIGINT <mask> return nil <mask> } <mask> <mask> // Check the service's status </s> *(global): refactoring - moved runtime properties to Context </s> remove config.appSignalChannel = make(chan os.Signal) signal.Notify(config.appSignalChannel, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT) go func() { <-config.appSignalChannel cleanup() cleanupAlways() os.Exit(0) }() </s> add </s> remove if config.firstRun && </s> add if Context.firstRun && </s> remove config.firstRun = detectFirstRun() if config.firstRun { </s> add Context.firstRun = detectFirstRun() if Context.firstRun { </s> remove } else if config.auth != nil && config.auth.AuthRequired() { </s> add } else if Context.auth != nil && Context.auth.AuthRequired() { </s> remove r := config.auth.CheckSession(cookie.Value) </s> add r := Context.auth.CheckSession(cookie.Value)
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/service.go
keep keep keep keep replace keep keep keep keep keep
<mask> // No more "dnsfilter.txt", filters are now kept in data/filters/ <mask> func upgradeSchema0to1(diskConfig *map[string]interface{}) error { <mask> log.Printf("%s(): called", _Func()) <mask> <mask> dnsFilterPath := filepath.Join(config.ourWorkingDir, "dnsfilter.txt") <mask> if _, err := os.Stat(dnsFilterPath); !os.IsNotExist(err) { <mask> log.Printf("Deleting %s as we don't need it anymore", dnsFilterPath) <mask> err = os.Remove(dnsFilterPath) <mask> if err != nil { <mask> log.Printf("Cannot remove %s due to %s", dnsFilterPath, err) </s> *(global): refactoring - moved runtime properties to Context </s> remove coreFilePath := filepath.Join(config.ourWorkingDir, "Corefile") </s> add coreFilePath := filepath.Join(Context.workDir, "Corefile") </s> remove baseDir := config.getDataDir() </s> add baseDir := Context.getDataDir() </s> remove configfile := config.ourConfigFilename </s> add configfile := Context.configFilename </s> remove configfile = filepath.Join(config.ourWorkingDir, config.ourConfigFilename) </s> add configfile = filepath.Join(Context.workDir, Context.configFilename) </s> remove configFile, err := filepath.EvalSymlinks(config.ourConfigFilename) </s> add configFile, err := filepath.EvalSymlinks(Context.configFilename) </s> remove configFile = config.ourConfigFilename </s> add configFile = Context.configFilename
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/upgrade.go
keep keep keep keep replace keep keep keep keep keep
<mask> // delete 'Corefile', since we don't use that anymore <mask> func upgradeSchema1to2(diskConfig *map[string]interface{}) error { <mask> log.Printf("%s(): called", _Func()) <mask> <mask> coreFilePath := filepath.Join(config.ourWorkingDir, "Corefile") <mask> if _, err := os.Stat(coreFilePath); !os.IsNotExist(err) { <mask> log.Printf("Deleting %s as we don't need it anymore", coreFilePath) <mask> err = os.Remove(coreFilePath) <mask> if err != nil { <mask> log.Printf("Cannot remove %s due to %s", coreFilePath, err) </s> *(global): refactoring - moved runtime properties to Context </s> remove dnsFilterPath := filepath.Join(config.ourWorkingDir, "dnsfilter.txt") </s> add dnsFilterPath := filepath.Join(Context.workDir, "dnsfilter.txt") </s> remove baseDir := config.getDataDir() </s> add baseDir := Context.getDataDir() </s> remove configfile := config.ourConfigFilename </s> add configfile := Context.configFilename </s> remove configfile = filepath.Join(config.ourWorkingDir, config.ourConfigFilename) </s> add configfile = filepath.Join(Context.workDir, Context.configFilename) </s> remove configFile, err := filepath.EvalSymlinks(config.ourConfigFilename) </s> add configFile, err := filepath.EvalSymlinks(Context.configFilename) </s> remove configFile = config.ourConfigFilename </s> add configFile = Context.configFilename
https://github.com/AdguardTeam/AdGuardHome/commit/ae2990582defd8062b99c546b2a932a8ba06c35d
home/upgrade.go
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> http.Error(w, "URL parameter is not valid request URL", http.StatusBadRequest) <mask> return <mask> } <mask> <mask> found := false <mask> config.Lock() <mask> for i := range config.Filters { <mask> filter := &config.Filters[i] // otherwise we will be operating on a copy <mask> if filter.URL == url { <mask> filter.Enabled = true <mask> found = true <mask> } <mask> } <mask> config.Unlock() <mask> <mask> if !found { <mask> http.Error(w, "URL parameter was not previously added", http.StatusBadRequest) <mask> return <mask> } <mask> </s> * control: enable/disable filter: move code to a separate function * don't start updating all filters after 1 filter has been enabled * unload filter data on disable </s> remove found := false config.Lock() for i := range config.Filters { filter := &config.Filters[i] // otherwise we will be operating on a copy if filter.URL == url { filter.Enabled = false found = true } } config.Unlock() </s> add found := filterEnable(url, false) </s> remove // kick off refresh of rules from new URLs refreshFiltersIfNecessary(false) </s> add </s> add // Clear filter rules func (filter *filter) unload() { filter.Rules = []string{} filter.RulesCount = 0 }
https://github.com/AdguardTeam/AdGuardHome/commit/ae2c7d00a95d67f21c72eac9c915701313b3646b
control.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> http.Error(w, "URL parameter was not previously added", http.StatusBadRequest) <mask> return <mask> } <mask> <mask> // kick off refresh of rules from new URLs <mask> refreshFiltersIfNecessary(false) <mask> httpUpdateConfigReloadDNSReturnOK(w, r) <mask> } <mask> <mask> func handleFilteringDisableURL(w http.ResponseWriter, r *http.Request) { <mask> log.Tracef("%s %v", r.Method, r.URL) </s> * control: enable/disable filter: move code to a separate function * don't start updating all filters after 1 filter has been enabled * unload filter data on disable </s> remove found := false config.Lock() for i := range config.Filters { filter := &config.Filters[i] // otherwise we will be operating on a copy if filter.URL == url { filter.Enabled = false found = true } } config.Unlock() </s> add found := filterEnable(url, false) </s> remove found := false config.Lock() for i := range config.Filters { filter := &config.Filters[i] // otherwise we will be operating on a copy if filter.URL == url { filter.Enabled = true found = true } } config.Unlock() </s> add found := filterEnable(url, true) </s> add // Clear filter rules func (filter *filter) unload() { filter.Rules = []string{} filter.RulesCount = 0 }
https://github.com/AdguardTeam/AdGuardHome/commit/ae2c7d00a95d67f21c72eac9c915701313b3646b
control.go
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> http.Error(w, "URL parameter is not valid request URL", http.StatusBadRequest) <mask> return <mask> } <mask> <mask> found := false <mask> config.Lock() <mask> for i := range config.Filters { <mask> filter := &config.Filters[i] // otherwise we will be operating on a copy <mask> if filter.URL == url { <mask> filter.Enabled = false <mask> found = true <mask> } <mask> } <mask> config.Unlock() <mask> <mask> if !found { <mask> http.Error(w, "URL parameter was not previously added", http.StatusBadRequest) <mask> return <mask> } <mask> </s> * control: enable/disable filter: move code to a separate function * don't start updating all filters after 1 filter has been enabled * unload filter data on disable </s> remove found := false config.Lock() for i := range config.Filters { filter := &config.Filters[i] // otherwise we will be operating on a copy if filter.URL == url { filter.Enabled = true found = true } } config.Unlock() </s> add found := filterEnable(url, true) </s> remove // kick off refresh of rules from new URLs refreshFiltersIfNecessary(false) </s> add </s> add // Clear filter rules func (filter *filter) unload() { filter.Rules = []string{} filter.RulesCount = 0 }
https://github.com/AdguardTeam/AdGuardHome/commit/ae2c7d00a95d67f21c72eac9c915701313b3646b
control.go
keep keep keep add keep keep keep keep keep keep
<mask> <mask> return nil <mask> } <mask> <mask> // Path to the filter contents <mask> func (filter *filter) Path() string { <mask> return filepath.Join(config.ourWorkingDir, dataDir, filterDir, strconv.FormatInt(filter.ID, 10)+".txt") <mask> } <mask> <mask> // LastTimeUpdated returns the time when the filter was last time updated </s> * control: enable/disable filter: move code to a separate function * don't start updating all filters after 1 filter has been enabled * unload filter data on disable </s> remove found := false config.Lock() for i := range config.Filters { filter := &config.Filters[i] // otherwise we will be operating on a copy if filter.URL == url { filter.Enabled = false found = true } } config.Unlock() </s> add found := filterEnable(url, false) </s> remove found := false config.Lock() for i := range config.Filters { filter := &config.Filters[i] // otherwise we will be operating on a copy if filter.URL == url { filter.Enabled = true found = true } } config.Unlock() </s> add found := filterEnable(url, true) </s> remove // kick off refresh of rules from new URLs refreshFiltersIfNecessary(false) </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae2c7d00a95d67f21c72eac9c915701313b3646b
filter.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> go 1.19 <mask> <mask> require ( <mask> github.com/AdguardTeam/dnsproxy v0.49.1 <mask> github.com/AdguardTeam/golibs v0.13.2 <mask> github.com/AdguardTeam/urlfilter v0.16.1 <mask> github.com/NYTimes/gziphandler v1.1.1 <mask> github.com/ameshkov/dnscrypt/v2 v2.2.7 <mask> github.com/digineo/go-ipset/v2 v2.2.1 </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add </s> remove github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= </s> add </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.mod
replace replace keep keep keep keep keep
<mask> github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= <mask> github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= <mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.10.4/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw= <mask> github.com/AdguardTeam/golibs v0.13.2 h1:BPASsyQKmb+b8VnvsNOHp7bKfcZl9Z+Z2UhPjOiupSc= <mask> github.com/AdguardTeam/golibs v0.13.2/go.mod h1:7ylQLv2Lqsc3UW3jHoITynYk6Y1tYtgEMkR09ppfsN8= <mask> github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 </s> add github.com/AdguardTeam/dnsproxy v0.49.2 </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add </s> remove github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= </s> add </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add </s> remove github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= </s> add </s> remove golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace keep keep keep keep keep
<mask> github.com/digineo/go-ipset/v2 v2.2.1 h1:k6skY+0fMqeUjjeWO/m5OuWPSZUAn7AucHMnQ1MX77g= <mask> github.com/digineo/go-ipset/v2 v2.2.1/go.mod h1:wBsNzJlZlABHUITkesrggFnZQtgW5wkqw1uo8Qxe0VU= <mask> github.com/dimfeld/httptreemux/v5 v5.5.0 h1:p8jkiMrCuZ0CmhwYLcbNbl7DDo21fozhKHQ2PccwOFQ= <mask> github.com/dimfeld/httptreemux/v5 v5.5.0/go.mod h1:QeEylH57C0v3VO0tkKraVz9oD3Uu93CKPnTLbsidvSw= <mask> github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= <mask> github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= <mask> github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= <mask> github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= <mask> github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY= <mask> github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 </s> add github.com/AdguardTeam/dnsproxy v0.49.2 </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= </s> add </s> remove github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8 h1:Z72DOke2yOK0Ms4Z2LK1E1OrRJXOxSj5DllTz2FYTRg= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8/go.mod h1:m5WMe03WCvWcXjRnhvaAbAAXdCnu20J5P+mmH44ZzpE= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= <mask> github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= <mask> github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= <mask> github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= <mask> github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= <mask> github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= <mask> github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= <mask> github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= <mask> github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= <mask> github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= <mask> github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= <mask> github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= <mask> github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/u-root/uio v0.0.0-20221213070652-c3537552635f/go.mod h1:IogEAUBXDEwX7oR/BMmCctShYs80ql4hF0ySdzGxf7E= </s> add </s> remove github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= </s> add </s> remove github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= </s> add </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep replace keep replace replace replace keep keep keep keep
<mask> github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= <mask> github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= <mask> github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= <mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 h1:/jC7qQFrv8CrSJVmaolDVOxTfS9kc36uB6H40kdbQq8= <mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= <mask> github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8 h1:Z72DOke2yOK0Ms4Z2LK1E1OrRJXOxSj5DllTz2FYTRg= <mask> github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8/go.mod h1:m5WMe03WCvWcXjRnhvaAbAAXdCnu20J5P+mmH44ZzpE= <mask> github.com/insomniacslk/dhcp v0.0.0-20230516061539-49801966e6cb h1:6fDKEAXwe3rsfS4khW3EZ8kEqmSiV9szhMPcDrD+Y7Q= <mask> github.com/insomniacslk/dhcp v0.0.0-20230516061539-49801966e6cb/go.mod h1:7474bZ1YNCvarT6WFKie4kEET6J0KYRDC4XJqqXzQW4= <mask> github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= <mask> github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok= github.com/jsimonetti/rtnetlink v0.0.0-20201110080708-d2c240429e6c/go.mod h1:huN4d1phzjhlOsNIjFsw2SVRbwIHj3fJDMEU2SDPTmg= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= </s> add </s> remove github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= </s> add </s> remove github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= </s> add </s> remove github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= </s> add </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= <mask> github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= <mask> github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86 h1:elKwZS1OcdQ0WwEDBeqxKwb7WB62QX8bvZ/FJnVXIfk= <mask> github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86/go.mod h1:aFAMtuldEgx/4q7iSGazk22+IcgvtiC+HIimFO9XlS8= <mask> github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= <mask> github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= <mask> github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok= <mask> github.com/jsimonetti/rtnetlink v0.0.0-20201110080708-d2c240429e6c/go.mod h1:huN4d1phzjhlOsNIjFsw2SVRbwIHj3fJDMEU2SDPTmg= <mask> github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= <mask> github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60= <mask> github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM= <mask> github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= <mask> github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= <mask> github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= </s> add </s> remove github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8 h1:Z72DOke2yOK0Ms4Z2LK1E1OrRJXOxSj5DllTz2FYTRg= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8/go.mod h1:m5WMe03WCvWcXjRnhvaAbAAXdCnu20J5P+mmH44ZzpE= </s> add </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add </s> remove github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= </s> add </s> remove golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add </s> remove github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep replace keep keep keep replace replace replace replace keep keep keep keep
<mask> github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= <mask> github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= <mask> github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= <mask> github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= <mask> github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118 h1:2oDp6OOhLxQ9JBoUuysVz9UZ9uI6oLUbvAZu0x8o+vE= <mask> github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118/go.mod h1:ZFUnHIVchZ9lJoWoEGUg8Q3M4U8aNNWA3CVSUTkW4og= <mask> github.com/mdlayher/netlink v0.0.0-20190313131330-258ea9dff42c/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= <mask> github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= <mask> github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= <mask> github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= <mask> github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= <mask> github.com/mdlayher/netlink v1.7.1 h1:FdUaT/e33HjEXagwELR8R3/KL1Fq5x3G5jgHLp/BTmg= <mask> github.com/mdlayher/netlink v1.7.1/go.mod h1:nKO5CSjE/DJjVhk/TNp6vCE1ktVxEA8VEh8drhZzxsQ= <mask> github.com/mdlayher/packet v1.0.0/go.mod h1:eE7/ctqDhoiRhQ44ko5JZU2zxB88g+JH/6jmnjzPjOU= <mask> github.com/mdlayher/packet v1.1.1 h1:7Fv4OEMYqPl7//uBm04VgPpnSNi8fbBZznppgh6WMr8= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add </s> remove github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok= github.com/jsimonetti/rtnetlink v0.0.0-20201110080708-d2c240429e6c/go.mod h1:huN4d1phzjhlOsNIjFsw2SVRbwIHj3fJDMEU2SDPTmg= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= </s> add </s> remove github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8 h1:Z72DOke2yOK0Ms4Z2LK1E1OrRJXOxSj5DllTz2FYTRg= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8/go.mod h1:m5WMe03WCvWcXjRnhvaAbAAXdCnu20J5P+mmH44ZzpE= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 </s> add github.com/AdguardTeam/dnsproxy v0.49.2 </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw=
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace replace keep keep keep keep keep
<mask> github.com/mdlayher/netlink v1.7.1/go.mod h1:nKO5CSjE/DJjVhk/TNp6vCE1ktVxEA8VEh8drhZzxsQ= <mask> github.com/mdlayher/packet v1.0.0/go.mod h1:eE7/ctqDhoiRhQ44ko5JZU2zxB88g+JH/6jmnjzPjOU= <mask> github.com/mdlayher/packet v1.1.1 h1:7Fv4OEMYqPl7//uBm04VgPpnSNi8fbBZznppgh6WMr8= <mask> github.com/mdlayher/packet v1.1.1/go.mod h1:DRvYY5mH4M4lUqAnMg04E60U4fjUKMZ/4g2cHElZkKo= <mask> github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= <mask> github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= <mask> github.com/mdlayher/raw v0.1.0 h1:K4PFMVy+AFsp0Zdlrts7yNhxc/uXoPVHi9RzRvtZF2Y= <mask> github.com/mdlayher/raw v0.1.0/go.mod h1:yXnxvs6c0XoF/aK52/H5PjsVHmWBCFfZUfoh/Y5s9Sg= <mask> github.com/mdlayher/socket v0.2.1/go.mod h1:QLlNPkFR88mRUNQIzRBMfXxwKal8H7u1h3bL1CV+f0E= <mask> github.com/mdlayher/socket v0.4.0 h1:280wsy40IC9M9q1uPGcLBwXpcTQDtoGwVt+BNoITxIw= <mask> github.com/mdlayher/socket v0.4.0/go.mod h1:xxFqz5GRCUN3UEOm9CZqEJsAbe1C8OwSK46NlmWuVoc= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= </s> add </s> remove github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= </s> add </s> remove github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok= github.com/jsimonetti/rtnetlink v0.0.0-20201110080708-d2c240429e6c/go.mod h1:huN4d1phzjhlOsNIjFsw2SVRbwIHj3fJDMEU2SDPTmg= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= </s> add </s> remove github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 </s> add github.com/AdguardTeam/dnsproxy v0.49.2 </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw=
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace replace keep keep keep keep keep
<mask> github.com/quic-go/quic-go v0.33.0 h1:ItNoTDN/Fm/zBlq769lLJc8ECe9gYaW40veHCCco7y0= <mask> github.com/quic-go/quic-go v0.33.0/go.mod h1:YMuhaAV9/jIu0XclDXwZPAsP/2Kgr5yMYhe9oxhhOFA= <mask> github.com/shirou/gopsutil/v3 v3.21.8 h1:nKct+uP0TV8DjjNiHanKf8SAuub+GNsbrOtM9Nl9biA= <mask> github.com/shirou/gopsutil/v3 v3.21.8/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= <mask> github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= <mask> github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= <mask> github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= <mask> github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= <mask> github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= <mask> github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= <mask> github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add </s> remove github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= </s> add </s> remove github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8 h1:Z72DOke2yOK0Ms4Z2LK1E1OrRJXOxSj5DllTz2FYTRg= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8/go.mod h1:m5WMe03WCvWcXjRnhvaAbAAXdCnu20J5P+mmH44ZzpE= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add </s> remove golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace keep keep keep keep keep
<mask> github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= <mask> github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= <mask> github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= <mask> github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= <mask> github.com/u-root/uio v0.0.0-20221213070652-c3537552635f/go.mod h1:IogEAUBXDEwX7oR/BMmCctShYs80ql4hF0ySdzGxf7E= <mask> github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63 h1:YcojQL98T/OO+rybuzn2+5KrD5dBwXIvYBvQ2cD3Avg= <mask> github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264= <mask> github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= <mask> go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= <mask> go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= </s> add </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace keep keep keep keep keep
<mask> go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= <mask> go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= <mask> golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= <mask> golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= <mask> golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= <mask> golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= <mask> golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= <mask> golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= <mask> golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= <mask> golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove github.com/u-root/uio v0.0.0-20221213070652-c3537552635f/go.mod h1:IogEAUBXDEwX7oR/BMmCctShYs80ql4hF0ySdzGxf7E= </s> add </s> remove golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= </s> add </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace keep keep keep replace replace replace replace replace keep keep keep keep
<mask> golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= <mask> golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= <mask> golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= <mask> golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= <mask> golang.org/x/net v0.0.0-20190419010253-1f3472d942ba/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= <mask> golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= <mask> golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= <mask> golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= <mask> golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= <mask> golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= <mask> golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= <mask> golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= <mask> golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= <mask> golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= <mask> golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= <mask> golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= <mask> golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace keep replace replace replace keep
<mask> golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= <mask> golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= <mask> golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190322080309-f49334f85ddc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190418153312-f0ce4c0180be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190606122018-79a91cf218c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add </s> remove github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7/go.mod h1:U6ZQobyTjI/tJyq2HG+i/dfSoFUt8/aZCM+GKtmFk/Y= </s> add </s> remove github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= </s> add </s> remove github.com/mdlayher/raw v0.0.0-20190606142536-fef19f00fc18/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep replace replace replace replace keep replace keep keep
<mask> golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= <mask> golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove golang.org/x/sys v0.0.0-20190418153312-f0ce4c0180be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606122018-79a91cf218c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add </s> remove golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw=
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace keep keep keep keep keep
<mask> golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= <mask> golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= <mask> golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= <mask> golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= <mask> golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= <mask> golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= <mask> golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= <mask> golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= <mask> golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= <mask> golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= </s> add </s> remove golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= </s> add </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
go.sum
keep keep keep keep replace keep keep keep keep keep
<mask> "upstream_dns": []string{badUps}, <mask> }, <mask> wantResp: map[string]any{ <mask> badUps: `upstream "` + badUps + `" fails to exchange: ` + <mask> `couldn't communicate with upstream: dns: id mismatch`, <mask> }, <mask> name: "broken", <mask> }, { <mask> body: map[string]any{ <mask> "upstream_dns": []string{goodUps, badUps}, </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add </s> remove github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= </s> add </s> remove github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8 h1:Z72DOke2yOK0Ms4Z2LK1E1OrRJXOxSj5DllTz2FYTRg= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8/go.mod h1:m5WMe03WCvWcXjRnhvaAbAAXdCnu20J5P+mmH44ZzpE= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
internal/dnsforward/http_test.go
keep keep keep keep replace keep keep keep keep keep
<mask> }, <mask> wantResp: map[string]any{ <mask> goodUps: "OK", <mask> badUps: `upstream "` + badUps + `" fails to exchange: ` + <mask> `couldn't communicate with upstream: dns: id mismatch`, <mask> }, <mask> name: "both", <mask> }} <mask> <mask> for _, tc := range testCases { </s> Pull request 1860: upd-proxy Merge in DNS/adguard-home from upd-proxy to master Squashed commit of the following: commit abb1f27954bf8c20461d86b382f59479a75a9958 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Jun 2 16:57:53 2023 +0300 all: upd dnsproxy </s> remove `couldn't communicate with upstream: dns: id mismatch`, </s> add `couldn't communicate with upstream: exchanging with ` + badUps + ` over tcp: dns: id mismatch`, </s> remove github.com/AdguardTeam/dnsproxy v0.49.1 h1:JpStBK05uCgA3ldleaNLRmIwE9V7vRg7/kVJQSdnQYg= github.com/AdguardTeam/dnsproxy v0.49.1/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> add github.com/AdguardTeam/dnsproxy v0.49.2 h1:DAFhLpz8KOvw9r6F3H1jK/JFYKzXY2RkqWSjkfwZMqU= github.com/AdguardTeam/dnsproxy v0.49.2/go.mod h1:Y7g7jRTd/u7+KJ/QvnGI2PCE8vnisp6EsW47/Sz0DZw= </s> remove github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= </s> add </s> remove github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= </s> add </s> remove github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= </s> add </s> remove github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8 h1:Z72DOke2yOK0Ms4Z2LK1E1OrRJXOxSj5DllTz2FYTRg= github.com/insomniacslk/dhcp v0.0.0-20221215072855-de60144f33f8/go.mod h1:m5WMe03WCvWcXjRnhvaAbAAXdCnu20J5P+mmH44ZzpE= </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/ae7bd79a6c2dba0061db4d5d46b9069e4bd3f22c
internal/dnsforward/http_test.go
keep keep keep add keep keep keep keep
<mask> // cached version.json to avoid hammering github.io for each page reload <mask> versionCheckJSON []byte <mask> versionCheckLastTime time.Time <mask> <mask> dhcpServer dhcpd.Server <mask> httpServer *http.Server <mask> httpsServer HTTPSServer <mask> </s> * move "dnsServer" to "config" </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop() </s> remove var dnsServer *dnsforward.Server </s> add </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove s := dnsServer.GetStatsTop() </s> add s := config.dnsServer.GetStatsTop() </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop() </s> remove dnsServer.ServeHTTP(w, r) </s> add config.dnsServer.ServeHTTP(w, r)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/config.go
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> func handleQueryLog(w http.ResponseWriter, r *http.Request) { <mask> log.Tracef("%s %v", r.Method, r.URL) <mask> data := dnsServer.GetQueryLog() <mask> <mask> jsonVal, err := json.Marshal(data) <mask> if err != nil { <mask> httpError(w, http.StatusInternalServerError, "Couldn't marshal data into json: %s", err) <mask> return </s> * move "dnsServer" to "config" </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove dnsServer.PurgeStats() </s> add config.dnsServer.PurgeStats() </s> remove s := dnsServer.GetStatsTop() </s> add s := config.dnsServer.GetStatsTop() </s> remove dnsServer = dnsforward.NewServer(baseDir) </s> add config.dnsServer = dnsforward.NewServer(baseDir) </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig()
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/control.go
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> func handleStatsTop(w http.ResponseWriter, r *http.Request) { <mask> log.Tracef("%s %v", r.Method, r.URL) <mask> s := dnsServer.GetStatsTop() <mask> <mask> // use manual json marshalling because we want maps to be sorted by value <mask> statsJSON := bytes.Buffer{} <mask> statsJSON.WriteString("{\n") <mask> </s> * move "dnsServer" to "config" </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove dnsServer.PurgeStats() </s> add config.dnsServer.PurgeStats() </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove top := dnsServer.GetStatsTop() </s> add top := config.dnsServer.GetStatsTop() </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop() </s> remove err = dnsServer.Start(&newconfig) </s> add err = config.dnsServer.Start(&newconfig)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/control.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> // handleStatsReset resets the stats caches <mask> func handleStatsReset(w http.ResponseWriter, r *http.Request) { <mask> log.Tracef("%s %v", r.Method, r.URL) <mask> dnsServer.PurgeStats() <mask> _, err := fmt.Fprintf(w, "OK\n") <mask> if err != nil { <mask> httpError(w, http.StatusInternalServerError, "Couldn't write body: %s", err) <mask> } <mask> } </s> * move "dnsServer" to "config" </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove s := dnsServer.GetStatsTop() </s> add s := config.dnsServer.GetStatsTop() </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig() </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop()
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/control.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> // handleStats returns aggregated stats data for the 24 hours <mask> func handleStats(w http.ResponseWriter, r *http.Request) { <mask> log.Tracef("%s %v", r.Method, r.URL) <mask> summed := dnsServer.GetAggregatedStats() <mask> <mask> statsJSON, err := json.Marshal(summed) <mask> if err != nil { <mask> httpError(w, http.StatusInternalServerError, "Unable to marshal status json: %s", err) <mask> return </s> * move "dnsServer" to "config" </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove dnsServer.PurgeStats() </s> add config.dnsServer.PurgeStats() </s> remove s := dnsServer.GetStatsTop() </s> add s := config.dnsServer.GetStatsTop() </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig() </s> remove dnsServer = dnsforward.NewServer(baseDir) </s> add config.dnsServer = dnsforward.NewServer(baseDir)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/control.go
keep keep keep keep replace keep keep keep keep keep
<mask> httpError(w, http.StatusBadRequest, "Must specify valid end_time parameter: %s", err) <mask> return <mask> } <mask> <mask> data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) <mask> if err != nil { <mask> httpError(w, http.StatusBadRequest, "Cannot get stats history: %s", err) <mask> return <mask> } <mask> </s> * move "dnsServer" to "config" </s> remove dnsServer.PurgeStats() </s> add config.dnsServer.PurgeStats() </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop() </s> remove dnsServer = dnsforward.NewServer(baseDir) </s> add config.dnsServer = dnsforward.NewServer(baseDir) </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig()
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/control.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> // Stop DNS server: <mask> // we close urlfilter object which in turn closes file descriptors to filter files. <mask> // Otherwise, Windows won't allow us to remove the file which is being currently used. <mask> _ = dnsServer.Stop() <mask> <mask> // go through each element and delete if url matches <mask> config.Lock() <mask> newFilters := config.Filters[:0] <mask> for _, filter := range config.Filters { </s> * move "dnsServer" to "config" </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop() </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove s := dnsServer.GetStatsTop() </s> add s := config.dnsServer.GetStatsTop() </s> remove dnsServer.PurgeStats() </s> add config.dnsServer.PurgeStats() </s> add dnsServer *dnsforward.Server </s> remove top := dnsServer.GetStatsTop() </s> add top := config.dnsServer.GetStatsTop()
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/control.go
keep keep keep keep replace keep keep keep keep keep
<mask> httpError(w, http.StatusInternalServerError, "DNS server is not running") <mask> return <mask> } <mask> <mask> dnsServer.ServeHTTP(w, r) <mask> } <mask> <mask> // ------------------------ <mask> // registration of handlers <mask> // ------------------------ </s> * move "dnsServer" to "config" </s> remove dnsServer.PurgeStats() </s> add config.dnsServer.PurgeStats() </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop() </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop()
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/control.go
keep keep keep keep replace replace keep keep keep keep keep
<mask> "github.com/joomcode/errorx" <mask> "github.com/miekg/dns" <mask> ) <mask> <mask> var dnsServer *dnsforward.Server <mask> <mask> const ( <mask> rdnsTimeout = 3 * time.Second // max time to wait for rDNS response <mask> ) <mask> <mask> type dnsContext struct { </s> * move "dnsServer" to "config" </s> add dnsServer *dnsforward.Server </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop() </s> remove dnsServer = dnsforward.NewServer(baseDir) </s> add config.dnsServer = dnsforward.NewServer(baseDir) </s> remove summed := dnsServer.GetAggregatedStats() </s> add summed := config.dnsServer.GetAggregatedStats() </s> remove return dnsServer != nil && dnsServer.IsRunning() </s> add return config.dnsServer != nil && config.dnsServer.IsRunning() </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop()
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/dns.go
keep keep keep keep replace keep keep keep keep keep
<mask> if err != nil { <mask> log.Fatalf("Cannot create DNS data dir at %s: %s", baseDir, err) <mask> } <mask> <mask> dnsServer = dnsforward.NewServer(baseDir) <mask> <mask> bindhost := config.DNS.BindHost <mask> if config.DNS.BindHost == "0.0.0.0" { <mask> bindhost = "127.0.0.1" <mask> } </s> * move "dnsServer" to "config" </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig() </s> remove err = dnsServer.Start(&newconfig) </s> add err = config.dnsServer.Start(&newconfig) </s> remove err = dnsServer.Reconfigure(&config) </s> add err = config.dnsServer.Reconfigure(&newconfig) </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop() </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/dns.go
keep keep keep keep replace keep keep keep keep keep
<mask> go asyncRDNSLoop() <mask> } <mask> <mask> func isRunning() bool { <mask> return dnsServer != nil && dnsServer.IsRunning() <mask> } <mask> <mask> func beginAsyncRDNS(ip string) { <mask> if config.clients.Exists(ip) { <mask> return </s> * move "dnsServer" to "config" </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig() </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop() </s> remove err = dnsServer.Reconfigure(&config) </s> add err = config.dnsServer.Reconfigure(&newconfig) </s> remove top := dnsServer.GetStatsTop() </s> add top := config.dnsServer.GetStatsTop() </s> remove err = dnsServer.Start(&newconfig) </s> add err = config.dnsServer.Start(&newconfig) </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog()
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/dns.go
keep keep keep keep replace keep keep keep keep replace keep keep keep
<mask> newconfig, err := generateServerConfig() <mask> if err != nil { <mask> return errorx.Decorate(err, "Couldn't start forwarding DNS server") <mask> } <mask> err = dnsServer.Start(&newconfig) <mask> if err != nil { <mask> return errorx.Decorate(err, "Couldn't start forwarding DNS server") <mask> } <mask> <mask> top := dnsServer.GetStatsTop() <mask> for k := range top.Clients { <mask> beginAsyncRDNS(k) <mask> } </s> * move "dnsServer" to "config" </s> remove err = dnsServer.Reconfigure(&config) </s> add err = config.dnsServer.Reconfigure(&newconfig) </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig() </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop() </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/dns.go
keep keep keep keep replace keep keep keep replace
<mask> return nil <mask> } <mask> <mask> func reconfigureDNSServer() error { <mask> config, err := generateServerConfig() <mask> if err != nil { <mask> return errorx.Decorate(err, "Couldn't start forwarding DNS server") <mask> } <mask> err = dnsServer.Reconfigure(&config) </s> * move "dnsServer" to "config" </s> remove err = dnsServer.Start(&newconfig) </s> add err = config.dnsServer.Start(&newconfig) </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop() </s> remove top := dnsServer.GetStatsTop() </s> add top := config.dnsServer.GetStatsTop() </s> remove data := dnsServer.GetQueryLog() </s> add data := config.dnsServer.GetQueryLog() </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/dns.go
keep keep keep keep replace keep keep keep keep keep
<mask> if !isRunning() { <mask> return nil <mask> } <mask> <mask> err := dnsServer.Stop() <mask> if err != nil { <mask> return errorx.Decorate(err, "Couldn't stop forwarding DNS server") <mask> } <mask> <mask> return nil </s> * move "dnsServer" to "config" </s> remove err = dnsServer.Reconfigure(&config) </s> add err = config.dnsServer.Reconfigure(&newconfig) </s> remove err = dnsServer.Start(&newconfig) </s> add err = config.dnsServer.Start(&newconfig) </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig() </s> remove top := dnsServer.GetStatsTop() </s> add top := config.dnsServer.GetStatsTop() </s> remove return dnsServer != nil && dnsServer.IsRunning() </s> add return config.dnsServer != nil && config.dnsServer.IsRunning() </s> remove data, err := dnsServer.GetStatsHistory(timeUnit, startTime, endTime) </s> add data, err := config.dnsServer.GetStatsHistory(timeUnit, startTime, endTime)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/dns.go
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> stopped := false <mask> if updateCount != 0 { <mask> _ = dnsServer.Stop() <mask> stopped = true <mask> } <mask> <mask> updateCount = 0 <mask> for i := range updateFilters { </s> * move "dnsServer" to "config" </s> remove _ = dnsServer.Stop() </s> add _ = config.dnsServer.Stop() </s> remove top := dnsServer.GetStatsTop() </s> add top := config.dnsServer.GetStatsTop() </s> remove err := dnsServer.Stop() </s> add err := config.dnsServer.Stop() </s> remove config, err := generateServerConfig() </s> add newconfig, err := generateServerConfig() </s> remove err = dnsServer.Start(&newconfig) </s> add err = config.dnsServer.Start(&newconfig) </s> remove dnsServer = dnsforward.NewServer(baseDir) </s> add config.dnsServer = dnsforward.NewServer(baseDir)
https://github.com/AdguardTeam/AdGuardHome/commit/af21a5f17bc1243c4ae8e44e424e0f1d264187f0
home/filter.go
keep keep add keep keep keep keep
<mask> "query_log_retention_confirm": "Are you sure you want to change query log retention? If you decrease the interval value, some data will be lost", <mask> "dns_config": "DNS server configuration", <mask> "blocking_mode": "Blocking mode", <mask> "nxdomain": "NXDOMAIN", <mask> "null_ip": "Null IP", <mask> "custom_ip": "Custom IP", <mask> "blocking_ipv4": "Blocking IPv4", </s> + client: handle default blocking mode </s> remove blocking_mode: BLOCKING_MODES.nxdomain, </s> add blocking_mode: BLOCKING_MODES.default, </s> add default: 'default', </s> remove <Trans components={[<div key="0">text</div>]}>blocking_mode_desc</Trans> </s> add {Object.values(BLOCKING_MODES).map(mode => ( <li key={mode}> <Trans >{`blocking_mode_${mode}`}</Trans> </li> ))}
https://github.com/AdguardTeam/AdGuardHome/commit/b01af453cc27cdb89ac0482ec68108ec8a2835a5
client/src/__locales/en.json
keep keep keep keep replace keep keep keep keep keep
<mask> <label className="form__label form__label--with-desc"> <mask> <Trans>blocking_mode</Trans> <mask> </label> <mask> <div className="form__desc form__desc--top"> <mask> <Trans components={[<div key="0">text</div>]}>blocking_mode_desc</Trans> <mask> </div> <mask> <div className="custom-controls-stacked"> <mask> {getFields(processing, t)} <mask> </div> <mask> </div> </s> + client: handle default blocking mode </s> remove blocking_mode: BLOCKING_MODES.nxdomain, </s> add blocking_mode: BLOCKING_MODES.default, </s> add default: 'default', </s> add "default": "Default",
https://github.com/AdguardTeam/AdGuardHome/commit/b01af453cc27cdb89ac0482ec68108ec8a2835a5
client/src/components/Settings/Dns/Config/Form.js
keep keep keep add keep keep keep keep keep keep
<mask> <mask> export const FILTERS_INTERVALS_HOURS = [0, 1, 12, 24, 72, 168]; <mask> <mask> export const BLOCKING_MODES = { <mask> nxdomain: 'nxdomain', <mask> null_ip: 'null_ip', <mask> custom_ip: 'custom_ip', <mask> }; <mask> <mask> export const WHOIS_ICONS = { </s> + client: handle default blocking mode </s> remove blocking_mode: BLOCKING_MODES.nxdomain, </s> add blocking_mode: BLOCKING_MODES.default, </s> remove <Trans components={[<div key="0">text</div>]}>blocking_mode_desc</Trans> </s> add {Object.values(BLOCKING_MODES).map(mode => ( <li key={mode}> <Trans >{`blocking_mode_${mode}`}</Trans> </li> ))} </s> add "default": "Default",
https://github.com/AdguardTeam/AdGuardHome/commit/b01af453cc27cdb89ac0482ec68108ec8a2835a5
client/src/helpers/constants.js
keep keep keep keep replace keep keep keep keep keep
<mask> }, <mask> { <mask> processingGetConfig: false, <mask> processingSetConfig: false, <mask> blocking_mode: BLOCKING_MODES.nxdomain, <mask> ratelimit: 20, <mask> blocking_ipv4: DEFAULT_BLOCKING_IPV4, <mask> blocking_ipv6: DEFAULT_BLOCKING_IPV6, <mask> edns_cs_enabled: false, <mask> disable_ipv6: false, </s> + client: handle default blocking mode </s> add default: 'default', </s> remove <Trans components={[<div key="0">text</div>]}>blocking_mode_desc</Trans> </s> add {Object.values(BLOCKING_MODES).map(mode => ( <li key={mode}> <Trans >{`blocking_mode_${mode}`}</Trans> </li> ))} </s> add "default": "Default",
https://github.com/AdguardTeam/AdGuardHome/commit/b01af453cc27cdb89ac0482ec68108ec8a2835a5
client/src/reducers/dnsConfig.js
keep keep add keep keep keep keep
<mask> <mask> // store session data in file <mask> func (a *Auth) addSession(data []byte, s *session) { <mask> a.lock.Lock() <mask> a.sessions[name] = s <mask> a.lock.Unlock() <mask> if a.storeSession(data, s) { </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove a.sessions[hex.EncodeToString(data)] = s </s> add a.sessions[name] = s </s> remove a.storeSession(data, s) </s> add if a.storeSession(data, s) { log.Info("Auth: created session %s: expire=%d", name, s.expire) } </s> remove func (a *Auth) storeSession(data []byte, s *session) { </s> add func (a *Auth) storeSession(data []byte, s *session) bool { </s> remove return </s> add return false </s> remove log.Debug("Auth: stored session in DB") </s> add return true </s> remove a.storeSession(key, s) </s> add if a.storeSession(key, s) { log.Debug("Auth: updated session %s: expire=%d", sess, s.expire) }
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep replace keep replace keep
<mask> a.lock.Lock() <mask> a.sessions[hex.EncodeToString(data)] = s <mask> a.lock.Unlock() <mask> a.storeSession(data, s) <mask> } </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> add name := hex.EncodeToString(data) </s> remove func (a *Auth) storeSession(data []byte, s *session) { </s> add func (a *Auth) storeSession(data []byte, s *session) bool { </s> remove a.storeSession(key, s) </s> add if a.storeSession(key, s) { log.Debug("Auth: updated session %s: expire=%d", sess, s.expire) } </s> remove return </s> add return false </s> add } else { log.Info("Auth: invalid Basic Authorization value")
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep replace keep keep keep replace keep keep
<mask> // store session data in file <mask> func (a *Auth) storeSession(data []byte, s *session) { <mask> tx, err := a.db.Begin(true) <mask> if err != nil { <mask> log.Error("Auth: bbolt.Begin: %s", err) <mask> return <mask> } <mask> defer func() { </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove a.storeSession(data, s) </s> add if a.storeSession(data, s) { log.Info("Auth: created session %s: expire=%d", name, s.expire) } </s> remove a.sessions[hex.EncodeToString(data)] = s </s> add a.sessions[name] = s </s> add name := hex.EncodeToString(data) </s> remove log.Debug("Auth: stored session in DB") </s> add return true </s> remove return </s> add return false
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep keep replace keep keep keep keep replace keep
<mask> bkt, err := tx.CreateBucketIfNotExists(bucketName()) <mask> if err != nil { <mask> log.Error("Auth: bbolt.CreateBucketIfNotExists: %s", err) <mask> return <mask> } <mask> err = bkt.Put(data, s.serialize()) <mask> if err != nil { <mask> log.Error("Auth: bbolt.Put: %s", err) <mask> return <mask> } </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove return </s> add return false </s> remove return </s> add return false </s> remove log.Debug("Auth: stored session in DB") </s> add return true </s> remove func (a *Auth) storeSession(data []byte, s *session) { </s> add func (a *Auth) storeSession(data []byte, s *session) bool { </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie)
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep replace keep replace replace keep keep keep
<mask> log.Error("Auth: bbolt.Commit: %s", err) <mask> return <mask> } <mask> <mask> log.Debug("Auth: stored session in DB") <mask> } <mask> <mask> // remove session from file </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove return </s> add return false </s> remove func (a *Auth) storeSession(data []byte, s *session) { </s> add func (a *Auth) storeSession(data []byte, s *session) bool { </s> remove a.sessions[hex.EncodeToString(data)] = s </s> add a.sessions[name] = s </s> remove return </s> add return false </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie)
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep keep keep replace keep keep keep keep keep
<mask> a.lock.Unlock() <mask> <mask> if update { <mask> key, _ := hex.DecodeString(sess) <mask> a.storeSession(key, s) <mask> } <mask> <mask> return 0 <mask> } <mask> </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove return </s> add return false </s> remove a.storeSession(data, s) </s> add if a.storeSession(data, s) { log.Info("Auth: created session %s: expire=%d", name, s.expire) } </s> add } else { log.Info("Auth: invalid Basic Authorization value") </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> remove func (a *Auth) storeSession(data []byte, s *session) { </s> add func (a *Auth) storeSession(data []byte, s *session) bool { </s> add name := hex.EncodeToString(data)
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep add keep keep keep keep
<mask> <mask> cookie := config.auth.httpCookie(req) <mask> if len(cookie) == 0 { <mask> time.Sleep(1 * time.Second) <mask> http.Error(w, "invalid user name or password", http.StatusBadRequest) <mask> return <mask> } </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove httpError(w, http.StatusBadRequest, "invalid login or password") </s> add http.Error(w, "invalid user name or password", http.StatusBadRequest) </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> remove a.storeSession(key, s) </s> add if a.storeSession(key, s) { log.Debug("Auth: updated session %s: expire=%d", sess, s.expire) } </s> add name := hex.EncodeToString(data) </s> add } else { log.Info("Auth: invalid Basic Authorization value")
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> cookie := config.auth.httpCookie(req) <mask> if len(cookie) == 0 { <mask> time.Sleep(1 * time.Second) <mask> httpError(w, http.StatusBadRequest, "invalid login or password") <mask> return <mask> } <mask> <mask> w.Header().Set("Set-Cookie", cookie) <mask> </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> add log.Info("Auth: invalid user name or password: name='%s'", req.Name) </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> remove a.storeSession(key, s) </s> add if a.storeSession(key, s) { log.Debug("Auth: updated session %s: expire=%d", sess, s.expire) } </s> add } else { log.Info("Auth: invalid Basic Authorization value") </s> remove return </s> add return false
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep keep keep replace keep keep keep keep keep
<mask> w.Header().Set("Location", "/") <mask> w.WriteHeader(http.StatusFound) <mask> return <mask> } else if r < 0 { <mask> log.Debug("Auth: invalid cookie value: %s", cookie) <mask> } <mask> } <mask> <mask> } else if r.URL.Path == "/favicon.png" || <mask> strings.HasPrefix(r.URL.Path, "/login.") { </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> add } else { log.Info("Auth: invalid Basic Authorization value") </s> remove httpError(w, http.StatusBadRequest, "invalid login or password") </s> add http.Error(w, "invalid user name or password", http.StatusBadRequest) </s> add log.Info("Auth: invalid user name or password: name='%s'", req.Name) </s> remove a.storeSession(key, s) </s> add if a.storeSession(key, s) { log.Debug("Auth: updated session %s: expire=%d", sess, s.expire) } </s> remove return </s> add return false
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep keep keep replace keep keep keep keep keep
<mask> r := config.auth.CheckSession(cookie.Value) <mask> if r == 0 { <mask> ok = true <mask> } else if r < 0 { <mask> log.Debug("Auth: invalid cookie value: %s", cookie) <mask> } <mask> } else { <mask> // there's no Cookie, check Basic authentication <mask> user, pass, ok2 := r.BasicAuth() <mask> if ok2 { </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> add } else { log.Info("Auth: invalid Basic Authorization value") </s> remove httpError(w, http.StatusBadRequest, "invalid login or password") </s> add http.Error(w, "invalid user name or password", http.StatusBadRequest) </s> add log.Info("Auth: invalid user name or password: name='%s'", req.Name) </s> remove a.storeSession(key, s) </s> add if a.storeSession(key, s) { log.Debug("Auth: updated session %s: expire=%d", sess, s.expire) } </s> remove log.Debug("Auth: stored session in DB") </s> add return true
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep add keep keep keep keep
<mask> u := config.auth.UserFind(user, pass) <mask> if len(u.Name) != 0 { <mask> ok = true <mask> } <mask> } <mask> } <mask> if !ok { </s> * auth: improve logging Write info log messages for login attempts (both successful and not) </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> remove log.Debug("Auth: stored session in DB") </s> add return true </s> remove a.storeSession(key, s) </s> add if a.storeSession(key, s) { log.Debug("Auth: updated session %s: expire=%d", sess, s.expire) } </s> remove return </s> add return false </s> remove log.Debug("Auth: invalid cookie value: %s", cookie) </s> add log.Info("Auth: invalid cookie value: %s", cookie) </s> remove return </s> add return false
https://github.com/AdguardTeam/AdGuardHome/commit/b03b36e47e1f230567fce0936ee1285b6861350a
home/auth.go
keep keep keep keep replace keep
<mask> "setup_config_to_enable_dhcp_server": "Setup config to enable DHCP server", <mask> "original_response": "Original response", <mask> "click_to_view_queries": "Click to view queries", <mask> "port_53_faq_link": "Port 53 is often occupied by \"DNSStubListener\" or \"systemd-resolved\" services. Please read <0>this instruction</0> on how to resolve this.", <mask> "adg_will_drop_dns_queries": "AdGuard Home will be dropping all DNS queries from this client." <mask> } </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> add import i18next from 'i18next'; </s> remove import { DNS_REQUEST_OPTIONS, FORM_NAME } from '../../../../helpers/constants'; </s> add import { DNS_REQUEST_OPTIONS, FORM_NAME, UPSTREAM_CONFIGURATION_WIKI_LINK } from '../../../../helpers/constants'; </s> remove const getInputFields = () => [{ // eslint-disable-next-line react/display-name getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <Trans>upstream_dns</Trans> </label>, name: 'upstream_dns', type: 'text', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }]; </s> add const Title = () => <label className="form__label" htmlFor="upstream_dns"> {i18next.t('upstream_dns')} <div> <a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank" rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a> </div> </label>; const getInputFields = (upstream_dns_file) => [ { getTitle: Title, name: 'upstream_dns', type: 'text', value: 'test', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, disabled: !!upstream_dns_file, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }, ]; </s> add upstream_dns_file: '', </s> add export const UPSTREAM_CONFIGURATION_WIKI_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams'; </s> remove processingTestUpstream={processingTestUpstream} processingSetConfig={processingSetConfig} </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/__locales/en.json
keep add keep keep keep keep
<mask> import classnames from 'classnames'; <mask> <mask> import Examples from './Examples'; <mask> import { renderRadioField, renderTextareaField } from '../../../../helpers/form'; <mask> import { DNS_REQUEST_OPTIONS, FORM_NAME, UPSTREAM_CONFIGURATION_WIKI_LINK } from '../../../../helpers/constants'; <mask> import { testUpstream } from '../../../../actions'; </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove import { DNS_REQUEST_OPTIONS, FORM_NAME } from '../../../../helpers/constants'; </s> add import { DNS_REQUEST_OPTIONS, FORM_NAME, UPSTREAM_CONFIGURATION_WIKI_LINK } from '../../../../helpers/constants'; </s> remove const getInputFields = () => [{ // eslint-disable-next-line react/display-name getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <Trans>upstream_dns</Trans> </label>, name: 'upstream_dns', type: 'text', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }]; </s> add const Title = () => <label className="form__label" htmlFor="upstream_dns"> {i18next.t('upstream_dns')} <div> <a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank" rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a> </div> </label>; const getInputFields = (upstream_dns_file) => [ { getTitle: Title, name: 'upstream_dns', type: 'text', value: 'test', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, disabled: !!upstream_dns_file, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }, ]; </s> remove "adg_will_drop_dns_queries": "AdGuard Home will be dropping all DNS queries from this client." </s> add "adg_will_drop_dns_queries": "AdGuard Home will be dropping all DNS queries from this client.", "configured_in": "Configured in {{path}}", "please_read_wiki": "Please read the wiki" </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> remove processingSetConfig, </s> add </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file);
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/Form.js
keep keep keep replace keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep
<mask> <mask> import Examples from './Examples'; <mask> import { renderRadioField, renderTextareaField } from '../../../../helpers/form'; <mask> import { DNS_REQUEST_OPTIONS, FORM_NAME } from '../../../../helpers/constants'; <mask> import { testUpstream } from '../../../../actions'; <mask> import { removeEmptyLines } from '../../../../helpers/helpers'; <mask> <mask> const getInputFields = () => [{ <mask> // eslint-disable-next-line react/display-name <mask> getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <mask> <Trans>upstream_dns</Trans> <mask> </label>, <mask> name: 'upstream_dns', <mask> type: 'text', <mask> component: renderTextareaField, <mask> className: 'form-control form-control--textarea font-monospace', <mask> placeholder: 'upstream_dns', <mask> normalizeOnBlur: removeEmptyLines, <mask> }, <mask> { <mask> name: 'upstream_mode', <mask> type: 'radio', <mask> value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, <mask> component: renderRadioField, <mask> subtitle: 'load_balancing_desc', <mask> placeholder: 'load_balancing', <mask> }, <mask> { <mask> name: 'upstream_mode', <mask> type: 'radio', <mask> value: DNS_REQUEST_OPTIONS.PARALLEL, <mask> component: renderRadioField, <mask> subtitle: 'upstream_parallel', <mask> placeholder: 'parallel_requests', <mask> }, <mask> { <mask> name: 'upstream_mode', <mask> type: 'radio', <mask> value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, <mask> component: renderRadioField, <mask> subtitle: 'fastest_addr_desc', <mask> placeholder: 'fastest_addr', <mask> }]; <mask> </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> add import i18next from 'i18next'; </s> remove submitting, invalid, processingSetConfig, processingTestUpstream, handleSubmit, </s> add submitting, invalid, handleSubmit, </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> remove processingSetConfig, </s> add </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file);
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> placeholder: 'fastest_addr', <mask> }]; <mask> <mask> const Form = ({ <mask> submitting, invalid, processingSetConfig, processingTestUpstream, handleSubmit, <mask> }) => { <mask> const dispatch = useDispatch(); <mask> const { t } = useTranslation(); <mask> const upstream_dns = useSelector((store) => store.form[FORM_NAME.UPSTREAM].values.upstream_dns); <mask> const bootstrap_dns = useSelector( </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove const getInputFields = () => [{ // eslint-disable-next-line react/display-name getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <Trans>upstream_dns</Trans> </label>, name: 'upstream_dns', type: 'text', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }]; </s> add const Title = () => <label className="form__label" htmlFor="upstream_dns"> {i18next.t('upstream_dns')} <div> <a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank" rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a> </div> </label>; const getInputFields = (upstream_dns_file) => [ { getTitle: Title, name: 'upstream_dns', type: 'text', value: 'test', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, disabled: !!upstream_dns_file, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }, ]; </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> remove processingSetConfig, </s> add </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); </s> remove const INPUT_FIELDS = getInputFields(); </s> add const INPUT_FIELDS = getInputFields(upstream_dns_file);
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/Form.js
keep keep add keep keep keep keep
<mask> const bootstrap_dns = useSelector( <mask> (store) => store.form[FORM_NAME.UPSTREAM].values.bootstrap_dns, <mask> ); <mask> <mask> const handleUpstreamTest = () => dispatch(testUpstream({ <mask> upstream_dns, <mask> bootstrap_dns, </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove submitting, invalid, processingSetConfig, processingTestUpstream, handleSubmit, </s> add submitting, invalid, handleSubmit, </s> remove processingSetConfig, </s> add </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); </s> add export const UPSTREAM_CONFIGURATION_WIKI_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams'; </s> remove const getInputFields = () => [{ // eslint-disable-next-line react/display-name getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <Trans>upstream_dns</Trans> </label>, name: 'upstream_dns', type: 'text', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }]; </s> add const Title = () => <label className="form__label" htmlFor="upstream_dns"> {i18next.t('upstream_dns')} <div> <a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank" rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a> </div> </label>; const getInputFields = (upstream_dns_file) => [ { getTitle: Title, name: 'upstream_dns', type: 'text', value: 'test', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, disabled: !!upstream_dns_file, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }, ];
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/Form.js
keep keep keep keep replace keep keep keep keep keep
<mask> const testButtonClass = classnames('btn btn-primary btn-standard mr-2', { <mask> 'btn-loading': processingTestUpstream, <mask> }); <mask> <mask> const INPUT_FIELDS = getInputFields(); <mask> <mask> return <form onSubmit={handleSubmit}> <mask> <div className="row"> <mask> {INPUT_FIELDS.map(({ <mask> name, component, type, className, placeholder, </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove submitting, invalid, processingSetConfig, processingTestUpstream, handleSubmit, </s> add submitting, invalid, handleSubmit, </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> remove upstream_dns, </s> add upstream_dns: upstreamDns, </s> add const upstreamDns = upstream_dns_file ? t('configured_in', { path: upstream_dns_file }) : upstream_dns; </s> remove processingSetConfig, </s> add </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file);
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/Form.js
keep keep keep keep replace replace keep keep keep
<mask> invalid: PropTypes.bool, <mask> initialValues: PropTypes.object, <mask> upstream_dns: PropTypes.string, <mask> bootstrap_dns: PropTypes.string, <mask> processingTestUpstream: PropTypes.bool, <mask> processingSetConfig: PropTypes.bool, <mask> }; <mask> <mask> export default reduxForm({ form: FORM_NAME.UPSTREAM })(Form); </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> add upstream_dns_file: '', </s> add export const UPSTREAM_CONFIGURATION_WIKI_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams'; </s> remove upstream_dns, </s> add upstream_dns: upstreamDns, </s> remove processingTestUpstream={processingTestUpstream} processingSetConfig={processingSetConfig} </s> add </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> add const upstreamDns = upstream_dns_file ? t('configured_in', { path: upstream_dns_file }) : upstream_dns;
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/Form.js
keep replace keep keep replace keep keep keep
<mask> upstream_mode, <mask> processingSetConfig, <mask> } = useSelector((state) => state.dnsConfig, shallowEqual); <mask> <mask> const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); <mask> <mask> const handleSubmit = (values) => { <mask> dispatch(setDnsConfig(values)); </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); </s> remove submitting, invalid, processingSetConfig, processingTestUpstream, handleSubmit, </s> add submitting, invalid, handleSubmit, </s> remove const getInputFields = () => [{ // eslint-disable-next-line react/display-name getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <Trans>upstream_dns</Trans> </label>, name: 'upstream_dns', type: 'text', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }]; </s> add const Title = () => <label className="form__label" htmlFor="upstream_dns"> {i18next.t('upstream_dns')} <div> <a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank" rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a> </div> </label>; const getInputFields = (upstream_dns_file) => [ { getTitle: Title, name: 'upstream_dns', type: 'text', value: 'test', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, disabled: !!upstream_dns_file, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }, ]; </s> remove const INPUT_FIELDS = getInputFields(); </s> add const INPUT_FIELDS = getInputFields(upstream_dns_file);
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/index.js
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); <mask> <mask> const handleSubmit = (values) => { <mask> dispatch(setDnsConfig(values)); <mask> }; <mask> <mask> return <Card <mask> title={t('upstream_dns')} <mask> subtitle={t('upstream_dns_hint')} </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); </s> remove processingSetConfig, </s> add </s> add const upstreamDns = upstream_dns_file ? t('configured_in', { path: upstream_dns_file }) : upstream_dns; </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); </s> remove const INPUT_FIELDS = getInputFields(); </s> add const INPUT_FIELDS = getInputFields(upstream_dns_file); </s> remove submitting, invalid, processingSetConfig, processingTestUpstream, handleSubmit, </s> add submitting, invalid, handleSubmit,
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/index.js
keep keep add keep keep keep keep
<mask> dispatch(setDnsConfig(dnsConfig)); <mask> }; <mask> <mask> return <Card <mask> title={t('upstream_dns')} <mask> subtitle={t('upstream_dns_hint')} <mask> bodyType="card-body box-body--settings" </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> remove const INPUT_FIELDS = getInputFields(); </s> add const INPUT_FIELDS = getInputFields(upstream_dns_file); </s> remove processingTestUpstream={processingTestUpstream} processingSetConfig={processingSetConfig} </s> add </s> remove processingTestUpstream: PropTypes.bool, processingSetConfig: PropTypes.bool, </s> add </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); </s> add upstream_dns_file: '',
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/index.js
keep keep keep replace keep keep keep keep replace replace keep keep keep keep
<mask> <div className="col"> <mask> <Form <mask> initialValues={{ <mask> upstream_dns, <mask> bootstrap_dns, <mask> upstream_mode, <mask> }} <mask> onSubmit={handleSubmit} <mask> processingTestUpstream={processingTestUpstream} <mask> processingSetConfig={processingSetConfig} <mask> /> <mask> </div> <mask> </div> <mask> </Card>; </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig)); </s> remove processingSetConfig, </s> add </s> remove const INPUT_FIELDS = getInputFields(); </s> add const INPUT_FIELDS = getInputFields(upstream_dns_file); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); </s> remove const getInputFields = () => [{ // eslint-disable-next-line react/display-name getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <Trans>upstream_dns</Trans> </label>, name: 'upstream_dns', type: 'text', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }]; </s> add const Title = () => <label className="form__label" htmlFor="upstream_dns"> {i18next.t('upstream_dns')} <div> <a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank" rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a> </div> </label>; const getInputFields = (upstream_dns_file) => [ { getTitle: Title, name: 'upstream_dns', type: 'text', value: 'test', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, disabled: !!upstream_dns_file, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }, ];
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/components/Settings/Dns/Upstream/index.js
keep keep add keep keep keep keep keep
<mask> <mask> export const PRIVACY_POLICY_LINK = 'https://adguard.com/privacy/home.html'; <mask> export const PORT_53_FAQ_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#bindinuse'; <mask> <mask> export const ADDRESS_IN_USE_TEXT = 'address already in use'; <mask> <mask> export const INSTALL_FIRST_STEP = 1; <mask> export const INSTALL_TOTAL_STEPS = 5; </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); </s> remove submitting, invalid, processingSetConfig, processingTestUpstream, handleSubmit, </s> add submitting, invalid, handleSubmit, </s> add upstream_dns_file: '', </s> remove const { processingTestUpstream } = useSelector((state) => state.settings, shallowEqual); </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); </s> remove processingSetConfig, </s> add </s> remove dispatch(setDnsConfig(values)); </s> add const { bootstrap_dns, upstream_dns, upstream_mode, } = values; const dnsConfig = { bootstrap_dns, upstream_mode, ...(upstream_dns_file ? null : { upstream_dns }), }; dispatch(setDnsConfig(dnsConfig));
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/helpers/constants.js
keep add keep keep keep keep
<mask> disable_ipv6: false, <mask> dnssec_enabled: false, <mask> }, <mask> ); <mask> <mask> export default dnsConfig; </s> + client: Display upstreams list loaded from a file Squashed commit of the following: commit b5abc9115806f345c8d0dd5ea00b8552d27813f9 Merge: 92708411 c1c8abdd Author: ArtemBaskal <a.baskal@adguard.com> Date: Mon Sep 7 14:38:06 2020 +0300 Merge branch '1680-upstreams-file' into feature/1680 commit 92708411f07638c037e049ee8012d15bdeda77e4 Author: ArtemBaskal <a.baskal@adguard.com> Date: Fri Sep 4 13:54:24 2020 +0300 + client: Display upstreams list loaded from a file </s> remove processingTestUpstream: PropTypes.bool, processingSetConfig: PropTypes.bool, </s> add </s> add export const UPSTREAM_CONFIGURATION_WIKI_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams'; </s> remove const getInputFields = () => [{ // eslint-disable-next-line react/display-name getTitle: () => <label className="form__label" htmlFor="upstream_dns"> <Trans>upstream_dns</Trans> </label>, name: 'upstream_dns', type: 'text', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }]; </s> add const Title = () => <label className="form__label" htmlFor="upstream_dns"> {i18next.t('upstream_dns')} <div> <a href={UPSTREAM_CONFIGURATION_WIKI_LINK} target="_blank" rel="noopener noreferrer">{i18next.t('please_read_wiki')}</a> </div> </label>; const getInputFields = (upstream_dns_file) => [ { getTitle: Title, name: 'upstream_dns', type: 'text', value: 'test', component: renderTextareaField, className: 'form-control form-control--textarea font-monospace', placeholder: 'upstream_dns', normalizeOnBlur: removeEmptyLines, disabled: !!upstream_dns_file, }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.LOAD_BALANCING, component: renderRadioField, subtitle: 'load_balancing_desc', placeholder: 'load_balancing', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.PARALLEL, component: renderRadioField, subtitle: 'upstream_parallel', placeholder: 'parallel_requests', }, { name: 'upstream_mode', type: 'radio', value: DNS_REQUEST_OPTIONS.FASTEST_ADDR, component: renderRadioField, subtitle: 'fastest_addr_desc', placeholder: 'fastest_addr', }, ]; </s> add const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); </s> remove processingTestUpstream={processingTestUpstream} processingSetConfig={processingSetConfig} </s> add </s> remove upstream_dns, </s> add upstream_dns: upstreamDns,
https://github.com/AdguardTeam/AdGuardHome/commit/b04e12e189b5949cdc8f60aede950dedf574d839
client/src/reducers/dnsConfig.js
keep add keep keep keep keep keep
<mask> } <mask> <mask> // A helper function that parses filter contents and returns a number of rules and a filter name (if there's any) <mask> func parseFilterContents(contents []byte) (int, string) { <mask> lines := strings.Split(string(contents), "\n") <mask> rulesCount := 0 <mask> name := "" </s> * filter update: ensure filter data is text (but not html) stop checking Content-Type HTTP header </s> add if !isPrintableText(body[:4096]) { return false, fmt.Errorf("Data contains non-printable characters") } s := strings.ToLower(string(body[:4096])) if strings.Index(s, "<html") >= 0 || strings.Index(s, "<!doctype") >= 0 { return false, fmt.Errorf("Data is HTML, not plain text") } </s> remove contentType := strings.ToLower(resp.Header.Get("content-type")) if !strings.HasPrefix(contentType, "text/plain") { log.Printf("Non-text response %s from %s, skipping", contentType, filter.URL) return false, fmt.Errorf("non-text response %s", contentType) } </s> add
https://github.com/AdguardTeam/AdGuardHome/commit/b078b82a89940bd96c7e9157c2f5c758224a72ae
home/filter.go