Commit Graph

169 Commits

Author SHA1 Message Date
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
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 4f0975bab5 + client: add norwegian language 2019-12-05 14:56:52 +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
Simon Zolin 8dbdf49c32 * use dnsproxy v0.22.0 and urlfilter v0.7.0 2019-12-03 20:55:45 +03:00
Ildar Kamalov 4d7984cb8b Merge: Update blocked_services.go Snapchat Rules
Closes #1222

* commit '9c2e5c3f51fa7fdc5f5e6d89a73c1456a8df49d0':
  Update blocked_services.go Snapchat Rules
2019-12-03 13:35:09 +03:00
Simon Zolin 7e45c2fc24 + new setting "dns.querylog_memsize"
* set 1000 entries by default (not 5000)
2019-12-02 15:46:03 +03:00
Simon Zolin f579c23bc9 * minor fixes 2019-12-02 15:25:11 +03:00
Simon Zolin 9b8cccdfcf * dnsforward: refactor code for default DNS servers logic 2019-12-02 14:58:17 +03:00
Simon Zolin 8bf75b54a4 * update tests 2019-12-02 14:58:17 +03:00
Simon Zolin 19a1c03d3b * dnsforward: move access settings and web handlers 2019-12-02 14:58:17 +03:00
Simon Zolin 7bb32eae3d + dnsforward: refactor
+ dnsforward: own HTTP handlers
* dnsforward: no DNS reload on ProtectionEnabled setting change
* dnsforward: move QueryLog* settings out
* dnsforward: move dnsfilter settings out
* clients,i18n: no DNS reload on settings change
2019-12-02 14:58:17 +03:00
Cybo1927 9c2e5c3f51
Update blocked_services.go Snapchat Rules
Snapchat still works on Android if that's not blocked
2019-11-29 16:55:27 +00:00
Simon Zolin a692616981 - clients: fix tests 2019-11-29 17:35:26 +03:00
Simon Zolin e9cb8666ce * clients: refactor 2019-11-29 17:11:07 +03:00
Simon Zolin 477a4bbf54 * dhcp: move HTTP handlers to dhcpd/ 2019-11-29 17:11:07 +03:00
Simon Zolin 149fcc0f2d * dhcp,clients: DHCP server module is passed to Clients module during initialization. 2019-11-29 17:11:07 +03:00
Simon Zolin fd26af2677 * minor 2019-11-29 16:53:21 +03:00
Simon Zolin 317a9cc49e * config: upgrade scheme to v6 2019-11-29 16:53:05 +03:00
Simon Zolin 71ce0c6da9 * clients: multiple IP, CIDR, MAC addresses
+ /clients/find
* clients: move code for config read/write
* clients: move HTTP handlers
2019-11-29 16:52:32 +03:00
Simon Zolin 48c0b487e3 Merge: * auth: rename "session" cookie to "agh_session"
Close #1196

* commit 'b3614ba62fcde8ff3e3b6e708095f84a230aa2f2':
  * auth: rename "session" cookie to "agh_session"
2019-11-26 19:21:34 +03:00
Ildar Kamalov bdffd8534c Merge: Update blocked_services.goTikTok Rules
Closes #1192

* commit 'f19d8c24c3e3a8d2934affc5690cc72c044a0a3f':
  Update blocked_services.goTikTok Rules
2019-11-26 13:48:58 +03:00
Cybo1927 f19d8c24c3 Update blocked_services.goTikTok Rules 2019-11-26 12:01:09 +03:00
Cybo1927 e0be4e8801 Update blocked_services.go Facebook, Messenger, and Instagram Rules 2019-11-26 11:17:22 +03:00
Ildar Kamalov 713613e3b8 Merge: Update blocked_services.go Snapchat Rules
Closes #1189

* commit 'a78156a7cb259f3cb0a78b7466e09ee4b99f2356':
  Update blocked_services.go Snapchat Rules
2019-11-26 11:12:19 +03:00
Ildar Kamalov af3096e23b Merge: blocked services: add new domain for youtube
Closes #1149

