aboutsummaryrefslogtreecommitdiff
path: root/src/common/dns_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* dns_utils: const compatibility with older libunboundmoneromooo-monero2016-02-231-22/+16
| | | | https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=515
* std::condvar is broken on Win32 with gcc/g++ 4.8 tooHoward Chu2016-02-181-2/+2
| | | | Use boost...
* updated copyright yearRiccardo Spagni2015-12-311-1/+1
|
* Replace tabs and remove trailing whitespacewarptangent2015-12-151-24/+24
|
* Optionally restrict DNS queries to TCPwarptangent2015-12-151-3/+24
| | | | | | | | | | | | | | | | | Sample use: DNS_PUBLIC=tcp torsocks bin/bitmonerod --p2p-bind-ip 127.0.0.1 Test: Run above with --log-level 4 with and without DNS_PUBLIC environment variable set. DNS debugging info should show successful DNS lookups only when DNS_PUBLIC is set to "tcp": DNS lookup for seeds.moneroseeds.se: 17 results DNS lookup for seeds.moneroseeds.ae.org: 17 results DNS lookup for seeds.moneroseeds.ch: 12 results DNS lookup for seeds.moneroseeds.li: 12 results
* dns_utils: fix wrong assertsmoneromooo-monero2015-09-271-2/+2
| | | | Braino.
* dns_utils: remove unnecessary string conversionmoneromooo-monero2015-08-301-5/+2
|
* dns_utils: factor the fetching code for different DNS record typesmoneromooo-monero2015-08-301-59/+21
|
* dns_utils: simplify string handling and fix leakmoneromooo-monero2015-08-301-5/+1
|
* dns_utils: add a const where possiblemoneromooo-monero2015-08-271-1/+1
|
* dns_utils: lock access to the singletonmoneromooo-monero2015-08-271-0/+4
| | | | This avoids races which could result in two objects being created
* dns: make ctor privatemoneromooo-monero2015-08-271-0/+5
| | | | | | | This ensures one can't instanciate a DNSResolver object by mistake, but uses the singleton. A separate create static function is added for cases where a new object is explicitely needed.
* Set dnssec_valid value correctly in dns_utils; fix address_from_url testRostislav2015-06-201-3/+3
|
* dns_utils: simpify smart pointer use, and use for url strings toomoneromooo-monero2015-06-071-38/+45
| | | | OK, I admit I wanted to template this struct for fun too.
* Allow name@domain.tld for OpenAlias lookupswarptangent2015-05-191-0/+13
| | | | | | | | | | | | | | | | | | Based on tewinget's update. Make OpenAlias address format independent of existing DNS functions. Add tests. Test: make debug-test cd build/debug/tests/unit_tests # test that regular DNS functions work, including IPv4 lookups. # also test function that converts OpenAlias address format make && ./unit_tests --gtest_filter=DNSResolver* # test that OpenAlias addresses like donate@getmonero.org work from # wallet tools make && ./unit_tests --gtest_filter=AddressFromURL.Success
* Revert "Allow name@domain.tld for OpenAlias lookups"warptangent2015-05-191-21/+13
| | | | This reverts commit b18368b635ba08aea541ef52ebc74180822644a2.
* Allow name@domain.tld for OpenAlias lookupsThomas Winget2015-04-291-13/+21
|
* [fix] log level change. compilation: dns, testsrfree2monero2015-04-101-1/+1
| | | | | old unbound #warning does not block compilation unit tests build fine. Even though the RPC/P2P network type is required again
* Merge pull request #252Riccardo Spagni2015-04-021-1/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 618f20c Network 1.7; Quieted the debug a bit. (rfree2monero) 391c7f9 Utils: use const, document dbg. Less default debug (rfree2monero) 44f4234 [fix] mac os x includes std::random... (rfree2monero) 162c993 Network 1.6: network limits, logging, +doxy (rfree2monero) a3b2226 my changelog (rfree2monero) 2900b1e doxygen files (rfree2monero) 1489310 doxygen related tool (rfree2monero) f9dba47 added windows_stream.* console colors (rfree2monero) c511abf remerged; commands JSON. logging upgrade. doxygen (rfree2monero) f79821a fix locking in count-peers thread (2) (rfree2monero) 0198ffb 2014 network limit 1.3 fix log/path/data +utils (rfree2monero) ae2a506 2014 network limit 1.2 +utils +toc -doc -drmonero (rfree2monero) 0f06dca fixed size_t on windows (rfree2monero) 39fc63f removed not needed <netinet/in.h> (rfree2monero) 5ce4256 2014 network limit 1.1 +utils +toc -doc -drmonero (rfree2monero) eabb519 2014 network limit 1.0a +utils +toc -doc -drmonero (rfree2monero)
| * remerged; commands JSON. logging upgrade. doxygenrfree2monero2015-04-011-1/+18
| |
* | Fixed DNS resolution bug in WindowsThomas Winget2015-04-021-4/+2
|/ | | | | | | | | | | | Due to a bug in unbound, we were passing a string containing a null character to ub_ctx_resolvconf and ub_ctx_hosts rather than a NULL pointer. On *nix this wasn't causing headache, but on Windows this was causing unbound to not correctly load DNS settings from the OS. Note on the bug: in a Windows-specific code branch in the function ub_ctx_hosts(), if the hosts file specified was a NULL pointer, a call to getenv() was stored in a local char* and later freed. This is incorrect, as we do not own that data, and caused the program to crash.
* DNSSEC added (hardcoded key)Thomas Winget2015-03-241-0/+66
| | | | | | | | DNSSEC is now implemented with the hardcoded key from unbound. This will need to be not hardcoded in the future, but is okay for now. Unit tests updated for DNSSEC (as well as for the fact that, contrary to previous assumption, example.com does not have a static IP address).
* year updated in licenseRiccardo Spagni2015-01-021-1/+1
|
* build libunbound from external if no local libunbound or for static buildsRiccardo Spagni2014-10-061-1/+2
|
* quick hacky fix for broken TXT readsRiccardo Spagni2014-10-031-1/+9
|
* updated DNSResolver/things that use it for DNSSECThomas Winget2014-09-301-3/+9
| | | | | | | Note: DNSResolver does not yet *use* DNSSEC, but rather this commit is preparation for including DNSSEC validation. The function in src/wallet/wallet2.cpp that uses DNSResolver still needs its parameters updated accordingly.
* Remove LDNS dep and fix a bug in libunbound const correctness fixThomas Winget2014-09-241-3/+3
|
* Removed ldns dependencyThomas Winget2014-09-241-4/+3
| | | | | | ldns dependency was only still around for constants defined in ldns/rr.h, but those constants are RFC specified DNS constants, and to reduce deps have been replicated in dns_utils.h instead of including ldns/rr.h.
* libunbound has const correctness issues...Thomas Winget2014-09-241-5/+19
|
* temp commitThomas Winget2014-09-241-15/+42
|
* Added function to check syntax of URL for DNS lookupThomas Winget2014-09-231-8/+35
| | | | | For now, simply checks for '.' character, but that will be easy to change in the future if necessary/desired.
* change to allow (at least a bit) for multiple TXT recordsThomas Winget2014-09-231-5/+10
|
* Monero addres from DNS TXT record implemented, tests passThomas Winget2014-09-231-17/+40
| | | | Still need to deal with DNSSEC and optional fields in the TXT record.
* Use the loop iterator, previous version of me.Thomas Winget2014-09-231-2/+2
|
* ipv4 and ipv6 resolution workingThomas Winget2014-09-231-11/+92
| | | | | | IPv4 and IPv6 name resolution working. Unit tests written (and passing). net_node.{h,inl} code modified to use DNS seeds.
* Initial commit of DNS codeThomas Winget2014-09-231-0/+55