aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge #9289: net: drop boost::thread_groupWladimir J. van der Laan2017-01-041-0/+1
|\ | | | | | | | | | | | | | | | | | | 67ee4ec net: misc header cleanups (Cory Fields) 8b3159e net: make proxy receives interruptible (Cory Fields) 5cb0fce net: remove thread_interrupted catch (Cory Fields) d3d7056 net: make net processing interruptible (Cory Fields) 0985052 net: make net interruptible (Cory Fields) 799df91 net: add CThreadInterrupt and InterruptibleSleep (Cory Fields) 7325b15 net: a few small cleanups before replacing boost threads (Cory Fields)
| * net: make proxy receives interruptibleCory Fields2017-01-031-0/+1
| |
* | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
|/ | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Do not shadow variables in networking codePavel Janík2016-08-151-1/+1
|
* net: Have LookupNumeric return a CService directlyCory Fields2016-08-041-1/+1
| | | | | | Also fix up a few small issues: - Lookup with "badip:port" now sets the port to 0 - Don't allow assert to have side-effects
* net: move CNetAddr/CService/CSubNet out of netbaseCory Fields2016-07-311-157/+1
|
* net: Split resolving out of CSubNetCory Fields2016-07-311-1/+3
|
* net: Split resolving out of CServiceCory Fields2016-07-311-4/+0
|
* net: Split resolving out of CNetAddrCory Fields2016-07-311-2/+1
|
* net: disable resolving from storage structuresCory Fields2016-04-201-7/+7
| | | | CNetAddr/CService/CSubnet can no longer resolve DNS.
* net: require lookup functions to specify all argumentsCory Fields2016-04-171-3/+3
| | | | To make it clear where DNS resolves are happening
* Net: Add IPv6 Link-Local Address Supportmruddy2016-04-051-1/+2
|
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* [trivial] Reuse translation and cleanup DEFAULT_* valuesMarcoFalke2015-11-281-1/+3
| | | | | * DEFAULT_DISABLE_SAFEMODE = false * Use DEFAULT_* constants for extern bools
* net: Automatically create hidden service, listen on TorWladimir J. van der Laan2015-11-101-0/+4
| | | | | | | | | | | | | | | | | | | | Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket API, to create and destroy 'ephemeral' hidden services programmatically. https://stem.torproject.org/api/control.html#stem.control.Controller.create_ephemeral_hidden_service This means that if Tor is running (and proper authorization is available), bitcoin automatically creates a hidden service to listen on, without user manual configuration. This will positively affect the number of available .onion nodes. - When the node is started, connect to Tor through control socket - Send `ADD_ONION` command - First time: - Make it create a hidden service key - Save the key in the data directory for later usage - Make it redirect port 8333 to the local port 8333 (or whatever port we're listening on). - Keep control socket connection open for as long node is running. The hidden service will (by default) automatically go away when the connection is closed.
* Adding CSubNet constructor over a single CNetAddrJonas Schnelli2015-07-021-0/+3
|
* banlist.dat: store banlist on diskJonas Schnelli2015-07-021-0/+9
|
* [RPC] extend setban to allow subnetsJonas Schnelli2015-06-171-0/+1
|
* Simplify code for CSubnetWladimir J. van der Laan2015-05-261-0/+2
| | | | | Simplify the code by using CAddress.ip directly, instead of the reversed GetByte() semantics.
* privacy: Stream isolation for TorWladimir J. van der Laan2015-04-171-3/+13
| | | | | | | | | | | | | According to Tor's extensions to the SOCKS protocol (https://gitweb.torproject.org/torspec.git/tree/socks-extensions.txt) it is possible to perform stream isolation by providing authentication to the proxy. Each set of credentials will create a new circuit, which makes it harder to correlate connections. This patch adds an option, `-proxyrandomize` (on by default) that randomizes credentials for every outgoing connection, thus creating a new circuit. 2015-03-16 15:29:59 SOCKS5 Sending proxy authentication 3842137544:3256031132
* src/netbase.h: Fix endian in CNetAddr serializationWladimir J. van der Laan2015-03-061-1/+1
| | | | | | | | We've chosen to htons/ntohs explicitly on reading and writing (I do not know why). But as READWRITE already does an endian swap on big endian, this means the port number gets switched around, which was what we were trying to avoid in the first place. So to make this compatible, serialize it as FLATDATA.
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Regard connection failures as attempt for addrmanWladimir J. van der Laan2014-12-021-2/+2
| | | | | | | This avoids connecting to them again too soon in ThreadOpenConnections. Make an exception for connection failures to the proxy as these shouldn't affect the status of specific nodes.
* Add missing reserved address spaces.Matt Corallo2014-10-281-0/+3
|
* add -timeout default as constant and use themPhilip Kaufmann2014-10-061-0/+3
| | | | | - update help message text - simplify code in init to check for -timeout
* Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODSPieter Wuille2014-09-021-2/+2
|
* Serializer simplifications after IMPLEMENT_SERIALIZE overhaulPieter Wuille2014-09-011-2/+1
|
* Merge pull request #4737Pieter Wuille2014-09-011-13/+17
|\ | | | | | | | | | | | | 31e9a83 Use CSizeComputer to avoid counting sizes in SerializationOp (Pieter Wuille) 84881f8 rework overhauled serialization methods to non-static (Kamil Domanski) 5d96b4a remove fields of ser_streamplaceholder (Kamil Domanski) 3d796f8 overhaul serialization code (Kamil Domanski)
| * Use CSizeComputer to avoid counting sizes in SerializationOpPieter Wuille2014-08-311-9/+4
| |
| * rework overhauled serialization methods to non-staticKamil Domanski2014-08-311-10/+10
| | | | | | | | | | | | | | Thanks to Pieter Wuille for most of the work on this commit. I did not fixup the overhaul commit, because a rebase conflicted with "remove fields of ser_streamplaceholder". I prefer not to risk making a mistake while resolving it.
| * overhaul serialization codeKamil Domanski2014-08-311-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of each class' serialization/deserialization is no longer passed within a macro. The implementation now lies within a template of form: template <typename T, typename Stream, typename Operation> inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) { size_t nSerSize = 0; /* CODE */ return nSerSize; } In cases when codepath should depend on whether or not we are just deserializing (old fGetSize, fWrite, fRead flags) an additional clause can be used: bool fRead = boost::is_same<Operation, CSerActionUnserialize>(); The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize, Serialize and Unserialize. These are now wrappers around the "SerializationOp" template.
* | add missing header end commentsPhilip Kaufmann2014-08-281-1/+1
|/ | | | | | - ensures a consistent usage in header files - also add a blank line after the copyright header where missing - also remove orphan new-lines at the end of some files
* Remove all other print() methodsWladimir J. van der Laan2014-08-201-2/+0
| | | | All unused.
* Add GetNetworkName functionWladimir J. van der Laan2014-07-301-1/+2
| | | | Returns the network name for an Network enum.
* net: add SetSocketNonBlocking() as OS independent wrapperPhilip Kaufmann2014-07-171-0/+2
|
* Convert closesocket 'compat wrapper' to function in netbaseWladimir J. van der Laan2014-07-171-0/+2
| | | | | | | | | | | Simpler alternative to #4348. The current setup with closesocket() is strange. It poses as a compatibility wrapper but adds functionality. Rename it and make it a documented utility function in netbase. Code movement only, zero effect on the functionality.
* remove SOCKS4 support from core and GUIPhilip Kaufmann2014-07-071-3/+3
| | | | - now we support SOCKS5 only
* build: fix build weirdness after 54372482.Cory Fields2014-06-231-1/+1
| | | | | | | | | | | | | bitcoin-config.h moved, but the old file is likely to still exist when reconfiguring or switching branches. This would've caused files to not rebuild correctly, and other strange problems. Make the path explicit so that the old one cannot be found. Core libs use config/bitcoin-config.h. Libs (like crypto) which don't want access to bitcoin's headers continue to use -Iconfig and #include bitcoin-config.h.
* remove dup of extern int nConnectTimeout; in netbasePhilip Kaufmann2014-05-311-3/+1
|
* Merge pull request #4183Wladimir J. van der Laan2014-05-251-1/+0
|\ | | | | | | | | | | | | | | | | f40dbee remove CPubKey::VerifyCompact( ) which is never used (Kamil Domanski) 28b6c1d remove GetMedianTime( ) which is never used (Kamil Domanski) 5bd4adc remove LookupHostNumeric( ) which is never used (Kamil Domanski) 595f691 remove LogException( ) which is never used (Kamil Domanski) f4057cb remove CTransaction::IsNewerThan which is never used (Kamil Domanski) 0e31e56 remove CWallet::AddReserveKey which is never used (Kamil Domanski)
| * remove LookupHostNumeric( ) which is never usedKamil Domanski2014-05-201-1/+0
| |
* | Replace non-threadsafe strerrorWladimir J. van der Laan2014-05-231-0/+2
|/ | | | | | | Log the name of the error as well as the error code if a network problem happens. This makes network troubleshooting more convenient. Use thread-safe strerror_r and the WIN32 equivalent FormatMessage.
* net: Add CSubNet class for subnet matchingWladimir J. van der Laan2014-05-091-0/+30
|
* Remove build-time no-IPv6 settingWladimir J. van der Laan2014-05-011-4/+0
| | | | | | | | | | | The year is 2014. All supported operating systems have IPv6 support, most certainly at build time (this doesn't mean that IPv6 is configured, of course). If noone is exercising the functionality to disable it, that means it doesn't get tested, and IMO it's better to get rid of it. (it's also not used consistently in RPC/boost and Net code...)
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-4/+6
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Bump Year Number to 2013super32013-10-201-1/+1
|
* fix #3049 by changing comment for CNetAddr::IsRFC4193()Philip Kaufmann2013-10-031-1/+1
|
* autotools: switch to autotools buildsystemCory Fields2013-09-051-0/+4
|
* Merge pull request #1913 from sipa/noi2pWladimir J. van der Laan2012-10-111-4/+2
|\ | | | | Remove I2P support from netbase