* commit '9675b3776ee50d8df4ce8a875f9b70b22bb8f8ee':
  blocked services: add new domain for youtube
2019-11-26 11:10:19 +03:00
Simon Zolin b3614ba62f * auth: rename "session" cookie to "agh_session"
for compatibility with other HTTP services on the same host
2019-11-25 15:48:14 +03:00
Simon Zolin dc2c68b1e4 * use Go v1.13 2019-11-25 14:10:28 +03:00
Cybo1927 a78156a7cb Update blocked_services.go Snapchat Rules 2019-11-22 14:54:14 +03:00
ArchiveBase 9675b3776e blocked services: add new domain for youtube 2019-11-22 14:50:38 +03:00
ArchiveBase 36636867e1 + blocked_services: add cloudflare 2019-11-21 11:40:03 +03:00
Simon Zolin 7c81efcbcb * go.mod: use bbolt from github 2019-11-20 20:14:28 +03:00
Cybo1927 15f6334748 * blocked_services: update hosts for whatsapp, facebook, youtube, tiktok 2019-11-20 19:57:38 +03:00
ArchiveBase ca6048f667 + blocked_services: add origin 2019-11-20 18:54:45 +03:00
Ildar Kamalov fa45f8a256 Merge: Add amazon to blocked services
* commit 'b1c7497d0552b4abd796e82a166d55faa90a030f':
  + client: add ebay icon
  + blocked_services: add ebay
  + client: add amazon icon
  + blocked_services: add amazon
2019-11-20 18:54:13 +03:00
Ildar Kamalov e7cf8f222d Merge: Add reddit to blocked services
* commit '7c10cefdf9a3d421de2d7e88cfd4e647baf31e8b':
  + client: add reddit icon
  + blocked_services: add reddit
2019-11-20 18:53:35 +03:00
Simon Zolin b03b36e47e * auth: improve logging
Write info log messages for login attempts (both successful and not)
2019-11-20 13:15:12 +03:00
Simon Zolin c9a6e4e018 + config: "web_session_ttl" setting 2019-11-20 13:15:08 +03:00
ArchiveBase c49f62cfe6 + blocked_services: add ebay 2019-11-20 10:28:57 +03:00
ArchiveBase 4a59d5a116 + blocked_services: add amazon 2019-11-20 10:28:56 +03:00
ArchiveBase dbf7a083cb + blocked_services: add reddit 2019-11-20 10:24:41 +03:00
Simon Zolin 6b76a2c9f7 Merge: * blocked-services: youtube: add "youtubei.googleapis.com"
Close #1122

* commit '59720467da42c8520e5d25b2c3368728a61d6bf6':
  * blocked-services: youtube: add "youtubei.googleapis.com"
2019-11-07 15:30:23 +03:00
Simon Zolin 59720467da * blocked-services: youtube: add "youtubei.googleapis.com" 2019-11-07 15:16:47 +03:00
Simon Zolin abd251c5c1 * whois,rdns: use 1 hour cache TTL 2019-11-07 14:02:34 +03:00
Simon Zolin ab24ab2f1a - auth: fix crash on showing Dashboard in UI if authentication is disabled 2019-10-25 11:01:29 +03:00
Simon Zolin 03c4793010 Merge: * don't show "sign out" button if authorization is disabled
Close #1093

* commit '49e535336be47cccee07f2e1b05f0d514aa91aa7':
  * changelog
  + client: get profile info
  * minor
  + GET /control/profile
2019-10-23 19:23:37 +03:00
Simon Zolin 9d29fdea4b Merge: * filters: don't fail on filter update when filter file doesn't exist
Close #1112

* commit '0737354f534385c3c2036e15d65554bcb7090fb4':
  * filters: don't fail on filter update when filter file doesn't exist
2019-10-23 19:19:50 +03:00
Simon Zolin c185f6826a + GET /control/profile
* openapi: get /profile

* auth: store user names along with sessions
2019-10-23 18:43:35 +03:00