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 |
|---|---|---|---|---|
updated, err := filter.update(force) | <mask> // fetch URLs
<mask> updateCount := 0
<mask> for i := range config.Filters {
<mask> filter := &config.Filters[i] // otherwise we will be operating on a copy
<mask> updated, err := filter.update(false)
<mask> if err != nil {
<mask> log.Printf("Failed to update filter %s: %s\n", filter.URL, err)... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
// Saving it to the filters dir now
err = filter.save()
if err != nil {
log.Printf("Failed to save the updated filter %d: %s", filter.ID, err)
continue
}
| <mask> }
<mask> if updated {
<mask> updateCount++
<mask> }
<mask> }
<mask> config.Unlock()
<mask>
<mask> if updateCount > 0 {
</s> Added filterId to the querylog
Updated the openapi.yaml accordingly
Some minor refactoring/renaming
Fix other review comments </s> remove jsonentry["status"] = stat... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
// Call "save" to persist the filter contents | <mask> // Checks for filters updates
<mask> // If "force" is true -- does not check the filter's LastUpdated field
<mask> func (filter *filter) update(force bool) (bool, error) {
<mask> if !filter.Enabled {
<mask> return false, nil
<mask> }
<mask> if !force && time.Since(filter.LastUpdated) <= updatePeriod ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
log.Printf("Downloading update for filter %d from %s", filter.ID, filter.URL) | <mask> if !force && time.Since(filter.LastUpdated) <= updatePeriod {
<mask> return false, nil
<mask> }
<mask>
<mask> log.Printf("Downloading update for filter %d", filter.ID)
<mask>
<mask> // use same update period for failed filter downloads to avoid flooding with requests
<mask> filter.LastUpdated = ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
// use the same update period for failed filter downloads to avoid flooding with requests | <mask> }
<mask>
<mask> log.Printf("Downloading update for filter %d", filter.ID)
<mask>
<mask> // use same update period for failed filter downloads to avoid flooding with requests
<mask> filter.LastUpdated = time.Now()
<mask>
<mask> resp, err := client.Get(filter.URL)
<mask> if resp != nil && resp.Bo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
rulesCount, filterName := parseFilterContents(body) | <mask> return false, err
<mask> }
<mask>
<mask> // Extract filter name and count number of rules
<mask> lines := strings.Split(string(body), "\n")
<mask> rulesCount := 0
<mask> seenTitle := false
<mask>
<mask> // Count lines in the filter
<mask> for _, line := range lines {
<mask> line = strings... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
if filterName != "" {
filter.Name = filterName | <mask> lines := strings.Split(string(body), "\n")
<mask> rulesCount := 0
<mask> seenTitle := false
<mask>
<mask> // Count lines in the filter
<mask> for _, line := range lines {
<mask> line = strings.TrimSpace(line)
<mask> if len(line) > 0 && line[0] == '!' {
<mask> if m := filterTitle.FindAllStri... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
// Check if the filter has been really changed | <mask> rulesCount++
<mask> }
<mask> }
<mask>
<mask> // Check if the filter was really changed
<mask> if bytes.Equal(filter.contents, body) {
<mask> return false, nil
<mask> }
<mask>
<mask> log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount)
</s> Added filterId... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
log.Printf("The filter %d text has not changed", filter.ID) | <mask> // Check if the filter has been really changed
<mask> if bytes.Equal(filter.contents, body) {
<mask> return false, nil
<mask> }
<mask>
<mask> log.Printf("Filter %d has been updated: %d bytes, %d rules", filter.ID, len(body), rulesCount)
<mask> filter.RulesCount = rulesCount
<mask> filter.content... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
log.Printf("Filter %d has been updated: %d bytes, %d rules", filter.ID, len(body), rulesCount) | <mask> if bytes.Equal(filter.contents, body) {
<mask> return false, nil
<mask> }
<mask>
<mask> log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount)
<mask> filter.RulesCount = rulesCount
<mask> filter.contents = body
<mask>
<mask> // Saving it to the filters dir now
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
<mask> log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount)
<mask> filter.RulesCount = rulesCount
<mask> filter.contents = body
<mask>
<mask> // Saving it to the filters dir now
<mask> err = filter.save()
<mask> if err != nil {
<mask> return false, nil
<mask> }
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go | |
return nil | <mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> return nil;
<mask> }
<mask>
<mask> // loads filter contents from the file in config.ourDataDir
<mask> func (filter *filter) load() error {
<mask>
</s> Added filterId to the querylog
Updated the openapi.yaml accordingly
Some minor refacto... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
filterFileContents, err := ioutil.ReadFile(filterFilePath) | <mask> // do nothing, file doesn't exist
<mask> return err
<mask> }
<mask>
<mask> filterFile, err := ioutil.ReadFile(filterFilePath)
<mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> log.Printf("Filter %d length is %d", filter.ID, len(filterFile))
</s> Added filterId to the querylo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
log.Printf("Filter %d length is %d", filter.ID, len(filterFileContents))
filter.contents = filterFileContents
// Now extract the rules count
rulesCount, _ := parseFilterContents(filter.contents)
filter.RulesCount = rulesCount
| <mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> log.Printf("Filter %d length is %d", filter.ID, len(filterFile))
<mask> filter.contents = filterFile
<mask> return nil
<mask> }
<mask>
<mask> // Path to the filter contents
<mask> func (filter *filter) getFilterFilePath() string {
</s>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
return filepath.Join(config.ourBinaryDir, config.ourDataDir, FiltersDir, strconv.Itoa(filter.ID)+".txt") | <mask> }
<mask>
<mask> // Path to the filter contents
<mask> func (filter *filter) getFilterFilePath() string {
<mask> return filepath.Join(config.ourBinaryDir, config.ourDataDir, FiltersDir, strconv.Itoa(filter.ID) + ".txt")
<mask> }
<mask>
<mask> // ------------
<mask> // safebrowsing
<mask> // ---------... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
//noinspection GoUnusedParameter | <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)
</s> Added filterId to the querylog
Updated the openapi.yaml accord... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
//noinspection GoUnusedParameter | <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{}{
<mask> "enabled": config.CoreDNS.ParentalEnabled,
<mask> }
<mask> if config.Core... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
//noinspection GoUnusedParameter | <mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<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)
</s> Added filterId to... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
http.HandleFunc("/control/querylog", optionalAuth(ensureGET(coreDnsPlugin.HandleQueryLog))) | <mask> func registerControlHandlers() {
<mask> http.HandleFunc("/control/status", optionalAuth(ensureGET(handleStatus)))
<mask> http.HandleFunc("/control/enable_protection", optionalAuth(ensurePOST(handleProtectionEnable)))
<mask> http.HandleFunc("/control/disable_protection", optionalAuth(ensurePOST(handleProte... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
http.HandleFunc("/control/stats_top", optionalAuth(ensureGET(coreDnsPlugin.HandleStatsTop)))
http.HandleFunc("/control/stats", optionalAuth(ensureGET(coreDnsPlugin.HandleStats)))
http.HandleFunc("/control/stats_history", optionalAuth(ensureGET(coreDnsPlugin.HandleStatsHistory)))
http.HandleFunc("/control/stats_rese... | <mask> http.HandleFunc("/control/querylog_enable", optionalAuth(ensurePOST(handleQueryLogEnable)))
<mask> http.HandleFunc("/control/querylog_disable", optionalAuth(ensurePOST(handleQueryLogDisable)))
<mask> http.HandleFunc("/control/set_upstream_dns", optionalAuth(ensurePOST(handleSetUpstreamDNS)))
<mask> http.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | control.go |
<mask> queryLogRotationPeriod = time.Hour * 24 // rotate the log every 24 hours
<mask> queryLogFileName = "querylog.json" // .gz added during compression
<mask> queryLogSize = 5000 // maximum API response for /querylog
<mask> queryLogTopSize = 500 // Keep in memory... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go | |
<mask> logBuffer []*logEntry
<mask>
<mask> queryLogCache []*logEntry
<mask> queryLogLock sync.RWMutex
<mask> queryLogTime time.Time
<mask> )
<mask>
<mask> type logEntry struct {
<mask> Question []byte
<mask> Answer []byte `json:",omitempty"` // sometimes empty answers happen like binerdunt.top... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go | |
//noinspection GoUnusedParameter | <mask> }
<mask> }
<mask>
<mask> func HandleQueryLog(w http.ResponseWriter, r *http.Request) {
<mask> queryLogLock.RLock()
<mask> values := make([]*logEntry, len(queryLogCache))
<mask> copy(values, queryLogCache)
<mask> queryLogLock.RUnlock()
<mask>
</s> Added filterId to the querylog
Updated the openap... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
jsonEntry := map[string]interface{}{ | <mask> a = nil
<mask> }
<mask> }
<mask>
<mask> jsonentry := map[string]interface{}{
<mask> "reason": entry.Result.Reason.String(),
<mask> "elapsed_ms": strconv.FormatFloat(entry.Elapsed.Seconds()*1000, 'f', -1, 64),
<mask> "time": entry.Time.Format(time.RFC3339),
<mask> "clien... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
"elapsedMs": strconv.FormatFloat(entry.Elapsed.Seconds()*1000, 'f', -1, 64), | <mask> }
<mask>
<mask> jsonentry := map[string]interface{}{
<mask> "reason": entry.Result.Reason.String(),
<mask> "elapsed_ms": strconv.FormatFloat(entry.Elapsed.Seconds()*1000, 'f', -1, 64),
<mask> "time": entry.Time.Format(time.RFC3339),
<mask> "client": entry.IP,
<mask> }
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
jsonEntry["question"] = map[string]interface{}{ | <mask> "time": entry.Time.Format(time.RFC3339),
<mask> "client": entry.IP,
<mask> }
<mask> if q != nil {
<mask> jsonentry["question"] = map[string]interface{}{
<mask> "host": strings.ToLower(strings.TrimSuffix(q.Question[0].Name, ".")),
<mask> "type": dns.Type(q.Question[0].Qtype... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
jsonEntry["status"] = status.String() | <mask> }
<mask>
<mask> if a != nil {
<mask> status, _ := response.Typify(a, time.Now().UTC())
<mask> jsonentry["status"] = status.String()
<mask> }
<mask> if len(entry.Result.Rule) > 0 {
<mask> jsonentry["rule"] = entry.Result.Rule
<mask> }
<mask>
</s> Added filterId to the querylog
Upda... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
jsonEntry["rule"] = entry.Result.Rule
jsonEntry["filterId"] = entry.Result.FilterID | <mask> status, _ := response.Typify(a, time.Now().UTC())
<mask> jsonentry["status"] = status.String()
<mask> }
<mask> if len(entry.Result.Rule) > 0 {
<mask> jsonentry["rule"] = entry.Result.Rule
<mask> }
<mask>
<mask> if a != nil && len(a.Answer) > 0 {
<mask> var answers = []map[string]int... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
jsonEntry["answer"] = answers | <mask> answer["value"] = v
<mask> }
<mask> answers = append(answers, answer)
<mask> }
<mask> jsonentry["answer"] = answers
<mask> }
<mask>
<mask> data = append(data, jsonentry)
<mask> }
<mask>
</s> Added filterId to the querylog
Updated the openapi.yaml accordingly
Some minor refact... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
data = append(data, jsonEntry) | <mask> }
<mask> jsonentry["answer"] = answers
<mask> }
<mask>
<mask> data = append(data, jsonentry)
<mask> }
<mask>
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Couldn't marshal data into json: %s", err)
</s> Added filterId to the querylog... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
errorText := fmt.Sprintf("Couldn't marshal data into json: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError) | <mask> }
<mask>
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Couldn't marshal data into json: %s", err)
<mask> log.Println(errortext)
<mask> http.Error(w, errortext, http.StatusInternalServerError)
<mask> return
<mask> }
<mask>
<mask> w.Head... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
errorText := fmt.Sprintf("Unable to write response json: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError) | <mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> _, err = w.Write(jsonVal)
<mask> if err != nil {
<mask> errortext := fmt.Sprintf("Unable to write response json: %s", err)
<mask> log.Println(errortext)
<mask> http.Error(w, errortext, http.StatusInternalServerError)
<mask> }
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | coredns_plugin/querylog.go |
res.FilterID = rule.listID | <mask> res.Reason = FilteredBlackList
<mask> res.IsFiltered = true
<mask> if rule.isWhitelist {
<mask> res.Reason = NotFilteredWhiteList
<mask> res.IsFiltered = false
<mask> }
<mask> res.Rule = rule.text
</s> Added filterId to the querylog
Updated the openapi.yaml accordingly
Some minor refactor... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | dnsfilter/dnsfilter.go |
elapsedMs: '65.469556' | <mask> value: 94.100.180.201
<mask> - ttl: 55
<mask> type: A
<mask> value: 217.69.139.200
<mask> elapsed_ms: '65.469556'
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | openapi.yaml |
- elapsedMs: '0.15716999999999998' | <mask> type: A
<mask> reason: DNSFILTER_NOTFILTERED_NOTFOUND
<mask> status: NOERROR
<mask> time: '2018-07-16T22:24:02+03:00'
<mask> - elapsed_ms: '0.1571699999999999... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | openapi.yaml |
elapsedMs: '132.110929' | <mask> - answer:
<mask> - ttl: 299
<mask> type: A
<mask> value: 176.103.133.78
<mask> elapsed_ms: '132.110929'
<mask> question:
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | openapi.yaml |
filterId: 1 | <mask> host: wmconvirus.narod.ru
<mask> type: A
<mask> reason: DNSFILTER_FILTERED_SAFEBROWSING
<mask> rule: adguard-malware-shavar
<mask> status: NOERROR
<mask>... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | openapi.yaml |
- filters:
enabled: true
id: 1
lastUpdated: "2018-10-30T12:18:57.223101822+03:00"
name: "AdGuard Simplified Domain Names filter"
rulesCount: 2... | <mask> description: OK
<mask> examples:
<mask> application/json:
<mask> enabled: false
<mask> urls:
<mask> - 'https://filters.adtidy.org/windows/filters/1.txt'
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/591065aa3aeff1cdee5cba0abdc7af0ceb09f54e | openapi.yaml |
"encoding/json"
"fmt" | <mask>
<mask> import (
<mask> "encoding/hex"
<mask> "net"
<mask> "net/http"
<mask> "path/filepath"
<mask> "runtime"
</s> Pull request: 2509 type-safety vol.1
Merge in DNS/adguard-home from 2509-type-safety to master
Updates #2509.
Squashed commit of the following:
commit 535968eb7de3a9e0817ddb57bc2320... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcpd.go |
<mask> "net"
<mask> "net/http"
<mask> "os"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/sysutil"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask> "github.com/AdguardTeam/golibs/jsonutil"
<mask> "github.com/AdguardTeam/golibs/log"
</s> Pul... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
<mask> log.Info("DHCP: %s %s: %s", r.Method, r.URL, text)
<mask> http.Error(w, text, code)
<mask> }
<mask>
<mask> // []Lease -> JSON
<mask> func convertLeases(inputLeases []Lease, includeExpires bool) []map[string]string {
<mask> leases := []map[string]string{}
<mask> for _, l := range inputLeases {
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
... | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
<mask> RangeEnd net.IP `json:"range_end"`
<mask> LeaseDuration uint32 `json:"lease_duration"`
<mask> }
<mask>
<mask> func v4ServerConfToJSON(c V4ServerConf) v4ServerConfJSON {
<mask> return v4ServerConfJSON{
<mask> GatewayIP: c.GatewayIP,
<mask> SubnetMask: c.SubnetMask,
<mask> RangeStart... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
GatewayIP: j.GatewayIP,
SubnetMask: j.SubnetMask,
RangeStart: j.RangeStart,
RangeEnd: j.RangeEnd, | <mask> }
<mask>
<mask> func v4JSONToServerConf(j v4ServerConfJSON) V4ServerConf {
<mask> return V4ServerConf{
<mask> GatewayIP: j.GatewayIP.To4(),
<mask> SubnetMask: j.SubnetMask.To4(),
<mask> RangeStart: j.RangeStart.To4(),
<mask> RangeEnd: j.RangeEnd.To4(),
<mask> LeaseDuration: j.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> RangeStart string `json:"range_start"`
<mask> LeaseDuration uint32 `json:"lease_duration"`
<mask> }
<mask>
<mask> func v6ServerConfToJSON(c V6ServerConf) v6ServerConfJSON {
<mask> return v6ServerConfJSON{
<mask> RangeStart: c.RangeStart,
<mask> LeaseDuration: c.LeaseDuration,
<mask> }
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
// dhcpStatusResponse is the response for /control/dhcp/status endpoint.
type dhcpStatusResponse struct {
Enabled bool `json:"enabled"`
IfaceName string `json:"interface_name"`
V4 V4ServerConf `json:"v4"`
V6 V6ServerConf `json:"v6"`
Leases []Lease `json:"leases"... | <mask> LeaseDuration: j.LeaseDuration,
<mask> }
<mask> }
<mask>
<mask> func (s *Server) handleDHCPStatus(w http.ResponseWriter, r *http.Request) {
<mask> leases := convertLeases(s.Leases(LeasesDynamic), true)
<mask> staticLeases := convertLeases(s.Leases(LeasesStatic), false)
<mask>
<mask> v4conf := V4... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
func (s *Server) handleDHCPStatus(w http.ResponseWriter, r *http.Request) {
status := &dhcpStatusResponse{
Enabled: s.conf.Enabled,
IfaceName: s.conf.InterfaceName,
V4: V4ServerConf{},
V6: V6ServerConf{},
} | <mask> func (s *Server) handleDHCPStatus(w http.ResponseWriter, r *http.Request) {
<mask> leases := convertLeases(s.Leases(LeasesDynamic), true)
<mask> staticLeases := convertLeases(s.Leases(LeasesStatic), false)
<mask>
<mask> v4conf := V4ServerConf{}
<mask> s.srv4.WriteDiskConfig4(&v4conf)
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
s.srv4.WriteDiskConfig4(&status.V4)
s.srv6.WriteDiskConfig6(&status.V6) | <mask>
<mask> v4conf := V4ServerConf{}
<mask> s.srv4.WriteDiskConfig4(&v4conf)
<mask>
<mask> v6conf := V6ServerConf{}
<mask> s.srv6.WriteDiskConfig6(&v6conf)
<mask>
<mask> status := map[string]interface{}{
<mask> "enabled": s.conf.Enabled,
<mask> "interface_name": s.conf.InterfaceName,
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
status.Leases = s.Leases(LeasesDynamic)
status.StaticLeases = s.Leases(LeasesStatic) | <mask>
<mask> v6conf := V6ServerConf{}
<mask> s.srv6.WriteDiskConfig6(&v6conf)
<mask>
<mask> status := map[string]interface{}{
<mask> "enabled": s.conf.Enabled,
<mask> "interface_name": s.conf.InterfaceName,
<mask> "v4": v4ServerConfToJSON(v4conf),
<mask> "v6": v6Ser... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> return
<mask> }
<mask> }
<mask>
<mask> type staticLeaseJSON struct {
<mask> HWAddr string `json:"mac"`
<mask> IP net.IP `json:"ip"`
<mask> Hostname string `json:"hostname"`
<mask> }
<mask>
<mask> type dhcpServerConfigJSON struct {
<mask> Enabled bool `json:"enabled"... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
response := map[string]netInterfaceJSON{} | <mask> Flags string `json:"flags"`
<mask> }
<mask>
<mask> func (s *Server) handleDHCPInterfaces(w http.ResponseWriter, r *http.Request) {
<mask> response := map[string]interface{}{}
<mask>
<mask> ifaces, err := util.GetValidNetInterfaces()
<mask> if err != nil {
<mask> httpError(r, w, http.Sta... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
result := dhcpSearchResult{
V4: dhcpSearchV4Result{
OtherServer: dhcpSearchOtherResult{},
StaticIP: dhcpStaticIPStatus{},
},
V6: dhcpSearchV6Result{
OtherServer: dhcpSearchOtherResult{},
},
}
| <mask> return
<mask> }
<mask>
<mask> found4, err4 := CheckIfOtherDHCPServersPresentV4(interfaceName)
<mask>
<mask> isStaticIP, err := sysutil.IfaceHasStaticIP(interfaceName)
<mask> if err != nil {
<mask> result.V4.StaticIP.Static = "error"
<mask> result.V4.StaticIP.Error = err.Error()
</s> Pull re... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> }
<mask>
<mask> found4, err4 := CheckIfOtherDHCPServersPresentV4(interfaceName)
<mask>
<mask> staticIP := map[string]interface{}{}
<mask> isStaticIP, err := sysutil.IfaceHasStaticIP(interfaceName)
<mask> staticIPStatus := "yes"
<mask> if err != nil {
<mask> staticIPStatus = "error"
<mask> s... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
<mask> found4, err4 := CheckIfOtherDHCPServersPresentV4(interfaceName)
<mask>
<mask> staticIP := map[string]interface{}{}
<mask> isStaticIP, err := sysutil.IfaceHasStaticIP(interfaceName)
<mask> staticIPStatus := "yes"
<mask> if err != nil {
<mask> staticIPStatus = "error"
<mask> staticIP["error"] = e... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
result.V4.StaticIP.Static = "error"
result.V4.StaticIP.Error = err.Error() | <mask> staticIP := map[string]interface{}{}
<mask> isStaticIP, err := sysutil.IfaceHasStaticIP(interfaceName)
<mask> staticIPStatus := "yes"
<mask> if err != nil {
<mask> staticIPStatus = "error"
<mask> staticIP["error"] = err.Error()
<mask> } else if !isStaticIP {
<mask> staticIPStatus = "no"
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
result.V4.StaticIP.Static = "no"
result.V4.StaticIP.IP = util.GetSubnet(interfaceName) | <mask> if err != nil {
<mask> staticIPStatus = "error"
<mask> staticIP["error"] = err.Error()
<mask> } else if !isStaticIP {
<mask> staticIPStatus = "no"
<mask> staticIP["ip"] = util.GetSubnet(interfaceName)
<mask> }
<mask> staticIP["static"] = staticIPStatus
<mask>
<mask> v4 := map[string]inter... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> } else if !isStaticIP {
<mask> staticIPStatus = "no"
<mask> staticIP["ip"] = util.GetSubnet(interfaceName)
<mask> }
<mask> staticIP["static"] = staticIPStatus
<mask>
<mask> v4 := map[string]interface{}{}
<mask> othSrv := map[string]interface{}{}
<mask> foundVal := "no"
<mask> if found4 {
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
<mask> staticIP["ip"] = util.GetSubnet(interfaceName)
<mask> }
<mask> staticIP["static"] = staticIPStatus
<mask>
<mask> v4 := map[string]interface{}{}
<mask> othSrv := map[string]interface{}{}
<mask> foundVal := "no"
<mask> if found4 {
<mask> foundVal = "yes"
<mask> } else if err4 != nil {
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
result.V4.OtherServer.Found = "yes" | <mask> v4 := map[string]interface{}{}
<mask> othSrv := map[string]interface{}{}
<mask> foundVal := "no"
<mask> if found4 {
<mask> foundVal = "yes"
<mask> } else if err4 != nil {
<mask> foundVal = "error"
<mask> othSrv["error"] = err4.Error()
<mask> }
<mask> othSrv["found"] = foundVal
</s> Pull r... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
result.V4.OtherServer.Found = "error"
result.V4.OtherServer.Error = err4.Error() | <mask> foundVal := "no"
<mask> if found4 {
<mask> foundVal = "yes"
<mask> } else if err4 != nil {
<mask> foundVal = "error"
<mask> othSrv["error"] = err4.Error()
<mask> }
<mask> othSrv["found"] = foundVal
<mask> v4["other_server"] = othSrv
<mask> v4["static_ip"] = staticIP
<mask>
</s> Pull req... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> } else if err4 != nil {
<mask> foundVal = "error"
<mask> othSrv["error"] = err4.Error()
<mask> }
<mask> othSrv["found"] = foundVal
<mask> v4["other_server"] = othSrv
<mask> v4["static_ip"] = staticIP
<mask>
<mask> found6, err6 := CheckIfOtherDHCPServersPresentV6(interfaceName)
<mask>
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
<mask> v4["static_ip"] = staticIP
<mask>
<mask> found6, err6 := CheckIfOtherDHCPServersPresentV6(interfaceName)
<mask>
<mask> v6 := map[string]interface{}{}
<mask> othSrv = map[string]interface{}{}
<mask> foundVal = "no"
<mask> if found6 {
<mask> foundVal = "yes"
<mask> } else if err6 != nil {
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
result.V6.OtherServer.Found = "yes" | <mask> v6 := map[string]interface{}{}
<mask> othSrv = map[string]interface{}{}
<mask> foundVal = "no"
<mask> if found6 {
<mask> foundVal = "yes"
<mask> } else if err6 != nil {
<mask> foundVal = "error"
<mask> othSrv["error"] = err6.Error()
<mask> }
<mask> othSrv["found"] = foundVal
</s> Pull req... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
result.V6.OtherServer.Found = "error"
result.V6.OtherServer.Error = err6.Error() | <mask> foundVal = "no"
<mask> if found6 {
<mask> foundVal = "yes"
<mask> } else if err6 != nil {
<mask> foundVal = "error"
<mask> othSrv["error"] = err6.Error()
<mask> }
<mask> othSrv["found"] = foundVal
<mask> v6["other_server"] = othSrv
<mask>
<mask> result := map[string]interface{}{}
</s> P... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> } else if err6 != nil {
<mask> foundVal = "error"
<mask> othSrv["error"] = err6.Error()
<mask> }
<mask> othSrv["found"] = foundVal
<mask> v6["other_server"] = othSrv
<mask>
<mask> result := map[string]interface{}{}
<mask> result["v4"] = v4
<mask> result["v6"] = v6
<mask>
<mask> w.Header... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
lj := Lease{} | <mask> }
<mask> }
<mask>
<mask> func (s *Server) handleDHCPAddStaticLease(w http.ResponseWriter, r *http.Request) {
<mask> lj := staticLeaseJSON{}
<mask> err := json.NewDecoder(r.Body).Decode(&lj)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "json.Decode: %s", err)
<mask>
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> }
<mask>
<mask> ip4 := lj.IP.To4()
<mask>
<mask> mac, err := net.ParseMAC(lj.HWAddr)
<mask> lease := Lease{
<mask> HWAddr: mac,
<mask> }
<mask>
<mask> if ip4 == nil {
<mask> lease.IP = lj.IP.To16()
<mask>
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "inval... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
lj.IP = lj.IP.To16() | <mask> HWAddr: mac,
<mask> }
<mask>
<mask> if ip4 == nil {
<mask> lease.IP = lj.IP.To16()
<mask>
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "invalid MAC")
<mask>
<mask> return
</s> Pull request: 2509 type-safety vol.1
Merge in DNS/adguard-home from 2509-type-safety... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
err = s.srv6.AddStaticLease(lj) | <mask>
<mask> if ip4 == nil {
<mask> lease.IP = lj.IP.To16()
<mask>
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "invalid MAC")
<mask>
<mask> return
<mask> }
<mask>
<mask> err = s.srv6.AddStaticLease(lease)
<mask> if err != nil {
<mask> httpError(r, w, http.S... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
lj.IP = ip4
err = s.srv4.AddStaticLease(lj) | <mask>
<mask> return
<mask> }
<mask>
<mask> lease.IP = ip4
<mask> lease.Hostname = lj.Hostname
<mask> err = s.srv4.AddStaticLease(lease)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "%s", err)
<mask>
<mask> return
<mask> }
</s> Pull request: 2509 type-safety vol.1
Me... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
lj := Lease{} | <mask> }
<mask> }
<mask>
<mask> func (s *Server) handleDHCPRemoveStaticLease(w http.ResponseWriter, r *http.Request) {
<mask> lj := staticLeaseJSON{}
<mask> err := json.NewDecoder(r.Body).Decode(&lj)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "json.Decode: %s", err)
<mask>
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
<mask> }
<mask>
<mask> ip4 := lj.IP.To4()
<mask>
<mask> mac, err := net.ParseMAC(lj.HWAddr)
<mask> lease := Lease{
<mask> HWAddr: mac,
<mask> }
<mask>
<mask> if ip4 == nil {
<mask> lease.IP = lj.IP.To16()
<mask>
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "inval... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go | |
lj.IP = lj.IP.To16() | <mask> HWAddr: mac,
<mask> }
<mask>
<mask> if ip4 == nil {
<mask> lease.IP = lj.IP.To16()
<mask>
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "invalid MAC")
<mask>
<mask> return
<mask> }
<mask>
<mask> err = s.srv6.RemoveStaticLease(lease)
<mask> if err != ni... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
err = s.srv6.RemoveStaticLease(lj) | <mask>
<mask> return
<mask> }
<mask>
<mask> err = s.srv6.RemoveStaticLease(lease)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "%s", err)
<mask> }
<mask>
<mask> return
</s> Pull request: 2509 type-safety vol.1
Merge in DNS/adguard-home from 2509-type-safety to mast... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
lj.IP = ip4
err = s.srv4.RemoveStaticLease(lj) | <mask>
<mask> return
<mask> }
<mask>
<mask> lease.IP = ip4
<mask> lease.Hostname = lj.Hostname
<mask> err = s.srv4.RemoveStaticLease(lease)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "%s", err)
<mask>
<mask> return
<mask> }
</s> Pull request: 2509 type-safety vol.1
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/dhcphttp.go |
Enabled bool `yaml:"-" json:"-"`
InterfaceName string `yaml:"-" json:"-"` | <mask> }
<mask>
<mask> // V4ServerConf - server configuration
<mask> type V4ServerConf struct {
<mask> Enabled bool `yaml:"-"`
<mask> InterfaceName string `yaml:"-"`
<mask>
<mask> GatewayIP net.IP `yaml:"gateway_ip"`
<mask> SubnetMask net.IP `yaml:"subnet_mask"`
<mask>
<mask> // The first & ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
GatewayIP net.IP `yaml:"gateway_ip" json:"gateway_ip"`
SubnetMask net.IP `yaml:"subnet_mask" json:"subnet_mask"` | <mask> type V4ServerConf struct {
<mask> Enabled bool `yaml:"-"`
<mask> InterfaceName string `yaml:"-"`
<mask>
<mask> GatewayIP net.IP `yaml:"gateway_ip"`
<mask> SubnetMask net.IP `yaml:"subnet_mask"`
<mask>
<mask> // The first & the last IP address for dynamic leases
<mask> // Bytes [0..2] of... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
RangeStart net.IP `yaml:"range_start" json:"range_start"`
RangeEnd net.IP `yaml:"range_end" json:"range_end"` | <mask> SubnetMask net.IP `yaml:"subnet_mask"`
<mask>
<mask> // The first & the last IP address for dynamic leases
<mask> // Bytes [0..2] of the last allowed IP address must match the first IP
<mask> RangeStart net.IP `yaml:"range_start"`
<mask> RangeEnd net.IP `yaml:"range_end"`
<mask>
<mask> LeaseDur... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
LeaseDuration uint32 `yaml:"lease_duration" json:"lease_duration"` // in seconds | <mask> // Bytes [0..2] of the last allowed IP address must match the first IP
<mask> RangeStart net.IP `yaml:"range_start"`
<mask> RangeEnd net.IP `yaml:"range_end"`
<mask>
<mask> LeaseDuration uint32 `yaml:"lease_duration"` // in seconds
<mask>
<mask> // IP conflict detector: time (ms) to wait for ICMP... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
ICMPTimeout uint32 `yaml:"icmp_timeout_msec" json:"-"` | <mask> LeaseDuration uint32 `yaml:"lease_duration"` // in seconds
<mask>
<mask> // IP conflict detector: time (ms) to wait for ICMP reply
<mask> // 0: disable
<mask> ICMPTimeout uint32 `yaml:"icmp_timeout_msec"`
<mask>
<mask> // Custom Options.
<mask> //
<mask> // Option with arbitrary hexadecimal dat... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
Options []string `yaml:"options" json:"-"` | <mask> // where DEC_CODE is a decimal DHCPv4 option code in range [1..255]
<mask> //
<mask> // Option with IP data (only 1 IP is supported):
<mask> // DEC_CODE ip IP_ADDR
<mask> Options []string `yaml:"options"`
<mask>
<mask> ipStart net.IP // starting IP address for dynamic leases
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
Enabled bool `yaml:"-" json:"-"`
InterfaceName string `yaml:"-" json:"-"` | <mask> }
<mask>
<mask> // V6ServerConf - server configuration
<mask> type V6ServerConf struct {
<mask> Enabled bool `yaml:"-"`
<mask> InterfaceName string `yaml:"-"`
<mask>
<mask> // The first IP address for dynamic leases
<mask> // The last allowed IP address ends with 0xff byte
<mask> RangeSt... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
RangeStart string `yaml:"range_start" json:"range_start"` | <mask> InterfaceName string `yaml:"-"`
<mask>
<mask> // The first IP address for dynamic leases
<mask> // The last allowed IP address ends with 0xff byte
<mask> RangeStart string `yaml:"range_start"`
<mask>
<mask> LeaseDuration uint32 `yaml:"lease_duration"` // in seconds
<mask>
<mask> RaSlaacOnly bo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
LeaseDuration uint32 `yaml:"lease_duration" json:"lease_duration"` // in seconds | <mask> // The first IP address for dynamic leases
<mask> // The last allowed IP address ends with 0xff byte
<mask> RangeStart string `yaml:"range_start"`
<mask>
<mask> LeaseDuration uint32 `yaml:"lease_duration"` // in seconds
<mask>
<mask> RaSlaacOnly bool `yaml:"ra_slaac_only"` // send ICMPv6.RA packe... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
RaSlaacOnly bool `yaml:"ra_slaac_only" json:"-"` // send ICMPv6.RA packets without MO flags
RaAllowSlaac bool `yaml:"ra_allow_slaac" json:"-"` // send ICMPv6.RA packets with MO flags | <mask> RangeStart string `yaml:"range_start"`
<mask>
<mask> LeaseDuration uint32 `yaml:"lease_duration"` // in seconds
<mask>
<mask> RaSlaacOnly bool `yaml:"ra_slaac_only"` // send ICMPv6.RA packets without MO flags
<mask> RaAllowSlaac bool `yaml:"ra_allow_slaac"` // send ICMPv6.RA packets with MO flags
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/server.go |
// The function shouldn't return nil value because zero-length slice
// behaves differently in cases like marshalling. Our front-end also
// requires non-nil value in the response.
result := []Lease{} | <mask> }
<mask>
<mask> // GetLeases returns the list of current DHCP leases (thread-safe)
<mask> func (s *v4Server) GetLeases(flags int) []Lease {
<mask> var result []Lease
<mask> now := time.Now().Unix()
<mask>
<mask> s.leasesLock.Lock()
<mask> for _, lease := range s.leases {
<mask> if ((flags&Lease... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/v4.go |
// The function shouldn't return nil value because zero-length slice
// behaves differently in cases like marshalling. Our front-end also
// requires non-nil value in the response.
result := []Lease{} | <mask> }
<mask>
<mask> // GetLeases - get current leases
<mask> func (s *v6Server) GetLeases(flags int) []Lease {
<mask> var result []Lease
<mask> s.leasesLock.Lock()
<mask> for _, lease := range s.leases {
<mask> if lease.Expiry.Unix() == leaseExpireStatic {
<mask> if (flags & LeasesStatic) != 0 {
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dhcpd/v6.go |
<mask> d.Config.ConfigModified()
<mask> }
<mask>
<mask> func (d *DNSFilter) handleSafeBrowsingStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": d.Config.SafeBrowsingEnabled,
<mask> }
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dnsfilter/safebrowsing.go | |
err := json.NewEncoder(w).Encode(&struct {
Enabled bool `json:"enabled"`
}{
Enabled: d.Config.SafeBrowsingEnabled,
}) | <mask> httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
<mask> }
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> _, err = w.Write(jsonVal)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Unable to write respo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dnsfilter/safebrowsing.go |
<mask> d.Config.ConfigModified()
<mask> }
<mask>
<mask> func (d *DNSFilter) handleParentalStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": d.Config.ParentalEnabled,
<mask> }
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dnsfilter/safebrowsing.go | |
err := json.NewEncoder(w).Encode(&struct {
Enabled bool `json:"enabled"`
}{
Enabled: d.Config.ParentalEnabled,
}) | <mask> return
<mask> }
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> _, err = w.Write(jsonVal)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Unable to write response json: %s", err)
<mask> return
<mask> }
<mask> }
</s> Pull request: 2509 ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dnsfilter/safebrowsing.go |
<mask> d.Config.ConfigModified()
<mask> }
<mask>
<mask> func (d *DNSFilter) handleSafeSearchStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": d.Config.SafeSearchEnabled,
<mask> }
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dnsfilter/safesearch.go | |
err := json.NewEncoder(w).Encode(&struct {
Enabled bool `json:"enabled"`
}{
Enabled: d.Config.SafeSearchEnabled,
}) | <mask> return
<mask> }
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> _, err = w.Write(jsonVal)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Unable to write response json: %s", err)
<mask> return
<mask> }
<mask> }
</s> Pull request: 2509 ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | internal/dnsfilter/safesearch.go |
'500':
'content':
'application/json':
'schema':
'$ref': '#/components/schemas/Error'
'description': 'Not implemented (for example, on Windows).'
'/dhcp/interfaces':
'get':
'tags':
- 'dhcp'
'operationId': 'dhcpInterfaces'
... | <mask> 'content':
<mask> 'application/json':
<mask> 'schema':
<mask> '$ref': '#/components/schemas/DhcpStatus'
<mask> '501':
<mask> 'content':
<mask> 'application/json':
<mask> 'schema':
<mask> '$ref... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | openapi/openapi.yaml |
'NetInterfaces':
'type': 'object'
'description': >
Network interfaces dictionary, keys are interface names.
'additionalProperties':
'$ref': '#/components/schemas/NetInterface' | <mask> 'items':
<mask> '$ref': '#/components/schemas/DhcpStaticLease'
<mask>
<mask> 'DhcpSearchResult':
<mask> 'type': 'object'
<mask> 'description': >
<mask> Information about a DHCP server discovered in the current network.
</s> Pull request: 2509 type-safety vol... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | openapi/openapi.yaml |
'enum':
- 'yes'
- 'no'
- 'error'
'description': >
The result of searching the other DHCP server. | <mask> 'type': 'object'
<mask> 'properties':
<mask> 'found':
<mask> 'type': 'string'
<mask> 'description': 'yes|no|error'
<mask> 'example': 'no'
<mask> 'error':
<mask> 'type': 'string'
<mask> 'description': 'Set if found=error'
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | openapi/openapi.yaml |
'enum':
- 'yes'
- 'no'
- 'error'
'description': >
The result of determining static IP address. | <mask> 'type': 'object'
<mask> 'properties':
<mask> 'static':
<mask> 'type': 'string'
<mask> 'description': 'yes|no|error'
<mask> 'example': 'yes'
<mask> 'ip':
<mask> 'type': 'string'
<mask> 'description': 'Set if static=no'
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | openapi/openapi.yaml |
'$ref': '#/components/schemas/NetInterfaces' | <mask> 'type': 'integer'
<mask> 'format': 'uint16'
<mask> 'example': 80
<mask> 'interfaces':
<mask> 'type': 'object'
<mask> 'description': >
<mask> Network interfaces dictionary, keys are interface names.
<mask> 'additionalPropertie... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5a50efadb2be6493d4c6f5fd2104b6d5861471f5 | openapi/openapi.yaml |
github.com/AdguardTeam/dnsproxy v0.37.4 | <mask>
<mask> go 1.15
<mask>
<mask> require (
<mask> github.com/AdguardTeam/dnsproxy v0.37.2
<mask> github.com/AdguardTeam/golibs v0.4.5
<mask> github.com/AdguardTeam/urlfilter v0.14.5
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/ameshkov/dnscrypt/v2 v2.1.3
<mask> github.com/digineo/... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5acae6e204ab3f5d92449c1231dee754c1db9abb | go.mod |
github.com/AdguardTeam/dnsproxy v0.37.4 h1:YIoJkIp828LKmmmgxXvZHUKfGLsqTQAK8g+4DXbDbyU=
github.com/AdguardTeam/dnsproxy v0.37.4/go.mod h1:xkJWEuTr550gPDmB9azsciKZzSXjf9wMn+Ji54PQ4gE= | <mask> dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
<mask> git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
<mask> github.com/AdguardTeam/dhcp v0.0.0-20210517101438-550ef4cd8c6e ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5acae6e204ab3f5d92449c1231dee754c1db9abb | go.sum |
var resp statusResponse
func() {
config.RLock()
defer config.RUnlock()
resp = statusResponse{
DNSAddrs: dnsAddrs,
DNSPort: config.DNS.Port,
HTTPPort: config.BindPort,
IsRunning: isRunning(),
Version: version.Version(),
Language: config.Language,
}
}() | <mask>
<mask> return
<mask> }
<mask>
<mask> resp := statusResponse{
<mask> DNSAddrs: dnsAddrs,
<mask> DNSPort: config.DNS.Port,
<mask> HTTPPort: config.BindPort,
<mask> IsRunning: isRunning(),
<mask> Version: version.Version(),
<mask> Language: config.Language,
<mask> }
<mask>
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/5acae6e204ab3f5d92449c1231dee754c1db9abb | internal/home/control.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.