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 |
|---|---|---|---|---|
// handleUpdate performs an update to the latest available version procedure. | <mask> httpError(w, http.StatusInternalServerError, "Couldn't write body: %s", err)
<mask> }
<mask> }
<mask>
<mask> // Perform an update procedure to the latest available version
<mask> func handleUpdate(w http.ResponseWriter, _ *http.Request) {
<mask> if Context.updater.NewVersion() == "" {
<mask> httpE... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/controlupdate.go |
// The background context is used because the underlying functions wrap
// it with timeout and shut down the server, which handles current
// request. It also should be done in a separate goroutine due to the
// same reason.
go func() {
finishUpdate(context.Background())
}() | <mask> if f, ok := w.(http.Flusher); ok {
<mask> f.Flush()
<mask> }
<mask>
<mask> go finishUpdate()
<mask> }
<mask>
<mask> // versionResponse is the response for /control/version.json endpoint.
<mask> type versionResponse struct {
<mask> Disabled bool `json:"disabled"`
</s> Pull request: 2552 rm cont... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/controlupdate.go |
// finishUpdate completes an update procedure.
func finishUpdate(ctx context.Context) { | <mask> vr.CanAutoUpdate = &canUpdate
<mask> }
<mask> }
<mask>
<mask> // Complete an update procedure
<mask> func finishUpdate() {
<mask> log.Info("Stopping all tasks")
<mask> cleanup()
<mask> cleanupAlways()
<mask>
<mask> exeName := "AdGuardHome"
</s> Pull request: 2552 rm context.TODO() instances
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/controlupdate.go |
cleanup(ctx) | <mask>
<mask> // Complete an update procedure
<mask> func finishUpdate() {
<mask> log.Info("Stopping all tasks")
<mask> cleanup()
<mask> cleanupAlways()
<mask>
<mask> exeName := "AdGuardHome"
<mask> if runtime.GOOS == "windows" {
<mask> exeName = "AdGuardHome.exe"
</s> Pull request: 2552 rm context.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/controlupdate.go |
cleanup(context.Background()) | <mask> Context.clients.Reload()
<mask> Context.tls.Reload()
<mask>
<mask> default:
<mask> cleanup()
<mask> cleanupAlways()
<mask> os.Exit(0)
<mask> }
<mask> }
<mask> }()
</s> Pull request: 2552 rm context.TODO() instances
Merge in DNS/adguard-home from 2552-context to master
C... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/home.go |
// StartMods initializes and starts the DNS server after installation. | <mask> // wait indefinitely for other go-routines to complete their job
<mask> select {}
<mask> }
<mask>
<mask> // StartMods - initialize and start DNS after installation
<mask> func StartMods() error {
<mask> err := initDNSServer()
<mask> if err != nil {
<mask> return err
<mask> }
</s> Pull request:... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/home.go |
// cleanup stops and resets all the modules.
func cleanup(ctx context.Context) { | <mask> })
<mask> }
<mask> }
<mask>
<mask> func cleanup() {
<mask> log.Info("Stopping AdGuard Home")
<mask>
<mask> if Context.web != nil {
<mask> Context.web.Close()
<mask> Context.web = nil
</s> Pull request: 2552 rm context.TODO() instances
Merge in DNS/adguard-home from 2552-context to master
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/home.go |
Context.web.Close(ctx) | <mask> func cleanup() {
<mask> log.Info("Stopping AdGuard Home")
<mask>
<mask> if Context.web != nil {
<mask> Context.web.Close()
<mask> Context.web = nil
<mask> }
<mask> if Context.auth != nil {
<mask> Context.auth.Close()
<mask> Context.auth = nil
</s> Pull request: 2552 rm context.TODO() inst... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/home.go |
cleanup(context.Background()) | <mask> }
<mask> time.Sleep(1 * time.Second)
<mask> }
<mask>
<mask> cleanup()
<mask> cleanupAlways()
<mask> }
</s> Pull request: 2552 rm context.TODO() instances
Merge in DNS/adguard-home from 2552-context to master
Closes #2552.
Squashed commit of the following:
commit 3d1cef33da529f4611869c4a0f2f29... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/home_test.go |
"context" | <mask>
<mask> import (
<mask> "crypto"
<mask> "crypto/ecdsa"
<mask> "crypto/rsa"
<mask> "crypto/tls"
<mask> "crypto/x509"
</s> Pull request: 2552 rm context.TODO() instances
Merge in DNS/adguard-home from 2552-context to master
Closes #2552.
Squashed commit of the following:
commit 3d1cef33da529f46118... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/tls.go |
// Start updates the configuration of TLSMod and starts it. | <mask> }
<mask> t.certLastMod = fi.ModTime().UTC()
<mask> }
<mask>
<mask> // Start - start the module
<mask> func (t *TLSMod) Start() {
<mask> if !tlsWebHandlersRegistered {
<mask> tlsWebHandlersRegistered = true
<mask> t.registerWebHandlers()
<mask> }
</s> Pull request: 2552 rm context.TODO() insta... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/tls.go |
// The background context is used because the TLSConfigChanged wraps
// context with timeout on its own and shuts down the server, which
// handles current request.
Context.web.TLSConfigChanged(context.Background(), tlsConf) | <mask>
<mask> t.confLock.Lock()
<mask> tlsConf := t.conf
<mask> t.confLock.Unlock()
<mask> Context.web.TLSConfigChanged(tlsConf)
<mask> }
<mask>
<mask> // Reload - reload certificate file
<mask> func (t *TLSMod) Reload() {
<mask> t.confLock.Lock()
</s> Pull request: 2552 rm context.TODO() instances
M... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/tls.go |
// Reload updates the configuration of TLSMod and restarts it. | <mask> t.confLock.Unlock()
<mask> Context.web.TLSConfigChanged(tlsConf)
<mask> }
<mask>
<mask> // Reload - reload certificate file
<mask> func (t *TLSMod) Reload() {
<mask> t.confLock.Lock()
<mask> tlsConf := t.conf
<mask> t.confLock.Unlock()
<mask>
</s> Pull request: 2552 rm context.TODO() instances
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/tls.go |
// The background context is used because the TLSConfigChanged wraps
// context with timeout on its own and shuts down the server, which
// handles current request.
Context.web.TLSConfigChanged(context.Background(), tlsConf) | <mask>
<mask> t.confLock.Lock()
<mask> tlsConf = t.conf
<mask> t.confLock.Unlock()
<mask> Context.web.TLSConfigChanged(tlsConf)
<mask> }
<mask>
<mask> // Set certificate and private key data
<mask> func tlsLoadConfig(tls *tlsConfigSettings, status *tlsConfigStatus) bool {
<mask> tls.CertificateChainDat... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/tls.go |
// The background context is used because the TLSConfigChanged wraps
// context with timeout on its own and shuts down the server, which
// handles current request. It is also should be done in a separate
// goroutine due to the same reason. | <mask> if f, ok := w.(http.Flusher); ok {
<mask> f.Flush()
<mask> }
<mask>
<mask> // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block
<mask> // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely
<mask> if re... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/tls.go |
Context.web.TLSConfigChanged(context.Background(), data) | <mask> // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block
<mask> // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely
<mask> if restartHTTPS {
<mask> go func() {
<mask> Context.web.TLSConfigChanged(data)
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/tls.go |
// TLSConfigChanged updates the TLS configuration and restarts the HTTPS server
// if necessary.
func (web *Web) TLSConfigChanged(ctx context.Context, tlsConf tlsConfigSettings) { | <mask> }
<mask> return true
<mask> }
<mask>
<mask> // TLSConfigChanged - called when TLS configuration has changed
<mask> func (web *Web) TLSConfigChanged(tlsConf tlsConfigSettings) {
<mask> log.Debug("Web: applying new TLS configuration")
<mask> web.conf.PortHTTPS = tlsConf.PortHTTPS
<mask> web.forceHTT... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/web.go |
ctx, cancel := context.WithTimeout(ctx, shutdownTimeout)
err = web.httpsServer.server.Shutdown(ctx)
cancel()
if err != nil {
log.Debug("error while shutting down HTTP server: %s", err)
} | <mask> }
<mask>
<mask> web.httpsServer.cond.L.Lock()
<mask> if web.httpsServer.server != nil {
<mask> _ = web.httpsServer.server.Shutdown(context.TODO())
<mask> }
<mask> web.httpsServer.enabled = enabled
<mask> web.httpsServer.cert = cert
<mask> web.httpsServer.cond.Broadcast()
<mask> web.httpsServ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/web.go |
// Close gracefully shuts down the HTTP servers.
func (web *Web) Close(ctx context.Context) { | <mask> // We use ErrServerClosed as a sign that we need to rebind on new address, so go back to the start of the loop
<mask> }
<mask> }
<mask>
<mask> // Close - stop HTTP server, possibly waiting for all active connections to be closed
<mask> func (web *Web) Close() {
<mask> log.Info("Stopping HTTP server..... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/web.go |
shut := func(srv *http.Server) {
if srv == nil {
return
}
ctx, cancel := context.WithTimeout(ctx, shutdownTimeout)
defer cancel()
if err := srv.Shutdown(ctx); err != nil {
log.Debug("error while shutting down HTTP server: %s", err)
} | <mask> log.Info("Stopping HTTP server...")
<mask> web.httpsServer.cond.L.Lock()
<mask> web.httpsServer.shutdown = true
<mask> web.httpsServer.cond.L.Unlock()
<mask> if web.httpsServer.server != nil {
<mask> _ = web.httpsServer.server.Shutdown(context.TODO())
<mask> }
<mask> if web.httpServer != nil {
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/web.go |
shut(web.httpsServer.server)
shut(web.httpServer)
shut(web.httpServerBeta)
| <mask> }
<mask>
<mask> log.Info("Stopped HTTP server")
<mask> }
<mask>
<mask> func (web *Web) tlsServerLoop() {
<mask> for {
<mask> web.httpsServer.cond.L.Lock()
</s> Pull request: 2552 rm context.TODO() instances
Merge in DNS/adguard-home from 2552-context to master
Closes #2552.
Squashed commit of ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/web.go |
// initWhois creates the Whois module context. | <mask> // If IP address couldn't be resolved, it stays here for some time to prevent further attempts to resolve the same IP.
<mask> ipAddrs cache.Cache
<mask> }
<mask>
<mask> // Create module context
<mask> func initWhois(clients *clientsContainer) *Whois {
<mask> w := Whois{}
<mask> w.timeoutMsec = 5000
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
w := Whois{
timeoutMsec: 5000,
clients: clients,
ipAddrs: cache.New(cache.Config{
EnableLRU: true,
MaxCount: 10000,
}),
ipChan: make(chan net.IP, 255),
} | <mask> }
<mask>
<mask> // Create module context
<mask> func initWhois(clients *clientsContainer) *Whois {
<mask> w := Whois{}
<mask> w.timeoutMsec = 5000
<mask> w.clients = clients
<mask>
<mask> cconf := cache.Config{}
<mask> cconf.EnableLRU = true
<mask> cconf.MaxCount = 10000
<mask> w.ipAddrs = c... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
<mask> cconf.EnableLRU = true
<mask> cconf.MaxCount = 10000
<mask> w.ipAddrs = cache.New(cconf)
<mask>
<mask> w.ipChan = make(chan net.IP, 255)
<mask> go w.workerLoop()
<mask> return &w
<mask> }
<mask>
<mask> // If the value is too large - cut it and append "..."
</s> Pull request: 2552 rm context.TO... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go | |
func (w *Whois) query(ctx context.Context, target, serverAddr string) (string, error) { | <mask> // MaxConnReadSize is an upper limit in bytes for reading from net.Conn.
<mask> const MaxConnReadSize = 64 * 1024
<mask>
<mask> // Send request to a server and receive the response
<mask> func (w *Whois) query(target, serverAddr string) (string, error) {
<mask> addr, _, _ := net.SplitHostPort(serverAddr)... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
conn, err := customDialContext(ctx, "tcp", serverAddr) | <mask> addr, _, _ := net.SplitHostPort(serverAddr)
<mask> if addr == "whois.arin.net" {
<mask> target = "n + " + target
<mask> }
<mask> conn, err := customDialContext(context.TODO(), "tcp", serverAddr)
<mask> if err != nil {
<mask> return "", err
<mask> }
<mask> defer conn.Close()
<mask>
</s> Pul... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
func (w *Whois) queryAll(ctx context.Context, target string) (string, error) { | <mask> return string(data), nil
<mask> }
<mask>
<mask> // Query WHOIS servers (handle redirects)
<mask> func (w *Whois) queryAll(target string) (string, error) {
<mask> server := net.JoinHostPort(defaultServer, defaultPort)
<mask> const maxRedirects = 5
<mask> for i := 0; i != maxRedirects; i++ {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
resp, err := w.query(ctx, target, server) | <mask> func (w *Whois) queryAll(target string) (string, error) {
<mask> server := net.JoinHostPort(defaultServer, defaultPort)
<mask> const maxRedirects = 5
<mask> for i := 0; i != maxRedirects; i++ {
<mask> resp, err := w.query(target, server)
<mask> if err != nil {
<mask> return "", err
<mask> }
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
func (w *Whois) process(ctx context.Context, ip net.IP) [][]string { | <mask> return "", fmt.Errorf("whois: redirect loop")
<mask> }
<mask>
<mask> // Request WHOIS information
<mask> func (w *Whois) process(ip net.IP) [][]string {
<mask> data := [][]string{}
<mask> resp, err := w.queryAll(ip.String())
<mask> if err != nil {
<mask> log.Debug("Whois: error: %s IP:%s", err, ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
resp, err := w.queryAll(ctx, ip.String()) | <mask>
<mask> // Request WHOIS information
<mask> func (w *Whois) process(ip net.IP) [][]string {
<mask> data := [][]string{}
<mask> resp, err := w.queryAll(ip.String())
<mask> if err != nil {
<mask> log.Debug("Whois: error: %s IP:%s", err, ip)
<mask> return data
<mask> }
<mask>
</s> Pull request:... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
// workerLoop processes the IP addresses it got from the channel and associates
// the retrieving WHOIS info with a client. | <mask> log.Debug("Whois: queue is full")
<mask> }
<mask> }
<mask>
<mask> // Get IP address from channel; get WHOIS info; associate info with a client
<mask> func (w *Whois) workerLoop() {
<mask> for {
<mask> ip := <-w.ipChan
<mask>
<mask> info := w.process(ip)
</s> Pull request: 2552 rm context.TOD... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
info := w.process(context.Background(), ip) | <mask> func (w *Whois) workerLoop() {
<mask> for {
<mask> ip := <-w.ipChan
<mask>
<mask> info := w.process(ip)
<mask> if len(info) == 0 {
<mask> continue
<mask> }
<mask>
<mask> w.clients.SetWhoisInfo(ip, info)
</s> Pull request: 2552 rm context.TODO() instances
Merge in DNS/adguard-home from... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois.go |
"context" | <mask> package home
<mask>
<mask> import (
<mask> "testing"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
<mask> "github.com/stretchr/testify/assert"
</s> Pull request: 2552 rm context.TODO() instances
Merge in DNS/adguard-home from 2552-context to master
Closes #2552.
Squashed ... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois_test.go |
resp, err := w.queryAll(context.Background(), "8.8.8.8") | <mask> func TestWhois(t *testing.T) {
<mask> assert.Nil(t, prepareTestDNSServer())
<mask>
<mask> w := Whois{timeoutMsec: 5000}
<mask> resp, err := w.queryAll("8.8.8.8")
<mask> assert.Nil(t, err)
<mask> m := whoisParse(resp)
<mask> assert.Equal(t, "Google LLC", m["orgname"])
<mask> assert.Equal(t, "US",... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c215b820046e6da5fd50c06149c904cd509066c8 | internal/home/whois_test.go |
github.com/AdguardTeam/dnsproxy v0.37.1 | <mask>
<mask> go 1.15
<mask>
<mask> require (
<mask> github.com/AdguardTeam/dnsproxy v0.35.5
<mask> github.com/AdguardTeam/golibs v0.4.5
<mask> github.com/AdguardTeam/urlfilter v0.14.4
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/ameshkov/dnscrypt/v2 v2.0.3
<mask> github.com/digineo/... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.mod |
github.com/ameshkov/dnscrypt/v2 v2.1.3 | <mask> github.com/AdguardTeam/dnsproxy v0.35.5
<mask> github.com/AdguardTeam/golibs v0.4.5
<mask> github.com/AdguardTeam/urlfilter v0.14.4
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/ameshkov/dnscrypt/v2 v2.0.3
<mask> github.com/digineo/go-ipset/v2 v2.2.1
<mask> github.com/fsnotify/fsno... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.mod |
github.com/lucas-clemente/quic-go v0.20.1 | <mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714
<mask> github.com/insomniacslk/dhcp v0.0.0-20210310193751-cfd4d47082c2
<mask> github.com/kardianos/service v1.2.0
<mask> github.com/karrick/godirwalk v1.16.1 // indirect
<mask> github.com/lucas-clemente/quic-go v0.19.3
<mask> github.c... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.mod |
github.com/AdguardTeam/dnsproxy v0.37.1 h1:vULyF1+xSI7vV99m8GD2hmOuCQrpu87awyeSe5qtFbA=
github.com/AdguardTeam/dnsproxy v0.37.1/go.mod h1:xkJWEuTr550gPDmB9azsciKZzSXjf9wMn+Ji54PQ4gE= | <mask> dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
<mask> dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
<mask> dmitri.shuralyov.com/state v0.0.0-20180228185332-... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0=
github.com/ameshkov/dnscrypt/v2 v2.1.3/go.mod h1:+8SbPbVXpxxcUsgGi8eodkqWPo1MyNHxKYC8hDpqLSo= | <mask> github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 h1:52m0LGchQBBVqJRyYYufQuIbVqRawmubW3OFGqK1ekw=
<mask> github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635/go.mod h1:lmLxL+FV291OopO93Bwf9fQLQeLyt33VJRUg5VJ30us=
<mask> github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= | <mask> github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
<mask> github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
<mask> github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
<mask> gith... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= | <mask> github.com/gobuffalo/packr/v2 v2.8.1/go.mod h1:c/PLlOuTU+p3SybaJATW3H6lX/iK7xEz5OeMf+NnJpg=
<mask> github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
<mask> github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
<mask> github.com/golang/glog... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
<mask> github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
<mask> github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
<mask> github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
<mask> g... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
<mask> github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
<mask> github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
<mask> github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
<mask> githu... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g=
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= | <mask> github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
<mask> github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
<mask> github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
<mask> github.com/golang/protobuf v1.3.1/go... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= | <mask> github.com/insomniacslk/dhcp v0.0.0-20210310193751-cfd4d47082c2 h1:NpTIlXznCStsY88jU+Gh1Dy5dt/jYV4z4uU8h2TUOt4=
<mask> github.com/insomniacslk/dhcp v0.0.0-20210310193751-cfd4d47082c2/go.mod h1:TKl4jN3Voofo4UJIicyNhWGp/nlQqQkFxmwIFTvBkKI=
<mask> github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
github.com/lucas-clemente/quic-go v0.20.1 h1:hb5m76V8QS/8Nw/suHvXqo3BMHAozvIkcnzpJdpanSk=
github.com/lucas-clemente/quic-go v0.20.1/go.mod h1:fZq/HUDIM+mW6X6wtzORjC0E/WDBMKe5Hf9bgjISwLk= | <mask> github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
<mask> github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
<mask> github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
<mask> github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkid... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
<mask> github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI=
<mask> github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI=
<mask> github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
<mask> github.com/marten-seemann/qpac... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
github.com/marten-seemann/qtls-go1-16 v0.1.3 h1:XEZ1xGorVy9u+lJq+WXNE+hiqRYLNvJGYmwfwKQN2gU=
github.com/marten-seemann/qtls-go1-16 v0.1.3/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= | <mask> github.com/marten-seemann/qtls-go1-15 v0.1.4 h1:RehYMOyRW8hPVEja1KBVsFVNSm35Jj9Mvs5yNoZZ28A=
<mask> github.com/marten-seemann/qtls-go1-15 v0.1.4/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I=
<mask> github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
<mask> git... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
<mask> github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065 h1:aFkJ6lx4FPip+S+Uw4aTegFMct9shDvP+79PsSxpm3w=
<mask> github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065/go.mod h1:7EpbotpCmVZcu+KCX4g9WaRNuu11uyhiW7+Le1dKawg=
<mask> github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSu... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
<mask> go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
<mask> go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
<mask> go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
<mask> go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2Ifi... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | <mask> golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
<mask> golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
<mask> golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
<mask> golang.org/x/net v0.0... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
<mask> golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<mask> golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<mask> golang.org/x/sys v0.0.0-20201118182958-a01c418693c7/go.mod h1:h1NjWce9XRLGQEsW7wpK... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
golang.org/x/sys v0.0.0-20201231184435-2d18734c6014/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | <mask> golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<mask> golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<mask> golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061/go.mod h1:h1NjWce9XRLGQEsW7wpK... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
<mask> golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
<mask> golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
<mask> golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= | <mask> google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
<mask> google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
<mask> google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= | <mask> google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
<mask> google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
<mask> google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
<mask> google.golang.org/grpc v1.23.0... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum |
<mask> honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
<mask> howett.net/plist v0.0.0-20201203080718-1454fab16a06 h1:QDxUo/w2COstK1wIBYpzQlHX/NqaQTcf9jyz347nI58=
<mask> howett.net/plist v0.0.0-20201203080718-1454fab16a06/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | go.sum | |
cliSrvName = qs.ConnectionState().TLS.ServerName | <mask>
<mask> return resultCodeError
<mask> }
<mask>
<mask> cliSrvName = qs.ConnectionState().ServerName
<mask> }
<mask>
<mask> clientID, err := clientIDFromClientServerName(hostSrvName, cliSrvName, srvConf.StrictSNICheck)
<mask> if err != nil {
<mask> dctx.err = fmt.Errorf("client id check: %w... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/dnsforward/clientid.go |
cs.TLS.ServerName = c.serverName | <mask> }
<mask>
<mask> // ConnectionState implements the quicSession interface for testQUICSession.
<mask> func (c testQUICSession) ConnectionState() (cs quic.ConnectionState) {
<mask> cs.ServerName = c.serverName
<mask>
<mask> return cs
<mask> }
<mask>
<mask> func TestProcessClientID(t *testing.T) {
</... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/dnsforward/clientid_test.go |
QUICListenAddrs: []*net.UDPAddr{{IP: net.IP{127, 0, 0, 1}}}, | <mask> }
<mask>
<mask> func TestDoQServer(t *testing.T) {
<mask> s, _ := createTestTLS(t, TLSConfig{
<mask> QUICListenAddrs: []*net.UDPAddr{{}},
<mask> })
<mask> s.conf.UpstreamConfig.Upstreams = []upstream.Upstream{
<mask> &aghtest.TestUpstream{
<mask> IPv4: map[string][]net.IP{
<mask> "google... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/dnsforward/dnsforward_test.go |
"net/url" | <mask> package home
<mask>
<mask> import (
<mask> "fmt"
<mask> "os"
<mask> "path"
<mask> "path/filepath"
<mask> "runtime"
</s> Pull request: 2843 upd dnsproxy
Merge in DNS/adguard-home from 2843-upd-dnsproxy to master
Closes #2843.
Squashed commit of the following:
commit c3ffddcbf85cbd2542c5bb111984... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/home/upgrade.go |
"strconv"
"strings" | <mask> "path/filepath"
<mask> "runtime"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/google/renameio/maybe"
<mask> "golang.org/x/crypto/bcrypt"
</s> Pull request: 2843 upd dnsproxy
Merge in DNS/adguard-home from 2843-upd... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/home/upgrade.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghnet" | <mask> "strconv"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/google/renameio/maybe"
<mask> "golang.org/x/crypto/bcrypt"
<mask> yaml "gopkg.in/yaml.v2"
<mask> )
</s> Pull request: 2843 upd dnsproxy
Merge in DNS/adguard-home from 2843-upd-dnsproxy to master
Clos... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/home/upgrade.go |
const currentSchemaVersion = 10 | <mask> yaml "gopkg.in/yaml.v2"
<mask> )
<mask>
<mask> // currentSchemaVersion is the current schema version.
<mask> const currentSchemaVersion = 9
<mask>
<mask> // These aliases are provided for convenience.
<mask> type (
<mask> any = interface{}
<mask> yarr = []any
</s> Pull request: 2843 upd dnsproxy... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/home/upgrade.go |
upgradeSchema9to10, | <mask> upgradeSchema7to8,
<mask> upgradeSchema8to9,
<mask> }
<mask>
<mask> n := 0
<mask> for i, u := range upgrades {
<mask> if i >= oldVersion {
</s> Pull request: 2843 upd dnsproxy
Merge in DNS/adguard-home from 2843-upd-dnsproxy to master
Closes #2843.
Squashed commit of the following:
commit c... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/home/upgrade.go |
return fmt.Errorf("unexpected type of dns.bind_host: %T", bindHostVal) | <mask>
<mask> bindHostVal := dns["bind_host"]
<mask> bindHost, ok := bindHostVal.(string)
<mask> if !ok {
<mask> return fmt.Errorf("undexpected type of dns.bind_host: %T", bindHostVal)
<mask> }
<mask>
<mask> delete(dns, "bind_host")
<mask> dns["bind_hosts"] = yarr{bindHost}
<mask>
</s> Pull reques... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/home/upgrade.go |
return fmt.Errorf("unexpected type of dns.autohost_tld: %T", autohostTLDVal) | <mask> }
<mask>
<mask> autohostTLD, ok := autohostTLDVal.(string)
<mask> if !ok {
<mask> return fmt.Errorf("undexpected type of dns.autohost_tld: %T", autohostTLDVal)
<mask> }
<mask>
<mask> delete(dns, "autohost_tld")
<mask> dns["local_domain_name"] = autohostTLD
<mask>
</s> Pull request: 2843 upd... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c26675585dad6ea87ac794e08f6599d7d3c5ffc7 | internal/home/upgrade.go |
"github.com/AdguardTeam/AdGuardHome/util"
| <mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> func httpError(r *http.Request, w http.ResponseWriter, code int, format string, args ...interface{}) {
<mask> text := fmt.Sprintf(format, args...)
<mask> log.Info("DHCP: %s %s: %s", r.Method, r.URL, t... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/dhcp_http.go |
ifaces, err := util.GetValidNetInterfaces() | <mask>
<mask> func (s *Server) handleDHCPInterfaces(w http.ResponseWriter, r *http.Request) {
<mask> response := map[string]interface{}{}
<mask>
<mask> ifaces, err := GetValidNetInterfaces()
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/dhcp_http.go |
staticIP["ip"] = util.GetSubnet(interfaceName) | <mask> staticIPStatus = "error"
<mask> staticIP["error"] = err.Error()
<mask> } else if !isStaticIP {
<mask> staticIPStatus = "no"
<mask> staticIP["ip"] = GetFullIP(interfaceName)
<mask> }
<mask> staticIP["static"] = staticIPStatus
<mask>
<mask> result := map[string]interface{}{}
<mask> result["... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/dhcp_http.go |
"regexp" | <mask> "fmt"
<mask> "io/ioutil"
<mask> "net"
<mask> "os/exec"
<mask> "runtime"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/util"
<mask>
</s> +(dhcpd): added static IP for MacOS | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go |
"github.com/AdguardTeam/AdGuardHome/util"
| <mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/golibs/file"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
</s> +(dhcpd): added static IP for MacOS | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go |
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // GetValidNetInterfaces returns interfaces that are eligible for DNS and/or DHCP
<mask> // invalid interface is a ppp interface or the one that doesn't allow broadcasts
<mask> func GetValidNetInterfaces() ([]net.Interface, error) {
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go | |
// Set a static IP for the specified network interface | <mask>
<mask> return false, fmt.Errorf("Cannot check if IP is static: not supported on %s", runtime.GOOS)
<mask> }
<mask>
<mask> // Get IP address with netmask
<mask> func GetFullIP(ifaceName string) string {
<mask> cmd := exec.Command("ip", "-oneline", "-family", "inet", "address", "show", ifaceName)
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go |
if runtime.GOOS == "linux" {
return setStaticIPDhcpdConf(ifaceName) | <mask>
<mask> // Set a static IP for network interface
<mask> // Supports: Raspbian.
<mask> func SetStaticIP(ifaceName string) error {
<mask> ip := GetFullIP(ifaceName)
<mask> if len(ip) == 0 {
<mask> return errors.New("Can't get IP address")
<mask> }
<mask>
<mask> ip4, _, err := net.ParseCIDR(ip)
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go |
if runtime.GOOS == "darwin" {
return fmt.Errorf("cannot do that")
// return setStaticIPDarwin(ifaceName) | <mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> body = append(body, []byte(add)...)
<mask> err = file.SafeWrite("/etc/dhcpcd.conf", body)
<mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
</s> +(dhcpd): added static IP for MacOS </s> r... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go |
return fmt.Errorf("Cannot set static IP on %s", runtime.GOOS) | <mask> if err != nil {
<mask> return err
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
<mask> // for dhcpcd.conf
<mask> func hasStaticIPDhcpcdConf(dhcpConf, ifaceName string) bool {
<mask> lines := strings.Split(dhcpConf, "\n")
</s> +(dhcpd): added static IP for MacOS </s> remove func setStaticIP... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go |
func updateStaticIPDhcpcdConf(ifaceName, ip, gatewayIP, dnsIP string) string { | <mask> return fields[2]
<mask> }
<mask>
<mask> // for dhcpcd.conf
<mask> func setStaticIPDhcpcdConf(ifaceName, ip, gatewayIP, dnsIP string) string {
<mask> var body []byte
<mask>
<mask> add := fmt.Sprintf("\ninterface %s\nstatic ip_address=%s\n",
<mask> ifaceName, ip)
<mask> body = append(body, []byte... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils.go |
s := updateStaticIPDhcpcdConf("wlan0", "192.168.0.2/24", "192.168.0.1", "192.168.0.2") | <mask> static routers=192.168.0.1
<mask> static domain_name_servers=192.168.0.2
<mask>
<mask> `
<mask> s := setStaticIPDhcpcdConf("wlan0", "192.168.0.2/24", "192.168.0.1", "192.168.0.2")
<mask> assert.Equal(t, dhcpcdConf, s)
<mask>
<mask> // without gateway
<mask> dhcpcdConf = `
<mask> interface wlan0
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils_test.go |
s = updateStaticIPDhcpcdConf("wlan0", "192.168.0.2/24", "", "192.168.0.2") | <mask> static ip_address=192.168.0.2/24
<mask> static domain_name_servers=192.168.0.2
<mask>
<mask> `
<mask> s = setStaticIPDhcpcdConf("wlan0", "192.168.0.2/24", "", "192.168.0.2")
<mask> assert.Equal(t, dhcpcdConf, s)
<mask> }
</s> +(dhcpd): added static IP for MacOS </s> remove s := setStaticIPDhcpcdConf(... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | dhcpd/network_utils_test.go |
"net" | <mask>
<mask> import (
<mask> "encoding/json"
<mask> "fmt"
<mask> "net/http"
<mask> "net/url"
<mask> "strconv"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/util"
</s> +(dhcpd): added static IP for MacOS | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control.go |
"net/url"
"strconv"
"strings"
"github.com/AdguardTeam/AdGuardHome/util" | <mask> "net"
<mask> "net/http"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/dnsforward"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/NYTimes/gziphandler"
<mask> )
</s> +(dhcpd): added static IP for MacOS | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control.go |
ifaces, e := util.GetValidNetInterfacesForWeb() | <mask> func getDNSAddresses() []string {
<mask> dnsAddresses := []string{}
<mask>
<mask> if config.DNS.BindHost == "0.0.0.0" {
<mask>
<mask> ifaces, e := getValidNetInterfacesForWeb()
<mask> if e != nil {
<mask> log.Error("Couldn't get network interfaces: %v", e)
<mask> return []string{}
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control.go |
"github.com/AdguardTeam/AdGuardHome/util"
| <mask> "path/filepath"
<mask> "runtime"
<mask> "strconv"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/dhcpd"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> type firstRunData struct {
</s> +(dhcpd): added static IP for MacOS | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
ifaces, err := util.GetValidNetInterfacesForWeb() | <mask> data := firstRunData{}
<mask> data.WebPort = 80
<mask> data.DNSPort = 53
<mask>
<mask> ifaces, err := getValidNetInterfacesForWeb()
<mask> if err != nil {
<mask> httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
<mask> return
<mask> }
<mask>
</s> +(dhcpd): ad... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
err = util.CheckPortAvailable(reqData.Web.IP, reqData.Web.Port) | <mask> return
<mask> }
<mask>
<mask> if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
<mask> err = checkPortAvailable(reqData.Web.IP, reqData.Web.Port)
<mask> if err != nil {
<mask> respData.Web.Status = fmt.Sprintf("%v", err)
<mask> }
<mask> }
<mask>
</s> +(dhcpd): added sta... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
err = util.CheckPacketPortAvailable(reqData.DNS.IP, reqData.DNS.Port) | <mask> }
<mask> }
<mask>
<mask> if reqData.DNS.Port != 0 {
<mask> err = checkPacketPortAvailable(reqData.DNS.IP, reqData.DNS.Port)
<mask>
<mask> if errorIsAddrInUse(err) {
<mask> canAutofix := checkDNSStubListener()
<mask> if canAutofix && reqData.DNS.Autofix {
<mask>
</s> +(dhcpd): added st... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
if util.ErrorIsAddrInUse(err) { | <mask>
<mask> if reqData.DNS.Port != 0 {
<mask> err = checkPacketPortAvailable(reqData.DNS.IP, reqData.DNS.Port)
<mask>
<mask> if errorIsAddrInUse(err) {
<mask> canAutofix := checkDNSStubListener()
<mask> if canAutofix && reqData.DNS.Autofix {
<mask>
<mask> err = disableDNSStubListener()
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
err = util.CheckPacketPortAvailable(reqData.DNS.IP, reqData.DNS.Port) | <mask> if err != nil {
<mask> log.Error("Couldn't disable DNSStubListener: %s", err)
<mask> }
<mask>
<mask> err = checkPacketPortAvailable(reqData.DNS.IP, reqData.DNS.Port)
<mask> canAutofix = false
<mask> }
<mask>
<mask> respData.DNS.CanAutofix = canAutofix
<mask> }
</s> +(dhc... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
err = util.CheckPortAvailable(reqData.DNS.IP, reqData.DNS.Port) | <mask> respData.DNS.CanAutofix = canAutofix
<mask> }
<mask>
<mask> if err == nil {
<mask> err = checkPortAvailable(reqData.DNS.IP, reqData.DNS.Port)
<mask> }
<mask>
<mask> if err != nil {
<mask> respData.DNS.Status = fmt.Sprintf("%v", err)
<mask>
</s> +(dhcpd): added static IP for MacOS <... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
interfaceName := util.GetInterfaceByIP(reqData.DNS.IP) | <mask> if err != nil {
<mask> respData.DNS.Status = fmt.Sprintf("%v", err)
<mask>
<mask> } else {
<mask>
<mask> interfaceName := getInterfaceByIP(reqData.DNS.IP)
<mask> staticIPStatus := "yes"
<mask>
<mask> if len(interfaceName) == 0 {
<mask> staticIPStatus = "error"
<mask> respDat... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
respData.StaticIP.IP = util.GetSubnet(interfaceName) | <mask> staticIPStatus = "error"
<mask> respData.StaticIP.Error = err.Error()
<mask> } else if !isStaticIP {
<mask> staticIPStatus = "no"
<mask> respData.StaticIP.IP = dhcpd.GetFullIP(interfaceName)
<mask> }
<mask> }
<mask> respData.StaticIP.Static = staticIPStatus
<mask> }
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
err = util.CheckPortAvailable(newSettings.Web.IP, newSettings.Web.Port) | <mask> }
<mask>
<mask> // validate that hosts and ports are bindable
<mask> if restartHTTP {
<mask> err = checkPortAvailable(newSettings.Web.IP, newSettings.Web.Port)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "Impossible to listen on IP:port %s due to %s",
<mask> net.JoinH... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
err = util.CheckPacketPortAvailable(newSettings.DNS.IP, newSettings.DNS.Port) | <mask> return
<mask> }
<mask> }
<mask>
<mask> err = checkPacketPortAvailable(newSettings.DNS.IP, newSettings.DNS.Port)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "%s", err)
<mask> return
<mask> }
<mask>
</s> +(dhcpd): added static IP for MacOS </s> remove err = checkPor... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
err = util.CheckPortAvailable(newSettings.DNS.IP, newSettings.DNS.Port) | <mask> httpError(w, http.StatusBadRequest, "%s", err)
<mask> return
<mask> }
<mask>
<mask> err = checkPortAvailable(newSettings.DNS.IP, newSettings.DNS.Port)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "%s", err)
<mask> return
<mask> }
<mask>
</s> +(dhcpd): added static IP... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_install.go |
"github.com/AdguardTeam/AdGuardHome/util"
| <mask> "reflect"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/joomcode/errorx"
<mask> )
<mask>
<mask> // Set certificate and private key data
<mask> func tlsLoadConfig(tls *tlsConfig, status *tlsConfigStatus) bool {
</s> +(dhcpd): added static IP ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_tls.go |
err = util.CheckPortAvailable(config.BindHost, data.PortHTTPS) | <mask> if Context.httpsServer.server != nil {
<mask> alreadyRunning = true
<mask> }
<mask> if !alreadyRunning {
<mask> err = checkPortAvailable(config.BindHost, data.PortHTTPS)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "port %d is not available, cannot enable HTTPS on it", dat... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_tls.go |
err = util.CheckPortAvailable(config.BindHost, data.PortHTTPS) | <mask> if Context.httpsServer.server != nil {
<mask> alreadyRunning = true
<mask> }
<mask> if !alreadyRunning {
<mask> err = checkPortAvailable(config.BindHost, data.PortHTTPS)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "port %d is not available, cannot enable HTTPS on it", dat... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_tls.go |
"github.com/AdguardTeam/AdGuardHome/util"
| <mask> "strings"
<mask> "syscall"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // Convert version.json data to our JSON response
<mask> func getVersionResp(data []byte) []byte {
</s> +(dhcpd): added static IP for MacOS | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_update.go |
if !util.FileExists(u.curBinName) { | <mask> if runtime.GOOS == "windows" {
<mask> binName = "AdGuardHome.exe"
<mask> }
<mask> u.curBinName = filepath.Join(workDir, binName)
<mask> if !fileExists(u.curBinName) {
<mask> return nil, fmt.Errorf("Executable file %s doesn't exist", u.curBinName)
<mask> }
<mask> u.bkpBinName = filepath.Join(u.b... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c27852537d2f5ce62b16c43f4241a15d0fb8c9fd | home/control_update.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.