docstring_tokens stringlengths 0 76.5k | code_tokens stringlengths 75 1.81M | label_window listlengths 4 2.12k | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|---|
}
func startFiltering() {
// Here we should start updating filters,
// but currently we can't wake up the periodic task to do so.
// So for now we just start this periodic task from here. | <mask> loadFilters()
<mask> deduplicateFilters()
<mask> updateUniqueFilterID(config.Filters)
<mask> go periodicallyRefreshFilters()
<mask> }
<mask>
<mask> func defaultFilters() []filter {
<mask> return []filter{
<mask> {Filter: dnsfilter.Filter{ID: 1}, Enabled: true, URL: "https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt", Name: "AdGuard Simplified Domain Names filter"},
</s> - filters: auto-update didn't work </s> remove if config.DNS.FiltersUpdateIntervalHours != 0 && refreshStatus != 0 {
</s> add if config.DNS.FiltersUpdateIntervalHours != 0 && refreshStatus == 0 { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e2ff8628ada0b9c2aac5dd6c1d9a6bb70de25854 | home/filter.go |
if config.DNS.FiltersUpdateIntervalHours != 0 && refreshStatus == 0 { | <mask>
<mask> // Sets up a timer that will be checking for filters updates periodically
<mask> func periodicallyRefreshFilters() {
<mask> for {
<mask> if config.DNS.FiltersUpdateIntervalHours != 0 && refreshStatus != 0 {
<mask> refreshStatus = 1
<mask> refreshLock.Lock()
<mask> _ = refreshFiltersIfNecessary(false)
<mask> refreshLock.Unlock()
<mask> refreshStatus = 0
</s> - filters: auto-update didn't work | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e2ff8628ada0b9c2aac5dd6c1d9a6bb70de25854 | home/filter.go |
$(TARGET): $(STATIC) *.go dnsfilter/*.go dnsforward/*.go | <mask>
<mask> $(STATIC): $(JSFILES) client/node_modules
<mask> npm --prefix client run build-prod
<mask>
<mask> $(TARGET): $(STATIC) *.go coredns_plugin/*.go dnsfilter/*.go
<mask> go get -d .
<mask> GOOS=$(NATIVE_GOOS) GOARCH=$(NATIVE_GOARCH) GO111MODULE=off go get -v github.com/gobuffalo/packr/...
<mask> PATH=$(GOPATH)/bin:$(PATH) packr -z
<mask> CGO_ENABLED=0 go build -ldflags="-s -w -X main.VersionString=$(GIT_VERSION)" -asmflags="-trimpath=$(PWD)" -gcflags="-trimpath=$(PWD)"
<mask> PATH=$(GOPATH)/bin:$(PATH) packr clean
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove errortext := fmt.Sprintf("Couldn't get querylog from coredns: %T %s\n", err, err)
</s> add errortext := fmt.Sprintf("Couldn't get version check json from %s: %T %s\n", versionCheckURL, err, err) </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { </s> remove // coredns run control
</s> add // dns run control </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { </s> remove "bootstrap_dns": config.CoreDNS.BootstrapDNS,
"upstream_dns": config.CoreDNS.UpstreamDNS,
</s> add "bootstrap_dns": config.DNS.BootstrapDNS,
"upstream_dns": config.DNS.UpstreamDNS, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | Makefile |
dataDir = "data" // data storage
filterDir = "filters" // cache location for downloaded filters, it's under DataDir | <mask> "gopkg.in/yaml.v2"
<mask> )
<mask>
<mask> const (
<mask> currentSchemaVersion = 1 // used for upgrading from old configs to new config
<mask> dataDir = "data" // data storage
<mask> filterDir = "filters" // cache location for downloaded filters, it's under DataDir
<mask> )
<mask>
<mask> // configuration is loaded from YAML
<mask> // field ordering is important -- yaml fields will mirror ordering from here
<mask> type configuration struct {
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove type coreDNSConfig struct {
binaryFile string
coreFile string
Port int `yaml:"port"`
</s> add type dnsConfig struct {
Port int `yaml:"port"` </s> remove // URL is deemed valid, append it to filters, update config, write new filter file and tell coredns to reload it
</s> add // URL is deemed valid, append it to filters, update config, write new filter file and tell dns to reload it
// TODO: since we directly feed filters in-memory, revisit if writing configs is always neccessary </s> remove config.CoreDNS.UpstreamDNS = defaultDNS
</s> add config.DNS.UpstreamDNS = defaultDNS </s> remove BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
CoreDNS coreDNSConfig `yaml:"coredns"`
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules,omitempty"`
</s> add BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
DNS dnsConfig `yaml:"dns"`
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules,omitempty"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | config.go |
BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
DNS dnsConfig `yaml:"dns"`
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules,omitempty"` | <mask> type configuration struct {
<mask> ourConfigFilename string // Config filename (can be overriden via the command line arguments)
<mask> ourBinaryDir string // Location of our directory, used to protect against CWD being somewhere else
<mask>
<mask> BindHost string `yaml:"bind_host"`
<mask> BindPort int `yaml:"bind_port"`
<mask> AuthName string `yaml:"auth_name"`
<mask> AuthPass string `yaml:"auth_pass"`
<mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code
<mask> CoreDNS coreDNSConfig `yaml:"coredns"`
<mask> Filters []filter `yaml:"filters"`
<mask> UserRules []string `yaml:"user_rules,omitempty"`
<mask>
<mask> sync.RWMutex `yaml:"-"`
<mask>
<mask> SchemaVersion int `yaml:"schema_version"` // keeping last so that users will be less tempted to change it -- used when upgrading between versions
<mask> }
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove type coreDNSConfig struct {
binaryFile string
coreFile string
Port int `yaml:"port"`
</s> add type dnsConfig struct {
Port int `yaml:"port"` </s> remove Pprof string `yaml:"-"`
Cache string `yaml:"-"`
Prometheus string `yaml:"-"`
</s> add </s> remove currentSchemaVersion = 1 // used for upgrading from old configs to new config
dataDir = "data" // data storage
filterDir = "filters" // cache location for downloaded filters, it's under DataDir
</s> add dataDir = "data" // data storage
filterDir = "filters" // cache location for downloaded filters, it's under DataDir </s> remove config.CoreDNS.ParentalSensitivity = i
config.CoreDNS.ParentalEnabled = true
</s> add config.DNS.ParentalSensitivity = i
config.DNS.ParentalEnabled = true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | config.go |
type dnsConfig struct {
Port int `yaml:"port"` | <mask> SchemaVersion int `yaml:"schema_version"` // keeping last so that users will be less tempted to change it -- used when upgrading between versions
<mask> }
<mask>
<mask> // field ordering is important -- yaml fields will mirror ordering from here
<mask> type coreDNSConfig struct {
<mask> binaryFile string
<mask> coreFile string
<mask> Port int `yaml:"port"`
<mask>
<mask> dnsforward.FilteringConfig `yaml:",inline"`
<mask>
<mask> Pprof string `yaml:"-"`
<mask> Cache string `yaml:"-"`
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
CoreDNS coreDNSConfig `yaml:"coredns"`
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules,omitempty"`
</s> add BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
DNS dnsConfig `yaml:"dns"`
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules,omitempty"` </s> remove Pprof string `yaml:"-"`
Cache string `yaml:"-"`
Prometheus string `yaml:"-"`
</s> add </s> remove currentSchemaVersion = 1 // used for upgrading from old configs to new config
dataDir = "data" // data storage
filterDir = "filters" // cache location for downloaded filters, it's under DataDir
</s> add dataDir = "data" // data storage
filterDir = "filters" // cache location for downloaded filters, it's under DataDir </s> remove config.CoreDNS.UpstreamDNS = defaultDNS
</s> add config.DNS.UpstreamDNS = defaultDNS | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | config.go |
<mask> Port int `yaml:"port"`
<mask>
<mask> dnsforward.FilteringConfig `yaml:",inline"`
<mask>
<mask> Pprof string `yaml:"-"`
<mask> Cache string `yaml:"-"`
<mask> Prometheus string `yaml:"-"`
<mask> BootstrapDNS string `yaml:"bootstrap_dns"`
<mask> UpstreamDNS []string `yaml:"upstream_dns"`
<mask> }
<mask>
<mask> var defaultDNS = []string{"tls://1.1.1.1", "tls://1.0.0.1"}
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove type coreDNSConfig struct {
binaryFile string
coreFile string
Port int `yaml:"port"`
</s> add type dnsConfig struct {
Port int `yaml:"port"` </s> remove BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
CoreDNS coreDNSConfig `yaml:"coredns"`
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules,omitempty"`
</s> add BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
DNS dnsConfig `yaml:"dns"`
Filters []filter `yaml:"filters"`
UserRules []string `yaml:"user_rules,omitempty"` </s> remove config.CoreDNS.UpstreamDNS = defaultDNS
</s> add config.DNS.UpstreamDNS = defaultDNS </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove CoreDNS: coreDNSConfig{
Port: 53,
binaryFile: "coredns", // only filename, no path
coreFile: "Corefile", // only filename, no path
</s> add DNS: dnsConfig{
Port: 53, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | config.go | |
DNS: dnsConfig{
Port: 53, | <mask> var config = configuration{
<mask> ourConfigFilename: "AdGuardHome.yaml",
<mask> BindPort: 3000,
<mask> BindHost: "127.0.0.1",
<mask> CoreDNS: coreDNSConfig{
<mask> Port: 53,
<mask> binaryFile: "coredns", // only filename, no path
<mask> coreFile: "Corefile", // only filename, no path
<mask> FilteringConfig: dnsforward.FilteringConfig{
<mask> ProtectionEnabled: true, // whether or not use any of dnsfilter features
<mask> FilteringEnabled: true, // whether or not use filter lists
<mask> BlockedResponseTTL: 10, // in seconds
<mask> QueryLogEnabled: true,
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove Cache: "cache",
Prometheus: "prometheus :9153",
</s> add </s> remove _, err := os.Stat(dnsFilterPath)
if !os.IsNotExist(err) {
</s> add if _, err := os.Stat(dnsFilterPath); !os.IsNotExist(err) { </s> remove // URL is deemed valid, append it to filters, update config, write new filter file and tell coredns to reload it
</s> add // URL is deemed valid, append it to filters, update config, write new filter file and tell dns to reload it
// TODO: since we directly feed filters in-memory, revisit if writing configs is always neccessary </s> remove Pprof string `yaml:"-"`
Cache string `yaml:"-"`
Prometheus string `yaml:"-"`
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | config.go |
<mask> RefuseAny: true,
<mask> },
<mask> BootstrapDNS: "8.8.8.8:53",
<mask> UpstreamDNS: defaultDNS,
<mask> Cache: "cache",
<mask> Prometheus: "prometheus :9153",
<mask> },
<mask> Filters: []filter{
<mask> {Filter: dnsfilter.Filter{ID: 1}, Enabled: true, URL: "https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt", Name: "AdGuard Simplified Domain Names filter"},
<mask> {Filter: dnsfilter.Filter{ID: 2}, Enabled: false, URL: "https://adaway.org/hosts.txt", Name: "AdAway"},
<mask> {Filter: dnsfilter.Filter{ID: 3}, Enabled: false, URL: "https://hosts-file.net/ad_servers.txt", Name: "hpHosts - Ad and Tracking servers only"},
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove CoreDNS: coreDNSConfig{
Port: 53,
binaryFile: "coredns", // only filename, no path
coreFile: "Corefile", // only filename, no path
</s> add DNS: dnsConfig{
Port: 53, </s> remove // URL is deemed valid, append it to filters, update config, write new filter file and tell coredns to reload it
</s> add // URL is deemed valid, append it to filters, update config, write new filter file and tell dns to reload it
// TODO: since we directly feed filters in-memory, revisit if writing configs is always neccessary </s> remove config.CoreDNS.UpstreamDNS = defaultDNS
</s> add config.DNS.UpstreamDNS = defaultDNS </s> remove UDPListenAddr: &net.UDPAddr{Port: config.CoreDNS.Port},
FilteringConfig: config.CoreDNS.FilteringConfig,
</s> add UDPListenAddr: &net.UDPAddr{Port: config.DNS.Port},
FilteringConfig: config.DNS.FilteringConfig, </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | config.go | |
// dns run control | <mask> Timeout: time.Second * 30,
<mask> }
<mask>
<mask> // -------------------
<mask> // coredns run control
<mask> // -------------------
<mask> func writeAllConfigsAndReloadCoreDNS() error {
<mask> err := writeAllConfigs()
<mask> if err != nil {
<mask> log.Printf("Couldn't write all configs: %s", err)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { </s> remove err := upgradeSchema0to1(diskConfig)
</s> add err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
func writeAllConfigsAndReloadDNS() error { | <mask>
<mask> // -------------------
<mask> // coredns run control
<mask> // -------------------
<mask> func writeAllConfigsAndReloadCoreDNS() error {
<mask> err := writeAllConfigs()
<mask> if err != nil {
<mask> log.Printf("Couldn't write all configs: %s", err)
<mask> return err
<mask> }
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove // coredns run control
</s> add // dns run control </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove err := upgradeSchema0to1(diskConfig)
</s> add err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
err := writeAllConfigsAndReloadDNS() | <mask> return nil
<mask> }
<mask>
<mask> func httpUpdateConfigReloadDNSReturnOK(w http.ResponseWriter, r *http.Request) {
<mask> err := writeAllConfigsAndReloadCoreDNS()
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Couldn't write config file: %s", err)
<mask> log.Println(errortext)
<mask> http.Error(w, errortext, http.StatusInternalServerError)
<mask> return
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove errortext := fmt.Sprintf("Couldn't read response body: %s", err)
</s> add errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) </s> remove errortext := fmt.Sprintf("Couldn't get querylog from coredns: %T %s\n", err, err)
</s> add errortext := fmt.Sprintf("Couldn't get version check json from %s: %T %s\n", versionCheckURL, err, err) </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
"dns_port": config.DNS.Port,
"protection_enabled": config.DNS.ProtectionEnabled,
"querylog_enabled": config.DNS.QueryLogEnabled, | <mask>
<mask> func handleStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "dns_address": config.BindHost,
<mask> "dns_port": config.CoreDNS.Port,
<mask> "protection_enabled": config.CoreDNS.ProtectionEnabled,
<mask> "querylog_enabled": config.CoreDNS.QueryLogEnabled,
<mask> "running": isRunning(),
<mask> "bootstrap_dns": config.CoreDNS.BootstrapDNS,
<mask> "upstream_dns": config.CoreDNS.UpstreamDNS,
<mask> "version": VersionString,
<mask> "language": config.Language,
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove "bootstrap_dns": config.CoreDNS.BootstrapDNS,
"upstream_dns": config.CoreDNS.UpstreamDNS,
</s> add "bootstrap_dns": config.DNS.BootstrapDNS,
"upstream_dns": config.DNS.UpstreamDNS, </s> remove config.CoreDNS.SafeSearchEnabled = false
</s> add config.DNS.SafeSearchEnabled = false </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
"bootstrap_dns": config.DNS.BootstrapDNS,
"upstream_dns": config.DNS.UpstreamDNS, | <mask> "dns_port": config.CoreDNS.Port,
<mask> "protection_enabled": config.CoreDNS.ProtectionEnabled,
<mask> "querylog_enabled": config.CoreDNS.QueryLogEnabled,
<mask> "running": isRunning(),
<mask> "bootstrap_dns": config.CoreDNS.BootstrapDNS,
<mask> "upstream_dns": config.CoreDNS.UpstreamDNS,
<mask> "version": VersionString,
<mask> "language": config.Language,
<mask> }
<mask>
<mask> jsonVal, err := json.Marshal(data)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove "dns_port": config.CoreDNS.Port,
"protection_enabled": config.CoreDNS.ProtectionEnabled,
"querylog_enabled": config.CoreDNS.QueryLogEnabled,
</s> add "dns_port": config.DNS.Port,
"protection_enabled": config.DNS.ProtectionEnabled,
"querylog_enabled": config.DNS.QueryLogEnabled, </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, </s> remove "enabled": config.CoreDNS.SafeSearchEnabled,
</s> add "enabled": config.DNS.SafeSearchEnabled, </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.ProtectionEnabled = true | <mask> }
<mask> }
<mask>
<mask> func handleProtectionEnable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.ProtectionEnabled = true
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleProtectionDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.ProtectionEnabled = false
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.ProtectionEnabled = false
</s> add config.DNS.ProtectionEnabled = false </s> remove config.CoreDNS.FilteringEnabled = true
</s> add config.DNS.FilteringEnabled = true </s> remove config.CoreDNS.SafeSearchEnabled = true
</s> add config.DNS.SafeSearchEnabled = true </s> remove config.CoreDNS.SafeBrowsingEnabled = true
</s> add config.DNS.SafeBrowsingEnabled = true </s> remove config.CoreDNS.QueryLogEnabled = true
</s> add config.DNS.QueryLogEnabled = true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.ProtectionEnabled = false | <mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleProtectionDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.ProtectionEnabled = false
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> // -----
<mask> // stats
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.ProtectionEnabled = true
</s> add config.DNS.ProtectionEnabled = true </s> remove config.CoreDNS.QueryLogEnabled = true
</s> add config.DNS.QueryLogEnabled = true </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.QueryLogEnabled = true | <mask> // -----
<mask> // stats
<mask> // -----
<mask> func handleQueryLogEnable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.QueryLogEnabled = true
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleQueryLogDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.QueryLogEnabled = false
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.ProtectionEnabled = false
</s> add config.DNS.ProtectionEnabled = false </s> remove config.CoreDNS.QueryLogEnabled = false
</s> add config.DNS.QueryLogEnabled = false </s> remove config.CoreDNS.ProtectionEnabled = true
</s> add config.DNS.ProtectionEnabled = true </s> remove config.CoreDNS.SafeSearchEnabled = true
</s> add config.DNS.SafeSearchEnabled = true </s> remove config.CoreDNS.SafeBrowsingEnabled = true
</s> add config.DNS.SafeBrowsingEnabled = true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.QueryLogEnabled = false | <mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleQueryLogDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.QueryLogEnabled = false
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func httpError(w http.ResponseWriter, code int, format string, args ...interface{}) {
<mask> text := fmt.Sprintf(format, args...)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.QueryLogEnabled = true
</s> add config.DNS.QueryLogEnabled = true </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false </s> remove config.CoreDNS.SafeSearchEnabled = false
</s> add config.DNS.SafeSearchEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.UpstreamDNS = defaultDNS | <mask> // if empty body -- user is asking for default servers
<mask> hosts := strings.Fields(string(body))
<mask>
<mask> if len(hosts) == 0 {
<mask> config.CoreDNS.UpstreamDNS = defaultDNS
<mask> } else {
<mask> config.CoreDNS.UpstreamDNS = hosts
<mask> }
<mask>
<mask> err = writeAllConfigs()
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { </s> remove UDPListenAddr: &net.UDPAddr{Port: config.CoreDNS.Port},
FilteringConfig: config.CoreDNS.FilteringConfig,
</s> add UDPListenAddr: &net.UDPAddr{Port: config.DNS.Port},
FilteringConfig: config.DNS.FilteringConfig, </s> remove currentSchemaVersion = 1 // used for upgrading from old configs to new config
dataDir = "data" // data storage
filterDir = "filters" // cache location for downloaded filters, it's under DataDir
</s> add dataDir = "data" // data storage
filterDir = "filters" // cache location for downloaded filters, it's under DataDir </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.UpstreamDNS = hosts | <mask>
<mask> if len(hosts) == 0 {
<mask> config.CoreDNS.UpstreamDNS = defaultDNS
<mask> } else {
<mask> config.CoreDNS.UpstreamDNS = hosts
<mask> }
<mask>
<mask> err = writeAllConfigs()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write config file: %s", err)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.UpstreamDNS = defaultDNS
</s> add config.DNS.UpstreamDNS = defaultDNS </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove // URL is deemed valid, append it to filters, update config, write new filter file and tell coredns to reload it
</s> add // URL is deemed valid, append it to filters, update config, write new filter file and tell dns to reload it
// TODO: since we directly feed filters in-memory, revisit if writing configs is always neccessary </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
errortext := fmt.Sprintf("Couldn't get version check json from %s: %T %s\n", versionCheckURL, err, err) | <mask> }
<mask>
<mask> resp, err := client.Get(versionCheckURL)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Couldn't get querylog from coredns: %T %s\n", err, err)
<mask> log.Println(errortext)
<mask> http.Error(w, errortext, http.StatusBadGateway)
<mask> return
<mask> }
<mask> if resp != nil && resp.Body != nil {
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove errortext := fmt.Sprintf("Couldn't read response body: %s", err)
</s> add errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove err := upgradeSchema0to1(diskConfig)
</s> add err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) </s> remove "enabled": config.CoreDNS.SafeSearchEnabled,
</s> add "enabled": config.DNS.SafeSearchEnabled, </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) | <mask>
<mask> // read the body entirely
<mask> body, err := ioutil.ReadAll(resp.Body)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Couldn't read response body: %s", err)
<mask> log.Println(errortext)
<mask> http.Error(w, errortext, http.StatusBadGateway)
<mask> return
<mask> }
<mask>
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove errortext := fmt.Sprintf("Couldn't get querylog from coredns: %T %s\n", err, err)
</s> add errortext := fmt.Sprintf("Couldn't get version check json from %s: %T %s\n", versionCheckURL, err, err) </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove "enabled": config.CoreDNS.SafeSearchEnabled,
</s> add "enabled": config.DNS.SafeSearchEnabled, </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.FilteringEnabled = true | <mask> // filtering
<mask> // ---------
<mask>
<mask> func handleFilteringEnable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.FilteringEnabled = true
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleFilteringDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.FilteringEnabled = false
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove config.CoreDNS.ProtectionEnabled = true
</s> add config.DNS.ProtectionEnabled = true </s> remove config.CoreDNS.SafeBrowsingEnabled = true
</s> add config.DNS.SafeBrowsingEnabled = true </s> remove config.CoreDNS.SafeSearchEnabled = true
</s> add config.DNS.SafeSearchEnabled = true </s> remove config.CoreDNS.QueryLogEnabled = true
</s> add config.DNS.QueryLogEnabled = true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.FilteringEnabled = false | <mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleFilteringDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.FilteringEnabled = false
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleFilteringStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.FilteringEnabled = true
</s> add config.DNS.FilteringEnabled = true </s> remove config.CoreDNS.SafeSearchEnabled = false
</s> add config.DNS.SafeSearchEnabled = false </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false </s> remove config.CoreDNS.QueryLogEnabled = false
</s> add config.DNS.QueryLogEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
"enabled": config.DNS.FilteringEnabled, | <mask> }
<mask>
<mask> func handleFilteringStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": config.CoreDNS.FilteringEnabled,
<mask> }
<mask>
<mask> config.RLock()
<mask> data["filters"] = config.Filters
<mask> data["user_rules"] = config.UserRules
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
// URL is deemed valid, append it to filters, update config, write new filter file and tell dns to reload it
// TODO: since we directly feed filters in-memory, revisit if writing configs is always neccessary | <mask> http.Error(w, errorText, http.StatusBadRequest)
<mask> return
<mask> }
<mask>
<mask> // URL is deemed valid, append it to filters, update config, write new filter file and tell coredns to reload it
<mask> config.Filters = append(config.Filters, filter)
<mask> err = writeAllConfigs()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write config file: %s", err)
<mask> log.Println(errorText)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { </s> remove // coredns run control
</s> add // dns run control </s> remove errortext := fmt.Sprintf("Couldn't read response body: %s", err)
</s> add errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.SafeBrowsingEnabled = true | <mask> // safebrowsing
<mask> // ------------
<mask>
<mask> func handleSafeBrowsingEnable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.SafeBrowsingEnabled = true
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleSafeBrowsingDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.SafeBrowsingEnabled = false
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false </s> remove config.CoreDNS.SafeSearchEnabled = true
</s> add config.DNS.SafeSearchEnabled = true </s> remove config.CoreDNS.ProtectionEnabled = true
</s> add config.DNS.ProtectionEnabled = true </s> remove config.CoreDNS.FilteringEnabled = true
</s> add config.DNS.FilteringEnabled = true </s> remove config.CoreDNS.QueryLogEnabled = true
</s> add config.DNS.QueryLogEnabled = true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.SafeBrowsingEnabled = false | <mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleSafeBrowsingDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.SafeBrowsingEnabled = false
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleSafeBrowsingStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.SafeBrowsingEnabled = true
</s> add config.DNS.SafeBrowsingEnabled = true </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove config.CoreDNS.SafeSearchEnabled = false
</s> add config.DNS.SafeSearchEnabled = false </s> remove config.CoreDNS.QueryLogEnabled = false
</s> add config.DNS.QueryLogEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
"enabled": config.DNS.SafeBrowsingEnabled, | <mask> }
<mask>
<mask> func handleSafeBrowsingStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": config.CoreDNS.SafeBrowsingEnabled,
<mask> }
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Unable to marshal status json: %s", err)
<mask> log.Println(errortext)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove "enabled": config.CoreDNS.SafeSearchEnabled,
</s> add "enabled": config.DNS.SafeSearchEnabled, </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove errortext := fmt.Sprintf("Couldn't read response body: %s", err)
</s> add errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.ParentalSensitivity = i
config.DNS.ParentalEnabled = true | <mask> if err != nil {
<mask> http.Error(w, "Sensitivity must be set to valid value", 400)
<mask> return
<mask> }
<mask> config.CoreDNS.ParentalSensitivity = i
<mask> config.CoreDNS.ParentalEnabled = true
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleParentalDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.ParentalEnabled = false
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, </s> remove config.CoreDNS.ProtectionEnabled = true
</s> add config.DNS.ProtectionEnabled = true </s> remove config.CoreDNS.SafeSearchEnabled = true
</s> add config.DNS.SafeSearchEnabled = true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.ParentalEnabled = false | <mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleParentalDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.ParentalEnabled = false
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleParentalStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove config.CoreDNS.SafeSearchEnabled = false
</s> add config.DNS.SafeSearchEnabled = false </s> remove config.CoreDNS.ParentalSensitivity = i
config.CoreDNS.ParentalEnabled = true
</s> add config.DNS.ParentalSensitivity = i
config.DNS.ParentalEnabled = true </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
"enabled": config.DNS.ParentalEnabled, | <mask> }
<mask>
<mask> func handleParentalStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": config.CoreDNS.ParentalEnabled,
<mask> }
<mask> if config.CoreDNS.ParentalEnabled {
<mask> data["sensitivity"] = config.CoreDNS.ParentalSensitivity
<mask> }
<mask> jsonVal, err := json.Marshal(data)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, </s> remove "enabled": config.CoreDNS.SafeSearchEnabled,
</s> add "enabled": config.DNS.SafeSearchEnabled, </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove "enabled": config.CoreDNS.FilteringEnabled,
</s> add "enabled": config.DNS.FilteringEnabled, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity | <mask> func handleParentalStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": config.CoreDNS.ParentalEnabled,
<mask> }
<mask> if config.CoreDNS.ParentalEnabled {
<mask> data["sensitivity"] = config.CoreDNS.ParentalSensitivity
<mask> }
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Unable to marshal status json: %s", err)
<mask> log.Println(errortext)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, </s> remove "enabled": config.CoreDNS.SafeSearchEnabled,
</s> add "enabled": config.DNS.SafeSearchEnabled, </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.SafeSearchEnabled = true | <mask> // safebrowsing
<mask> // ------------
<mask>
<mask> func handleSafeSearchEnable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.SafeSearchEnabled = true
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleSafeSearchDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.SafeSearchEnabled = false
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.SafeSearchEnabled = false
</s> add config.DNS.SafeSearchEnabled = false </s> remove config.CoreDNS.SafeBrowsingEnabled = true
</s> add config.DNS.SafeBrowsingEnabled = true </s> remove config.CoreDNS.ProtectionEnabled = true
</s> add config.DNS.ProtectionEnabled = true </s> remove config.CoreDNS.FilteringEnabled = true
</s> add config.DNS.FilteringEnabled = true </s> remove config.CoreDNS.QueryLogEnabled = true
</s> add config.DNS.QueryLogEnabled = true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
config.DNS.SafeSearchEnabled = false | <mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleSafeSearchDisable(w http.ResponseWriter, r *http.Request) {
<mask> config.CoreDNS.SafeSearchEnabled = false
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> func handleSafeSearchStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove config.CoreDNS.SafeSearchEnabled = true
</s> add config.DNS.SafeSearchEnabled = true </s> remove config.CoreDNS.SafeBrowsingEnabled = false
</s> add config.DNS.SafeBrowsingEnabled = false </s> remove config.CoreDNS.FilteringEnabled = false
</s> add config.DNS.FilteringEnabled = false </s> remove config.CoreDNS.ParentalEnabled = false
</s> add config.DNS.ParentalEnabled = false </s> remove config.CoreDNS.QueryLogEnabled = false
</s> add config.DNS.QueryLogEnabled = false | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
"enabled": config.DNS.SafeSearchEnabled, | <mask> }
<mask>
<mask> func handleSafeSearchStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": config.CoreDNS.SafeSearchEnabled,
<mask> }
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Unable to marshal status json: %s", err)
<mask> log.Println(errortext)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove errortext := fmt.Sprintf("Couldn't read response body: %s", err)
</s> add errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | control.go |
UDPListenAddr: &net.UDPAddr{Port: config.DNS.Port},
FilteringConfig: config.DNS.FilteringConfig, | <mask> })
<mask> }
<mask>
<mask> newconfig := dnsforward.ServerConfig{
<mask> UDPListenAddr: &net.UDPAddr{Port: config.CoreDNS.Port},
<mask> FilteringConfig: config.CoreDNS.FilteringConfig,
<mask> Filters: filters,
<mask> }
<mask>
<mask> for _, u := range config.CoreDNS.UpstreamDNS {
<mask> upstream, err := dnsforward.GetUpstream(u)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { </s> remove config.CoreDNS.UpstreamDNS = defaultDNS
</s> add config.DNS.UpstreamDNS = defaultDNS </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove err := upgradeSchema0to1(diskConfig)
</s> add err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) </s> remove "enabled": config.CoreDNS.ParentalEnabled,
</s> add "enabled": config.DNS.ParentalEnabled, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | coredns.go |
for _, u := range config.DNS.UpstreamDNS { | <mask> FilteringConfig: config.CoreDNS.FilteringConfig,
<mask> Filters: filters,
<mask> }
<mask>
<mask> for _, u := range config.CoreDNS.UpstreamDNS {
<mask> upstream, err := dnsforward.GetUpstream(u)
<mask> if err != nil {
<mask> log.Printf("Couldn't get upstream: %s", err)
<mask> // continue, just ignore the upstream
<mask> continue
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove UDPListenAddr: &net.UDPAddr{Port: config.CoreDNS.Port},
FilteringConfig: config.CoreDNS.FilteringConfig,
</s> add UDPListenAddr: &net.UDPAddr{Port: config.DNS.Port},
FilteringConfig: config.DNS.FilteringConfig, </s> remove config.CoreDNS.UpstreamDNS = hosts
</s> add config.DNS.UpstreamDNS = hosts </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { </s> remove errortext := fmt.Sprintf("Couldn't get querylog from coredns: %T %s\n", err, err)
</s> add errortext := fmt.Sprintf("Couldn't get version check json from %s: %T %s\n", versionCheckURL, err, err) </s> remove errortext := fmt.Sprintf("Couldn't read response body: %s", err)
</s> add errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | coredns.go |
const currentSchemaVersion = 2 // used for upgrading from old configs to new config
| <mask> "gopkg.in/yaml.v2"
<mask> )
<mask>
<mask> // Performs necessary upgrade operations if needed
<mask> func upgradeConfig() error {
<mask> // read a config file into an interface map, so we can manipulate values without losing any
<mask> configFile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
<mask> if _, err := os.Stat(configFile); os.IsNotExist(err) {
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove // The first schema upgrade:
// No more "dnsfilter.txt", filters are now kept in data/filters/
</s> add </s> remove _, err := os.Stat(dnsFilterPath)
if !os.IsNotExist(err) {
</s> add if _, err := os.Stat(dnsFilterPath); !os.IsNotExist(err) { </s> remove err := upgradeSchema0to1(diskConfig)
</s> add err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) </s> remove errortext := fmt.Sprintf("Couldn't read response body: %s", err)
</s> add errortext := fmt.Sprintf("Couldn't read response body from %s: %s", versionCheckURL, err) | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | upgrade.go |
err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) | <mask> // Upgrade from oldVersion to newVersion
<mask> func upgradeConfigSchema(oldVersion int, diskConfig *map[string]interface{}) error {
<mask> switch oldVersion {
<mask> case 0:
<mask> err := upgradeSchema0to1(diskConfig)
<mask> if err != nil {
<mask> return err
<mask> }
<mask> default:
<mask> err := fmt.Errorf("configuration file contains unknown schema_version, abort")
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { </s> remove err := writeAllConfigsAndReloadCoreDNS()
</s> add err := writeAllConfigsAndReloadDNS() </s> remove errortext := fmt.Sprintf("Couldn't get querylog from coredns: %T %s\n", err, err)
</s> add errortext := fmt.Sprintf("Couldn't get version check json from %s: %T %s\n", versionCheckURL, err, err) </s> remove "enabled": config.CoreDNS.SafeBrowsingEnabled,
</s> add "enabled": config.DNS.SafeBrowsingEnabled, </s> remove "enabled": config.CoreDNS.SafeSearchEnabled,
</s> add "enabled": config.DNS.SafeSearchEnabled, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | upgrade.go |
// The first schema upgrade:
// No more "dnsfilter.txt", filters are now kept in data/filters/ | <mask> }
<mask>
<mask> func upgradeSchema0to1(diskConfig *map[string]interface{}) error {
<mask> log.Printf("%s(): called", _Func())
<mask>
<mask> dnsFilterPath := filepath.Join(config.ourBinaryDir, "dnsfilter.txt")
<mask> if _, err := os.Stat(dnsFilterPath); !os.IsNotExist(err) {
<mask> log.Printf("Deleting %s as we don't need it anymore", dnsFilterPath)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove // The first schema upgrade:
// No more "dnsfilter.txt", filters are now kept in data/filters/
</s> add </s> remove _, err := os.Stat(dnsFilterPath)
if !os.IsNotExist(err) {
</s> add if _, err := os.Stat(dnsFilterPath); !os.IsNotExist(err) { </s> remove err := upgradeSchema0to1(diskConfig)
</s> add err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | upgrade.go |
<mask>
<mask> func upgradeSchema0to1(diskConfig *map[string]interface{}) error {
<mask> log.Printf("%s(): called", _Func())
<mask>
<mask> // The first schema upgrade:
<mask> // No more "dnsfilter.txt", filters are now kept in data/filters/
<mask> dnsFilterPath := filepath.Join(config.ourBinaryDir, "dnsfilter.txt")
<mask> _, err := os.Stat(dnsFilterPath)
<mask> if !os.IsNotExist(err) {
<mask> log.Printf("Deleting %s as we don't need it anymore", dnsFilterPath)
<mask> err = os.Remove(dnsFilterPath)
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove _, err := os.Stat(dnsFilterPath)
if !os.IsNotExist(err) {
</s> add if _, err := os.Stat(dnsFilterPath); !os.IsNotExist(err) { </s> remove err := upgradeSchema0to1(diskConfig)
</s> add err := upgradeSchema0to2(diskConfig)
if err != nil {
return err
}
case 1:
err := upgradeSchema1to2(diskConfig) </s> remove func writeAllConfigsAndReloadCoreDNS() error {
</s> add func writeAllConfigsAndReloadDNS() error { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | upgrade.go | |
if _, err := os.Stat(dnsFilterPath); !os.IsNotExist(err) { | <mask>
<mask> // The first schema upgrade:
<mask> // No more "dnsfilter.txt", filters are now kept in data/filters/
<mask> dnsFilterPath := filepath.Join(config.ourBinaryDir, "dnsfilter.txt")
<mask> _, err := os.Stat(dnsFilterPath)
<mask> if !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)
<mask> // not fatal, move on
</s> Get rid of mentions of CoreDNS in code except for upgrading and in readme. Add config upgrade. </s> remove // The first schema upgrade:
// No more "dnsfilter.txt", filters are now kept in data/filters/
</s> add </s> remove // URL is deemed valid, append it to filters, update config, write new filter file and tell coredns to reload it
</s> add // URL is deemed valid, append it to filters, update config, write new filter file and tell dns to reload it
// TODO: since we directly feed filters in-memory, revisit if writing configs is always neccessary </s> remove for _, u := range config.CoreDNS.UpstreamDNS {
</s> add for _, u := range config.DNS.UpstreamDNS { </s> remove if config.CoreDNS.ParentalEnabled {
data["sensitivity"] = config.CoreDNS.ParentalSensitivity
</s> add if config.DNS.ParentalEnabled {
data["sensitivity"] = config.DNS.ParentalSensitivity | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e31905864b23a25ae1797dbc081f36f66d904ac9 | upgrade.go |
#
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}} | <mask> - 'app'
<mask> - 'docker'
<mask> # Secrets are not passed to workflows that are triggered by a pull request
<mask> # from a fork.
<mask> 'if': "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}"
<mask> 'runs-on': 'ubuntu-latest'
<mask> 'steps':
<mask> - 'name': 'Conclusion'
<mask> 'uses': 'technote-space/workflow-conclusion-action@v1'
<mask> - 'name': 'Send Slack notif'
</s> Pull request: all: fix github action result reporting
Merge in DNS/adguard-home from fix-gh-action-on-fail to master
Squashed commit of the following:
commit e8d48ee022772e0741de56dd955103efa27db0f6
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:54:14 2020 +0300
all: remove tests
commit ecdcea9c3a2ee3adda3aca57c761963678547cb2
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:44:47 2020 +0300
all: fix github action result reporting </s> remove 'fields': 'repo, message, commit, author'
</s> add 'fields': 'repo, message, commit, author, job' </s> remove 'fields': 'repo, message, commit, author'
</s> add 'fields': 'repo, message, commit, author, job' </s> remove 'if': "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}"
</s> add #
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e4383189a5cdb94b056504e3cce2dbcecd1a8d78 | .github/workflows/build.yml |
'fields': 'repo, message, commit, author, job' | <mask> - 'name': 'Send Slack notif'
<mask> 'uses': '8398a7/action-slack@v3'
<mask> 'with':
<mask> 'status': '${{ env.WORKFLOW_CONCLUSION }}'
<mask> 'fields': 'repo, message, commit, author'
<mask> 'env':
<mask> 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
<mask> 'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'
</s> Pull request: all: fix github action result reporting
Merge in DNS/adguard-home from fix-gh-action-on-fail to master
Squashed commit of the following:
commit e8d48ee022772e0741de56dd955103efa27db0f6
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:54:14 2020 +0300
all: remove tests
commit ecdcea9c3a2ee3adda3aca57c761963678547cb2
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:44:47 2020 +0300
all: fix github action result reporting </s> remove 'if': "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}"
</s> add #
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}} </s> remove 'if': "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}"
</s> add #
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}} </s> remove 'fields': 'repo, message, commit, author'
</s> add 'fields': 'repo, message, commit, author, job' | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e4383189a5cdb94b056504e3cce2dbcecd1a8d78 | .github/workflows/build.yml |
#
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}} | <mask> - 'golangci'
<mask> - 'eslint'
<mask> # Secrets are not passed to workflows that are triggered by a pull request
<mask> # from a fork.
<mask> 'if': "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}"
<mask> 'runs-on': 'ubuntu-latest'
<mask> 'steps':
<mask> - 'name': 'Conclusion'
<mask> 'uses': 'technote-space/workflow-conclusion-action@v1'
<mask> - 'name': 'Send Slack notif'
</s> Pull request: all: fix github action result reporting
Merge in DNS/adguard-home from fix-gh-action-on-fail to master
Squashed commit of the following:
commit e8d48ee022772e0741de56dd955103efa27db0f6
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:54:14 2020 +0300
all: remove tests
commit ecdcea9c3a2ee3adda3aca57c761963678547cb2
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:44:47 2020 +0300
all: fix github action result reporting </s> remove 'fields': 'repo, message, commit, author'
</s> add 'fields': 'repo, message, commit, author, job' </s> remove 'fields': 'repo, message, commit, author'
</s> add 'fields': 'repo, message, commit, author, job' </s> remove 'if': "${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}"
</s> add #
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e4383189a5cdb94b056504e3cce2dbcecd1a8d78 | .github/workflows/lint.yml |
'fields': 'repo, message, commit, author, job' | <mask> - 'name': 'Send Slack notif'
<mask> 'uses': '8398a7/action-slack@v3'
<mask> 'with':
<mask> 'status': '${{ env.WORKFLOW_CONCLUSION }}'
<mask> 'fields': 'repo, message, commit, author'
<mask> 'env':
<mask> 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
<mask> 'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'
</s> Pull request: all: fix github action result reporting
Merge in DNS/adguard-home from fix-gh-action-on-fail to master
Squashed commit of the following:
commit e8d48ee022772e0741de56dd955103efa27db0f6
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:54:14 2020 +0300
all: remove tests
commit ecdcea9c3a2ee3adda3aca57c761963678547cb2
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 7 18:44:47 2020 +0300
all: fix github action result reporting | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e4383189a5cdb94b056504e3cce2dbcecd1a8d78 | .github/workflows/lint.yml |
<mask> CMD [ \
<mask> "/opt/adguardhome/AdGuardHome", \
<mask> "--no-check-update", \
<mask> "-c", "/opt/adguardhome/conf/AdGuardHome.yaml", \
<mask> "-h", "0.0.0.0", \
<mask> "-w", "/opt/adguardhome/work" \
<mask> ]
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | docker/Dockerfile | |
// Rewrite deprecated options.
bindAddr := opts.bindAddr
if bindAddr.IsValid() {
config.BindHost = bindAddr.Addr()
config.BindPort = int(bindAddr.Port())
err = checkPorts()
if err != nil {
// Don't wrap the error, because it's informative enough as is.
return err
}
}
| <mask> config.BindHost = opts.bindHost
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
<mask> // setupDNSFilteringConf sets up DNS filtering configuration settings.
<mask> func setupDNSFilteringConf(conf *filtering.Config) (err error) {
<mask> const (
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/home.go |
//
// Deprecated: Use bindAddr. | <mask> serviceControlAction string
<mask>
<mask> // bindHost is the address on which to serve the HTTP UI.
<mask> bindHost netip.Addr
<mask>
<mask> // bindPort is the port on which to serve the HTTP UI.
<mask> //
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/options.go |
//
// Deprecated: Use bindAddr. | <mask> // Deprecated: Use bindAddr.
<mask> bindHost netip.Addr
<mask>
<mask> // bindPort is the port on which to serve the HTTP UI.
<mask> bindPort int
<mask>
<mask> // bindAddr is the address to serve the web UI on.
<mask> bindAddr netip.AddrPort
<mask>
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/options.go |
// bindAddr is the address to serve the web UI on.
bindAddr netip.AddrPort
| <mask> bindPort int
<mask>
<mask> // checkConfig is true if the current invocation is only required to check
<mask> // the configuration file and exit.
<mask> checkConfig bool
<mask>
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/options.go |
description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", | <mask> }
<mask>
<mask> return o.bindHost.String(), true
<mask> },
<mask> description: "Host address to bind HTTP server on.",
<mask> longName: "host",
<mask> shortName: "h",
<mask> }, {
<mask> updateWithValue: func(o options, v string) (options, error) {
<mask> var err error
<mask> var p int
<mask> minPort, maxPort := 0, 1<<16-1
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/options.go |
description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", | <mask> }
<mask>
<mask> return strconv.Itoa(o.bindPort), true
<mask> },
<mask> description: "Port to serve HTTP pages on.",
<mask> longName: "port",
<mask> shortName: "p",
<mask> }, {
<mask> updateWithValue: func(o options, v string) (options, error) {
<mask> o.serviceControlAction = v
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/options.go |
}, {
updateWithValue: func(o options, v string) (oo options, err error) {
o.bindAddr, err = netip.ParseAddrPort(v)
return o, err
},
updateNoValue: nil,
effect: nil,
serialize: func(o options) (val string, ok bool) {
return o.bindAddr.String(), o.bindAddr.IsValid()
},
description: "Address to serve the web UI on, in the host:port format.",
longName: "web-addr",
shortName: "", | <mask> },
<mask> description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.",
<mask> longName: "port",
<mask> shortName: "p",
<mask> }, {
<mask> updateWithValue: func(o options, v string) (options, error) {
<mask> o.serviceControlAction = v
<mask> return o, nil
<mask> },
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/options.go |
}, {
name: "web-addr",
args: []string{"--web-addr", "1.2.3.4:8080"},
opts: options{bindAddr: netip.MustParseAddrPort("1.2.3.4:8080")}, | <mask> }, {
<mask> name: "bind_port",
<mask> args: []string{"-p", "666"},
<mask> opts: options{bindPort: 666},
<mask> }, {
<mask> name: "log_file",
<mask> args: []string{"-l", "path"},
<mask> opts: options{logFile: "path"},
<mask> }, {
<mask> name: "pid_file",
</s> Pull request: web-addr-cmdline
Merge in DNS/adguard-home from web-addr-cmdline to master
Squashed commit of the following:
commit 27652dbfae227f9a9f4d921f14af1e5897d7830d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:51:43 2023 +0400
home: web-addr opt
commit b234d108e70fed3ff11eeb4986946f8a50dda515
Merge: eef1b5cbb 66345e855
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:10:57 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
# Conflicts:
# CHANGELOG.md
commit eef1b5cbb9f7dd9819c8038800a4bbcf3ff575aa
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 17:04:12 2023 +0400
all: docs
Updates #4231.
commit b4adb0bae82e44101f7b6685a29926c3d02e95af
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 16:58:12 2023 +0400
all: docker
Updates #4231.
commit a4012fddc50a3f5143136df8f3b865d7e1b9087c
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:24:02 2023 +0400
all: docker
commit bd5cc3308298b1022dea501c2fe79d96df24ce2a
Merge: 36841dd85 123ca8738
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Thu Jun 22 11:22:51 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 36841dd85fe1d006e6ec518329cb8ceea0915599
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:53:40 2023 +0400
all: docker
commit 5c4756a56d251f1486b92f333f11485b5f4807f4
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:50:41 2023 +0400
all: imp docs
commit 7b6fba81f2d5a354bdf259d812d04f3bd64de0c6
Merge: 54c119024 ca313521d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Wed Jun 21 11:47:36 2023 +0400
Merge remote-tracking branch 'origin/master' into web-addr-cmdline
commit 54c119024f3999d5c4dec06b21e3bb78803bf388
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:57:54 2023 +0400
home: imp code
commit c87e0a690376aa6a28a018c3cbbb5de0ad16333d
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:56:45 2023 +0400
all: imp docs
commit de240d00e334f7fd3dbf39ac08472183deeb32db
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 15:54:27 2023 +0400
all: docker
commit 568d5371e73fb6c5ba19a036e7a5135764f6538b
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:38:53 2023 +0400
all: docs
commit 407e230c8e3bc293e8d533ca5db1f28fec4b3c54
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:24:23 2023 +0400
home: deprecate opts
commit 6e628fad6f4ee9f23213eeb55bec500db4435175
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date: Tue Jun 20 13:18:10 2023 +0400
home: web-addr opt </s> remove description: "Port to serve HTTP pages on.",
</s> add description: "Deprecated. Port to serve HTTP pages on. Use --web-addr.", </s> remove description: "Host address to bind HTTP server on.",
longName: "host",
shortName: "h",
</s> add description: "Deprecated. Host address to bind HTTP server on. Use --web-addr. " +
"The short -h will work as --help in the future.",
longName: "host",
shortName: "h", | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e54fc9b1e9ad9f344edad86a2991308e6c5c29d0 | internal/home/options_test.go |
import { HTML_PAGES } from '../helpers/constants'; | <mask> import apiClient from '../api/Api';
<mask> import { addErrorToast } from './toasts';
<mask>
<mask> export const processLoginRequest = createAction('PROCESS_LOGIN_REQUEST');
<mask> export const processLoginFailure = createAction('PROCESS_LOGIN_FAILURE');
<mask> export const processLoginSuccess = createAction('PROCESS_LOGIN_SUCCESS');
<mask>
<mask> export const processLogin = (values) => async (dispatch) => {
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
</s> add const dashboardUrl = window.location.origin
+ window.location.pathname.replace(HTML_PAGES.LOGIN, HTML_PAGES.MAIN); </s> remove import { QUERY_LOGS_PAGE_LIMIT, R_PATH_LAST_PART } from '../helpers/constants';
</s> add import { QUERY_LOGS_PAGE_LIMIT, HTML_PAGES, R_PATH_LAST_PART } from '../helpers/constants'; </s> remove if (error.response.status === 403) {
const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
</s> add const { pathname } = document.location;
const shouldRedirect = pathname !== HTML_PAGES.LOGIN
&& pathname !== HTML_PAGES.INSTALL;
if (error.response.status === 403 && shouldRedirect) {
const loginPageUrl = window.location.href
.replace(R_PATH_LAST_PART, HTML_PAGES.LOGIN); </s> remove console.error(error);
const errorPath = `${this.baseUrl}/${path}`;
</s> add const errorPath = url; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/actions/login.js |
const dashboardUrl = window.location.origin
+ window.location.pathname.replace(HTML_PAGES.LOGIN, HTML_PAGES.MAIN); | <mask> export const processLogin = (values) => async (dispatch) => {
<mask> dispatch(processLoginRequest());
<mask> try {
<mask> await apiClient.login(values);
<mask> const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
<mask> window.location.replace(dashboardUrl);
<mask> dispatch(processLoginSuccess());
<mask> } catch (error) {
<mask> dispatch(addErrorToast({ error }));
<mask> dispatch(processLoginFailure());
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove url: `${this.baseUrl}/${path}`,
</s> add url, </s> remove if (error.response.status === 403) {
const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
</s> add const { pathname } = document.location;
const shouldRedirect = pathname !== HTML_PAGES.LOGIN
&& pathname !== HTML_PAGES.INSTALL;
if (error.response.status === 403 && shouldRedirect) {
const loginPageUrl = window.location.href
.replace(R_PATH_LAST_PART, HTML_PAGES.LOGIN); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/actions/login.js |
import { QUERY_LOGS_PAGE_LIMIT, HTML_PAGES, R_PATH_LAST_PART } from '../helpers/constants'; | <mask> import axios from 'axios';
<mask>
<mask> import { getPathWithQueryString } from '../helpers/helpers';
<mask> import { QUERY_LOGS_PAGE_LIMIT, R_PATH_LAST_PART } from '../helpers/constants';
<mask> import { BASE_URL } from '../../constants';
<mask>
<mask> class Api {
<mask> baseUrl = BASE_URL;
<mask>
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove if (error.response.status === 403) {
const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
</s> add const { pathname } = document.location;
const shouldRedirect = pathname !== HTML_PAGES.LOGIN
&& pathname !== HTML_PAGES.INSTALL;
if (error.response.status === 403 && shouldRedirect) {
const loginPageUrl = window.location.href
.replace(R_PATH_LAST_PART, HTML_PAGES.LOGIN); </s> remove url: `${this.baseUrl}/${path}`,
</s> add url, </s> remove console.error(error);
const errorPath = `${this.baseUrl}/${path}`;
</s> add const errorPath = url; | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/api/Api.js |
const url = `${this.baseUrl}/${path}`;
| <mask> baseUrl = BASE_URL;
<mask>
<mask> async makeRequest(path, method = 'POST', config) {
<mask> try {
<mask> const response = await axios({
<mask> url,
<mask> method,
<mask> ...config,
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove url: `${this.baseUrl}/${path}`,
</s> add url, </s> remove import { QUERY_LOGS_PAGE_LIMIT, R_PATH_LAST_PART } from '../helpers/constants';
</s> add import { QUERY_LOGS_PAGE_LIMIT, HTML_PAGES, R_PATH_LAST_PART } from '../helpers/constants'; </s> remove const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
</s> add const dashboardUrl = window.location.origin
+ window.location.pathname.replace(HTML_PAGES.LOGIN, HTML_PAGES.MAIN); </s> remove console.error(error);
const errorPath = `${this.baseUrl}/${path}`;
</s> add const errorPath = url; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/api/Api.js |
url, | <mask>
<mask> async makeRequest(path, method = 'POST', config) {
<mask> try {
<mask> const response = await axios({
<mask> url: `${this.baseUrl}/${path}`,
<mask> method,
<mask> ...config,
<mask> });
<mask> return response.data;
<mask> } catch (error) {
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove console.error(error);
const errorPath = `${this.baseUrl}/${path}`;
</s> add const errorPath = url; </s> remove const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
</s> add const dashboardUrl = window.location.origin
+ window.location.pathname.replace(HTML_PAGES.LOGIN, HTML_PAGES.MAIN); </s> remove if (error.response.status === 403) {
const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
</s> add const { pathname } = document.location;
const shouldRedirect = pathname !== HTML_PAGES.LOGIN
&& pathname !== HTML_PAGES.INSTALL;
if (error.response.status === 403 && shouldRedirect) {
const loginPageUrl = window.location.href
.replace(R_PATH_LAST_PART, HTML_PAGES.LOGIN); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/api/Api.js |
const errorPath = url; | <mask> ...config,
<mask> });
<mask> return response.data;
<mask> } catch (error) {
<mask> console.error(error);
<mask> const errorPath = `${this.baseUrl}/${path}`;
<mask> if (error.response) {
<mask> if (error.response.status === 403) {
<mask> const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
<mask> window.location.replace(loginPageUrl);
<mask> return false;
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove if (error.response.status === 403) {
const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
</s> add const { pathname } = document.location;
const shouldRedirect = pathname !== HTML_PAGES.LOGIN
&& pathname !== HTML_PAGES.INSTALL;
if (error.response.status === 403 && shouldRedirect) {
const loginPageUrl = window.location.href
.replace(R_PATH_LAST_PART, HTML_PAGES.LOGIN); </s> remove url: `${this.baseUrl}/${path}`,
</s> add url, </s> remove const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
</s> add const dashboardUrl = window.location.origin
+ window.location.pathname.replace(HTML_PAGES.LOGIN, HTML_PAGES.MAIN); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/api/Api.js |
const { pathname } = document.location;
const shouldRedirect = pathname !== HTML_PAGES.LOGIN
&& pathname !== HTML_PAGES.INSTALL;
if (error.response.status === 403 && shouldRedirect) {
const loginPageUrl = window.location.href
.replace(R_PATH_LAST_PART, HTML_PAGES.LOGIN); | <mask> } catch (error) {
<mask> console.error(error);
<mask> const errorPath = `${this.baseUrl}/${path}`;
<mask> if (error.response) {
<mask> if (error.response.status === 403) {
<mask> const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
<mask> window.location.replace(loginPageUrl);
<mask> return false;
<mask> }
<mask>
<mask> throw new Error(`${errorPath} | ${error.response.data} | ${error.response.status}`);
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove console.error(error);
const errorPath = `${this.baseUrl}/${path}`;
</s> add const errorPath = url; </s> remove url: `${this.baseUrl}/${path}`,
</s> add url, </s> remove const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
</s> add const dashboardUrl = window.location.origin
+ window.location.pathname.replace(HTML_PAGES.LOGIN, HTML_PAGES.MAIN); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/api/Api.js |
export const HTML_PAGES = {
INSTALL: '/install.html',
LOGIN: '/login.html',
MAIN: '/',
};
| <mask> export const R_WIN_ABSOLUTE_PATH = /^([a-zA-Z]:)?(\\|\/)(?:[^\\/:*?"<>|\x00]+\\)*[^\\/:*?"<>|\x00]*$/;
<mask>
<mask> export const STATS_NAMES = {
<mask> avg_processing_time: 'average_processing_time',
<mask> blocked_filtering: 'Blocked by filters',
<mask> dns_queries: 'DNS queries',
</s> - client: Do not redirect to login page from install and login pages
Close #2036
Squashed commit of the following:
commit 9880b80671973929b732bb45f767392627ddecc1
Merge: 55a51ea2 7b9cef3a
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 16:34:43 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 55a51ea2947a43c339c8e5111ba79e4d52b26c84
Merge: 170b7387 7931e506
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Wed Sep 2 15:54:38 2020 +0300
Merge branch 'master' into fix/unauthorized_redirect_logic
commit 170b7387b06e6c9b30b50cc673f7457976007b0f
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Tue Aug 25 17:13:02 2020 +0300
- client: Do not redirect to login page from install and login pages </s> remove const dashboardUrl = window.location.origin + window.location.pathname.replace('/login.html', '/');
</s> add const dashboardUrl = window.location.origin
+ window.location.pathname.replace(HTML_PAGES.LOGIN, HTML_PAGES.MAIN); </s> remove if (error.response.status === 403) {
const loginPageUrl = window.location.href.replace(R_PATH_LAST_PART, '/login.html');
</s> add const { pathname } = document.location;
const shouldRedirect = pathname !== HTML_PAGES.LOGIN
&& pathname !== HTML_PAGES.INSTALL;
if (error.response.status === 403 && shouldRedirect) {
const loginPageUrl = window.location.href
.replace(R_PATH_LAST_PART, HTML_PAGES.LOGIN); </s> remove console.error(error);
const errorPath = `${this.baseUrl}/${path}`;
</s> add const errorPath = url; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e56c746b608fe15e79ac75bbdd1c25e78594aecf | client/src/helpers/constants.js |
build: client_with_deps
go mod download | <mask>
<mask> init:
<mask> git config core.hooksPath .githooks
<mask>
<mask> build: dependencies client
<mask> PATH=$(GOPATH)/bin:$(PATH) go generate ./...
<mask> CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=$(VERSION) -X main.channel=$(CHANNEL) -X main.goarm=$(GOARM)"
<mask> PATH=$(GOPATH)/bin:$(PATH) packr clean
<mask>
<mask> client:
</s> * Makefile: support running with multiple parallel jobs (e.g. -j8) </s> remove ci: dependencies client test
</s> add ci: client_with_deps
go mod download
$(MAKE) test </s> remove release: dependencies client
</s> add release: client_with_deps
go mod download | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e57cbc36d944b6c4ebe99f397eb55976d786d5f8 | Makefile |
client_with_deps:
npm --prefix client ci
npm --prefix client run build-prod
| <mask> npm --prefix client run build-prod
<mask>
<mask> client-watch:
<mask> npm --prefix client run watch
<mask>
<mask> docker:
<mask> DOCKER_CLI_EXPERIMENTAL=enabled \
</s> * Makefile: support running with multiple parallel jobs (e.g. -j8) </s> remove ci: dependencies client test
</s> add ci: client_with_deps
go mod download
$(MAKE) test </s> remove release: dependencies client
</s> add release: client_with_deps
go mod download </s> remove build: dependencies client
</s> add build: client_with_deps
go mod download | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e57cbc36d944b6c4ebe99f397eb55976d786d5f8 | Makefile |
ci: client_with_deps
go mod download
$(MAKE) test | <mask> npm run test --prefix client
<mask> @echo Running Go unit-tests
<mask> go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
<mask>
<mask> ci: dependencies client test
<mask>
<mask> dependencies:
<mask> npm --prefix client ci
<mask> go mod download
<mask>
</s> * Makefile: support running with multiple parallel jobs (e.g. -j8) </s> remove build: dependencies client
</s> add build: client_with_deps
go mod download </s> remove release: dependencies client
</s> add release: client_with_deps
go mod download | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e57cbc36d944b6c4ebe99f397eb55976d786d5f8 | Makefile |
release: client_with_deps
go mod download | <mask>
<mask> @echo If the image was pushed to the registry, you can now run it:
<mask> @echo docker run --name "adguard-home" -p 53:53/tcp -p 53:53/udp -p 80:80/tcp -p 443:443/tcp -p 853:853/tcp -p 3000:3000/tcp $(DOCKER_IMAGE_NAME)
<mask>
<mask> release: dependencies client
<mask> @echo Starting release build: version $(VERSION), channel $(CHANNEL)
<mask> CHANNEL=$(CHANNEL) $(GORELEASER_COMMAND)
<mask> $(call repack_dist)
<mask> $(call write_version_file,$(VERSION))
<mask> PATH=$(GOPATH)/bin:$(PATH) packr clean
</s> * Makefile: support running with multiple parallel jobs (e.g. -j8) </s> remove ci: dependencies client test
</s> add ci: client_with_deps
go mod download
$(MAKE) test </s> remove build: dependencies client
</s> add build: client_with_deps
go mod download | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e57cbc36d944b6c4ebe99f397eb55976d786d5f8 | Makefile |
// &dnsOverHTTPS{address: "https://1.1.1.1/dns-query"},
// &dnsOverHTTPS{address: "https://dns.google.com/experimental"},
// &dnsOverHTTPS{address: "https://doh.cleanbrowsing.org/doh/security-filter/"},
// &dnsOverHTTPS{address: "https://dns10.quad9.net/dns-query"},
// &dnsOverHTTPS{address: "https://doh.powerdns.org"},
// &dnsOverHTTPS{address: "https://doh.securedns.eu/dns-query"}, | <mask> UDPListenAddr: &net.UDPAddr{Port: 53},
<mask> FilteringConfig: FilteringConfig{BlockedResponseTTL: 3600},
<mask> Upstreams: []Upstream{
<mask> //// dns over HTTPS
<mask> // &dnsOverHTTPS{Address: "https://1.1.1.1/dns-query"},
<mask> // &dnsOverHTTPS{Address: "https://dns.google.com/experimental"},
<mask> // &dnsOverHTTPS{Address: "https://doh.cleanbrowsing.org/doh/security-filter/"},
<mask> // &dnsOverHTTPS{Address: "https://dns10.quad9.net/dns-query"},
<mask> // &dnsOverHTTPS{Address: "https://doh.powerdns.org"},
<mask> // &dnsOverHTTPS{Address: "https://doh.securedns.eu/dns-query"},
<mask>
<mask> //// dns over TLS
<mask> // &dnsOverTLS{Address: "tls://8.8.8.8:853"},
<mask> // &dnsOverTLS{Address: "tls://8.8.4.4:853"},
<mask> // &dnsOverTLS{Address: "tls://1.1.1.1:853"},
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove // &dnsOverTLS{Address: "tls://8.8.8.8:853"},
// &dnsOverTLS{Address: "tls://8.8.4.4:853"},
// &dnsOverTLS{Address: "tls://1.1.1.1:853"},
// &dnsOverTLS{Address: "tls://1.0.0.1:853"},
</s> add // &dnsOverTLS{address: "tls://8.8.8.8:853"},
// &dnsOverTLS{address: "tls://8.8.4.4:853"},
// &dnsOverTLS{address: "tls://1.1.1.1:853"},
// &dnsOverTLS{address: "tls://1.0.0.1:853"}, </s> remove return &dnsOverHTTPS{Address: url.String()}, nil
</s> add return &dnsOverHTTPS{address: url.String()}, nil </s> remove return &dnsOverTLS{Address: url.String()}, nil
</s> add return &dnsOverTLS{address: url.String()}, nil </s> remove &plainDNS{Address: "8.8.8.8:53"},
&plainDNS{Address: "8.8.4.4:53"},
&plainDNS{Address: "1.1.1.1:53"},
&plainDNS{Address: "1.0.0.1:53"},
</s> add &plainDNS{address: "8.8.8.8:53"},
&plainDNS{address: "8.8.4.4:53"},
&plainDNS{address: "1.1.1.1:53"},
&plainDNS{address: "1.0.0.1:53"}, </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/dnsforward.go |
// &dnsOverTLS{address: "tls://8.8.8.8:853"},
// &dnsOverTLS{address: "tls://8.8.4.4:853"},
// &dnsOverTLS{address: "tls://1.1.1.1:853"},
// &dnsOverTLS{address: "tls://1.0.0.1:853"}, | <mask> // &dnsOverHTTPS{Address: "https://doh.powerdns.org"},
<mask> // &dnsOverHTTPS{Address: "https://doh.securedns.eu/dns-query"},
<mask>
<mask> //// dns over TLS
<mask> // &dnsOverTLS{Address: "tls://8.8.8.8:853"},
<mask> // &dnsOverTLS{Address: "tls://8.8.4.4:853"},
<mask> // &dnsOverTLS{Address: "tls://1.1.1.1:853"},
<mask> // &dnsOverTLS{Address: "tls://1.0.0.1:853"},
<mask>
<mask> //// plainDNS
<mask> &plainDNS{Address: "8.8.8.8:53"},
<mask> &plainDNS{Address: "8.8.4.4:53"},
<mask> &plainDNS{Address: "1.1.1.1:53"},
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove &plainDNS{Address: "8.8.8.8:53"},
&plainDNS{Address: "8.8.4.4:53"},
&plainDNS{Address: "1.1.1.1:53"},
&plainDNS{Address: "1.0.0.1:53"},
</s> add &plainDNS{address: "8.8.8.8:53"},
&plainDNS{address: "8.8.4.4:53"},
&plainDNS{address: "1.1.1.1:53"},
&plainDNS{address: "1.0.0.1:53"}, </s> remove // &dnsOverHTTPS{Address: "https://1.1.1.1/dns-query"},
// &dnsOverHTTPS{Address: "https://dns.google.com/experimental"},
// &dnsOverHTTPS{Address: "https://doh.cleanbrowsing.org/doh/security-filter/"},
// &dnsOverHTTPS{Address: "https://dns10.quad9.net/dns-query"},
// &dnsOverHTTPS{Address: "https://doh.powerdns.org"},
// &dnsOverHTTPS{Address: "https://doh.securedns.eu/dns-query"},
</s> add // &dnsOverHTTPS{address: "https://1.1.1.1/dns-query"},
// &dnsOverHTTPS{address: "https://dns.google.com/experimental"},
// &dnsOverHTTPS{address: "https://doh.cleanbrowsing.org/doh/security-filter/"},
// &dnsOverHTTPS{address: "https://dns10.quad9.net/dns-query"},
// &dnsOverHTTPS{address: "https://doh.powerdns.org"},
// &dnsOverHTTPS{address: "https://doh.securedns.eu/dns-query"}, </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove return &dnsOverHTTPS{Address: url.String()}, nil
</s> add return &dnsOverHTTPS{address: url.String()}, nil </s> remove return &dnsOverTLS{Address: url.String()}, nil
</s> add return &dnsOverTLS{address: url.String()}, nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/dnsforward.go |
&plainDNS{address: "8.8.8.8:53"},
&plainDNS{address: "8.8.4.4:53"},
&plainDNS{address: "1.1.1.1:53"},
&plainDNS{address: "1.0.0.1:53"}, | <mask> // &dnsOverTLS{Address: "tls://1.1.1.1:853"},
<mask> // &dnsOverTLS{Address: "tls://1.0.0.1:853"},
<mask>
<mask> //// plainDNS
<mask> &plainDNS{Address: "8.8.8.8:53"},
<mask> &plainDNS{Address: "8.8.4.4:53"},
<mask> &plainDNS{Address: "1.1.1.1:53"},
<mask> &plainDNS{Address: "1.0.0.1:53"},
<mask> },
<mask> }
<mask>
<mask> //
<mask> // packet loop
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove // &dnsOverTLS{Address: "tls://8.8.8.8:853"},
// &dnsOverTLS{Address: "tls://8.8.4.4:853"},
// &dnsOverTLS{Address: "tls://1.1.1.1:853"},
// &dnsOverTLS{Address: "tls://1.0.0.1:853"},
</s> add // &dnsOverTLS{address: "tls://8.8.8.8:853"},
// &dnsOverTLS{address: "tls://8.8.4.4:853"},
// &dnsOverTLS{address: "tls://1.1.1.1:853"},
// &dnsOverTLS{address: "tls://1.0.0.1:853"}, </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove // &dnsOverHTTPS{Address: "https://1.1.1.1/dns-query"},
// &dnsOverHTTPS{Address: "https://dns.google.com/experimental"},
// &dnsOverHTTPS{Address: "https://doh.cleanbrowsing.org/doh/security-filter/"},
// &dnsOverHTTPS{Address: "https://dns10.quad9.net/dns-query"},
// &dnsOverHTTPS{Address: "https://doh.powerdns.org"},
// &dnsOverHTTPS{Address: "https://doh.securedns.eu/dns-query"},
</s> add // &dnsOverHTTPS{address: "https://1.1.1.1/dns-query"},
// &dnsOverHTTPS{address: "https://dns.google.com/experimental"},
// &dnsOverHTTPS{address: "https://doh.cleanbrowsing.org/doh/security-filter/"},
// &dnsOverHTTPS{address: "https://dns10.quad9.net/dns-query"},
// &dnsOverHTTPS{address: "https://doh.powerdns.org"},
// &dnsOverHTTPS{address: "https://doh.securedns.eu/dns-query"}, </s> remove return &plainDNS{Address: address}, nil
</s> add return &plainDNS{address: address}, nil </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/dnsforward.go |
Address() string | <mask>
<mask> type Upstream interface {
<mask> Exchange(m *dns.Msg) (*dns.Msg, error)
<mask> }
<mask>
<mask> //
<mask> // plain DNS
<mask> //
<mask> type plainDNS struct {
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove Address string
</s> add address string </s> remove Address string
</s> add address string </s> remove Address string
</s> add address string | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
address string | <mask> //
<mask> // plain DNS
<mask> //
<mask> type plainDNS struct {
<mask> Address string
<mask> }
<mask>
<mask> var defaultUDPClient = dns.Client{
<mask> Timeout: defaultTimeout,
<mask> UDPSize: dns.MaxMsgSize,
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove Address string
</s> add address string </s> remove Address string
</s> add address string | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
func (p *plainDNS) Address() string { return p.address }
| <mask> Timeout: defaultTimeout,
<mask> }
<mask>
<mask> func (p *plainDNS) Exchange(m *dns.Msg) (*dns.Msg, error) {
<mask> reply, _, err := defaultUDPClient.Exchange(m, p.address)
<mask> if err != nil && reply != nil && reply.Truncated {
<mask> log.Printf("Truncated message was received, retrying over TCP, question: %s", m.Question[0].String())
<mask> reply, _, err = defaultTCPClient.Exchange(m, p.address)
<mask> }
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove reply, _, err := defaultUDPClient.Exchange(m, p.Address)
</s> add reply, _, err := defaultUDPClient.Exchange(m, p.address) </s> remove reply, _, err = defaultTCPClient.Exchange(m, p.Address)
</s> add reply, _, err = defaultTCPClient.Exchange(m, p.address) </s> remove return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
reply, _, err := defaultUDPClient.Exchange(m, p.address) | <mask> Timeout: defaultTimeout,
<mask> }
<mask>
<mask> func (p *plainDNS) Exchange(m *dns.Msg) (*dns.Msg, error) {
<mask> reply, _, err := defaultUDPClient.Exchange(m, p.Address)
<mask> if err != nil && reply != nil && reply.Truncated {
<mask> log.Printf("Truncated message was received, retrying over TCP, question: %s", m.Question[0].String())
<mask> reply, _, err = defaultTCPClient.Exchange(m, p.Address)
<mask> }
<mask> return reply, err
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove reply, _, err = defaultTCPClient.Exchange(m, p.Address)
</s> add reply, _, err = defaultTCPClient.Exchange(m, p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
reply, _, err = defaultTCPClient.Exchange(m, p.address) | <mask> func (p *plainDNS) Exchange(m *dns.Msg) (*dns.Msg, error) {
<mask> reply, _, err := defaultUDPClient.Exchange(m, p.Address)
<mask> if err != nil && reply != nil && reply.Truncated {
<mask> log.Printf("Truncated message was received, retrying over TCP, question: %s", m.Question[0].String())
<mask> reply, _, err = defaultTCPClient.Exchange(m, p.Address)
<mask> }
<mask> return reply, err
<mask> }
<mask>
<mask> //
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove reply, _, err := defaultUDPClient.Exchange(m, p.Address)
</s> add reply, _, err := defaultUDPClient.Exchange(m, p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
address string | <mask> //
<mask> // DNS-over-TLS
<mask> //
<mask> type dnsOverTLS struct {
<mask> Address string
<mask> pool *TLSPool
<mask>
<mask> sync.RWMutex // protects pool
<mask> }
<mask>
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove Address string
</s> add address string </s> remove Address string
</s> add address string </s> remove p.pool = &TLSPool{Address: p.Address}
</s> add p.pool = &TLSPool{Address: p.address} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
func (p *dnsOverTLS) Address() string { return p.address }
| <mask> UDPSize: dns.MaxMsgSize,
<mask> TLSConfig: &tls.Config{},
<mask> }
<mask>
<mask> func (p *dnsOverTLS) Exchange(m *dns.Msg) (*dns.Msg, error) {
<mask> var pool *TLSPool
<mask> p.RLock()
<mask> pool = p.pool
<mask> p.RUnlock()
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove p.pool = &TLSPool{Address: p.Address}
</s> add p.pool = &TLSPool{Address: p.address} </s> remove Address string
</s> add address string </s> remove Address string
</s> add address string | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
p.pool = &TLSPool{Address: p.address} | <mask> p.RUnlock()
<mask> if pool == nil {
<mask> p.Lock()
<mask> // lazy initialize it
<mask> p.pool = &TLSPool{Address: p.Address}
<mask> p.Unlock()
<mask> }
<mask>
<mask> p.RLock()
<mask> poolConn, err := p.pool.Get()
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) </s> remove Address string
</s> add address string </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.address) | <mask> p.RLock()
<mask> poolConn, err := p.pool.Get()
<mask> p.RUnlock()
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.Address)
<mask> }
<mask> c := dns.Conn{Conn: poolConn}
<mask> err = c.WriteMsg(m)
<mask> if err != nil {
<mask> poolConn.Close()
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove p.pool = &TLSPool{Address: p.Address}
</s> add p.pool = &TLSPool{Address: p.address} </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) | <mask> c := dns.Conn{Conn: poolConn}
<mask> err = c.WriteMsg(m)
<mask> if err != nil {
<mask> poolConn.Close()
<mask> return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
<mask> }
<mask>
<mask> reply, err := c.ReadMsg()
<mask> if err != nil {
<mask> poolConn.Close()
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) | <mask>
<mask> reply, err := c.ReadMsg()
<mask> if err != nil {
<mask> poolConn.Close()
<mask> return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
<mask> }
<mask> p.RLock()
<mask> p.pool.Put(poolConn)
<mask> p.RUnlock()
<mask> return reply, nil
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
address string | <mask> //
<mask> // DNS-over-https
<mask> //
<mask> type dnsOverHTTPS struct {
<mask> Address string
<mask> }
<mask>
<mask> var defaultHTTPSTransport = http.Transport{}
<mask>
<mask> var defaultHTTPSClient = http.Client{
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove Address string
</s> add address string </s> remove Address string
</s> add address string | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
func (p *dnsOverHTTPS) Address() string { return p.address }
| <mask> }
<mask>
<mask> func (p *dnsOverHTTPS) Exchange(m *dns.Msg) (*dns.Msg, error) {
<mask> buf, err := m.Pack()
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't pack request msg")
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) </s> remove reply, _, err := defaultUDPClient.Exchange(m, p.Address)
</s> add reply, _, err := defaultUDPClient.Exchange(m, p.address) </s> remove reply, _, err = defaultTCPClient.Exchange(m, p.Address)
</s> add reply, _, err = defaultTCPClient.Exchange(m, p.address) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
resp, err := http.Post(p.address, "application/dns-message", bb) | <mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't pack request msg")
<mask> }
<mask> bb := bytes.NewBuffer(buf)
<mask> resp, err := http.Post(p.Address, "application/dns-message", bb)
<mask> if resp != nil && resp.Body != nil {
<mask> defer resp.Body.Close()
<mask> }
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) | <mask> if resp != nil && resp.Body != nil {
<mask> defer resp.Body.Close()
<mask> }
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
<mask> }
<mask> body, err := ioutil.ReadAll(resp.Body)
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
<mask> }
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) </s> remove return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.address) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) </s> remove return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) | <mask> return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
<mask> }
<mask> body, err := ioutil.ReadAll(resp.Body)
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
<mask> }
<mask> if resp.StatusCode != http.StatusOK {
<mask> return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.Address)
<mask> }
<mask> if len(body) == 0 {
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.address) </s> remove return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) </s> remove return nil, errorx.Decorate(err, "Failed to read a request from %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to read a request from %s", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.address) | <mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
<mask> }
<mask> if resp.StatusCode != http.StatusOK {
<mask> return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.Address)
<mask> }
<mask> if len(body) == 0 {
<mask> return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.Address)
<mask> }
<mask> response := dns.Msg{}
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.Address, string(body))
</s> add return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.address, string(body)) </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.address) | <mask> if resp.StatusCode != http.StatusOK {
<mask> return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.Address)
<mask> }
<mask> if len(body) == 0 {
<mask> return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.Address)
<mask> }
<mask> response := dns.Msg{}
<mask> err = response.Unpack(body)
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.Address, string(body))
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.Address, string(body))
</s> add return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.address, string(body)) </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.address, string(body)) | <mask> }
<mask> response := dns.Msg{}
<mask> err = response.Unpack(body)
<mask> if err != nil {
<mask> return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.Address, string(body))
<mask> }
<mask> return &response, nil
<mask> }
<mask>
<mask> func (s *Server) chooseUpstream() Upstream {
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.address) </s> remove return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected HTTP status code %d from '%s'", resp.StatusCode, p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return &plainDNS{address: url.String()}, nil | <mask> case "dns":
<mask> if url.Port() == "" {
<mask> url.Host += ":53"
<mask> }
<mask> return &plainDNS{Address: url.String()}, nil
<mask> case "tls":
<mask> if url.Port() == "" {
<mask> url.Host += ":853"
<mask> }
<mask> return &dnsOverTLS{Address: url.String()}, nil
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return &dnsOverTLS{Address: url.String()}, nil
</s> add return &dnsOverTLS{address: url.String()}, nil </s> remove return &dnsOverHTTPS{Address: url.String()}, nil
</s> add return &dnsOverHTTPS{address: url.String()}, nil </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove return &plainDNS{Address: address}, nil
</s> add return &plainDNS{address: address}, nil </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return &dnsOverTLS{address: url.String()}, nil | <mask> case "tls":
<mask> if url.Port() == "" {
<mask> url.Host += ":853"
<mask> }
<mask> return &dnsOverTLS{Address: url.String()}, nil
<mask> case "https":
<mask> return &dnsOverHTTPS{Address: url.String()}, nil
<mask> default:
<mask> // assume it's plain DNS
<mask> if url.Port() == "" {
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return &dnsOverHTTPS{Address: url.String()}, nil
</s> add return &dnsOverHTTPS{address: url.String()}, nil </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.Address)
</s> add return nil, fmt.Errorf("Got an unexpected empty body from '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't read body contents for '%s'", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return &dnsOverHTTPS{address: url.String()}, nil | <mask> url.Host += ":853"
<mask> }
<mask> return &dnsOverTLS{Address: url.String()}, nil
<mask> case "https":
<mask> return &dnsOverHTTPS{Address: url.String()}, nil
<mask> default:
<mask> // assume it's plain DNS
<mask> if url.Port() == "" {
<mask> url.Host += ":53"
<mask> }
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return &dnsOverTLS{Address: url.String()}, nil
</s> add return &dnsOverTLS{address: url.String()}, nil </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.Address, string(body))
</s> add return nil, errorx.Decorate(err, "Couldn't unpack DNS response from '%s': body is %s", p.address, string(body)) </s> remove return &plainDNS{Address: address}, nil
</s> add return &plainDNS{address: address}, nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return &plainDNS{address: url.String()}, nil | <mask> // assume it's plain DNS
<mask> if url.Port() == "" {
<mask> url.Host += ":53"
<mask> }
<mask> return &plainDNS{Address: url.String()}, nil
<mask> }
<mask> }
<mask>
<mask> // we don't have scheme in the url, so it's just a plain DNS host:port
<mask> _, _, err := net.SplitHostPort(address)
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return &dnsOverHTTPS{Address: url.String()}, nil
</s> add return &dnsOverHTTPS{address: url.String()}, nil </s> remove return &dnsOverTLS{Address: url.String()}, nil
</s> add return &dnsOverTLS{address: url.String()}, nil </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove reply, _, err := defaultUDPClient.Exchange(m, p.Address)
</s> add reply, _, err := defaultUDPClient.Exchange(m, p.address) </s> remove reply, _, err = defaultTCPClient.Exchange(m, p.Address)
</s> add reply, _, err = defaultTCPClient.Exchange(m, p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
return &plainDNS{address: address}, nil | <mask> if err != nil {
<mask> // doesn't have port, default to 53
<mask> address = net.JoinHostPort(address, "53")
<mask> }
<mask> return &plainDNS{Address: address}, nil
<mask> }
</s> dnsforward -- Make Upstream interface give access to Address field. </s> remove return &plainDNS{Address: url.String()}, nil
</s> add return &plainDNS{address: url.String()}, nil </s> remove return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.Address)
</s> add return nil, errorx.Decorate(err, "Couldn't do a POST request to '%s'", p.address) </s> remove return nil, errorx.Decorate(err, "Failed to send a request to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to send a request to %s", p.address) </s> remove resp, err := http.Post(p.Address, "application/dns-message", bb)
</s> add resp, err := http.Post(p.address, "application/dns-message", bb) </s> remove return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.Address)
</s> add return nil, errorx.Decorate(err, "Failed to get a connection from TLSPool to %s", p.address) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e5d2f883ac13b195ece8e00aa386f61a64c5c669 | dnsforward/upstream.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghnet" | <mask> "runtime/debug"
<mask> "strings"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/urlfilter"
<mask> "github.com/AdguardTeam/urlfilter/filterlist"
</s> Pull request: 1947 disable autohosts option
Merge in DNS/adguard-home from 1947-hosts-opt to master
Updates #1947.
Updates #2829.
Squashed commit of the following:
commit d09285c3dbfa7816469eec223b88c320c255c8fe
Merge: cff8c4cd 7c6557b0
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 18:23:20 2021 +0300
Merge branch 'master' into 1947-hosts-opt
commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:46:19 2021 +0300
home: fix help
commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:40:48 2021 +0300
home: fix option order
commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:28:30 2021 +0300
aghnet: add important todo
commit 7f1386ff5c3081e07e975b640164a7a05e1319c9
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:17:17 2021 +0300
all: correct naming
commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:55:46 2021 +0300
all: mv functionality from util
commit e82ad53862682d903dd0dd10844db65997a758bc
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:41:35 2021 +0300
home: imp code, docs
commit 9058977f3ff99648fabaebbd7c1c354c71671327
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:02:34 2021 +0300
home: add an option to disable autohosts </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add </s> remove clients.autoHosts = autoHosts
</s> add if etcHosts != nil {
clients.etcHosts = etcHosts
} </s> remove // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files
AutoHosts *util.AutoHosts `yaml:"-"`
</s> add // EtcHosts is a container of IP-hostname pairs taken from the operating
// system configuration files (e.g. /etc/hosts).
EtcHosts *aghnet.EtcHostsContainer `yaml:"-"` </s> remove if d.Config.AutoHosts == nil {
</s> add if d.Config.EtcHosts == nil { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30 | internal/dnsfilter/dnsfilter.go |
// EtcHosts is a container of IP-hostname pairs taken from the operating
// system configuration files (e.g. /etc/hosts).
EtcHosts *aghnet.EtcHostsContainer `yaml:"-"` | <mask> // Names of services to block (globally).
<mask> // Per-client settings can override this configuration.
<mask> BlockedServices []string `yaml:"blocked_services"`
<mask>
<mask> // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files
<mask> AutoHosts *util.AutoHosts `yaml:"-"`
<mask>
<mask> // Called when the configuration is changed by HTTP request
<mask> ConfigModified func() `yaml:"-"`
<mask>
<mask> // Register an HTTP handler
</s> Pull request: 1947 disable autohosts option
Merge in DNS/adguard-home from 1947-hosts-opt to master
Updates #1947.
Updates #2829.
Squashed commit of the following:
commit d09285c3dbfa7816469eec223b88c320c255c8fe
Merge: cff8c4cd 7c6557b0
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 18:23:20 2021 +0300
Merge branch 'master' into 1947-hosts-opt
commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:46:19 2021 +0300
home: fix help
commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:40:48 2021 +0300
home: fix option order
commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:28:30 2021 +0300
aghnet: add important todo
commit 7f1386ff5c3081e07e975b640164a7a05e1319c9
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:17:17 2021 +0300
all: correct naming
commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:55:46 2021 +0300
all: mv functionality from util
commit e82ad53862682d903dd0dd10844db65997a758bc
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:41:35 2021 +0300
home: imp code, docs
commit 9058977f3ff99648fabaebbd7c1c354c71671327
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:02:34 2021 +0300
home: add an option to disable autohosts </s> remove clients clientsContainer // per-client-settings module
stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
dnsServer *dnsforward.Server // DNS module
rdns *RDNS // rDNS module
whois *Whois // WHOIS module
dnsFilter *dnsfilter.DNSFilter // DNS filtering module
dhcpServer *dhcpd.Server // DHCP module
auth *Auth // HTTP authentication module
filters Filtering // DNS filtering module
web *Web // Web (HTTP, HTTPS) module
tls *TLSMod // TLS module
autoHosts util.AutoHosts // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files
</s> add clients clientsContainer // per-client-settings module
stats stats.Stats // statistics module
queryLog querylog.QueryLog // query log module
dnsServer *dnsforward.Server // DNS module
rdns *RDNS // rDNS module
whois *Whois // WHOIS module
dnsFilter *dnsfilter.DNSFilter // DNS filtering module
dhcpServer *dhcpd.Server // DHCP module
auth *Auth // HTTP authentication module
filters Filtering // DNS filtering module
web *Web // Web (HTTP, HTTPS) module
tls *TLSMod // TLS module
etcHosts *aghnet.EtcHostsContainer // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files </s> remove autoHosts *util.AutoHosts // get entries from system hosts-files
</s> add etcHosts *aghnet.EtcHostsContainer // get entries from system hosts-files </s> remove hosts := clients.autoHosts.List()
</s> add if clients.etcHosts == nil {
return
}
hosts := clients.etcHosts.List() </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) {
</s> add func (clients *clientsContainer) Init(
objects []clientObject,
dhcpServer *dhcpd.Server,
etcHosts *aghnet.EtcHostsContainer,
) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30 | internal/dnsfilter/dnsfilter.go |
if d.Config.EtcHosts == nil { | <mask> host string,
<mask> qtype uint16,
<mask> _ *FilteringSettings,
<mask> ) (res Result, err error) {
<mask> if d.Config.AutoHosts == nil {
<mask> return Result{}, nil
<mask> }
<mask>
<mask> ips := d.Config.AutoHosts.Process(host, qtype)
<mask> if ips != nil {
</s> Pull request: 1947 disable autohosts option
Merge in DNS/adguard-home from 1947-hosts-opt to master
Updates #1947.
Updates #2829.
Squashed commit of the following:
commit d09285c3dbfa7816469eec223b88c320c255c8fe
Merge: cff8c4cd 7c6557b0
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 18:23:20 2021 +0300
Merge branch 'master' into 1947-hosts-opt
commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:46:19 2021 +0300
home: fix help
commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:40:48 2021 +0300
home: fix option order
commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:28:30 2021 +0300
aghnet: add important todo
commit 7f1386ff5c3081e07e975b640164a7a05e1319c9
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:17:17 2021 +0300
all: correct naming
commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:55:46 2021 +0300
all: mv functionality from util
commit e82ad53862682d903dd0dd10844db65997a758bc
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:41:35 2021 +0300
home: imp code, docs
commit 9058977f3ff99648fabaebbd7c1c354c71671327
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:02:34 2021 +0300
home: add an option to disable autohosts </s> remove ips := d.Config.AutoHosts.Process(host, qtype)
</s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype)
</s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype) </s> remove "Print this help. Show more detailed version description with -v",
</s> add "Print this help", </s> remove hosts := clients.autoHosts.List()
</s> add if clients.etcHosts == nil {
return
}
hosts := clients.etcHosts.List() </s> remove Context.autoHosts.Close()
</s> add Context.etcHosts.Close() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30 | internal/dnsfilter/dnsfilter.go |
ips := d.Config.EtcHosts.Process(host, qtype) | <mask> if d.Config.AutoHosts == nil {
<mask> return Result{}, nil
<mask> }
<mask>
<mask> ips := d.Config.AutoHosts.Process(host, qtype)
<mask> if ips != nil {
<mask> res = Result{
<mask> Reason: RewrittenAutoHosts,
<mask> IPList: ips,
<mask> }
</s> Pull request: 1947 disable autohosts option
Merge in DNS/adguard-home from 1947-hosts-opt to master
Updates #1947.
Updates #2829.
Squashed commit of the following:
commit d09285c3dbfa7816469eec223b88c320c255c8fe
Merge: cff8c4cd 7c6557b0
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 18:23:20 2021 +0300
Merge branch 'master' into 1947-hosts-opt
commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:46:19 2021 +0300
home: fix help
commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:40:48 2021 +0300
home: fix option order
commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:28:30 2021 +0300
aghnet: add important todo
commit 7f1386ff5c3081e07e975b640164a7a05e1319c9
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:17:17 2021 +0300
all: correct naming
commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:55:46 2021 +0300
all: mv functionality from util
commit e82ad53862682d903dd0dd10844db65997a758bc
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:41:35 2021 +0300
home: imp code, docs
commit 9058977f3ff99648fabaebbd7c1c354c71671327
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:02:34 2021 +0300
home: add an option to disable autohosts </s> remove if d.Config.AutoHosts == nil {
</s> add if d.Config.EtcHosts == nil { </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype)
</s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype) </s> remove Context.autoHosts.Close()
</s> add Context.etcHosts.Close() </s> remove hosts := clients.autoHosts.List()
</s> add if clients.etcHosts == nil {
return
}
hosts := clients.etcHosts.List() </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged)
</s> add if clients.etcHosts != nil {
clients.etcHosts.SetOnChanged(clients.onHostsChanged)
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30 | internal/dnsfilter/dnsfilter.go |
revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype) | <mask>
<mask> return res, nil
<mask> }
<mask>
<mask> revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype)
<mask> if len(revHosts) != 0 {
<mask> res = Result{
<mask> Reason: RewrittenAutoHosts,
<mask> }
<mask>
</s> Pull request: 1947 disable autohosts option
Merge in DNS/adguard-home from 1947-hosts-opt to master
Updates #1947.
Updates #2829.
Squashed commit of the following:
commit d09285c3dbfa7816469eec223b88c320c255c8fe
Merge: cff8c4cd 7c6557b0
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 18:23:20 2021 +0300
Merge branch 'master' into 1947-hosts-opt
commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:46:19 2021 +0300
home: fix help
commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:40:48 2021 +0300
home: fix option order
commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:28:30 2021 +0300
aghnet: add important todo
commit 7f1386ff5c3081e07e975b640164a7a05e1319c9
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 17:17:17 2021 +0300
all: correct naming
commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:55:46 2021 +0300
all: mv functionality from util
commit e82ad53862682d903dd0dd10844db65997a758bc
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:41:35 2021 +0300
home: imp code, docs
commit 9058977f3ff99648fabaebbd7c1c354c71671327
Author: Eugene Burkov <e.burkov@adguard.com>
Date: Mon Apr 12 15:02:34 2021 +0300
home: add an option to disable autohosts </s> remove ips := d.Config.AutoHosts.Process(host, qtype)
</s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove if d.Config.AutoHosts == nil {
</s> add if d.Config.EtcHosts == nil { </s> remove Context.clients.Init(config.Clients, Context.dhcpServer, &Context.autoHosts)
</s> add if !args.noEtcHosts {
Context.etcHosts = &aghnet.EtcHostsContainer{}
Context.etcHosts.Init("")
Context.clients.Init(config.Clients, Context.dhcpServer, Context.etcHosts)
} </s> remove Context.autoHosts.Close()
</s> add Context.etcHosts.Close() </s> remove Context.autoHosts.Start()
</s> add Context.etcHosts.Start() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30 | internal/dnsfilter/dnsfilter.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.