Commit Graph

62 Commits

Author SHA1 Message Date
Simon Zolin
c616259e8b * dnsfilter: use golibs/cache
+ config: add cache size settings
+ config: add cache_time setting
2019-09-02 19:12:53 +03:00
Simon Zolin
24bb708b21 + config: add certificate_path, private_key_path
* POST /control/tls/configure: support certificate_path and private_key_path
2019-08-30 19:18:14 +03:00
Ildar Kamalov
bdd86adac5 + blocked_services: add tiktok main domain 2019-08-29 11:45:39 +03:00
Ildar Kamalov
eb524e27a6 + blocked_services: add tiktok 2019-08-29 11:39:04 +03:00
Simon Zolin
d4c012220e * control: add link to the issue on github 2019-08-27 11:53:09 +03:00
Simon Zolin
815489c0ff * /control/version.json: retry up to 3 times after DNS resolve of static.adguard.com has failed 2019-08-26 16:02:56 +03:00
Simon Zolin
452a668a5b * control: refactor: all handlers are registered via httpRegister()
* move some code to home/control_filtering.go
2019-08-21 14:52:57 +03:00
Andrey Meshkov
c82e93cfc7 -(dnsforward): fixed sigsegv when protection is disabled
Also, fixed all golint issues

 Closes: #941
2019-08-20 00:55:32 +03:00
Simon Zolin
8e08cddf64 + dhcp: use --workdir value for "leases.db" file path 2019-08-19 14:40:10 +03:00
Simon Zolin
d46ebe1c8b Revert "+ config: add cache size settings"
This reverts commit 81303b5db7.
2019-08-16 15:17:38 +03:00
Simon Zolin
ea2a523f8c Merge: * config: set default DNS server as IP addresses
Close #926

* commit '9d7285e42c61852ab5106402b0138ef27dbc5b0f':
  * config: set default DNS server as IP addresses
2019-08-13 13:48:12 +03:00
Simon Zolin
9d7285e42c * config: set default DNS server as IP addresses
* config: add "1.0.0.1" to default bootstrap addresses
2019-08-13 11:52:06 +03:00
Simon Zolin
8b63811fa9 * filters update: increase update period to 24 hours 2019-08-13 10:30:28 +03:00
Simon Zolin
d659e7ee08 * rDNS: make log messages' level = debug 2019-08-08 12:11:24 +03:00
Simon Zolin
4f08f96607 * rDNS: refactor: move code to a separate file 2019-08-08 12:10:50 +03:00
Simon Zolin
e7001c3bc4 * config upgrade: sequential processing 2019-08-05 14:12:22 +03:00
Simon Zolin
1b95a85651 * config: upgrade schema version: 3 -> 4 2019-08-05 14:12:22 +03:00
Simon Zolin
dc2d8cf075 + /control/blocked_services/* API 2019-08-05 14:12:22 +03:00
Simon Zolin
e81a9c7d56 + dnsfilter: use global and per-client BlockedServices array 2019-08-05 14:12:22 +03:00
Simon Zolin
04a477c14a + clients: add BlockedServices field 2019-08-05 14:12:22 +03:00
Simon Zolin
8307a5a494 + config: store/load "blocked_services" per-client setting 2019-08-05 14:12:22 +03:00
Simon Zolin
9857024c5d + control: add /rewrite/* handlers 2019-07-29 11:48:24 +03:00
Simon Zolin
81303b5db7 + config: add cache size settings 2019-07-23 15:57:44 +03:00
Simon Zolin
b8444ff46a * minor 2019-07-19 12:18:16 +03:00
Simon Zolin
6701e9ce06 * move "dnsctx" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
af21a5f17b * move "dnsServer" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
001b4b981f * move "dhcpServer" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
5e309a7b3a * move "httpServer" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
2780ace63e * move "httpsServer" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
f79008d9d0 * move "pidFileName" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
d3ddfc81a6 * move "versionCheckJSON" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
c426ee0108 * move "client", "transport" to "config" 2019-07-19 12:18:16 +03:00
Simon Zolin
2682adca39 * move "controlLock" mutex to "config" 2019-07-17 19:29:45 +03:00
Simon Zolin
d51f43e27a * clients: move container object to "config"
Now the functions use parameter, not a global object.
2019-07-17 19:29:45 +03:00
Simon Zolin
1c5b613048 - filters: fix crash after update 2019-07-16 15:29:36 +03:00
Simon Zolin
1b45dc45fc - filters: start DNS server after filters are updated 2019-07-16 14:32:58 +03:00
Simon Zolin
2c91de73af * minor 2019-07-16 12:55:55 +03:00
Simon Zolin
94f3bf44d7 - filters: start DNS server after filter has been removed 2019-07-16 12:55:47 +03:00
Simon Zolin
27006f58c5 - filters: windows: fix update procedure
We couldn't write filter files on Windows due to
 "file is being used" error.
2019-07-16 12:55:18 +03:00
Simon Zolin
375e410aa3 - /filtering/remove_url: windows: remove filter file only after DNS server has been stopped
Otherwise, os.Remove() will return with an error "file is being used".
2019-07-15 18:23:58 +03:00
Simon Zolin
e2b518339f - don't load filter rules if filter is disabled 2019-07-15 12:49:48 +03:00
Simon Zolin
425f3c87d0 + /status: "dns_addresses": add "tls://" or "https://" prefix 2019-07-05 15:47:21 +03:00
Simon Zolin
ad7c5cb9dc * /status: "dns_addresses": add port if not 53 2019-07-05 15:47:21 +03:00
Simon Zolin
1445940473 Merge: * use urlfilter v0.4.0
Close #866

* commit '134d9275bba7de7d1550412310bc275c52bb340e':
  * use urlfilter v0.4.0
2019-07-05 12:33:30 +03:00
Simon Zolin
df30248870 Merge: - freebsd: fix build
Close #870

* commit '98ff11e1c781a373768f01c54f6c7c29d8096d32':
  - freebsd: fix build
2019-07-04 15:12:38 +03:00
Simon Zolin
b419a1e3d8 Merge: * dns: fail on starting DNS server if upstream servers configuration is incorrect
* commit 'e2675e9a3bb54263d991ed4e9260d5acfedd63da':
  - client: fix link to dhcp settings page
  * dns: fail on starting DNS server if upstream servers configuration is incorrect
2019-07-04 14:57:35 +03:00
Simon Zolin
98ff11e1c7 - freebsd: fix build
Go's "syscall" package file for FreeBSD (incorrectly?) uses int64
 types in syscall.Rlimit struct.
2019-07-04 14:26:34 +03:00
Simon Zolin
134d9275bb * use urlfilter v0.4.0
Now we pass filtering rules to urlfilter as filer file names,
 rather than the list of rule strings.
(Note: user rules are still passed as the list of rule strings).

As a result, we don't store the contents of filter files in memory.
2019-07-04 14:10:01 +03:00
Simon Zolin
dc43ad9910 * dns: fail on starting DNS server if upstream servers configuration is incorrect 2019-07-03 17:59:19 +03:00
Simon Zolin
131aa4c93c - service stop: fix race
Service Stop handler sends SIGINT to the main thread,
 which begins the stops the app.
2019-07-02 12:56:23 +03:00