1
0
mirror of https://github.com/danog/dns.git synced 2024-11-30 04:29:06 +01:00
Commit Graph

272 Commits

Author SHA1 Message Date
Niklas Keller
d8d497458a Improve error messages 2018-05-01 19:55:02 +02:00
Austin Heap
41d02a30bb Use ext-filter instead of inet_pton to avoid error suppression (#73) 2018-03-31 17:56:32 +02:00
Gabriel Caruso
e9ee48e269 Use assertLessThan over simple assertTrue 2018-03-31 08:17:46 +02:00
peter279k
6cdea2e995 Add tests (#71) 2018-03-11 09:39:46 +01:00
Niklas Keller
2c8133a7b4 Allow empty domain names to be decoded
This is a rather long standing issue. LibDNS didn't allow to decode empty domain names. Empty domain names were previously only observed with PTR records, but were now also observed in regular queries in authoritative records that include the root nameservers.

LibDNS 2.0 mainly adds scalar types has just a few breaking changes. We don't expose it anywhere, so an upgrade is perfectly fine.

Fixes #53.
2018-01-10 17:26:11 +01:00
Niklas Keller
16e6d6c22f Limit cache size by default to 256 entries
Fixes #65.
2017-12-16 19:59:47 +01:00
Niklas Keller
417a4a83f9 Fix PATH on AppVeyor 2017-12-15 17:14:52 +01:00
Niklas Keller
38f7431878 Disable phpdbg, because it causes segfaults 2017-12-15 17:03:56 +01:00
Niklas Keller
fb282e4e93 Allow amphp/file ^0.3 2017-12-15 17:02:47 +01:00
Niklas Keller
95cf192749 Use PHP 7.2 on AppVeyor 2017-12-15 16:58:35 +01:00
Niklas Keller
86833034cd Update shared documentation files
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools.
2017-12-14 19:16:25 +01:00
Niklas Keller
f8bf80ad84 Update shared documentation files
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools.
2017-12-06 12:50:02 +01:00
Aaron Piotrowski
511e89c52b
Define target platform in composer.json and fix .travis.yml 2017-12-02 21:11:27 -06:00
Bob Weinand
cbaa517c8a
Fix #68 - cyclic reference within BasicResolver->gcWatcher 2017-11-07 16:18:49 +01:00
Niklas Keller
36ef1a6959 Prevent UDP sockets from leaking and close sockets on timeouts 2017-11-07 09:42:42 +01:00
Niklas Keller
4dbc6b1038 Update shared documentation files
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools.
2017-10-20 19:13:42 +02:00
Niklas Keller
c2a2258b8f Update shared documentation files
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools.
2017-10-20 18:33:32 +02:00
Niklas Keller
223fb06077 Update to new shared docs repo 2017-09-27 14:49:02 +02:00
Niklas Keller
ec1cf1681a Update shared documentation files
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools.
2017-09-21 18:14:27 +02:00
Niklas Keller
8b8706dcb9 Update shared documentation files
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools.
2017-09-20 21:48:34 +02:00
Niklas Keller
261b775400 Update shared documentation files
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools.
2017-09-16 19:34:09 +02:00
Niklas Keller
1a41089d84 Fix BasicResolver::resolve to break redirect loop
Previously we queried domains usually five times (max redirects). It didn't have much impact, because these records were usually cached and immediately returned again, but this resulted in the TTL always being NULL due to cached records being returned.
2017-09-12 17:08:38 +02:00
Niklas Keller
dd6e3c294a Improve example formatting and add PTR example 2017-09-12 17:05:40 +02:00
Niklas Keller
fcdf01de72 Add Record::getName to translate record types to names 2017-09-12 17:04:41 +02:00
Niklas Keller
331e359936 Fix indent 2017-09-12 09:39:42 +02:00
Niklas Keller
b33ec8043f Add example for a custom config 2017-09-12 09:38:26 +02:00
Niklas Keller
947c0d1022 Remove header from top 500 domains in examples 2017-09-10 11:01:27 +02:00
Niklas Keller
40d0fa412f Improve examples 2017-09-09 19:40:48 +02:00
Robert Goldsmith
4005ff4d32 Fix a precedence issue whee supplying your own ConfigLoader to the BasicResolver resulted in a WindowsConfigLoader being instantiated instead. 2017-08-09 18:53:33 +02:00
Niklas Keller
44cef3fb53 Unbreak logo text 2017-07-15 23:20:14 +02:00
Niklas Keller
3b71a3d9d5 Use new logo \o/ 2017-07-15 23:16:08 +02:00
Niklas Keller
a5ccdd9a08 Fix up previous commit for concurrent config loading 2017-07-13 21:17:16 +02:00
Niklas Keller
474787af05 Don't load config multiple times concurrently 2017-07-13 21:02:59 +02:00
Niklas Keller
ab2adecaea Fix typo 2017-07-07 12:46:35 +02:00
Niklas Keller
cbe273c3d2 Add documentation and update README 2017-07-06 21:22:39 +02:00
Niklas Keller
d382d71fc7 Implement proper fix for the OPCache issue 2017-07-01 15:44:10 +02:00
Niklas Keller
c1c552d752 Add php-src bug reference 2017-07-01 12:19:09 +02:00
Niklas Keller
e0fc018ad7 Work around OPCache issue 2017-07-01 10:52:56 +02:00
Niklas Keller
f9f0c6cdc8 Fix queries over TCP, add tests 2017-06-29 12:36:09 +02:00
Niklas Keller
1a1427ce10 Add explanation comments 2017-06-27 18:35:57 +02:00
Niklas Keller
8dca65bcd4 Move socket classes into an internal namespace 2017-06-27 18:30:28 +02:00
Niklas Keller
bd78869bcd Rename Server to Socket
Server was pretty weird, they're sockets. These classes were marked as
@internal before, so this is not a BC break.
2017-06-27 17:47:57 +02:00
Niklas Keller
ee05df2e1e Use random IDs and different UDP ports for each request
This is another countermeasure as outlined in https://tools.ietf.org/html/rfc5452. Request IDs have 16 bits of entropy now. The port will change during requests, but is usually not random. However, there are systems that use a random port for :0 port requests.
2017-06-27 17:35:53 +02:00
Niklas Keller
58b9ed1035 Match question section of responses to the asked question
This makes forging responses and poisoning the cache harder and is one method suggested in https://tools.ietf.org/html/rfc5452.
2017-06-27 16:55:24 +02:00
Niklas Keller
cbffb766f3 Restrict caching to max one day 2017-06-25 21:00:30 +02:00
Niklas Keller
2167251966 Update LICENSE date 2017-06-24 08:14:50 +02:00
Aaron Piotrowski
3aaf2708f7
Use flag to control reading requests 2017-06-24 00:50:34 -05:00
Niklas Keller
5f73365b9b Add simple examples that queries 10 out of the top 500 domains 2017-06-24 01:51:41 +02:00
Niklas Keller
ad55bcf870 Fix host loading on Windows 2017-06-24 01:18:12 +02:00
Aaron Piotrowski
70205d9282
Store deferred in question array before receiving
Also avoid creating unnecessary exception instances.
2017-06-23 18:05:11 -05:00