Commit Graph

993 Commits

Author SHA1 Message Date
Simon Zolin 8defb3b39e Merge: control: DHCP: don't return expired leases #584 #567
* commit 'ef789acee4ef990d9f93fa7f718f819b5bdea03d':
  * control: DHCP: don't return expired leases
2019-03-20 12:58:03 +03:00
Simon Zolin d5e57248a0 Merge: Add "Setup guide" menu item #605
* commit 'c091d10a416b0ea9c72fb1addd95e7194281d9ce':
  * client: update translations
  + client: added setup guide page and DNS addresses popover
  + control: use the list of IP addresses instead of single string in "dns_address"
2019-03-20 12:56:47 +03:00
Simon Zolin 0647f3fe86 * filters: rework update mechanism so that UI doesn't get locked while update is in progress 2019-03-19 17:30:17 +03:00
Simon Zolin d664a9de1d - filter: update 'LastUpdated' field and 'last-modified' file time
even when filter's content is up to date

* filters: refactor: don't check 'LastUpdated' inside update()
2019-03-19 17:30:17 +03:00
Simon Zolin b54f540f71 * control: refactor: move filter adding code to a separate function 2019-03-19 17:30:17 +03:00
Simon Zolin 0884116de3 * app: refactor: don't rewrite config file after filters are updated 2019-03-19 17:30:17 +03:00
Simon Zolin eefdf8449a * filters: refactor: remove unused if-branches
filter.ID == 0:
Useless, because filter ID is assigned either on application load
 or on filter add.

len(filter.Rules) == 0:
Useless, because rules are added either on application load
 or on filter add or on filter enable.
2019-03-19 17:30:17 +03:00
Simon Zolin ae2c7d00a9 * control: enable/disable filter: move code to a separate function
* don't start updating all filters after 1 filter has been enabled
* unload filter data on disable
2019-03-19 17:30:17 +03:00
Simon Zolin afa54a1339 * filters: refactor: don't check Enabled flag inside filter.update() & filter.load() 2019-03-19 17:29:07 +03:00
Simon Zolin 56271819ea - control: filtering/add_url: don't call httpError() twice on error while reconfiguring 2019-03-19 17:29:07 +03:00
Simon Zolin a9b329daf6 - control: use locks when operating on config.Filters array 2019-03-19 17:29:07 +03:00
Simon Zolin 61b1a30aa1 * refactor: move code to loadFilters() 2019-03-19 17:29:07 +03:00
Simon Zolin b4732c83c5 * filter: use CRC32 to check whether filter data should be updated 2019-03-19 17:29:07 +03:00
Simon Zolin 783ac967a1 * filter: refactor 2019-03-19 17:29:07 +03:00
Ildar Kamalov c091d10a41 * client: update translations 2019-03-19 16:27:23 +03:00
Ildar Kamalov 756c5ac0d3 + client: added setup guide page and DNS addresses popover
Closes #605
2019-03-19 16:19:53 +03:00
Simon Zolin ef789acee4 * control: DHCP: don't return expired leases
- fix potential race when lease's data can be modified while UI thread is reading it
2019-03-19 15:54:35 +03:00
Simon Zolin b1c11a718e Merge: * control: filtering/refresh: force update filters #537
* commit 'd7b1825cf59cb71a3bdb39fe488527b670e3a90c':
  * control: filtering/refresh: force update filters
2019-03-19 15:09:51 +03:00
Simon Zolin d7b1825cf5 * control: filtering/refresh: force update filters 2019-03-19 14:28:12 +03:00
Simon Zolin b5eb840d22 + control: use the list of IP addresses instead of single string in "dns_address"
"dns_address":"0.0.0.0" -> "dns_addresses":["127.0.0.1", "::1", ...]
2019-03-19 14:14:58 +03:00
Alexey Dmitrievskiy 6f56eb4c12 Merge pull request #172 in DNS/adguard-dns from fix/525 to master
* commit '6b223e2992f45aaba7ae9d685a741bd76c23d284':
  * dnsfilter: extend logging
  Fix #606, Fix #610 [change] app, config: add symlink support, allow to specify absolute path in log_file
2019-03-18 14:57:24 +03:00
Aleksey Dmitrevskiy 6b223e2992 * dnsfilter: extend logging 2019-03-18 14:50:33 +03:00
Aleksey Dmitrevskiy 43e5d42070 Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-dns 2019-03-15 20:15:14 +03:00
Simon Zolin a58bf0e24e Merge: Fix function comments based on best practices from Effective Go; #638
* commit 'f432eb360952e9bbf95448798ea6a89c4d93dec7':
  Fix function comments based on best practices from Effective Go
2019-03-15 15:06:09 +03:00
CodeLingo Bot f432eb3609 Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-03-15 14:59:05 +03:00
Simon Zolin 6e16654344 Merge: DHCP: refactoring, unit-test, readme, on-disk cache, safe restart, expiration handling; #584 #539
* commit 'ef637e1313ce548eab28c9b9f36c6db20a1c62c9':
  + DHCP: step-by-step guide for test setup with Virtual Box
  * control: add logs
  + dhcp: handle lease expiration
  + dhcp: use ICMP for IP conflict detection
  * dhcp: don't allocate a new lease when processing Request message
  * dhcp: don't process Discover/Request packets with empty client HW address
  * dhcp: refactor
  * DHCP: Stop(): wait until the worker is stopped
  * control: safely restart DHCP server
  + DHCP: On-disk database for lease table
  * use golibs v0.1.1: file.SafeWrite()
  + dhcp: test
  * dhcp: remove code which forces an update of current lease's IP in  Request message handler
  * dhcp: refactor;  log client's HW addr
