text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```go
package home
import (
"bytes"
"encoding/binary"
"io"
"net"
"net/http"
"os"
"time"
"github.com/AdguardTeam/golibs/ioutil"
"github.com/AdguardTeam/golibs/log"
"github.com/josharian/native"
)
// GLMode - enable GL-Inet compatibility mode
var GLMode bool
var glFilePrefix = "/tmp/gl_token_"
const (
glT... | /content/code_sandbox/internal/home/authglinet.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 617 |
```go
//go:build openbsd
package home
import (
"cmp"
"fmt"
"os"
"os/signal"
"path/filepath"
"strings"
"syscall"
"text/template"
"github.com/AdguardTeam/AdGuardHome/internal/aghos"
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/log"
"github.com/kardianos/service"
)
// OpenBSD Servi... | /content/code_sandbox/internal/home/service_openbsd.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 2,930 |
```go
package home
import (
"cmp"
"fmt"
"log/slog"
"path/filepath"
"runtime"
"github.com/AdguardTeam/AdGuardHome/internal/aghos"
"github.com/AdguardTeam/golibs/log"
"github.com/AdguardTeam/golibs/logutil/slogutil"
"gopkg.in/natefinch/lumberjack.v2"
"gopkg.in/yaml.v3"
)
// configSyslog is used to indicate t... | /content/code_sandbox/internal/home/log.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 859 |
```go
package home
import (
"net/http"
"net/netip"
"net/textproto"
"net/url"
"path/filepath"
"testing"
"github.com/AdguardTeam/golibs/httphdr"
"github.com/AdguardTeam/golibs/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// implements http.ResponseWriter
type testRes... | /content/code_sandbox/internal/home/authhttp_internal_test.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 1,265 |
```go
package home
import (
"encoding/json"
"fmt"
"net/http"
"net/netip"
"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/AdGuardHome/internal/client"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardT... | /content/code_sandbox/internal/home/clientshttp.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 3,656 |
```go
package home
import (
"encoding/json"
"net/http"
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/golibs/container"
"github.com/AdguardTeam/golibs/log"
)
// TODO(a.garipov): Get rid of a global or generate from .twosky.json.
var allowedLanguages = container.NewMapSet(
"ar",
... | /content/code_sandbox/internal/home/i18n.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 523 |
```go
package home
import (
"io"
"net/http"
"net/http/httptest"
"strings"
"testing"
"github.com/AdguardTeam/golibs/ioutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestLimitRequestBody(t *testing.T) {
errReqLimitReached := &ioutil.LimitError{
Limit: defaultReqBodyS... | /content/code_sandbox/internal/home/middlewares_test.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 419 |
```go
package home
import (
"bytes"
"crypto/rand"
"encoding/hex"
"path/filepath"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewSessionToken(t *testing.T) {
// Successful case.
token, err := newSessionToken()
require.NoError(t, err)
assert.Len(t,... | /content/code_sandbox/internal/home/auth_internal_test.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 591 |
```go
package home
import (
"fmt"
"net/netip"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func testParseOK(t *testing.T, ss ...string) options {
t.Helper()
o, _, err := parseCmdOpts("", ss)
require.NoError(t, err)
return o
}
func testParseErr(t *testing.T, descr... | /content/code_sandbox/internal/home/options_test.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 2,342 |
```go
package home
import (
"encoding/hex"
"encoding/json"
"fmt"
"net/http"
"net/netip"
"path"
"strconv"
"strings"
"time"
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/httphdr"
"github.com/AdguardTeam/golibs/log"
"github.com/A... | /content/code_sandbox/internal/home/authhttp.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 2,514 |
```go
package home
import (
"encoding/json"
"fmt"
"net/http"
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/golibs/log"
)
// Theme is an enum of all allowed UI themes.
type Theme string
// Allowed [Theme] values.
//
// Keep in sync with client/src/helpers/constants.ts.
const (
T... | /content/code_sandbox/internal/home/profilehttp.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 587 |
```go
package home
import (
"fmt"
"net/http"
"net/netip"
"net/url"
"runtime"
"strings"
"time"
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/AdGuardHome/internal/aghnet"
"github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/AdGuardHome/internal/vers... | /content/code_sandbox/internal/home/control.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 3,299 |
```go
package home
import (
"io"
"net/http"
"github.com/AdguardTeam/golibs/ioutil"
"github.com/c2h5oh/datasize"
)
// middlerware is a wrapper function signature.
type middleware func(http.Handler) http.Handler
// withMiddlewares consequently wraps h with all the middlewares.
//
// TODO(e.burkov): Use [httputil... | /content/code_sandbox/internal/home/middlewares.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 492 |
```go
package home
import (
"bytes"
"fmt"
"net/netip"
"os"
"path/filepath"
"sync"
"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
"github.com/AdguardTeam/AdGuardHome/internal/aghtls"
"github.com/AdguardTeam/AdGuardHome/internal/configmigrate"
"github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
"github... | /content/code_sandbox/internal/home/config.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 6,129 |
```go
package home
import (
"net"
"net/netip"
"runtime"
"testing"
"time"
"github.com/AdguardTeam/AdGuardHome/internal/client"
"github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
"github.com/AdguardTeam/AdGuardHome/internal/dhcpsvc"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardT... | /content/code_sandbox/internal/home/clients_internal_test.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 3,062 |
```go
// Package version contains AdGuard Home version information.
package version
import (
"fmt"
"runtime"
"runtime/debug"
"strconv"
"strings"
"time"
"github.com/AdguardTeam/golibs/stringutil"
)
// Channel constants.
const (
ChannelBeta = "beta"
ChannelCandidate = "candidate"
ChannelDevelopment ... | /content/code_sandbox/internal/version/version.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 1,294 |
```go
//go:build race
package version
const isRace = true
``` | /content/code_sandbox/internal/version/race.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 16 |
```go
//go:build !race
package version
const isRace = false
``` | /content/code_sandbox/internal/version/norace.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 17 |
```go
package configmigrate
import (
"fmt"
"golang.org/x/crypto/bcrypt"
)
// migrateTo5 performs the following changes:
//
// # BEFORE:
// 'schema_version': 4
// 'auth_name':
// 'auth_pass':
// #
//
// # AFTER:
// 'schema_version': 5
// 'users':
// - 'name':
// 'password': <hashed>
// #
func migrateTo5(disk... | /content/code_sandbox/internal/configmigrate/v5.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 260 |
```go
package configmigrate
import (
"os"
"path/filepath"
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/log"
)
// migrateTo2 performs the following changes:
//
// # BEFORE:
// 'schema_version': 1
// 'coredns':
// #
//
// # AFTER:
// 'schema_version': 2
// 'dns':
// #
//
// It also d... | /content/code_sandbox/internal/configmigrate/v2.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 241 |
```go
package configmigrate
import (
"fmt"
"net/url"
"strconv"
"strings"
"github.com/AdguardTeam/golibs/netutil"
)
// migrateTo10 performs the following changes:
//
// # BEFORE:
// 'schema_version': 9
// 'dns':
// 'upstream_dns':
// - 'quic://some-upstream.com'
// 'local_ptr_upstreams':
// - 'quic://s... | /content/code_sandbox/internal/configmigrate/v10.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 750 |
```go
package configmigrate
import (
"fmt"
)
type (
// yarr is the convenience alias for YAML array.
yarr = []any
// yobj is the convenience alias for YAML key-value object.
yobj = map[string]any
)
// fieldVal returns the value of type T for key from obj. Use [any] if the
// field's type doesn't matter.
func ... | /content/code_sandbox/internal/configmigrate/yaml.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 330 |
```go
package configmigrate
// migrateTo11 performs the following changes:
//
// # BEFORE:
// 'schema_version': 10
// 'rlimit_nofile': 42
// #
//
// # AFTER:
// 'schema_version': 11
// 'os':
// 'group': ''
// 'rlimit_nofile': 42
// 'user': ''
// #
func migrateTo11(diskConf yobj) (err error) {
diskConf["schema... | /content/code_sandbox/internal/configmigrate/v11.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 199 |
```go
package configmigrate
import (
"bytes"
"fmt"
"github.com/AdguardTeam/golibs/log"
yaml "gopkg.in/yaml.v3"
)
// Config is a the configuration for initializing a [Migrator].
type Config struct {
// WorkingDir is an absolute path to the working directory of AdGuardHome.
WorkingDir string
}
// Migrator perfo... | /content/code_sandbox/internal/configmigrate/migrator.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 1,081 |
```go
package configmigrate
// migrateTo25 performs the following changes:
//
// # BEFORE:
// 'schema_version': 24
// 'debug_pprof': true
// #
//
// # AFTER:
// 'schema_version': 25
// 'http':
// 'pprof':
// 'enabled': true
// 'port': 6060
// #
func migrateTo25(diskConf yobj) (err error) {
diskConf["schem... | /content/code_sandbox/internal/configmigrate/v25.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 217 |
```go
package configmigrate
// migrateTo18 performs the following changes:
//
// # BEFORE:
// 'schema_version': 17
// 'dns':
// 'safesearch_enabled': true
// #
// #
//
// # AFTER:
// 'schema_version': 18
// 'dns':
// 'safe_search':
// 'enabled': true
// 'bing': true
// 'duckduckgo': true
// 'go... | /content/code_sandbox/internal/configmigrate/v18.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 295 |
```go
package configmigrate
// migrateTo17 performs the following changes:
//
// # BEFORE:
// 'schema_version': 16
// 'dns':
// 'edns_client_subnet': false
// #
// #
//
// # AFTER:
// 'schema_version': 17
// 'dns':
// 'edns_client_subnet':
// 'enabled': false
// 'use_custom': false
// 'custom_ip': ... | /content/code_sandbox/internal/configmigrate/v17.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 226 |
```go
package configmigrate
import "fmt"
// migrateTo6 performs the following changes:
//
// # BEFORE:
// 'schema_version': 5
// 'clients':
// - #
// 'ip': '127.0.0.1'
// 'mac': 'AA:AA:AA:AA:AA:AA'
// #
// #
//
// # AFTER:
// 'schema_version': 6
// 'clients':
// - #
// 'ip': '127.0.0.1'
// 'mac': ... | /content/code_sandbox/internal/configmigrate/v6.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 390 |
```go
package configmigrate
import (
"fmt"
)
// migrateTo22 performs the following changes:
//
// # BEFORE:
// 'schema_version': 21
// 'persistent':
// - 'name': 'client_name'
// 'blocked_services':
// - 'svc_name'
// - #
// #
// #
// #
//
// # AFTER:
// 'schema_version': 22
// 'persistent':
... | /content/code_sandbox/internal/configmigrate/v22.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 406 |
```go
package configmigrate_test
import (
"io/fs"
"os"
"path"
"testing"
"github.com/AdguardTeam/AdGuardHome/internal/configmigrate"
"github.com/AdguardTeam/golibs/testutil"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/bcrypt"
yaml "gopkg.in/yaml.v3"
)
func TestMain(m *testing.M) {
testutil.Di... | /content/code_sandbox/internal/configmigrate/migrator_test.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 1,643 |
```go
package configmigrate
// migrateTo3 performs the following changes:
//
// # BEFORE:
// 'schema_version': 2
// 'dns':
// 'bootstrap_dns': '1.1.1.1'
// #
//
// # AFTER:
// 'schema_version': 3
// 'dns':
// 'bootstrap_dns':
// - '1.1.1.1'
// #
func migrateTo3(diskConf yobj) (err error) {
diskConf["schem... | /content/code_sandbox/internal/configmigrate/v3.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 195 |
```go
package configmigrate
// migrateTo27 performs the following changes:
//
// # BEFORE:
// 'querylog':
// 'ignored':
// - '.'
// - #
// #
// 'statistics':
// 'ignored':
// - '.'
// - #
// #
// #
//
// # AFTER:
// 'querylog':
// 'ignored':
// - '|.^'
// - #
// #
// 'statistics':
// '... | /content/code_sandbox/internal/configmigrate/v27.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 397 |
```go
package configmigrate
// migrateTo13 performs the following changes:
//
// # BEFORE:
// 'schema_version': 12
// 'dns':
// 'local_domain_name': 'lan'
// #
// #
//
// # AFTER:
// 'schema_version': 13
// 'dhcp':
// 'local_domain_name': 'lan'
// #
// #
func migrateTo13(diskConf yobj) (err error) {
diskC... | /content/code_sandbox/internal/configmigrate/v13.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 189 |
```go
package configmigrate
import "github.com/AdguardTeam/golibs/errors"
// migrateTo24 performs the following changes:
//
// # BEFORE:
// 'schema_version': 23
// 'log_file': ""
// 'log_max_backups': 0
// 'log_max_size': 100
// 'log_max_age': 3
// 'log_compress': false
// 'log_localtime': false
// 'verbose': false
/... | /content/code_sandbox/internal/configmigrate/v24.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 421 |
```go
package configmigrate
// migrateTo14 performs the following changes:
//
// # BEFORE:
// 'schema_version': 13
// 'dns':
// 'resolve_clients': true
// #
// 'clients':
// - 'name': 'client-name'
// #
// #
//
// # AFTER:
// 'schema_version': 14
// 'dns':
// #
// 'clients':
// 'persistent':
// - 'name... | /content/code_sandbox/internal/configmigrate/v14.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 373 |
```go
package configmigrate
import "github.com/AdguardTeam/golibs/errors"
// migrateTo15 performs the following changes:
//
// # BEFORE:
// 'schema_version': 14
// 'dns':
// #
// 'querylog_enabled': true
// 'querylog_file_enabled': true
// 'querylog_interval': '2160h'
// 'querylog_size_memory': 1000
// 'qu... | /content/code_sandbox/internal/configmigrate/v15.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 396 |
```go
package configmigrate
import (
"os"
"path/filepath"
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/log"
)
// migrateTo1 performs the following changes:
//
// # BEFORE:
// #
//
// # AFTER:
// 'schema_version': 1
// #
//
// It also deletes the unused dnsfilter.txt file, since the fol... | /content/code_sandbox/internal/configmigrate/v1.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 219 |
```go
package configmigrate
import (
"github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
)
// migrateTo28 performs the following changes:
//
// # BEFORE:
// 'dns':
// 'all_servers': true
// 'fastest_addr': true
// #
// #
//
// # AFTER:
// 'dns':
// 'upstream_mode': 'parallel'
// #
// #
func migrat... | /content/code_sandbox/internal/configmigrate/v28.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 292 |
```go
package configmigrate
// migrateTo21 performs the following changes:
//
// # BEFORE:
// 'schema_version': 20
// 'dns':
// 'blocked_services':
// - 'svc_name'
// - #
// #
// #
//
// # AFTER:
// 'schema_version': 21
// 'dns':
// 'blocked_services':
// 'ids':
// - 'svc_name'
// - #
// ... | /content/code_sandbox/internal/configmigrate/v21.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 255 |
```go
package configmigrate
// migrateTo16 performs the following changes:
//
// # BEFORE:
// 'schema_version': 15
// 'dns':
// #
// 'statistics_interval': 1
// 'statistics':
// #
// #
//
// # AFTER:
// 'schema_version': 16
// 'dns':
// #
// 'statistics':
// 'enabled': true
// 'interval': 1
// 'ignor... | /content/code_sandbox/internal/configmigrate/v16.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 430 |
```go
package configmigrate
import (
"time"
"github.com/AdguardTeam/golibs/timeutil"
)
// migrateTo20 performs the following changes:
//
// # BEFORE:
// 'schema_version': 19
// 'statistics':
// 'interval': 1
// #
// #
//
// # AFTER:
// 'schema_version': 20
// 'statistics':
// 'interval': 24h
// #
// #
... | /content/code_sandbox/internal/configmigrate/v20.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 240 |
```go
package configmigrate
// migrateTo9 performs the following changes:
//
// # BEFORE:
// 'schema_version': 8
// 'dns':
// 'autohost_tld': 'lan'
// #
// #
//
// # AFTER:
// 'schema_version': 9
// 'dns':
// 'local_domain_name': 'lan'
// #
// #
func migrateTo9(diskConf yobj) (err error) {
diskConf["schem... | /content/code_sandbox/internal/configmigrate/v9.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 167 |
```go
package configmigrate
import (
"fmt"
"net/netip"
"time"
"github.com/AdguardTeam/golibs/timeutil"
)
// migrateTo23 performs the following changes:
//
// # BEFORE:
// 'schema_version': 22
// 'bind_host': '1.2.3.4'
// 'bind_port': 8080
// 'web_session_ttl': 720
// #
//
// # AFTER:
// 'schema_version': 23
// ... | /content/code_sandbox/internal/configmigrate/v23.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 387 |
```go
package configmigrate
// migrateTo4 performs the following changes:
//
// # BEFORE:
// 'schema_version': 3
// 'clients':
// - #
// #
//
// # AFTER:
// 'schema_version': 4
// 'clients':
// - 'use_global_blocked_services': true
// #
// #
func migrateTo4(diskConf yobj) (err error) {
diskConf["schema_version"... | /content/code_sandbox/internal/configmigrate/v4.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 179 |
```go
package configmigrate
import "github.com/AdguardTeam/golibs/errors"
// migrateTo26 performs the following changes:
//
// # BEFORE:
// 'schema_version': 25
// 'dns':
// 'filtering_enabled': true
// 'filters_update_interval': 24
// 'parental_enabled': false
// 'safebrowsing_enabled': false
// 'safebrows... | /content/code_sandbox/internal/configmigrate/v26.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 1,081 |
```go
// Package configmigrate provides a way to upgrade the YAML configuration file.
package configmigrate
// LastSchemaVersion is the most recent schema version.
const LastSchemaVersion uint = 28
``` | /content/code_sandbox/internal/configmigrate/configmigrate.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 41 |
```go
package configmigrate
import "github.com/AdguardTeam/golibs/log"
// migrateTo19 performs the following changes:
//
// # BEFORE:
// 'schema_version': 18
// 'clients':
// 'persistent':
// - 'name': 'client-name'
// 'safesearch_enabled': true
// #
// #
// #
//
// # AFTER:
// 'schema_version': 19
/... | /content/code_sandbox/internal/configmigrate/v19.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 442 |
```go
package configmigrate
import "github.com/AdguardTeam/golibs/errors"
// migrateTo7 performs the following changes:
//
// # BEFORE:
// 'schema_version': 6
// 'dhcp':
// 'enabled': false
// 'interface_name': vboxnet0
// 'gateway_ip': '192.168.56.1'
// 'subnet_mask': '255.255.255.0'
// 'range_start': '192... | /content/code_sandbox/internal/configmigrate/v7.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 475 |
```go
package configmigrate
// migrateTo8 performs the following changes:
//
// # BEFORE:
// 'schema_version': 7
// 'dns':
// 'bind_host': '127.0.0.1'
// #
// #
//
// # AFTER:
// 'schema_version': 8
// 'dns':
// 'bind_hosts':
// - '127.0.0.1'
// #
// #
func migrateTo8(diskConf yobj) (err error) {
diskCo... | /content/code_sandbox/internal/configmigrate/v8.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 211 |
```go
package configmigrate
import (
"time"
"github.com/AdguardTeam/golibs/timeutil"
)
// migrateTo12 performs the following changes:
//
// # BEFORE:
// 'schema_version': 11
// 'querylog_interval': 90
// #
//
// # AFTER:
// 'schema_version': 12
// 'querylog_interval': '2160h'
// #
func migrateTo12(diskConf yobj)... | /content/code_sandbox/internal/configmigrate/v12.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 241 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v21/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 662 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v21/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 674 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: true
... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v5/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 303 |
```go
package configmigrate
import (
"testing"
"time"
"github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardTeam/golibs/testutil"
"github.com/AdguardTeam/golibs/timeutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/tes... | /content/code_sandbox/internal/configmigrate/migrations_internal_test.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 11,767 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: ... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v5/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 305 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v15/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 527 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v15/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 526 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
local_domain_name: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensiti... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v11/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 451 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
local_domain_name: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensiti... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v11/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 462 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
autohost_tld: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity:... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v9/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 429 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
local_domain_name: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensiti... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v9/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 428 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
local_domain_name: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensiti... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v12/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 470 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
local_domain_name: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensiti... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v12/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 471 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v19/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 609 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v19/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 651 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v22/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 684 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: true
... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v3/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 235 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v22/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 696 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: true
... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v3/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 237 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: ... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v7/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 388 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: ... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v7/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 393 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
local_domain_name: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensiti... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v10/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 441 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
local_domain_name: local
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensiti... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v10/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 443 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
coredns:
bind_host: 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 1... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v2/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 249 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
dns:
bind_host: 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v2/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 248 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v17/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 551 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v17/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 567 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: true
... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v4/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 295 |
```yaml
http:
address: 127.0.0.1:3000
session_ttl: 3h
debug_pprof: true
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckdu... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v25/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 752 |
```yaml
http:
address: 127.0.0.1:3000
session_ttl: 3h
pprof:
enabled: true
port: 6060
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bin... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v25/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 762 |
```yaml
http:
address: 127.0.0.1:3000
session_ttl: 3h
pprof:
enabled: true
port: 6060
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
parental_sensitivity: 0
upstream_dns:
- tls://1.1.1.1
- tls://1.0.0.1
- quic://8.8.8.8:784
bootstrap_dns:
- 8.8.8... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v27/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 773 |
```yaml
http:
address: 127.0.0.1:3000
session_ttl: 3h
pprof:
enabled: true
port: 6060
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
parental_sensitivity: 0
upstream_dns:
- tls://1.1.1.1
- tls://1.0.0.1
- quic://8.8.8.8:784
bootstrap_dns:
- 8.8.8... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v27/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 771 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v14/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 477 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v14/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 509 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: ... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v6/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 316 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v18/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 609 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: ... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v6/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 344 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_host: 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: ... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v8/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 419 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v8/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 421 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
web_session_ttl: 3
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v23/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 703 |
```yaml
http:
address: 127.0.0.1:3000
session_ttl: 3h
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
goo... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v23/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 702 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
google: true... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v20/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 652 |
```yaml
http:
address: 127.0.0.1:3000
session_ttl: 3h
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
goo... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v24/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 743 |
```yaml
http:
address: 127.0.0.1:3000
session_ttl: 3h
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safe_search:
enabled: false
bing: true
duckduckgo: true
goo... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v24/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 746 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
coredns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: t... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v1/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 215 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
auth_name: testuser
auth_pass: testpassword
coredns:
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_ttl: 10
querylog_enabled: t... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v1/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 221 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v16/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 543 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v16/input.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 533 |
```yaml
bind_host: 127.0.0.1
bind_port: 3000
users:
- name: testuser
password: testpassword
dns:
bind_hosts:
- 127.0.0.1
port: 53
protection_enabled: true
filtering_enabled: true
safebrowsing_enabled: false
safesearch_enabled: false
parental_enabled: false
parental_sensitivity: 0
blocked_response_... | /content/code_sandbox/internal/configmigrate/testdata/TestMigrateConfig_Migrate/v13/output.yml | yaml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 471 |
```go
// Package ipset provides ipset functionality.
package ipset
import (
"net"
)
// Manager is the ipset manager interface.
//
// TODO(a.garipov): Perhaps generalize this into some kind of a NetFilter type,
// since ipset is exclusive to Linux?
type Manager interface {
Add(host string, ip4s, ip6s []net.IP) (n in... | /content/code_sandbox/internal/ipset/ipset.go | go | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 247 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.