aboutsummaryrefslogtreecommitdiff
path: root/src/common/dns_utils.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-12-19Cleanup scoped_ptr in src/common/dns_utils.cpp and header include:0xFFFC00001-34/+10
* No need for entire new class (Fix #8732). * Fix stdint.h header include in contrib/epee/include/net/http_base.h.
2023-06-27Fixup error message.ComputeryPony1-0/+2
Looks like the extra MWARNING was supposed to be guarded by the if statement.
2023-06-27Merge pull request #8804luigi11111-0/+1
ca6c42a Message about DNS_PUBLIC to help users with issue #8452 (OrvilleRed)
2023-03-27Message about DNS_PUBLIC to help users with issue #8452OrvilleRed1-0/+1
2023-01-16Copyright: Update to 2023mj-xmr1-1/+1
Co-authored-by: plowsof <plowsof@protonmail.com> extra files
2023-01-11Merge pull request #8682luigi11111-0/+2
96677ff common: add missing includes (selsta)
2022-12-18common: add missing includesselsta1-0/+2
2022-11-21common: DNSResolver can handle hostnames without dot charactersJeffrey Ryan1-15/+0
Unrelated, but similar code-wise to #8643. There is a check in `DNSResolver` which automatically fails to resolve hostnames which do not contain the `.` character. This PR removes that check.
2022-09-20Second thread pool for IOSChernykh1-1/+1
2022-08-06dns_util: remove outdated DNSSEC DS trust anchorselsta1-1/+0
2022-03-04Copyright: Update to 2022mj-xmr1-1/+1
2021-03-29Merge pull request #7088luigi11111-2/+27
386ef03 Add TLSA support to DNSSEC fetching (Lee Clagett)
2020-10-15add more updates domains and make the voting generic, not just 2/3moneromooo-monero1-41/+21
2020-10-07Add TLSA support to DNSSEC fetchingLee Clagett1-2/+27
2020-09-01threadpool: guard against exceptions in jobs, and armour platingmoneromooo-monero1-2/+2
Those would, if uncaught, exit run and leave the waiter to wait indefinitely for the number of active jobs to reach 0
2020-05-06Update copyright year to 2020SomaticFanatic1-1/+1
Update copyright year to 2020
2019-06-21Remove Xiala.net from the list of dns resolverstobtoht1-1/+0
It is down permanently. See: https://xiala.net/ "Ende November 2018 werden alle Dienste von xiala.net abgeschaltet."
2019-04-04crypto: replace rand<T>()%N idiom with unbiased rand_idx(N)stoffu1-5/+2
2019-04-01Merge pull request #5306Riccardo Spagni1-5/+5
8a97563a Use threadpool instead of new threads for DNS queries (Howard Chu)
2019-03-20dns_utils: really add default DNSSEC servers on failuremoneromooo-monero1-3/+2
Coverity 196597
2019-03-19Merge pull request #5198Riccardo Spagni1-6/+34
9c4d403a dns_utils: use fallback if the default resolver does not support DNSSEC (moneromooo-monero)
2019-03-17Merge pull request #5179Riccardo Spagni1-4/+4
7c09882a dns_utils: remove MoneroPulse/checkpoints mention in TXT record code (moneromooo-monero)
2019-03-17Use threadpool instead of new threads for DNS queriesHoward Chu1-5/+5
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-02-27dns_utils: use fallback if the default resolver does not support DNSSECmoneromooo-monero1-6/+34
2019-02-21dns_utils: remove MoneroPulse/checkpoints mention in TXT record codemoneromooo-monero1-4/+4
This code is used for more than just these
2018-12-04Merge pull request #4894Riccardo Spagni1-1/+1
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero) 1a0733e5 windows_service: fix memory leak (moneromooo-monero) 0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero) 5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero) d4f50cb1 remove some unused code (moneromooo-monero) 61163971 a few minor (but easy) performance tweaks (moneromooo-monero) 30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-12-04Merge pull request #4854Riccardo Spagni1-2/+0
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-11-23remove some unused codemoneromooo-monero1-1/+1
Found by codacy.com
2018-11-15Removed a lot of unnecessary includesMartijn Otto1-2/+0
2018-11-01dns_utils: do not exit if DNS records are corruptmoneromooo-monero1-7/+34
2018-09-28dns_utils: refresh list of usable DNSSEC serversmoneromooo-monero1-3/+4
A few of them are now returning invalid replies.
2018-08-28dns_util: add new DNSSEC trust anchor for rollovermoneromooo-monero1-4/+14
It should be useful from the 11th of october 2018. The old key is still trusted for now. https://www.icann.org/resources/pages/ksk-rollover
2018-04-10common: make this build with unbound 1.4.20moneromooo-monero1-1/+1
Common on currently used distros
2018-02-08dns: change default DNS to a worldwide selectionmoneromooo-monero1-9/+19
DNSSEC aware servers picked from https://wiki.ipfire.org/dns/public-servers
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2017-12-16move includes around to lessen overall loadmoneromooo-monero1-0/+2
2017-10-10dns_utils: allow an optional DNS server IP in DNS_PUBLICmoneromooo-monero1-6/+39
tcp://a.b.c.d
2017-10-02Merge pull request #2504Riccardo Spagni1-6/+15
f182acdd dns_utils: query DNS records in parallel (moneromooo-monero)
2017-09-21dns_utils: query DNS records in parallelmoneromooo-monero1-6/+15
2017-09-04dns_utils: remove a few obsolete thingsmoneromooo-monero1-4/+0
2017-08-07Merge pull request #2210Riccardo Spagni1-43/+3
cb0b5594 Move OpenAlias console input back from libs (moneromooo-monero)
2017-07-27Move OpenAlias console input back from libsmoneromooo-monero1-43/+3
Library code should definitely not ask for console input unless it's clearly an input function. Delegating the user interaction part to the caller means it can now be used by a GUI, or have a decision algorithm better adapted to a particular caller.
2017-06-28Ensure DNSResolver destructor runs on exitHoward Chu1-6/+2
Plugs a noisy but benign memory leak
2017-03-17wallet-rpc: enable openaliasstoffu1-3/+5
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-21dns_utils: fix infinite recursion when distributing empty dns_urlsanonimal1-0/+3
load_txt_records_from_dns attempts to distribute `a = 0, b = -1` where (b = dns_urls.size() - 1) and IntType is signed integer. This results in an infinite recursion which leads to SIGSEGV.
2017-02-20dns_utils: fix first checked DNS entry being ignoredmoneromooo-monero1-1/+0
2017-02-20dns_utils: factor TXT record loading code from checkpoint codemoneromooo-monero1-0/+103
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-1/+1
2017-01-24moved get_account_address_from_str_or_url from libcommon to libcryptonote_corekenshi841-16/+0
2017-01-16Change logging to easylogging++moneromooo-monero1-0/+3
This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
2016-12-21make openalias also available for solo miner; introduce namespace ↵kenshi841-0/+143
tools::dns_utils; support integrated address with dns lookup
2016-02-23dns_utils: const compatibility with older libunboundmoneromooo-monero1-22/+16
https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=515
2016-02-18std::condvar is broken on Win32 with gcc/g++ 4.8 tooHoward Chu1-2/+2
Use boost...
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-12-15Replace tabs and remove trailing whitespacewarptangent1-24/+24
2015-12-15Optionally restrict DNS queries to TCPwarptangent1-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
2015-09-27dns_utils: fix wrong assertsmoneromooo-monero1-2/+2
Braino.
2015-08-30dns_utils: remove unnecessary string conversionmoneromooo-monero1-5/+2
2015-08-30dns_utils: factor the fetching code for different DNS record typesmoneromooo-monero1-59/+21
2015-08-30dns_utils: simplify string handling and fix leakmoneromooo-monero1-5/+1
2015-08-27dns_utils: add a const where possiblemoneromooo-monero1-1/+1
2015-08-27dns_utils: lock access to the singletonmoneromooo-monero1-0/+4
This avoids races which could result in two objects being created
2015-08-27dns: make ctor privatemoneromooo-monero1-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.
2015-06-20Set dnssec_valid value correctly in dns_utils; fix address_from_url testRostislav1-3/+3
2015-06-07dns_utils: simpify smart pointer use, and use for url strings toomoneromooo-monero1-38/+45
OK, I admit I wanted to template this struct for fun too.
2015-05-19Allow name@domain.tld for OpenAlias lookupswarptangent1-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
2015-05-19Revert "Allow name@domain.tld for OpenAlias lookups"warptangent1-21/+13
This reverts commit b18368b635ba08aea541ef52ebc74180822644a2.
2015-04-29Allow name@domain.tld for OpenAlias lookupsThomas Winget1-13/+21
2015-04-10[fix] log level change. compilation: dns, testsrfree2monero1-1/+1
old unbound #warning does not block compilation unit tests build fine. Even though the RPC/P2P network type is required again
2015-04-02Merge pull request #252Riccardo Spagni1-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)
2015-04-02Fixed DNS resolution bug in WindowsThomas Winget1-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.
2015-04-01remerged; commands JSON. logging upgrade. doxygenrfree2monero1-1/+18
2015-03-24DNSSEC added (hardcoded key)Thomas Winget1-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).
2015-01-02year updated in licenseRiccardo Spagni1-1/+1
2014-10-06build libunbound from external if no local libunbound or for static buildsRiccardo Spagni1-1/+2
2014-10-03quick hacky fix for broken TXT readsRiccardo Spagni1-1/+9
2014-09-30updated DNSResolver/things that use it for DNSSECThomas Winget1-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.
2014-09-24Remove LDNS dep and fix a bug in libunbound const correctness fixThomas Winget1-3/+3
2014-09-24Removed ldns dependencyThomas Winget1-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.
2014-09-24libunbound has const correctness issues...Thomas Winget1-5/+19
2014-09-24temp commitThomas Winget1-15/+42
2014-09-23Added function to check syntax of URL for DNS lookupThomas Winget1-8/+35
For now, simply checks for '.' character, but that will be easy to change in the future if necessary/desired.
2014-09-23change to allow (at least a bit) for multiple TXT recordsThomas Winget1-5/+10
2014-09-23Monero addres from DNS TXT record implemented, tests passThomas Winget1-17/+40
Still need to deal with DNSSEC and optional fields in the TXT record.
2014-09-23Use the loop iterator, previous version of me.Thomas Winget1-2/+2
2014-09-23ipv4 and ipv6 resolution workingThomas Winget1-11/+92
IPv4 and IPv6 name resolution working. Unit tests written (and passing). net_node.{h,inl} code modified to use DNS seeds.
2014-09-23Initial commit of DNS codeThomas Winget1-0/+55