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 |
|---|---|---|---|---|
* | <mask> };
<mask>
<mask> /**
<mask> * Gets the source metadata for the specified tracker
<mask> * @param {TrackerData} trackerData tracker data
<mask> * @returns {source} source metadata or null if no matching tracker found
<mask> */
<mask> export const getSourceData = (trackerData) => {
<mask> if (!tr... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | client/src/helpers/trackers/trackers.js |
* | <mask> };
<mask>
<mask> /**
<mask> * Converts the JSON string source into numeric source for AdGuard Home
<mask> * @param {TrackerData} trackerData tracker data
<mask> * @returns {number} source number
<mask> */
<mask> const convertSource = (sourceStr) => {
<mask> if (!sourceStr || sourceStr !== 'AdGu... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | client/src/helpers/trackers/trackers.js |
golang.org/x/crypto v0.6.0
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb
golang.org/x/net v0.7.0 | <mask> github.com/quic-go/quic-go v0.32.0
<mask> github.com/stretchr/testify v1.8.1
<mask> github.com/ti-mo/netfilter v0.5.0
<mask> go.etcd.io/bbolt v1.3.7
<mask> golang.org/x/crypto v0.5.0
<mask> golang.org/x/exp v0.0.0-20230206171751-46f607a40771
<mask> golang.org/x/net v0.5.0
<mask> golang.org/x/sys ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.mod |
github.com/onsi/ginkgo/v2 v2.8.1 // indirect | <mask> github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect
<mask> github.com/josharian/native v1.1.0 // indirect
<mask> github.com/mdlayher/packet v1.1.1 // indirect
<mask> github.com/mdlayher/socket v0.4.0 // indirect
<mask> github.com/onsi/ginkgo/v2 v2.8.0 // indirect
<mask> github.com/... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.mod |
github.com/pierrec/lz4/v4 v4.1.17 // indirect | <mask> github.com/mdlayher/socket v0.4.0 // indirect
<mask> github.com/onsi/ginkgo/v2 v2.8.1 // indirect
<mask> github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
<mask> github.com/pkg/errors v0.9.1 // indirect
<mask> github.com/pmezard/go-difflib v1.0.0 // indirect
<mask> github.com/quic-go/qpac... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.mod |
github.com/u-root/uio v0.0.0-20230215032506-9aa6f7e2d72c // indirect
golang.org/x/mod v0.8.0 // indirect | <mask> github.com/quic-go/qpack v0.4.0 // indirect
<mask> github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
<mask> github.com/quic-go/qtls-go1-19 v0.2.0 // indirect
<mask> github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
<mask> github.com/u-root/uio v0.0.0-20221213070652-c3537552635f // indirect
<mask> gol... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.mod |
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.6.0 // indirect | <mask> github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
<mask> github.com/u-root/uio v0.0.0-20221213070652-c3537552635f // indirect
<mask> golang.org/x/mod v0.7.0 // indirect
<mask> golang.org/x/sync v0.1.0 // indirect
<mask> golang.org/x/text v0.6.0 // indirect
<mask> golang.org/x/tools v0.5.0 // indirect... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.mod |
github.com/onsi/ginkgo/v2 v2.8.1 h1:xFTEVwOFa1D/Ty24Ws1npBWkDYEV9BqZrsDxVrVkrrU=
github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc=
github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= | <mask> github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA=
<mask> github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME=
<mask> github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
<mask> github.com/niemey... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc=
github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= | <mask> github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q=
<mask> github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
<mask> github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
<mask> github... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
<mask> github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo=
<mask> github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
<mask> github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ=
<mask> github.com/tklauser/numcpu... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum | |
github.com/u-root/uio v0.0.0-20230215032506-9aa6f7e2d72c h1:PHoGTnweZP+KIg/8Zc6+iOesrIF5yHkpb4GBDxHm7yE=
github.com/u-root/uio v0.0.0-20230215032506-9aa6f7e2d72c/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264= | <mask> github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
<mask> github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ=
<mask> github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=
<mask> github.com/u-root/uio ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb h1:PaBZQdo+iSDyHT053FjUCgZQ/9uqVwPOcl7KSWhKn6w=
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb/go.mod h1:C... | <mask> go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
<mask> golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
<mask> golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfC... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | <mask> golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
<mask> golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
<mask> golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBz... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= | <mask> golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
<mask> golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
<mask> golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | <mask> golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
<mask> golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
<mask> golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
<mask> golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71r... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= | <mask> golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
<mask> golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
<mask> golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOk... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | go.sum |
<mask> IconSVG: []byte("<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" viewBox=\"0 0 512 512\"><path d=\"M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go | |
<mask> "||aus.social^",
<mask> "||awscommunity.social^",
<mask> "||cupoftea.social^",
<mask> "||cyberplace.social^",
<mask> "||defcon.social^",
<mask> "||det.social^",
<mask> "||fosstodon.org^",
<mask> "||glasgow.social^",
<mask> "||h4.io^",
<mask> "||hachyderm.io^",
</s> Pull request 173... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go | |
<mask> "||masto.pt^",
<mask> "||mastodon.au^",
<mask> "||mastodon.bida.im^",
<mask> "||mastodon.com.tr^",
<mask> "||mastodon.eus^",
<mask> "||mastodon.green^",
<mask> "||mastodon.ie^",
<mask> "||mastodon.iriseden.eu^",
<mask> "||mastodon.nl^",
<mask> "||mastodon.nu^",
</s> Pull request 17... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go | |
"||mastodon.online^", | <mask> "||mastodon.nz^",
<mask> "||mastodon.online^",
<mask> "||mastodon.scot^",
<mask> "||mastodon.sdf.org^",
<mask> "||mastodon.social^",
<mask> "||mastodon.social^",
</s> Pull request 1737: upd-all
Merge in DNS/adguard-home from upd-all to master
Squashed commit of the following:
commit e89605e... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go |
"||mastodon.social^", | <mask> "||mastodon.scot^",
<mask> "||mastodon.sdf.org^",
<mask> "||mastodon.social^",
<mask> "||mastodon.top^",
<mask> "||mastodon.uno^",
<mask> "||mastodon.world^",
<mask> "||mastodon.xyz^",
<mask> "||mastodonapp.uk^",
<mask> "||mastodonners.nl^",
</s> Pull request 1737: upd-all
Merge in D... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go |
"||mastodon.xyz^", | <mask> "||mastodon.social^",
<mask> "||mastodon.top^",
<mask> "||mastodon.uno^",
<mask> "||mastodon.world^",
<mask> "||mastodon.zaclys.com^",
<mask> "||mastodonapp.uk^",
<mask> "||mastodonners.nl^",
<mask> "||mastodont.cat^",
<mask> "||mastodontech.de^",
<mask> "||mastodontti.fi^",
</s> P... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go |
"||mstdn.party^", | <mask> "||metalhead.club^",
<mask> "||mindly.social^",
<mask> "||mstdn.ca^",
<mask> "||mstdn.jp^",
<mask> "||mstdn.social^",
<mask> "||muenchen.social^",
<mask> "||nerdculture.de^",
<mask> "||newsie.social^",
</s> Pull request 1737: upd-all
Merge in DNS/adguard-home from upd-all to master
Squ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go |
"||nerdculture.de^", | <mask> "||mstdn.ca^",
<mask> "||mstdn.jp^",
<mask> "||mstdn.social^",
<mask> "||muenchen.social^",
<mask> "||muenster.im^",
<mask> "||newsie.social^",
<mask> "||noc.social^",
<mask> "||norden.social^",
<mask> "||nrw.social^",
<mask> "||o3o.ca^",
</s> Pull request 1737: upd-all
Merge in D... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/filtering/servicelist.go |
golang.org/x/tools v0.6.0
golang.org/x/vuln v0.0.0-20230213165600-1a019b0c7f30
honnef.co/go/tools v0.4.1 | <mask> github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28
<mask> github.com/kisielk/errcheck v1.6.3
<mask> github.com/kyoh86/looppointer v0.2.1
<mask> github.com/securego/gosec/v2 v2.15.0
<mask> golang.org/x/tools v0.5.1-0.20230117180257-8aba49bb5ea2
<mask> golang.org/x/vuln v0.0.0-202302... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/tools/go.mod |
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb // indirect
golang.org/x/exp/typeparams v0.0.0-20230213192124-5e25df0256eb // indirect
golang.org/x/mod v0.8.0 // indirect | <mask> github.com/gookit/color v1.5.2 // indirect
<mask> github.com/kyoh86/nolint v0.0.1 // indirect
<mask> github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
<mask> github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
<mask> golang.org/x/exp v0.0.0-20230206171751-4... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/tools/go.mod |
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb h1:PaBZQdo+iSDyHT053FjUCgZQ/9uqVwPOcl7KSWhKn6w=
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp/typeparams v0.0.0-20230213192124-5e25df0256eb h1:WGs/bGIWYyAY5PVgGGMXqGGCxSJz4fpoUExb/vgqNCU=
go... | <mask> golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
<mask> golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
<mask> golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNh... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/tools/go.sum |
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | <mask> golang.org/x/exp/typeparams v0.0.0-20230206171751-46f607a40771/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
<mask> golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
<mask> golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
<mask> golang.org/x... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/tools/go.sum |
golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= | <mask> golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
<mask> golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
<mask> golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/tools/go.sum |
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/vuln v0.0.0-20230213165600-1a019b0c7f30 h1:Q4B8LhSjZGto/+P5REBb4N51ec2H4efRqjBIeJ6nv/Y=
golang.org/x/vuln v0.0.0-20230213165600-1a019b0c7f30/go.mod h1:c... | <mask> golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
<mask> golang.org/x/tools v0.0.0-20201007032633-0806396f153e/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
<mask> golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOk... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/tools/go.sum |
honnef.co/go/tools v0.4.1 h1:HPeloSr0mLOEMOkhT9Au5aeki44kvP6ka3v1xIsM6Zo=
honnef.co/go/tools v0.4.1/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= | <mask> gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
<mask> gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
<mask> gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
<mask> g... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6575c068b842d7e81addc39785c4c10dad248832 | internal/tools/go.sum |
pidFile := fmt.Sprintf("/var/run/%s.pid", serviceName) | <mask>
<mask> return
<mask> }
<mask>
<mask> pidfile := fmt.Sprintf("/var/run/%s.pid", serviceName)
<mask> var pid int
<mask> data, err := os.ReadFile(pidfile)
<mask> if errors.Is(err, os.ErrNotExist) {
<mask> if pid, err = aghos.PIDByCommand(serviceName, os.Getpid()); err != nil {
<mask> log.Err... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
data, err := os.ReadFile(pidFile) | <mask> }
<mask>
<mask> pidfile := fmt.Sprintf("/var/run/%s.pid", serviceName)
<mask> var pid int
<mask> data, err := os.ReadFile(pidfile)
<mask> if errors.Is(err, os.ErrNotExist) {
<mask> if pid, err = aghos.PIDByCommand(serviceName, os.Getpid()); err != nil {
<mask> log.Error("service: finding AdGua... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
log.Error("service: reading pid file %s: %s", pidFile, err) | <mask>
<mask> return
<mask> }
<mask> } else if err != nil {
<mask> log.Error("service: reading pid file %s: %s", pidfile, err)
<mask>
<mask> return
<mask> } else {
<mask> parts := strings.SplitN(string(data), "\n", 2)
<mask> if len(parts) == 0 {
</s> Pull request: 3868 imp service uninstall
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
log.Error("service: parsing pid file %s: bad value", pidFile) | <mask> return
<mask> } else {
<mask> parts := strings.SplitN(string(data), "\n", 2)
<mask> if len(parts) == 0 {
<mask> log.Error("service: parsing pid file %s: bad value", pidfile)
<mask>
<mask> return
<mask> }
<mask>
<mask> if pid, err = strconv.Atoi(strings.TrimSpace(parts[0])); err != ni... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
log.Error("service: parsing pid from file %s: %s", pidFile, err) | <mask> return
<mask> }
<mask>
<mask> if pid, err = strconv.Atoi(strings.TrimSpace(parts[0])); err != nil {
<mask> log.Error("service: parsing pid from file %s: %s", pidfile, err)
<mask>
<mask> return
<mask> }
<mask> }
<mask>
</s> Pull request: 3868 imp service uninstall
Merge in DNS/adgua... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
// installation. Otherwise, the service won't start on the system | <mask> }
<mask>
<mask> if aghos.IsOpenWrt() {
<mask> // On OpenWrt it is important to run enable after the service
<mask> // installation Otherwise, the service won't start on the system
<mask> // startup.
<mask> _, err = runInitdCommand("enable")
<mask> if err != nil {
<mask> log.Fatalf("servi... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
if err := svcAction(s, "stop"); err != nil {
log.Debug("service: executing action %q: %s", "stop", err)
}
| <mask> log.Fatalf("service: running init disable: %s", err)
<mask> }
<mask> }
<mask>
<mask> if err := svcAction(s, "uninstall"); err != nil {
<mask> log.Fatalf("service: executing action %q: %s", "uninstall", err)
<mask> }
<mask>
<mask> if runtime.GOOS == "darwin" {
<mask> // Remove log files o... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
// Pass the script and action as a single string argument. | <mask> // runInitdCommand runs init.d service command
<mask> // returns command code or error if any
<mask> func runInitdCommand(action string) (int, error) {
<mask> confPath := "/etc/init.d/" + serviceName
<mask> code, _, err := aghos.RunCommand("sh", "-c", confPath+" "+action)
<mask>
<mask> return code, er... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
pidfile_child="/var/run/${name}.pid"
pidfile="/var/run/${name}_daemon.pid" | <mask> . /etc/rc.subr
<mask> name="{{.Name}}"
<mask> {{.Name}}_env="IS_DAEMON=1"
<mask> {{.Name}}_user="root"
<mask> pidfile="/var/run/${name}.pid"
<mask> command="/usr/sbin/daemon"
<mask> command_args="-p ${pidfile} -f -r {{.WorkingDirectory}}/{{.Name}}"
<mask> run_rc_command "$1"
<mask> `
<mask>
</s> Pull... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
command_args="-P ${pidfile} -p ${pidfile_child} -f -r {{.WorkingDirectory}}/{{.Name}}" | <mask> {{.Name}}_env="IS_DAEMON=1"
<mask> {{.Name}}_user="root"
<mask> pidfile="/var/run/${name}.pid"
<mask> command="/usr/sbin/daemon"
<mask> command_args="-p ${pidfile} -f -r {{.WorkingDirectory}}/{{.Name}}"
<mask> run_rc_command "$1"
<mask> `
<mask>
<mask> const openBSDScript = `#!/bin/sh
<mask> #
</s> P... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service.go |
// sysVersion is the version of local service.System interface implementation. | <mask> // package and has only one internal dependency.
<mask> //
<mask> // TODO(e.burkov): Perhaps, file a PR to github.com/kardianos/service.
<mask>
<mask> // sysVersion is the version of local service.System interface
<mask> // implementation.
<mask> const sysVersion = "openbsd-runcom"
<mask>
<mask> func... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/661f4ece48d9e8d4c17847961184f1d93bdfa16f | internal/home/service_openbsd.go |
"upstreams": "Upstreams", | <mask> "upstream_dns_hint": "If you keep this field empty, AdGuard Home will use <a href='https://www.quad9.net/' target='_blank'>Quad9</a> as an upstream.",
<mask> "test_upstream_btn": "Test upstreams",
<mask> "apply_btn": "Apply",
<mask> "disabled_filtering_toast": "Disabled filtering",
<mask> ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/__locales/en.json |
import { normalizeTextarea } from '../../../helpers/helpers'; | <mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import ReactTable from 'react-table';
<mask>
<mask> import { MODAL_TYPE } from '../../../helpers/constants';
<mask> import Card from '../../ui/Card';
<mask> import Modal from './Modal';
<mask> import WrapCell from './WrapCell';
<mask>
<mask... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/components/Settings/Clients/ClientsTable.js |
const config = values; | <mask> this.props.updateClient(values, name);
<mask> };
<mask>
<mask> handleSubmit = (values) => {
<mask> let config = values;
<mask>
<mask> if (values && values.blocked_services) {
<mask> const blocked_services = Object
<mask> .keys(values.blocked_... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/components/Settings/Clients/ClientsTable.js |
if (values) {
if (values.blocked_services) {
config.blocked_services = Object
.keys(values.blocked_services)
.filter(service => values.blocked_services[service]);
}
if (values.upstreams && typeof values.upstreams === 's... | <mask>
<mask> handleSubmit = (values) => {
<mask> let config = values;
<mask>
<mask> if (values && values.blocked_services) {
<mask> const blocked_services = Object
<mask> .keys(values.blocked_services)
<mask> .filter(service => values.blocked_se... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/components/Settings/Clients/ClientsTable.js |
const { upstreams, whois_info, ...values } = client; | <mask> getClient = (name, clients) => {
<mask> const client = clients.find(item => name === item.name);
<mask>
<mask> if (client) {
<mask> return {
<mask> upstreams: (upstreams && upstreams.join('\n')) || '',
<mask> ...values,
<mask> }... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/components/Settings/Clients/ClientsTable.js |
upstreams: (upstreams && upstreams.join('\n')) || '',
...values, | <mask> const client = clients.find(item => name === item.name);
<mask>
<mask> if (client) {
<mask> return {
<mask> use_global_settings: true,
<mask> use_global_blocked_services: true,
<mask> ...client,
<mask> };
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/components/Settings/Clients/ClientsTable.js |
import Examples from '../Dns/Upstream/Examples'; | <mask> import i18n from '../../../i18n';
<mask> import Tabs from '../../ui/Tabs';
<mask> import { toggleAllServices } from '../../../helpers/helpers';
<mask> import {
<mask> renderField,
<mask> renderGroupField,
</s> + client: handle upstream DNS servers for clients </s> remove if (values && valu... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/components/Settings/Clients/Form.js |
<div label="upstream" title={props.t('upstream_dns')}>
<Field
id="upstreams"
name="upstreams"
component="textarea"
type="text"
className... | <mask> </div>
<mask> </div>
<mask> </div>
<mask> </Tabs>
<mask> </div>
<mask>
<mask> <div className="modal-footer">
</s> + client: handle upstream DNS servers for clients </s> remove ... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6684a120ac9909140e4ecbe674e09c8f24e87ac4 | client/src/components/Settings/Clients/Form.js |
// Existing files are overwritten
// Return the list of files (not directories) written
func zipFileUnpack(zipfile, outdir string) ([]string, error) {
| <mask> return &u, nil
<mask> }
<mask>
<mask> // Unpack all files from .zip file to the specified directory
<mask> func zipFileUnpack(zipfile, outdir string) error {
<mask> r, err := zip.OpenReader(zipfile)
<mask> if err != nil {
<mask> return fmt.Errorf("zip.OpenReader(): %s", err)
<mask> }
<mask> def... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
return nil, fmt.Errorf("zip.OpenReader(): %s", err) | <mask> // Unpack all files from .zip file to the specified directory
<mask> func zipFileUnpack(zipfile, outdir string) error {
<mask> r, err := zip.OpenReader(zipfile)
<mask> if err != nil {
<mask> return fmt.Errorf("zip.OpenReader(): %s", err)
<mask> }
<mask> defer r.Close()
<mask>
<mask> for _, zf :=... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
var files []string
var err2 error
var zr io.ReadCloser | <mask> return nil, fmt.Errorf("zip.OpenReader(): %s", err)
<mask> }
<mask> defer r.Close()
<mask>
<mask> for _, zf := range r.File {
<mask> zr, err = zf.Open()
<mask> if err != nil {
<mask> err2 = fmt.Errorf("zip file Open(): %s", err)
<mask> break
</s> * auto-update: zipFileUnpack() returns l... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
zr, err = zf.Open() | <mask> }
<mask> defer r.Close()
<mask>
<mask> for _, zf := range r.File {
<mask> zr, err := zf.Open()
<mask> if err != nil {
<mask> return fmt.Errorf("zip file Open(): %s", err)
<mask> }
<mask> fi := zf.FileInfo()
<mask> fn := filepath.Join(outdir, fi.Name())
</s> * auto-update: zipFileUnpac... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
err2 = fmt.Errorf("zip file Open(): %s", err)
break | <mask>
<mask> for _, zf := range r.File {
<mask> zr, err := zf.Open()
<mask> if err != nil {
<mask> return fmt.Errorf("zip file Open(): %s", err)
<mask> }
<mask> fi := zf.FileInfo()
<mask> fn := filepath.Join(outdir, fi.Name())
<mask>
<mask> if fi.IsDir() {
</s> * auto-update: zipFileUnpack... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
if len(fi.Name()) == 0 {
continue
}
| <mask>
<mask> fi := zf.FileInfo()
<mask> fn := filepath.Join(outdir, fi.Name())
<mask>
<mask> if fi.IsDir() {
<mask> err = os.Mkdir(fn, fi.Mode())
</s> * auto-update: zipFileUnpack() returns list of unpacked files </s> remove if err != nil {
return fmt.Errorf("zip file Read(): %s", err)
</s> a... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
if err != nil && !os.IsExist(err) {
err2 = fmt.Errorf("os.Mkdir(): %s", err)
break | <mask> fn := filepath.Join(outdir, fi.Name())
<mask>
<mask> if fi.IsDir() {
<mask> err = os.Mkdir(fn, fi.Mode())
<mask> if err != nil {
<mask> return fmt.Errorf("zip file Read(): %s", err)
<mask> }
<mask> continue
<mask> }
<mask>
<mask> f, err := os.OpenFile(fn, os.O_WRONLY|os.O_CRE... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
log.Tracef("created directory %s", fn) | <mask> break
<mask> }
<mask> continue
<mask> }
<mask>
<mask> f, err := os.OpenFile(fn, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fi.Mode())
<mask> if err != nil {
</s> * auto-update: zipFileUnpack() returns list of unpacked files </s> remove if err != nil {
return fmt.Errorf("zip file Read(): ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
err2 = fmt.Errorf("os.OpenFile(): %s", err)
break | <mask> }
<mask>
<mask> f, err := os.OpenFile(fn, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fi.Mode())
<mask> if err != nil {
<mask> zr.Close()
<mask> return fmt.Errorf("os.OpenFile(): %s", err)
<mask> }
<mask> _, err = io.Copy(f, zr)
<mask> if err != nil {
<mask> zr.Close()
<mask> return f... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
f.Close()
err2 = fmt.Errorf("io.Copy(): %s", err)
break | <mask> return fmt.Errorf("os.OpenFile(): %s", err)
<mask> }
<mask> _, err = io.Copy(f, zr)
<mask> if err != nil {
<mask> zr.Close()
<mask> return fmt.Errorf("io.Copy(): %s", err)
<mask> }
<mask> zr.Close()
<mask> }
<mask> return nil
<mask> }
</s> * auto-update: zipFileUnpack() returns l... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
f.Close()
log.Tracef("created file %s", fn)
files = append(files, fi.Name()) | <mask> if err != nil {
<mask> zr.Close()
<mask> return fmt.Errorf("io.Copy(): %s", err)
<mask> }
<mask> zr.Close()
<mask> }
<mask> return nil
<mask> }
<mask>
<mask> // Unpack all files from .tar.gz file to the specified directory
</s> * auto-update: zipFileUnpack() returns list of unpacked fil... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
zr.Close()
return files, err2 | <mask> return fmt.Errorf("io.Copy(): %s", err)
<mask> }
<mask> zr.Close()
<mask> }
<mask> return nil
<mask> }
<mask>
<mask> // Unpack all files from .tar.gz file to the specified directory
<mask> // Existing files are overwritten
<mask> // Return the list of files (not directories) written
</s> * a... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
_, err = zipFileUnpack(u.pkgName, u.updateDir) | <mask> log.Tracef("Unpacking the package")
<mask> _ = os.Mkdir(u.updateDir, 0755)
<mask> _, file := filepath.Split(u.pkgName)
<mask> if strings.HasSuffix(file, ".zip") {
<mask> err = zipFileUnpack(u.pkgName, u.updateDir)
<mask> if err != nil {
<mask> return fmt.Errorf("zipFileUnpack() failed: %s", err... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update.go |
files, e := zipFileUnpack(fn, outdir) | <mask> func testZipFileUnpack(t *testing.T) {
<mask> fn := "./dist/AdGuardHome_v0.95_Windows_amd64.zip"
<mask> outdir := "./test-unpack"
<mask> _ = os.Mkdir(outdir, 0755)
<mask> e := zipFileUnpack(fn, outdir)
<mask> if e != nil {
<mask> t.Fatalf("FAILED: %s", e)
<mask> }
<mask> os.RemoveAll(outdir)
<... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update_test.go |
t.Logf("%v", files) | <mask> t.Fatalf("FAILED: %s", e)
<mask> }
<mask> os.RemoveAll(outdir)
<mask> }
</s> * auto-update: zipFileUnpack() returns list of unpacked files </s> remove e := zipFileUnpack(fn, outdir)
</s> add files, e := zipFileUnpack(fn, outdir) </s> remove zr.Close()
return fmt.Errorf("io.Copy(): %s", err)
</... | [
"keep",
"add",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/66c670c6fff0489ce1195e5fabec1128505220b5 | control_update_test.go |
dnsctx dnsContext | <mask> versionCheckJSON []byte
<mask> versionCheckLastTime time.Time
<mask>
<mask> dnsServer *dnsforward.Server
<mask> dhcpServer dhcpd.Server
<mask> httpServer *http.Server
<mask> httpsServer HTTPSServer
<mask>
</s> * move "dnsctx" to "config" </s> remove dnsctx.rdnsLock.Lock()
delete(dnsc... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/config.go |
<mask> rdnsLock sync.Mutex // synchronize access to rdnsIP
<mask> upstream upstream.Upstream // Upstream object for our own DNS server
<mask> }
<mask>
<mask> var dnsctx dnsContext
<mask>
<mask> // initDNSServer creates an instance of the dnsforward.Server
<mask> // Please note that we must do it even... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go | |
config.dnsctx.upstream, err = upstream.AddressToUpstream(resolverAddress, opts) | <mask> resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port)
<mask> opts := upstream.Options{
<mask> Timeout: rdnsTimeout,
<mask> }
<mask> dnsctx.upstream, err = upstream.AddressToUpstream(resolverAddress, opts)
<mask> if err != nil {
<mask> log.Error("upstream.AddressToUpstream: %s", err)
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
config.dnsctx.rdnsIP = make(map[string]bool)
config.dnsctx.rdnsChannel = make(chan string, 256) | <mask> if err != nil {
<mask> log.Error("upstream.AddressToUpstream: %s", err)
<mask> return
<mask> }
<mask> dnsctx.rdnsIP = make(map[string]bool)
<mask> dnsctx.rdnsChannel = make(chan string, 256)
<mask> go asyncRDNSLoop()
<mask> }
<mask>
<mask> func isRunning() bool {
<mask> return config.dnsSer... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
config.dnsctx.rdnsLock.Lock()
defer config.dnsctx.rdnsLock.Unlock()
_, ok := config.dnsctx.rdnsIP[ip] | <mask> return
<mask> }
<mask>
<mask> // add IP to rdnsIP, if not exists
<mask> dnsctx.rdnsLock.Lock()
<mask> defer dnsctx.rdnsLock.Unlock()
<mask> _, ok := dnsctx.rdnsIP[ip]
<mask> if ok {
<mask> return
<mask> }
<mask> dnsctx.rdnsIP[ip] = true
<mask>
</s> * move "dnsctx" to "config" </s> remo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
config.dnsctx.rdnsIP[ip] = true | <mask> _, ok := dnsctx.rdnsIP[ip]
<mask> if ok {
<mask> return
<mask> }
<mask> dnsctx.rdnsIP[ip] = true
<mask>
<mask> log.Tracef("Adding %s for rDNS resolve", ip)
<mask> select {
<mask> case dnsctx.rdnsChannel <- ip:
<mask> //
</s> * move "dnsctx" to "config" </s> remove case dnsctx.rdnsChannel ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
case config.dnsctx.rdnsChannel <- ip: | <mask> dnsctx.rdnsIP[ip] = true
<mask>
<mask> log.Tracef("Adding %s for rDNS resolve", ip)
<mask> select {
<mask> case dnsctx.rdnsChannel <- ip:
<mask> //
<mask> default:
<mask> log.Tracef("rDNS queue is full")
<mask> }
<mask> }
</s> * move "dnsctx" to "config" </s> remove dnsctx.rdnsIP[ip] = tru... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
resp, err := config.dnsctx.upstream.Exchange(&req) | <mask> log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err)
<mask> return ""
<mask> }
<mask>
<mask> resp, err := dnsctx.upstream.Exchange(&req)
<mask> if err != nil {
<mask> log.Error("Error while making an rDNS lookup for %s: %s", ip, err)
<mask> return ""
<mask> }
<mask> if len(re... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
ip = <-config.dnsctx.rdnsChannel | <mask> // Add the hostname:IP pair to "Clients" array
<mask> func asyncRDNSLoop() {
<mask> for {
<mask> var ip string
<mask> ip = <-dnsctx.rdnsChannel
<mask>
<mask> host := resolveRDNS(ip)
<mask> if len(host) == 0 {
<mask> continue
<mask> }
</s> * move "dnsctx" to "config" </s> remove dnsctx... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
config.dnsctx.rdnsLock.Lock()
delete(config.dnsctx.rdnsIP, ip)
config.dnsctx.rdnsLock.Unlock() | <mask> if len(host) == 0 {
<mask> continue
<mask> }
<mask>
<mask> dnsctx.rdnsLock.Lock()
<mask> delete(dnsctx.rdnsIP, ip)
<mask> dnsctx.rdnsLock.Unlock()
<mask>
<mask> _, _ = config.clients.AddHost(ip, host, ClientSourceRDNS)
<mask> }
<mask> }
<mask>
</s> * move "dnsctx" to "config" </s>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/6701e9ce068d7caba926673f0217f7d8108d7db2 | home/dns.go |
var cj clientJSON | <mask> el := map[string]interface{}{}
<mask> c, ok := clients.Find(ip)
<mask> if !ok {
<mask> var found bool
<mask> cj, found = clients.findTemporary(ip)
<mask> if !found {
</s> Pull request: home: don't miss blocked clients in client search api
Merge in DNS/adguard-home from 2428-blocked-runtime... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/clientshttp.go |
var found bool
cj, found = clients.findTemporary(ip)
if !found {
continue | <mask> }
<mask> el := map[string]interface{}{}
<mask> c, ok := clients.Find(ip)
<mask> if !ok {
<mask> ch, ok := clients.FindAutoClient(ip)
<mask> if !ok {
<mask> continue // a client with this IP isn't found
<mask> }
<mask> cj := clientHostToJSON(ip, ch)
<mask>
<mask> cj.Disallow... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/clientshttp.go |
<mask> ch, ok := clients.FindAutoClient(ip)
<mask> if !ok {
<mask> continue // a client with this IP isn't found
<mask> }
<mask> cj := clientHostToJSON(ip, ch)
<mask>
<mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip)
<mask> el[ip] = cj
<mask> } else {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/clientshttp.go | |
cj = clientToJSON(&c) | <mask>
<mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip)
<mask> el[ip] = cj
<mask> } else {
<mask> cj := clientToJSON(&c)
<mask>
<mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip)
<mask> el[ip] = cj
<mask> }
<mask>
<mask> data = appen... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/clientshttp.go |
<mask> } else {
<mask> cj := clientToJSON(&c)
<mask>
<mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip)
<mask> el[ip] = cj
<mask> }
<mask>
<mask> data = append(data, el)
<mask> }
<mask>
</s> Pull request: home: don't miss blocked clients in client search api
Merge... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/clientshttp.go | |
el[ip] = cj | <mask> cj.Disallowed, cj.DisallowedRule = clients.dnsServer.IsBlockedIP(ip)
<mask> }
<mask>
<mask> data = append(data, el)
<mask> }
<mask>
<mask> js, err := json.Marshal(data)
<mask> if err != nil {
<mask> httpError(w, http.StatusInternalServerError, "json.Marshal: %s", err)
</s> Pull request: h... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/clientshttp.go |
data.NotBefore.Equal(notBefore) &&
data.NotAfter.Equal(notAfter) && | <mask> data.ValidKey &&
<mask> data.KeyType == "RSA" &&
<mask> data.Subject == "CN=AdGuard Home,O=AdGuard Ltd" &&
<mask> data.Issuer == "CN=AdGuard Home,O=AdGuard Ltd" &&
<mask> data.NotBefore == notBefore &&
<mask> data.NotAfter == notAfter &&
<mask> // data.DNSNames[0] == &&
<mask> data.Valid... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/control_test.go |
respData.Web.Status = err.Error() | <mask>
<mask> if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort {
<mask> err = util.CheckPortAvailable(reqData.Web.IP, reqData.Web.Port)
<mask> if err != nil {
<mask> respData.Web.Status = fmt.Sprintf("%v", err)
<mask> }
<mask> }
<mask>
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/controlinstall.go |
respData.DNS.Status = err.Error() | <mask> err = util.CheckPortAvailable(reqData.DNS.IP, reqData.DNS.Port)
<mask> }
<mask>
<mask> if err != nil {
<mask> respData.DNS.Status = fmt.Sprintf("%v", err)
<mask> } else if reqData.DNS.IP != "0.0.0.0" {
<mask> respData.StaticIP = handleStaticIP(reqData.DNS.IP, reqData.SetStaticIP)
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/679bbcdc26775bc3d961cbeef553dce7aa9c091b | internal/home/controlinstall.go |
// Package cmd is the AdGuard Home entry point. It assembles the configuration
// file manager, sets up signal processing logic, and so on. | <mask> // Package cmd is the AdGuard Home entry point. It contains the on-disk
<mask> // configuration file utilities, signal processing logic, and so on.
<mask> //
<mask> // TODO(a.garipov): Move to the upper-level internal/.
<mask> package cmd
<mask>
<mask> import (
</s> Pull request 1870: nextapi-frontend-... | [
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
<mask>
<mask> import (
<mask> "context"
<mask> "io/fs"
<mask> "math/rand"
<mask> "os"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/next/configmgr"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/version"
</s> Pull request 1870: nextapi-frontend-fs
Merge in DNS/adguar... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go | |
// Main is the entry point of AdGuard Home.
func Main(frontend fs.FS) { | <mask> "github.com/AdguardTeam/AdGuardHome/internal/version"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // Main is the entry point of application.
<mask> func Main(clientBuildFS fs.FS) {
<mask> // Initial Configuration
<mask>
<mask> start := time.Now()
<mask> rand.Seed(start.Unix... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
<mask> func Main(clientBuildFS fs.FS) {
<mask> // Initial Configuration
<mask>
<mask> start := time.Now()
<mask> rand.Seed(start.UnixNano())
<mask>
<mask> // TODO(a.garipov): Set up logging.
<mask>
<mask> log.Info("starting adguard home, version %s, pid %d", version.Version(), os.Getpid())
<mask>
</... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go | |
<mask> log.Info("starting adguard home, version %s, pid %d", version.Version(), os.Getpid())
<mask>
<mask> // Web Service
<mask>
<mask> // TODO(a.garipov): Use in the Web service.
<mask> _ = clientBuildFS
<mask>
<mask> // TODO(a.garipov): Set up configuration file name.
<mask> const confFile = "AdGuar... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go | |
confMgr, err := configmgr.New(confFile, frontend, start)
check(err) | <mask>
<mask> // TODO(a.garipov): Set up configuration file name.
<mask> const confFile = "AdGuardHome.1.yaml"
<mask>
<mask> confMgr, err := configmgr.New(confFile, start)
<mask> fatalOnError(err)
<mask>
<mask> web := confMgr.Web()
<mask> err = web.Start()
<mask> fatalOnError(err)
<mask>
</s> Pul... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
check(err) | <mask> fatalOnError(err)
<mask>
<mask> web := confMgr.Web()
<mask> err = web.Start()
<mask> fatalOnError(err)
<mask>
<mask> dns := confMgr.DNS()
<mask> err = dns.Start()
<mask> fatalOnError(err)
<mask>
</s> Pull request 1870: nextapi-frontend-fs
Merge in DNS/adguard-home from nextapi-frontend-fs t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
check(err) | <mask> fatalOnError(err)
<mask>
<mask> dns := confMgr.DNS()
<mask> err = dns.Start()
<mask> fatalOnError(err)
<mask>
<mask> sigHdlr := newSignalHandler(
<mask> confFile,
<mask> start,
<mask> web,
</s> Pull request 1870: nextapi-frontend-fs
Merge in DNS/adguard-home from nextapi-frontend-fs to m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
frontend, | <mask> sigHdlr := newSignalHandler(
<mask> confFile,
<mask> start,
<mask> web,
<mask> dns,
<mask> )
<mask>
</s> Pull request 1870: nextapi-frontend-fs
Merge in DNS/adguard-home from nextapi-frontend-fs to master
Squashed commit of the following:
commit 3ed959f21939cf5590c27426af46906cbffed502
Merg... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
sigHdlr.handle() | <mask> web,
<mask> dns,
<mask> )
<mask>
<mask> go sigHdlr.handle()
<mask>
<mask> select {}
<mask> }
<mask>
<mask> // defaultTimeout is the timeout used for some operations where another timeout
<mask> // hasn't been defined yet.
<mask> const defaultTimeout = 15 * time.Second
</s> Pull request 187... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
const defaultTimeout = 5 * time.Second | <mask> }
<mask>
<mask> // defaultTimeout is the timeout used for some operations where another timeout
<mask> // hasn't been defined yet.
<mask> const defaultTimeout = 15 * time.Second
<mask>
<mask> // ctxWithDefaultTimeout is a helper function that returns a context with
<mask> // timeout set to defaultTimeo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
// check is a simple error-checking helper. It must only be used within Main.
func check(err error) { | <mask> func ctxWithDefaultTimeout() (ctx context.Context, cancel context.CancelFunc) {
<mask> return context.WithTimeout(context.Background(), defaultTimeout)
<mask> }
<mask>
<mask> // fatalOnError is a helper that exits the program with an error code if err is
<mask> // not nil. It must only be used within Ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
panic(err) | <mask> // fatalOnError is a helper that exits the program with an error code if err is
<mask> // not nil. It must only be used within Main.
<mask> func fatalOnError(err error) {
<mask> if err != nil {
<mask> log.Fatal(err)
<mask> }
<mask> }
</s> Pull request 1870: nextapi-frontend-fs
Merge in DNS/adguard-... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/cmd.go |
"io/fs" | <mask> package cmd
<mask>
<mask> import (
<mask> "os"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghos"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/next/agh"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/next/configmgr"
</s> Pull request 1870: nextapi-fronten... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/signal.go |
// frontend is the filesystem with the frontend and other statically
// compiled files.
frontend fs.FS
| <mask> // confFile is the path to the configuration file.
<mask> confFile string
<mask>
<mask> // start is the time at which AdGuard Home has been started.
<mask> start time.Time
<mask>
<mask> // services are the services that are shut down before application exiting.
<mask> services []agh.Service
</s>... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/signal.go |
confMgr, err := configmgr.New(h.confFile, h.frontend, h.start)
check(err) | <mask> // TODO(a.garipov): This is a very rough way to do it. Some services can be
<mask> // reconfigured without the full shutdown, and the error handling is
<mask> // currently not the best.
<mask>
<mask> confMgr, err := configmgr.New(h.confFile, h.start)
<mask> fatalOnError(err)
<mask>
<mask> web :=... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/681c604c228942dfcb90c02f88e0fe148c7acd67 | internal/next/cmd/signal.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.