aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-03-18Removed boost/asio.hpp include from epee/string_tools.hLee Clagett2-0/+2
2017-03-05http_client: allow cancelling a downloadmoneromooo-monero1-2/+10
2017-03-05http_client: allow derived class to get headers at startmoneromooo-monero1-0/+11
2017-02-22Merge pull request #1762Riccardo Spagni1-1/+1
dcf684c7 http_server_impl_base: set bind message to MGINFO (anonimal)
2017-02-21http_server_impl_base: set bind message to MGINFOanonimal1-1/+1
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-20http_client: add a couple constsmoneromooo-monero1-2/+2
2017-02-12epee: fix some log macros not printing context nicelymoneromooo-monero1-5/+5
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett5-41/+78
2017-01-25Updates to epee HTTP client codeLee Clagett3-183/+63
- http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed
2017-01-16Change logging to easylogging++moneromooo-monero25-117/+174
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.
2017-01-11Added (not yet enabled) HTTP client authenticationLee Clagett3-22/+101
2016-12-30Workarounds for gcc 4.8Lee Clagett1-3/+10
2016-12-13Adding HTTP Digest Auth (but not yet enabled)Lee Clagett4-6/+103
2016-12-04Merge pull request #1403Riccardo Spagni1-1/+1
60633cf6 Spelling in errors (taushet)
2016-12-04Merge pull request #1385Riccardo Spagni1-0/+30
5783dd8c tests: add unit tests for uri parsing (moneromooo-monero) 82ba2108 wallet: add API and RPC to create/parse monero: URIs (moneromooo-monero) d9001b43 epee: add functions to convert from URL format (ie, %XX values) (moneromooo-monero)
2016-12-04Spelling in errorstaushet1-1/+1
2016-11-28epee: add functions to convert from URL format (ie, %XX values)moneromooo-monero1-0/+30
2016-11-28epee: signal cond var before unlockingmoneromooo-monero1-1/+1
This is more canonical, and avoids some helgrind spam
2016-11-23Fix DNS failures in offline mode preventing daemon startupmoneromooo-monero1-3/+3
2016-11-12levin: fix wrong value passed as return code to remote callmoneromooo-monero1-1/+1
When receiving an answer packet, the command code was passed to the callback instead of the error code. This was hiding the "command not found" failure from the peer, and in turn causing the code to attempt to deserialize a non existent reply string.
2016-10-03Removed all code related to fast_exitNanoAkron2-14/+1
2016-09-18epee: optionally restrict HTTP service to a configurable user agentmoneromooo-monero5-12/+31
This is intended to catch traffic coming from a web browser, so we avoid issues with a web page sending a transfer RPC to the wallet. Requiring a particular user agent can act as a simple password scheme, while we wait for 0MQ and proper authentication to be merged.
2016-09-01epee: do not try network resolution if loopback workedmoneromooo-monero1-1/+1
Fixes the wallet being unable to connect to the daemon when there is no NIC.
2016-06-22contrib: epee: add missing noexcept spec to class declredfish1-1/+1
The noexcept specs were added to make GCC 6.1.1 happy (#846), but this one was missing (because GCC did not complain about it on Linux, but does complain on OSX).
2016-05-18contrib: epee: add exception spec to throwing destructorsredfish2-2/+2
The destructors get a noexcept(true) spec by default, but these destructors in fact throw exceptions. An alternative fix might be to not throw (most if not all of these throws are non-essential error-reporting/logging).
2016-05-14Don't allow 'flush_txpool' and 'setbans' JSON_RPC methods when running in ↵osensei1-2/+4
restricted mode.
2016-04-17abstract_tcp_server2: fix send queue limit warning spammoneromooo-monero1-1/+1
When the send queue limit is reached, it is likely to not drain any time soon. If we call close on the connection, it will stay alive, waiting for the queue to drain before actually closing, and will hit that check again and again. Since the queue size limit is the reason we're closing in the first place, we call shutdown directly.
2016-04-17abstract_tcp_server2: avoid deadlock waiting for send queue to drainmoneromooo-monero1-2/+5
If we reach the send queue size limit, we need to release the lock, or we will deadlock and it will never drain. If we reach that limit, it's likely there's another problem in the first place though, so it will probably not drain in practice either, unless some kind of transient network timeout.
2016-03-27abstract_tcp_server2: possible fix for exception in handle_acceptmoneromooo-monero1-4/+17
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero1-1/+1
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-20Merge pull request #736Riccardo Spagni1-0/+8
2b4cab3 epee: fix potential hang on exit (moneromooo-monero)
2016-03-20epee: fix potential hang on exitmoneromooo-monero1-0/+8
Also close sockets on failure, just in case
2016-03-19Print stack trace upon exceptionsmoneromooo-monero1-1/+1
Useful for debugging users' logs
2016-03-12epee: fix bug deleting more than one connection at oncemoneromooo-monero1-0/+1
2016-03-11Use boost::thread instead of std::threadHoward Chu2-5/+5
and all other associated IPC
2016-02-18Fix crash in std::map for connections_mapHoward Chu1-1/+2
Use boost::unordered_map instead.
2016-02-13epee: always call the PRNG through the locked APImoneromooo-monero1-1/+1
2016-01-30epee: use generate_random_bytes for new random uuidsmoneromooo-monero1-1/+6
Instead of using boost::uuids::generate_random, which uses uninitialized stuff *on purpose*, just to annoy people who use valgrind
2016-01-25more typos fixedHenning Kopp1-1/+1
2016-01-02IP_TOS not supported before Windows7Howard Chu1-1/+4
2015-12-23epee: regularly cleanup connections we kept a reference tomoneromooo-monero2-4/+23
Since connections from the ::connect method are now kept in a deque to be able to cancel them on exit, this leaks both memory and a file descriptor. Here, we clean those up after 30 seconds, to avoid this. 30 seconds is higher then the 5 second timeout used in the async code, so this should be safe. However, this is an assumption which would break if that async code was to start relying on longer timeouts.
2015-12-22epee: fix hang on exitmoneromooo-monero2-1/+25
When the boost ioservice is stopped, pending work notifications will not happen. This includes deadline timers, which would otherwise time out the now cancelled I/O operations. When this happens just after starting a new connect operation, this can leave that operations in a state where it won't receive either the completion notification nor a timeout, causing a hang. This is fixed by keeping a list of connections corresponding to the connect operations, and cancelling them before stopping the boost ioservice. Note that the list of these connections can grow unbounded, as they're never cleaned up. Cleaning them up would involve working out which connections do not have any pending work, and it's not quite clear yet how to go about this.
2015-11-27core_rpc_server: add a --restricted-rpc optionmoneromooo-monero1-2/+4
It does not expose the RPC for commands like start_mining, etc (ie, commands a public node operator might want to be restricted)
2015-11-23Add IP blocking for misbehaving nodes (adapted from Boolberry)Javier Smooth1-3/+1
With minor cleanup and fixes (spelling, indent) by moneromooo
2015-04-10[fix] log level change. compilation: dns, testsrfree2monero1-2/+2
old unbound #warning does not block compilation unit tests build fine. Even though the RPC/P2P network type is required again
2015-04-08[fix] Network 1.8: unlimited the RPC connectionsrfree2monero3-59/+112
works for unit tests build, too
2015-04-01[fix] mac os x includes std::random...rfree2monero1-0/+4
2015-04-01remerged; commands JSON. logging upgrade. doxygenrfree2monero1-1/+0
2015-04-01Merge remote-tracking branch 'monero-official/master' into network-1.6-work1rfree2monero1-4/+4
2015-03-27Restore daemon interactive modeThomas Winget1-4/+4
Daemon interactive mode is now working again. RPC mapped calls in daemon and wallet have both had connection_context removed as an argument as that argument was not being used anywhere.
2015-02-202014 network limit 1.2 +utils +toc -doc -drmonerorfree2monero1-11/+10
new update of the pr with network limits more debug options: discarding downloaded blocks all or after given height. trying to trigger the locking errors. debug levels polished/tuned to sane values. debug/logging improved. warning: this pr should be correct code, but it could make an existing (in master version) locking error appear more often. it's a race on the list (map) of peers, e.g. between closing/deleting them versus working on them in net-limit sleep in sending chunk. the bug is not in this code/this pr, but in the master version. the locking problem of master will be fixed in other pr. problem is ub, and in practice is seems to usually cause program abort (tested on debian stable with updated gcc). see --help for option to add sleep to trigger the error faster.
2015-02-20fixed size_t on windowsrfree2monero1-2/+8
thought it was already fixed, apparently commit got lost somewhere
2015-02-202014 network limit 1.1 +utils +toc -doc -drmonerorfree2monero4-14/+99
Update of the PR with network limits works very well for all speeds (but remember that low download speed can stop upload because we then slow down downloading of blockchain requests too) more debug options fixed pedantic warnings in our code should work again on Mac OS X and FreeBSD fixed warning about size_t tested on Debian, Ubuntu, Windows(testing now) TCP options and ToS (QoS) flag FIXED peer number limit FIXED some spikes in ingress/download FIXED problems when other up and down limit
2015-02-202014 network limit 1.0a +utils +toc -doc -drmonerorfree2monero3-127/+336
commands and options for network limiting works very well e.g. for 50 KiB/sec up and down ToS (QoS) flag peer number limit TODO some spikes in ingress/download TODO problems when other up and down limit added "otshell utils" - simple logging (with colors, text files channels)
2015-01-02year updated in licenseRiccardo Spagni15-15/+15
2014-10-02forgot to add connection context to log lineRiccardo Spagni1-1/+1
2014-10-02moved non-critical p2p errors to l2Riccardo Spagni2-2/+2
2014-09-29dependencies enforced, send que error message log level movedRiccardo Spagni1-1/+1
2014-09-15increase ABSTRACT_SERVER_SEND_QUE_MAX_COUNT to a more sane valueRiccardo Spagni1-1/+1
2014-09-09moved non-critical warnings and errors to log level 1fluffypony5-9/+9
2014-07-25move modified epee code to new classes, revert licensefluffypony42-1062/+875
2014-07-23License updated to BSD 3-clausefluffypony42-875/+1062
2014-05-25extra filesmydesktop4-0/+433
2014-05-250.8.8updatemydesktop4-127/+38
2014-05-03initial [broken] updatemydesktop1-1/+1
2014-04-30mac osx building fixesmydesktop2-4/+4
2014-04-07Improvements in JSON RPCAntonio Juarez2-48/+40
2014-04-02json rpc for wallet and bugfixAntonio Juarez3-18/+92
2014-03-20some fixesAntonio Juarez17-125/+160
2014-03-03moved all stuff to githubAntonio Juarez39-0/+10745