Commit Graph

92 Commits

Author SHA1 Message Date
Star Brilliant acf3e3c328 Bump version to 2.2.1 2019-10-27 22:41:14 +08:00
Star Brilliant b708ff47b9 Release 2.2.0 2019-10-27 22:40:48 +08:00
gdm85 a09dfbbbc1 Add support for type prefix for upstream addresses
Add support for DNS-over-TLS upstream addresses
Remove tcp_only configuration option
2019-10-16 13:14:03 +02:00
gdm85 cc60be718c Improve error logging/checking 2019-10-16 13:14:03 +02:00
Star Brilliant 268e203540 Release 2.1.2 2019-08-30 01:27:06 +08:00
Star Brilliant 1c321be49c Release 2.1.1 2019-06-24 10:19:03 +08:00
Star Brilliant cb64f6694b Update the sample configuration to teach users how to listen on both IPv4 and IPv6 2019-05-17 02:37:52 +08:00
Star Brilliant 1ec9548ff1 Release 2.1.0 2019-05-14 01:39:46 +08:00
Wesley Squasher f6b52a653a Use TCP when appropriate for the given query type/response 2019-05-12 08:17:52 +00:00
Ming Aldrich-Gan 2332d9b7c1 Add local_addr configuration for doh-server (#39)
* Add local_addr configuration for doh-server

This commit adds a `local_addr` string value to `doh-server.conf`, specifying the IP address and port from which outgoing calls to upstream DNS resolvers should originate. This value is set as the `udpClient`'s and `tcpClient`'s `Dialer.LocalAddr` when initializing a `NewServer`. If the value is left empty in `doh-server.conf`, it defaults to the first `listen` address (which in turn defaults to `"127.0.0.1:8053"`).

One use case for this would be if `doh-server` is proxying requests to a local DNS resolver (e.g. `unbound` or Pi-hole). Up to version 2.0.0, all DNS queries from `doh-server` are sent from `127.0.0.1` (even if the `listen` address is set to a different loopback IP address), making it hard to distinguish them from all other local DNS queries from the same machine in the query logs.

* Revert defaulting of local_addr to listen address

This commit reverts to the existing behavior when `conf.LocalAddr == ""`, i.e. letting `dns.Client` instantiate its own `Dialer` with the default local address.

* Fixup comment in configuration file

* Log errors from Dialer instantiation (e.g. if LocalAddr port is missing)

* Fixup other comment in configuration file

* Return error and log fatal
2019-03-25 04:01:32 +08:00
Star Brilliant 7f5a23584f Release 2.0.1 2019-03-24 19:11:12 +08:00
qyb 2df81db465 log real client ip behind a HTTPS gateway (#38)
* log real client ip behind a HTTPS gateway

* fix tab/space indent

* better compatible for apache/nginx log default format

* add  config option
2019-03-16 05:36:52 +08:00
Star Brilliant a400f03960 Bump version to 2.0.0 2019-03-09 19:10:30 +08:00
Star Brilliant 8f2004d1de Bump to version 1.4.3 2018-12-05 15:57:51 +08:00
Star Brilliant fa2bcf74a9 Remove dns.ErrTruncated according to https://github.com/miekg/dns/pull/815 2018-11-28 15:31:02 +08:00
Sherlock Holo 4c0cae7111 Refine runtime.GOOS check, use switch case to replace a long if 2018-11-28 00:08:21 +08:00
Star Brilliant 35ddf43505 Add PID file support 2018-11-27 17:37:57 +08:00
Star Brilliant 0df0002e6b Bump version to 1.4.2 2018-11-10 23:00:06 +08:00
Star Brilliant 3affb2c227 Release 1.4.1 2018-11-10 22:59:37 +08:00
Star Brilliant 4754aa0414 Enable CORS by default, which is necessary for AJAX resolver to run 2018-11-07 20:13:51 +08:00
Star Brilliant c51be0e69c Use context for more functions 2018-11-07 19:25:46 +08:00
Star Brilliant afa0d563d0 Add passthrough feature, tests are welcome 2018-11-07 17:10:39 +08:00
Chris Hills ef2c6bbdc8 Update google.go
Make "cd" check case-insensitive.
2018-11-01 20:12:28 +00:00
Chris Hills 4d742bd15e doh-server: change to google.go
Allow the "cd" parameter to be case insensitive to work with some clients that send True/False instead of true/false such as gDNS.
2018-10-31 23:40:33 +00:00
Star Brilliant c85ef45840 Fix panic with debug_http_headers 2018-09-27 16:46:36 +08:00
Star Brilliant 6eb7b29142 Add configuration option: debug_http_headers 2018-09-22 04:23:55 +08:00
Star Brilliant ea0a769389 Bump version to 1.3.11 2018-08-21 01:44:56 +08:00
Star Brilliant a303c21036 Bump version to 1.3.10 2018-08-14 09:08:46 +08:00
Star Brilliant ffe5573552 Change the ECS prefix length from /48 to /56 for IPv6, per RFC 7871 2018-08-14 09:06:13 +08:00
Star Brilliant 07f39088d4 Update example configuration 2018-07-02 20:42:11 +08:00
Star Brilliant db007fbded Update example configuration 2018-07-02 20:40:56 +08:00
Star Brilliant 89d809d469 Bump version to 1.3.9 2018-07-02 20:12:04 +08:00
Star Brilliant 033865e508 Workaround a bug causing Firefox 61-62 to reject responses with Content-Type = application/dns-message 2018-07-02 19:42:57 +08:00
Star Brilliant 7e7cd1ee90 Workaround a bug causing Firefox 61-62 to reject responses with Content-Type = application/dns-message 2018-07-02 17:55:58 +08:00
Star Brilliant e19250dc99 Workaround a bug causing Firefox 61-62 to reject responses with Content-Type = application/dns-message 2018-07-02 17:49:34 +08:00
Star Brilliant a64df3f048 Preserve TransactionID 2018-07-02 13:49:59 +08:00
Star Brilliant f54b49c090 Disable preventing capitalization scrambling 2018-07-02 13:48:05 +08:00
Star Brilliant 11056bcad5 Construct a real DNS packet for DNSCrypt-Proxy 2018-06-26 15:20:43 +08:00
Star Brilliant ca33027e04 Remove offensive words :-) 2018-06-26 14:39:05 +08:00
Star Brilliant 07143d5890 Update documentation about TLS
This is to avoid confusions like issue #12
2018-06-26 13:22:32 +08:00
Star Brilliant 1d367cb7e7 Bump version to 1.3.8 2018-06-26 04:10:58 +08:00
Star Brilliant 523b6120b9 Workaround a bug causing DNSCrypt-Proxy to expect a response with TransactionID = 0xcafe 2018-06-26 03:55:59 +08:00
Star Brilliant 82fe91395d Workaround a bug causing Unbound to refuse returning anything about the root 2018-06-26 03:04:34 +08:00
Star Brilliant abdd033310 Print upstream information if error happens 2018-06-12 11:12:13 +08:00
Star Brilliant f2e3a642e3 Write a logger for macOS systems 2018-05-08 21:11:03 +08:00
Star Brilliant 76c40fb4dc Bump version to 1.3.5 2018-04-26 23:52:59 +08:00
Star Brilliant 7839d2c7b1 Bump version to 1.3.4 2018-04-26 10:18:36 +08:00
Star Brilliant c4b2236cf9 Do not respond to network error, silently fail to prevent caching of SERVFAIL
Hopefully we can improve the availability of DoH under unstable network environments.
2018-04-26 10:17:14 +08:00
Star Brilliant 5afdee6315 Put EDNS0 at the beginning of the OPT section 2018-04-25 03:05:06 +08:00
Star Brilliant 874a3613e4 Use dns.DefaultMsgSize instead of magic number 4096 2018-04-25 03:04:31 +08:00