Commit Graph

1778 Commits

Author SHA1 Message Date
Simon Zolin
b9c0b55356 * dhcp: now static leases functionality works before DHCP is started 2019-12-17 15:59:05 +03:00
Simon Zolin
b105f20837 Merge: - DNS: fix slow response to /status and /access/list requests
Close #1264

* commit '8521635f63e9570a4e75033533dec8180e7f130a':
  - DNS: fix slow response to /status and /access/list requests
2019-12-17 15:11:48 +03:00
Simon Zolin
8521635f63 - DNS: fix slow response to /status and /access/list requests 2019-12-17 13:09:03 +03:00
Simon Zolin
04de9d0f7b Merge: - DNS: "custom_ip" blocking mode didn't work after app restart
Close #1262

Squashed commit of the following:

commit bacd683ef5b52e275323a3c07b370ca08702403e
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 17:00:49 2019 +0300

    fix

commit 3d4f9626460de3e13a621f2b8e535e9e0939e2bb
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 16:54:23 2019 +0300

    fix

commit bf924bf90e9b705883bec88f8d7af11c39c1f322
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 16:45:41 2019 +0300

    add test

commit 43338ea3645a025d69dd838bc732344255960bed
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 16:07:51 2019 +0300

    - DNS: "custom_ip" blocking mode didn't work after app restart

commit 220f32e713a95d2c67355c61e419dd09df9d42b2
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 15:46:01 2019 +0300

    - first run: fix panic on stop in case initialization didn't complete

    e.g. when Stats module can't be initialized because of incompatible file system
2019-12-16 17:04:30 +03:00
Simon Zolin
6a2430b799 Merge: - clients: IPv6 address matching didn't work
Close #1261

Squashed commit of the following:

commit acc39ea6c0d88cb9d2b07837e89db2c170263891
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 12:29:33 2019 +0300

    minor

commit 0d2ef3d53185d5ca17797e2ac20f0efc1498a53c
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 12:13:17 2019 +0300

    add link to GH

commit 0da754b1751057968780b457a2f490f4148275a8
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 16 11:53:42 2019 +0300

    - clients: IPv6 address matching didn't work
2019-12-16 12:36:52 +03:00
Simon Zolin
d9ee9b88d6 Merge: Revert "Merge: + DNS: TLS handshake: terminate handshake on bad SNI"
* commit 'b00a789ca34008dfe9e4cfdb0b2d4d63874957ff':
  Revert "Merge: + DNS: TLS handshake: terminate handshake on bad SNI"
2019-12-13 17:42:57 +03:00
Simon Zolin
864c91e524 Merge: - DNS: fix security checks via PC/SB services
Squashed commit of the following:

commit e73bc282d77a11c923a86166035f1b44427d7066
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Fri Dec 13 17:17:36 2019 +0300

    fix

commit f8b5c174816c6fd57fb3930cc465318f468fc8ff
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Fri Dec 13 17:03:13 2019 +0300

    fix

commit 9d5483a2fb89a172218547b5ee356e7122dca609
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Fri Dec 13 16:54:30 2019 +0300

    - fix security checks via PC/SB services
2019-12-13 17:42:01 +03:00
Simon Zolin
b00a789ca3 Revert "Merge: + DNS: TLS handshake: terminate handshake on bad SNI"
This reverts commit c8c76ae12b.
2019-12-13 17:38:17 +03:00
Simon Zolin
42790bf083 Merge: * client: correction on message toast
* commit '4942d0c39f2b078ba25993151e7ee59fa0e969b8':
  * client: correction on message toast
2019-12-13 14:02:13 +03:00
Fresnel Vincent
4942d0c39f * client: correction on message toast
fix #1255
2019-12-13 13:50:42 +03:00
Andrey Meshkov
af7f51d9b9 Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-home 2019-12-13 13:31:13 +03:00
Andrey Meshkov
3d280c5d92 *: run travis in AG repo only 2019-12-13 13:31:10 +03:00
Simon Zolin
c8c76ae12b Merge: + DNS: TLS handshake: terminate handshake on bad SNI
Close #1014

Squashed commit of the following:

commit 759248efc0587ff2f288996c47739e602c557a76
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 19:26:46 2019 +0300

    support empty ServerName

commit 68afecd5eca5ae66262b12dcb414b50efe88dc02
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Dec 11 14:40:22 2019 +0300

    + DNS: TLS handshake: terminate handshake on bad SNI
2019-12-13 13:06:37 +03:00
Simon Zolin
aa202277fb Merge: * update translations
Close #1250

Squashed commit of the following:

