Commit Graph

39 Commits

Author SHA1 Message Date
Frank Denis 363d44919f Properly check for the sticky bit 2024-04-03 16:47:13 +02:00
YX Hao ac5087315c Listen `0.0.0.0` only on IPv4 2024-02-27 19:04:09 +08:00
Frank Denis 0b559bb54f Warn if the main config file could be written by other system users 2024-02-20 02:11:03 +01:00
Carlo Teubner d8b1f4e7cd
Fix miscellaneous style issues (#2421)
Found by running: golangci-lint run --enable-all

I have only addressed the reported issues that seemed relevant to me.
2023-06-24 21:56:03 +02:00
Frank Denis 3f23ff5c08 Mostly get rid of ioutil 2023-02-02 19:38:24 +01:00
livingentity 87d9653ec2
Remove unused functions (#2057)
They aren't used anywhere.
2022-03-07 17:01:18 +01:00
Ian Bashford 1b6caba307
allow ptr queries for cloaked domains (#1958)
* allow ptr queries for cloaked domains

* multi ips per PTR returned + cleanup

* some string tidy up

* enable config file switch

* add cloaked ptr test

* enable cloak ptrs in test scenario

* fix reverse ipv6 ptr lookup

* added ipv6 cloaked ptr test
2021-12-13 14:00:13 +01:00
Frank Denis 06135b6141 Reduce MaxHTTPBodyLength 2021-06-05 18:29:13 +02:00
Alison Winters eda8dd5181
replace TrimFunc(s, IsSpace) with TrimSpace for ASCII optimization (#1663) 2021-04-05 11:46:57 +02:00
Frank Denis 6235c11c77 When forking, relocate descriptors higher up
Channels used by the `services` module may use descriptors, so we don't
want to overwrite them.

Maybe
fixes #1371
2020-06-19 00:04:54 +02:00
Frank Denis a6026ce48a Ignore lines starting with '#'
Fixes #1171
2020-01-30 16:16:05 +01:00
Frank Denis 349320f291 Add support for inline comments in patterns lists
Fixes #1162
2020-01-25 15:45:23 +01:00
Markus Linnala 0d553a9fa7 cleanup: Drop ExtractPort ExtractHost, use ExtractHostAndPort instead 2019-10-18 20:24:11 +02:00
Frank Denis 63e6dbdac7 Avoid strings.ReplaceAll() that was introduced too recently 2019-10-12 22:22:28 +02:00
Frank Denis d627a4bc58 Limit the number of required retries for local queries 2019-10-12 21:15:39 +02:00
Frank Denis 2c16bc4eaf Bump InitialMinQuestionSize up 2019-09-26 00:39:13 +02:00
Frank Denis 0e7692524e Remove unused function 2019-09-07 17:06:42 +02:00
Frank Denis 99133f53ef Skip BOMs in configuration files
Fixes #613
2018-10-15 17:56:31 +02:00
Sebastian Schmidt aab7e6380f Drop privileges with exec (#467)
* Drop privileges with exec and SysProcAttr

* Fix windows build

* Fix passing logfile fd
2018-06-13 16:52:41 +02:00
Frank Denis 0166f21b27 Add built-in support for Tor 2018-06-06 15:54:51 +02:00
Frank Denis 5be294a6e2 packetLength can be negative
Fixes #359
2018-04-16 02:05:28 +02:00
Frank Denis 10986aba62 Add a MemUsage() helper 2018-04-07 17:05:55 +02:00
Frank Denis e09f0875c1 Add the list of addresses to the -list -json output 2018-03-28 12:22:37 +02:00
Frank Denis 8bedb4b01e Add some helpers 2018-03-28 12:08:05 +02:00
Frank Denis 7f221afeff Don't assume that DoH servers use port 443 2018-03-28 11:52:04 +02:00
Frank Denis ba2f43e6db TCP: don't read past the prefixed size
Maybe
fixes #219
2018-03-10 18:50:31 -08:00
Frank Denis 14075e31dc Vastly improve the way load balancing works 2018-02-21 00:14:18 +01:00
Frank Denis 458da8fa77 DoH: use 0 as a transaction ID
Reject short TCP queries early by the way
2018-02-04 12:57:54 +01:00
Frank Denis 9d69811de9 Add limits to HTTP requests 2018-02-04 11:33:04 +01:00
Frank Denis f6571af24f Nits 2018-01-31 08:38:22 +01:00
Frank Denis b9c43c8ef3 Add the ability to log blocked queries 2018-01-17 17:03:42 +01:00
Frank Denis f35357ef88 Simplify the forwarding syntax 2018-01-17 16:06:30 +01:00
Frank Denis 170e2e816e Implement blocking, fully compatible with rules from version 1 2018-01-17 02:40:47 +01:00
Frank Denis 9eeb799d6e Many improvements 2018-01-10 16:01:29 +01:00
Frank Denis b86e7f268e Use more things from the config file 2018-01-10 12:09:59 +01:00
Frank Denis 705cf440b1 Skip queries without a question 2018-01-10 03:04:13 +01:00
Frank Denis d8f8d561c8 Synthesize a truncated response if the response wouldn't fit the local MSS 2018-01-10 02:52:09 +01:00
Frank Denis 1a59d93192 Support TCP connection to the backend 2018-01-09 19:47:24 +01:00
Frank Denis 841bf65d61 Reorganize 2018-01-09 18:32:14 +01:00