aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/net_utils_base.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-08-05p2p: remove blocked addresses/hosts from peerlistmoneromooo-monero1-0/+3
2020-01-26epee: remove backward compatible endian specific address serializationmoneromooo-monero1-6/+2
2019-09-04Fix IP address serialization on big endianmoneromooo-monero1-1/+15
IP addresses are stored in network byte order even on little endian hosts
2019-07-16Add ref-counted buffer byte_slice. Currently used for sending TCP data.Lee Clagett1-2/+3
2019-07-31Add IPv6 supportThomas Winget1-0/+56
new cli options (RPC ones also apply to wallet): --p2p-bind-ipv6-address (default = "::") --p2p-bind-port-ipv6 (default same as ipv4 port for given nettype) --rpc-bind-ipv6-address (default = "::1") --p2p-use-ipv6 (default false) --rpc-use-ipv6 (default false) --p2p-require-ipv4 (default true, if ipv4 bind fails and this is true, will not continue even if ipv6 bind successful) --rpc-require-ipv4 (default true, description as above) ipv6 addresses are to be specified as "[xx:xx:xx::xx:xx]:port" except in the cases of the cli args for bind address. For those the square braces can be omitted.
2019-07-24Merge pull request #5528luigi11111-1/+1
f61a315 net_utils: fix m_ssl type from time_t to bool (moneromooo-monero)
2019-07-16allow blocking whole subnetsmoneromooo-monero1-1/+48
2019-06-09Fix GCC 9.1 build warningsmoneromooo-monero1-0/+5
GCC wants operator= aand copy ctor to be both defined, or neither
2019-05-10net_utils: fix m_ssl type from time_t to boolmoneromooo-monero1-1/+1
2019-03-25Added socks proxy (tor/i2pd/kovri) support to walletLee Clagett1-0/+6
2019-03-04Merge pull request #5091Riccardo Spagni1-1/+4
123fc2a2 i2p: initial support (Jethro Grassie)
2019-02-02epee: add SSL supportmoneromooo-monero1-4/+7
RPC connections now have optional tranparent SSL. An optional private key and certificate file can be passed, using the --{rpc,daemon}-ssl-private-key and --{rpc,daemon}-ssl-certificate options. Those have as argument a path to a PEM format private private key and certificate, respectively. If not given, a temporary self signed certificate will be used. SSL can be enabled or disabled using --{rpc}-ssl, which accepts autodetect (default), disabled or enabled. Access can be restricted to particular certificates using the --rpc-ssl-allowed-certificates, which takes a list of paths to PEM encoded certificates. This can allow a wallet to connect to only the daemon they think they're connected to, by forcing SSL and listing the paths to the known good certificates. To generate long term certificates: openssl genrsa -out /tmp/KEY 4096 openssl req -new -key /tmp/KEY -out /tmp/REQ openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT /tmp/KEY is the private key, and /tmp/CERT is the certificate, both in PEM format. /tmp/REQ can be removed. Adjust the last command to set expiration date, etc, as needed. It doesn't make a whole lot of sense for monero anyway, since most servers will run with one time temporary self signed certificates anyway. SSL support is transparent, so all communication is done on the existing ports, with SSL autodetection. This means you can start using an SSL daemon now, but you should not enforce SSL yet or nothing will talk to you.
2019-01-30i2p: initial supportJethro Grassie1-1/+4
2019-01-28Adding initial support for broadcasting transactions over TorLee Clagett1-36/+55
- Support for ".onion" in --add-exclusive-node and --add-peer - Add --anonymizing-proxy for outbound Tor connections - Add --anonymous-inbounds for inbound Tor connections - Support for sharing ".onion" addresses over Tor connections - Support for broadcasting transactions received over RPC exclusively over Tor (else broadcast over public IP when Tor not enabled).
2019-01-22Pruningmoneromooo-monero1-2/+8
The blockchain prunes seven eighths of prunable tx data. This saves about two thirds of the blockchain size, while keeping the node useful as a sync source for an eighth of the blockchain. No other data is currently pruned. There are three ways to prune a blockchain: - run monerod with --prune-blockchain - run "prune_blockchain" in the monerod console - run the monero-blockchain-prune utility The first two will prune in place. Due to how LMDB works, this will not reduce the blockchain size on disk. Instead, it will mark parts of the file as free, so that future data will use that free space, causing the file to not grow until free space grows scarce. The third way will create a second database, a pruned copy of the original one. Since this is a new file, this one will be smaller than the original one. Once the database is pruned, it will stay pruned as it syncs. That is, there is no need to use --prune-blockchain again, etc.
2018-06-10epee: adaptive connection timeout systemmoneromooo-monero1-0/+1
a connection's timeout is halved for every extra connection from the same host. Also keep track of when we don't need to use a connection anymore, so we can close it and free the resource for another connection. Also use the longer timeout for non routable local addresses.
2017-12-16move includes around to lessen overall loadmoneromooo-monero1-32/+5
2017-12-09net_utils_base: fix peer list parsingmoneromooo-monero1-3/+25
Fields are written with their "name" as key, and that name changed.
2017-10-05Upgrades to epee::net_utils::network_addressLee Clagett1-69/+125
- internal nullptr checks - prevent modifications to network_address (shallow copy issues) - automagically works with any type containing interface functions - removed fnv1a hashing - ipv4_network_address now flattened with no base class
2017-09-18epee: give virtual dtor to network_address_basemoneromooo-monero1-0/+3
It has virtual functions and is used as a base class
2017-08-01p2p: move m_in_timedsync from connection_context to p2p_connection_contextmoneromooo-monero1-3/+0
It's got no place in the base class as it's P2P specific field
2017-06-28Remove typeid use in network_addressmoneromooo-monero1-3/+2
Since I had to add an ID to the derived classes anyway, this can be used instead. This removes an apparently pointless warning from CLANG too.
2017-06-24Merge pull request #2073Riccardo Spagni1-0/+3
07c4276c Don't issue a new timedsync while one is already in progress (Howard Chu) cf3a376c Don't timeout a slow operation that's making progress (Howard Chu) 340830de Fix PR#2039 (Howard Chu)
2017-06-19net_utils_base: added missing template keywordkenshi841-1/+1
2017-06-15Don't issue a new timedsync while one is already in progressHoward Chu1-0/+3
A timedsync is issued every minute on a connection, but the input tineout is 2 minutes. This means a new sync request could be issued while a slow sync request was already in progress. The additional request will further clog the network on a slow connection, and cause a premature timeout.
2017-05-27abstracted nework addressesmoneromooo-monero1-12/+110
All code which was using ip and port now uses a new IPv4 object, subclass of a new network_address class. This will allow easy addition of I2P addresses later (and also IPv6, etc). Both old style and new style peer lists are now sent in the P2P protocol, which is inefficient but allows peers using both codebases to talk to each other. This will be removed in the future. No other subclasses than IPv4 exist yet.
2017-03-18Removed boost/asio.hpp include from epee/string_tools.hLee Clagett1-0/+1
2017-02-12epee: fix some log macros not printing context nicelymoneromooo-monero1-5/+5
2017-01-16Change logging to easylogging++moneromooo-monero1-21/+22
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-05-18contrib: epee: add exception spec to throwing destructorsredfish1-1/+1
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).
2015-02-202014 network limit 1.1 +utils +toc -doc -drmonerorfree2monero1-2/+8
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
2014-10-02moved non-critical p2p errors to l2Riccardo Spagni1-1/+1
2014-09-09moved non-critical warnings and errors to log level 1fluffypony1-1/+1
2014-07-25move modified epee code to new classes, revert licensefluffypony1-25/+23
2014-07-23License updated to BSD 3-clausefluffypony1-23/+25
2014-05-250.8.8updatemydesktop1-7/+10
2014-04-02json rpc for wallet and bugfixAntonio Juarez1-0/+6
2014-03-20some fixesAntonio Juarez1-9/+22
2014-03-03moved all stuff to githubAntonio Juarez1-0/+150