commit e722a3e3b4b1049c5df22b3f11b5826992d3cc6c
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 18:27:51 2019 +0300

    update ru

commit 086e722a4dc1922ac7b8aff537050689900a8bd0
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 18:15:15 2019 +0300

    fix cloudflare -> quad9, update es

commit 86c235936d2f86e536f45fc475f29b43eb695e3d
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 18:01:20 2019 +0300

    * update es, ru, sr-cs

commit 2b6b510b998b7e7b2f4c3fa5d7af57dc5413a611
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 17:43:05 2019 +0300

    * update 'no'

commit 1de6215aa90374ee147bbd0a685643232e98e4c8
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 17:41:37 2019 +0300

    * use dnsproxy v0.23.2

commit c545a1bf7e4e706b45b4670b804a50bf8d75bae3
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 17:36:37 2019 +0300

    update ru

commit c22eec9bcfad67284e21cfc4e6b06fb63a64d25d
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Dec 12 17:22:03 2019 +0300

    * update translations;  add sr-cs, fa, hr
2019-12-12 18:42:51 +03:00
Simon Zolin
9cc09274f1 Merge: - DNS: fix deadlock
Close #1251

* commit 'ef57f7e192fdd4fbbfe25dc1c1e61d52e9f0b6ee':
  - DNS: fix race in WriteDiskConfig()
  - DNS: fix deadlock in Server.ServeHTTP()
2019-12-12 15:08:19 +03:00
Simon Zolin
ef57f7e192 - DNS: fix race in WriteDiskConfig() 2019-12-12 15:04:29 +03:00
Simon Zolin
000e842f7b - DNS: fix deadlock in Server.ServeHTTP()
s.RLock() is called again in filterResponse() while another thread
 holds s.Lock()
2019-12-12 15:00:10 +03:00
Ildar Kamalov
e85fdd7f09 Merge: - client: fix request count in clients table
* commit '8c8deb3d3db72a2f091156d3ec10447f0e6c062c':
  - client: fix request count in clients table
2019-12-12 13:46:44 +03:00
Ildar Kamalov
8c8deb3d3d - client: fix request count in clients table 2019-12-12 11:33:02 +03:00
Simon Zolin
c9ccc53282 Merge: * set BlockingMode: "null_ip" by default; minor improvements
Squashed commit of the following:

commit 653544b98dc4d1b9a74e1509d0e6104b71bcdcb3
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Dec 11 17:34:41 2019 +0300

    * DNS reconfigure: protect against delayed socket fd close

commit 9e650f37dee7f771bf1d9d714c35f0a81788aa16
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Dec 11 15:28:33 2019 +0300

    - fix race on startup

commit 878fdb8fc4ebbc6fab683a65f5e4298e64c2073e
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Dec 11 15:11:21 2019 +0300

    * travis: don't run tests

commit 1c4ab60684ee22d55e6d2a3350c0f24d9844255c
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Dec 11 14:56:28 2019 +0300

    * travis: 'release.sh' and then run tests

commit e1f644b8d9a1f3b46990cdfb1b75fd81b3a49d33
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Dec 11 14:52:59 2019 +0300

    * set BlockingMode: "null_ip" by default
2019-12-11 17:54:34 +03:00
Andrey Meshkov
daf17f16f2 -(home): fix whois info on the dashboard 2019-12-11 14:31:38 +03:00
Simon Zolin
0a66913b4d Merge: * use upstream servers directly for the internal DNS resolver
Close #1212

* Server.Start(config *ServerConfig) -> Start()
+ Server.Prepare(config *ServerConfig)
+ Server.Resolve(host string)
+ Server.Exchange()
* rDNS: use internal DNS resolver
- clients: fix race in WriteDiskConfig()
- fix race: move 'clients' object from 'configuration' to 'HomeContext'
    Go race detector didn't like our 'clients' object in 'configuration'.
+ add AGH startup test
    . Create a configuration file
    . Start AGH instance
    . Check Web server
    . Check DNS server
    . Wait until the filters are downloaded
    . Stop and cleanup
* move module objects from config.* to Context.*
* don't call log.SetLevel() if not necessary
    This helps to avoid Go race detector's warning
* ci.sh: 'make' and then run tests

Squashed commit of the following:

commit 86500c7f749307f37af4cc8c2a1066f679d0cfad
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 18:08:53 2019 +0300

    minor

commit 6e6abb9dca3cd250c458bec23aa30d2250a9eb40
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 18:08:31 2019 +0300

    * ci.sh: 'make' and then run tests