2019-03-15 14:52:18 +03:00
Simon Zolin ef637e1313 + DHCP: step-by-step guide for test setup with Virtual Box 2019-03-15 14:00:32 +03:00
Simon Zolin 9494b87ca5 * control: add logs 2019-03-15 14:00:32 +03:00
Simon Zolin d68600c5d0 + dhcp: handle lease expiration 2019-03-15 14:00:32 +03:00
Simon Zolin 8fa2f48136 + dhcp: use ICMP for IP conflict detection
+ 'icmp_timeout_msec' YAML config setting
2019-03-15 14:00:32 +03:00
Simon Zolin 542a67b84e * dhcp: don't allocate a new lease when processing Request message 2019-03-15 14:00:32 +03:00
Simon Zolin d832d7ce95 * dhcp: don't process Discover/Request packets with empty client HW address 2019-03-15 14:00:32 +03:00
Simon Zolin 92cf7c1aca * dhcp: refactor 2019-03-15 14:00:04 +03:00
Simon Zolin b5f0d48e7f * DHCP: Stop(): wait until the worker is stopped 2019-03-15 13:56:45 +03:00
Simon Zolin 6f69fb73af * control: safely restart DHCP server
* control: use mutex in all POST,PUT,DELETE handlers
2019-03-15 13:56:45 +03:00
Simon Zolin 67014c40f7 + DHCP: On-disk database for lease table 2019-03-15 13:56:45 +03:00
Simon Zolin a2e9d69452 * use golibs v0.1.1: file.SafeWrite() 2019-03-15 13:56:45 +03:00
Simon Zolin e164cff02b + dhcp: test 2019-03-15 13:56:45 +03:00
Simon Zolin 08bf9b0acb * dhcp: remove code which forces an update of current lease's IP in
Request message handler
2019-03-15 13:56:45 +03:00
Simon Zolin 60fa3b2e95 * dhcp: refactor; log client's HW addr 2019-03-15 13:56:45 +03:00
Aleksey Dmitrevskiy 3f93cb3397 Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-dns 2019-03-15 11:55:34 +03:00
Alexey Dmitrievskiy 10daf29e2f Merge: [feature] app, config: add symlink support, allow to specify absolute path in log_file; Fix #606, Fix #610
* commit '70c56f7a180e1113c289574e69dd148bc76db511':
  + app, config: add symlink support, allow to specify absolute path in log_file
2019-03-15 11:55:01 +03:00
Aleksey Dmitrevskiy 70c56f7a18 + app, config: add symlink support, allow to specify absolute path in log_file 2019-03-15 11:49:58 +03:00
Aleksey Dmitrevskiy e9d20651e9 Fix #606, Fix #610 [change] app, config: add symlink support, allow to specify absolute path in log_file 2019-03-14 18:06:53 +03:00
Ildar Kamalov 466807638c Merge pull request #168 in DNS/adguard-dns from fix/625 to master
* commit 'b1f707d18cf6ce63fe1ed56efbd18d4f614d0543':
  - client: load favicon from local server
2019-03-14 11:30:21 +03:00
Alexey Dmitrievskiy 991717e150 Merge pull request #166 in DNS/adguard-dns from fix/598 to master
* commit 'd06cc0f8ee89a0142c493b33d295272ba100aaf5':
  Fix #598 - [change] service: windows: register sercive to work under local system user
2019-03-13 11:22:28 +03:00
Ildar Kamalov b1f707d18c - client: load favicon from local server
Closes #625
2019-03-12 18:59:58 +03:00
Alexey Dmitrievskiy f857ed74ec Merge pull request #154 in DNS/adguard-dns from fix/596 to master
* commit 'b74eded414cf3f31da6feb185619afab85233b5a': (34 commits)
  [change] control: fix issues from review
  [change] config: fix default upstreams list
  * client: typo
  * client: remove log
  * client: fix grammar
  [change] control: add upstreams validation before dns config test
  [change] control: add upstreams validation
  [change] control: update bootstrap DNS check
  * client: remove empty elements from upstream and bootstrap
  * client: locales and pass object to testUpstream
  [change] config, control, openapi: fix issues from reviw
  [fix] control: fix json decode for upstream config
  * client: upstream form
  [change] control, openapi: Handle upstreams test with JSON
  [change] upgrade_test: rework tests
  [change] upgrade_test: add test for upgrade
  [change] control: Remove unuseful check
  [change] control: Fix issues from review
  [change] dnsforward: Add comments for public fields
  [change] control: Handle upstream config with JSON
  ...
2019-03-12 14:30:31 +03:00
Ildar Kamalov 2f497cf5d0 Merge pull request #167 in DNS/adguard-dns from feature/611 to master
* commit '21db166be048bb9d99455838f2ce0a24e85162cd':
  + client: added Simplified Chinese
2019-03-12 12:30:03 +03:00
Ildar Kamalov 21db166be0 + client: added Simplified Chinese
Closes #611
2019-03-12 12:04:41 +03:00