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
Aaron Piotrowski
3aaf2708f7
Use flag to control reading requests
2017-06-24 00:50:34 -05: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
Niklas Keller
46cc8e47c7
Remove normalizeDnsName and isValidDnsName, as they're in amphp/uri now
2017-06-24 00:53:10 +02:00
Aaron Piotrowski
6a2e666a80
Consolidate error handling
2017-06-23 16:25:50 -05:00
Niklas Keller
8271989335
Fix garbage collection and mark classes as final / internal
2017-06-23 21:07:59 +02:00
Niklas Keller
fd7c82113c
Fix retrying, wrap non-ResolutionExceptions in ResolutionException
2017-06-23 20:51:50 +02:00
Niklas Keller
dd938ce846
Clean up unused sockets
2017-06-23 19:13:28 +02:00
Niklas Keller
b0aa8daeca
Implement timeout for queries
2017-06-23 18:57:22 +02:00
Niklas Keller
015ac39f08
Fix BasicResolver::reloadConfig
2017-06-23 18:43:04 +02:00
Niklas Keller
a10643fa37
Fix issue with type restricted resolve and add test
2017-06-23 18:35:48 +02:00
Niklas Keller
9ed331ae3d
Implement request sharing for concurrent requests to the same resource
2017-06-23 17:48:03 +02:00
Niklas Keller
1bd8870003
Fix code style
2017-06-23 17:37:40 +02:00
Aaron Piotrowski
a4b714c0b0
Keep receiving if there are still pending requests
2017-06-23 10:06:30 -05:00
Niklas Keller
f536ddfd8a
Purge requests if they're still in the map after 65k requests in between
2017-06-23 15:34:12 +02:00
Niklas Keller
2d5a7ab37b
Change appveyor.yml, it's enough to run one version of PHP on Windows
2017-06-23 14:37:04 +02:00
Niklas Keller
b05d11912b
Fix resolution data and add CNAME / DNAME support
2017-06-23 14:23:04 +02:00
Niklas Keller
05a413f72c
Error out if type is restricted and passed name is an IP but not of that type
2017-06-23 13:39:20 +02:00
Niklas Keller
ea1cd633dd
Add BasicResolver::reloadConfig() and move docs to interface
2017-06-23 13:32:04 +02:00
Niklas Keller
affebb612a
Delete DefaultDriver
2017-06-23 13:15:15 +02:00
Niklas Keller
ebdf4a663e
Implement resolve in BasicResolver
2017-06-23 13:14:51 +02:00
Niklas Keller
0331eadcc8
Implement TCP retry and server reuse
2017-06-23 12:49:16 +02:00
Niklas Keller
48e37f4014
Implement caching and name normalization in BasicResolver
2017-06-23 09:24:26 +02:00
Niklas Keller
f0a67f5619
Refactor TcpServer connect logic and fix its parser
2017-06-23 08:39:49 +02:00
Aaron Piotrowski
c250d471c8
WIP
2017-06-23 00:34:11 -05:00
Aaron Piotrowski
fdeb03ca44
Use input/output streams
2017-06-22 19:38:36 -05:00
Aaron Piotrowski
ba8a8423eb
Use anonymous class
2017-06-22 18:46:08 -05:00
Niklas Keller
ed1ea12067
Fix phpdoc in functions.php
2017-06-23 01:02:07 +02:00
Niklas Keller
2815d8f694
Add config test
2017-06-22 23:39:13 +02:00
Niklas Keller
74e68587f7
Refactor to option-less interface
2017-06-22 23:25:21 +02:00
Niklas Keller
3c8412b4a7
Remove TYPE_ prefix for record constants
2017-06-22 20:08:27 +02:00
Niklas Keller
315e03ff54
Refactor to Record class
...
Arrays are clearly not a good API and have resulted in bugs before, even within this package.
2017-06-22 19:22:45 +02:00
Niklas Keller
f06f3b4f74
Refactor name normalization and validity checking
2017-06-22 19:06:49 +02:00
Niklas Keller
25a8110c89
Refactor config loaders out of DefaultResolver
2017-06-17 12:30:38 +02:00
Niklas Keller
4d8f27d9b5
Readd call import removed by php-cs-fixer
2017-06-17 11:00:26 +02:00
Niklas Keller
cbac861746
Update to PHPUnit 6, update code style
2017-06-17 10:49:54 +02:00
Niklas Keller
3d035a7e14
Serialize cache entries, use stable versions where possible
2017-06-17 08:31:35 +02:00
Niklas Keller
f06b5fd810
Add normalizeName
2017-06-15 22:06:50 +02:00
Niklas Keller
08ada39e3b
Merge branch 'master' into amp_v2
2017-06-14 08:10:06 +02:00
Niklas Keller
4ef49e8544
Fix cache TTL
2017-06-14 08:08:34 +02:00
Aaron Piotrowski
e7559b6cbc
Merge branch 'master' into amp_v2
2017-06-13 12:28:06 -05:00
Peleg Rosenthal
1de011e888
use ttl before caching
2017-05-26 16:37:15 -04:00
Aaron Piotrowski
20069da691
Update for removal of pipe()
2017-05-04 17:12:13 -05:00
Aaron Piotrowski
1d8dc615bf
Update for async-interop merge and other Amp changes
2017-03-16 23:01:58 -05:00