commit 114192eefea6800e565ba9ab238202c006516c27
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 17:50:04 2019 +0300

    fix

commit d426deea7f02cdfd4c7217a38c59e51251956a0f
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 17:46:33 2019 +0300

    tests

commit 7b350edf03027895b4e43dee908d0155a9b0ac9b
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 15:56:12 2019 +0300

    fix test

commit 2f5f116873bbbfdd4bb7f82a596f9e1f5c2bcfd8
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 15:48:56 2019 +0300

    fix tests

commit 3fbdc77f9c34726e2295185279444983652d559e
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 15:45:00 2019 +0300

    linter

commit 9da0b6965a2b6863bcd552fa83a4de2866600bb8
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 15:33:23 2019 +0300

    * config.dnsctx.whois -> Context.whois

commit c71ebdbdf6efd88c877b2f243c69d3bc00a997d7
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 15:31:08 2019 +0300

    * don't call log.SetLevel() if not necessary

    This helps to avoid Go race detector's warning

commit 0f250220133cefdcb0843a50000cb932802b8324
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 15:28:19 2019 +0300

    * rdns: refactor

commit c460d8c9414940dac852e390b6c1b4d4fb38dff9
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 14:08:08 2019 +0300

    Revert: * stats: serialize access to 'limit'

    Use 'conf *Config' and update it atomically, as in querylog module.
    (Note: Race detector still doesn't like it)

commit 488bcb884971276de0d5629384b29e22c59ee7e6
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 13:50:23 2019 +0300

    * config.dnsFilter -> Context.dnsFilter

commit 86c0a6827a450414b50acec7ebfc5220d13b81e4
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 13:45:05 2019 +0300

    * config.dnsServer -> Context.dnsServer

commit ee35ef095ccaabc89e3de0ef52c9b5ed56b36873
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 13:42:10 2019 +0300

    * config.dhcpServer -> Context.dhcpServer

commit 1537001cd211099d5fad01696c0b806ae5d257b1
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 13:39:45 2019 +0300

    * config.queryLog -> Context.queryLog

commit e5955fe4ff1ef6f41763461b37b502ea25a3d04c
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Dec 10 13:03:18 2019 +0300

    * config.httpsServer -> Context.httpsServer

commit 6153c10a9ac173e159d1f05e0db1512579b9203c
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 9 20:12:24 2019 +0300

    * config.httpServer -> Context.httpServer

commit abd021fb94039015cd45c97614e8b78d4694f956
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 9 20:08:05 2019 +0300

    * stats: serialize access to 'limit'

commit 38c2decfd87c712100edcabe62a6d4518719cb53
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 9 19:57:04 2019 +0300

    * config.stats -> Context.stats

commit 6caf8965ad44db9dce9a7a5103aa8fa305ad9a06
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 9 19:45:23 2019 +0300

    fix Restart()

... and 6 more commits
2019-12-11 12:38:58 +03:00
Artem Baskal
fe357d04f7 Merge: - client: add message when dns server is starting up
Close #1186

* commit '1e429df3bcb8ea2fd3a457c026cb8c8a7131e504':
  - client: add message when dns server is starting up
2019-12-10 18:30:51 +03:00
Artem Baskal
1e429df3bc - client: add message when dns server is starting up 2019-12-10 17:48:42 +03:00
Simon Zolin
2b14a043a9 Merge: + DNS: new settings (ratelimit, blocking mode, edns_client_subnet)
Close #1091 Close #1154 Close #1022

* commit '97e77cab643d6784067ce97c0f03ec3e4612c2c9':
  + client: handle EDNS Client Subnet setting
  + dns: add "edns_client_subnet" setting
  + client: handle DNS config
  * DNS: remove /enable_protection and /disable_protection
  + openapi: /dns_info, /dns_config
  * /control/set_upstreams_config: allow empty upstream list
  + dns: support blocking_mode=custom_ip
  + DNS: Get/Set DNS general settings
2019-12-10 16:10:31 +03:00
Ildar Kamalov
97e77cab64 + client: handle EDNS Client Subnet setting 2019-12-10 16:01:18 +03:00
Simon Zolin
19a94bf789 + dns: add "edns_client_subnet" setting 2019-12-10 16:01:17 +03:00
Artem Baskal
197d07f32b + client: handle DNS config 2019-12-10 16:01:17 +03:00
Simon Zolin
87bb773d3e * DNS: remove /enable_protection and /disable_protection 2019-12-10 16:01:17 +03:00
Simon Zolin
3b13c031a3 + openapi: /dns_info, /dns_config 2019-12-10 16:01:17 +03:00
Simon Zolin
1b3122dd35 * /control/set_upstreams_config: allow empty upstream list 2019-12-10 16:01:17 +03:00
Simon Zolin
4f4da3397c + dns: support blocking_mode=custom_ip 2019-12-10 16:01:16 +03:00
Simon Zolin
26ccee47b5 + DNS: Get/Set DNS general settings
GET /control/dns_info
POST /control/dns_config
2019-12-10 16:01:16 +03:00
Ildar Kamalov
92141e03c4 Merge: - client: fix request count in clients table
* commit '289c6f8c731f616c73eac2739b572c13eb245680':
  - client: fix request count in clients table
2019-12-10 15:55:38 +03:00
Ildar Kamalov
289c6f8c73 - client: fix request count in clients table 2019-12-10 15:22:40 +03:00
Simon Zolin
40763c903b Merge: * stats: handle "invalid argument" error from "bbolt"
Close #1188

Squashed commit of the following:

commit 70355154bb49ae7df57e79ed1405754682f5d57f
Merge: 331650e6 d1c47c0d
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 9 14:09:59 2019 +0300

    Merge remote-tracking branch 'origin/master' into 1188-bolt-err

commit 331650e60d5869b7c706b539f04c1a856cd9f254
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Dec 9 13:57:14 2019 +0300

    minor

commit 07130a0f1f2e88cab30a88d899e8d817096ac35f
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Dec 4 13:50:29 2019 +0300

    * stats: handle "invalid argument" error from "bbolt"
2019-12-09 14:13:39 +03:00
Artem Baskal
d1c47c0dbb Merge: + client: add norwegian language
Closes #1174

* commit '4f0975bab5db189a192aeb07c7e8f6cebc101f34':
  + client: add norwegian language
2019-12-05 16:36:51 +03:00
Artem Baskal
4f0975bab5 + client: add norwegian language 2019-12-05 14:56:52 +03:00
Simon Zolin
9fd27b9add Merge: + Clients: use per-client DNS servers
Close #821

* commit '6684a120ac9909140e4ecbe674e09c8f24e87ac4':
  + client: handle upstream DNS servers for clients
  * openapi: add "upstreams" to Client struct
  + use per-client DNS servers
2019-12-05 13:22:50 +03:00
Ildar Kamalov
6684a120ac + client: handle upstream DNS servers for clients 2019-12-05 13:19:27 +03:00
Simon Zolin
72ec4d7d7e * openapi: add "upstreams" to Client struct 2019-12-05 13:16:41 +03:00
Simon Zolin
7313c3bc53 + use per-client DNS servers 2019-12-05 13:16:41 +03:00
Simon Zolin
b6b26c0681 Merge: - rDNS: support multiple Answer records
Close #1230

* commit '56a0c9684bfdb8bebbeea5eb94192a215d8d45a1':
  - rDNS: support multiple Answer records
2019-12-05 13:14:57 +03:00
Simon Zolin
56a0c9684b - rDNS: support multiple Answer records 2019-12-05 13:06:52 +03:00
Andrey Meshkov
47cc025504 Merge: fix #1211 * use dnsproxy v0.21.0 and urlfilter v0.7.0
* commit '8dbdf49c32d66288dece97b84a6b70b05e5ff43e':
  * use dnsproxy v0.22.0 and urlfilter v0.7.0
2019-12-04 20:44:40 +03:00
Simon Zolin
89cc1715d9 Merge: - DHCP: normalize leases on startup (prioritize static leases over dynamic)
Close #1005

* commit '906f26d7d276c181960048a2c059d5b141e71f0a':
  - DHCP: normalize leases on startup (prioritize static leases over dynamic)
2019-12-04 19:43:04 +03:00
Simon Zolin
8dbdf49c32 * use dnsproxy v0.22.0 and urlfilter v0.7.0 2019-12-03 20:55:45 +03:00
Simon Zolin
906f26d7d2 - DHCP: normalize leases on startup (prioritize static leases over dynamic) 2019-12-03 20:43:22 +03:00
Simon Zolin
07a9c3bd45 Merge: + dnsforward: match CNAME with filtering rules
Close #1185

* commit '8cb4d128f5392646eb60229717b09f8398897075':
  * openapi: get /querylog: add "original_answer", "service_name"
  * doc: filtering logic with a diagram
  + client: handle blocked by response in query log
  + dnsforward: match CNAME with filtering rules
2019-12-03 17:09:30 +03:00
Simon Zolin
8cb4d128f5 * openapi: get /querylog: add "original_answer", "service_name" 2019-12-03 17:01:26 +03:00