aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
AgeCommit message (Collapse)Author
2012-10-04add LOCK() for proxy related data-structuresPhilip Kaufmann
- fix #1560 by properly locking proxy related data-structures - update GetProxy() and introduce GetNameProxy() to be able to use a thread-safe local copy from proxyInfo and nameproxyInfo - update usage of GetProxy() all over the source to match the new behaviour, as it now fills a full proxyType object - rename GetNameProxy() into HaveNameProxy() to be more clear
2012-09-21Merge pull request #1793 from Diapolo/fix_signed_unsigned_strprintfWladimir J. van der Laan
fix signed/unsigned in strprintf and CNetAddr::GetByte()
2012-09-18Trim trailing whitespace for src/*.{h,cpp}Jeff Garzik
2012-09-12fix signed/unsigned in strprintf and CNetAddr::GetByte()Philip Kaufmann
- I checked every occurance of strprintf() in the code and used %u, where unsigned vars are used - the change to GetByte() was made, as ip is an unsigned char
2012-08-01Bugfix: Fix a variety of misspellingsLuke Dashjr
2012-07-07Fix OBO in socks5 auth proposal. This fixes compatibility with openssh's ↵Douglas Huff
socks5 proxy and tor's .2.3.x branch.
2012-06-23Rewrite CNetAddr::GetReachabilityFrom()Pieter Wuille
Add support for Tor/I2P networks, and make code more readable.
2012-06-23Node support for Tor hidden servicesPieter Wuille
This commit adds support for .onion addresses (mapped into the IPv6 by using OnionCat's range and encoding), and the ability to connect to them via a SOCKS5 proxy.
2012-06-19Fix netbase testsPieter Wuille
* Do not rely on "a.b.c" being interpreted as "a.0.b.c" * Parse numeric addresses for address families for which no device is configured
2012-06-18Merge pull request #1399 from sipa/ipparseGavin Andresen
Improve parsing of IPv6 addresses
2012-06-18Merge branch 'signbugs' of https://github.com/wizeman/bitcoinGavin Andresen
Resolved minor conflict in main.cpp
2012-06-14Improve parsing of IPv6 addressesPieter Wuille
Implement the following rules: * Interpret [X]:Y as host=X port=Y, if Y is an integer * Interpret X:Y as host=X port=Y, if Y is an integer and X contains no colon * Interpret X:Y as host=X:Y port=default otherwise
2012-06-05fix two signed/unsigned comparison warnings in netbase.cppPhilip Kaufmann
2012-05-31Rework network config settingsPieter Wuille
2012-05-18Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-14Use getnameinfo() to get canonical IPv6 addressesPieter Wuille
2012-05-13Make CNetAddr::GetHash() return an unsigned val.Ricardo M. Correia
This prevents an undefined operation in main.cpp, when shifting the hash value left by 32 bits. Shifting a signed int left into the sign bit is undefined in C++11.
2012-05-12Merge pull request #1277 from Diapolo/IPv6_IPv4_stringsJeff Garzik
use "IPv6" and "IPv4" in strings as these are the official spellings
2012-05-13use "IPv6" and "IPv4" in strings as these are the official spellings and ↵Philip Kaufmann
make ParseNetwork() in netbase.cpp case-insensitive
2012-05-13Only check for port# after : in ConnectSocketByNamePieter Wuille
2012-05-11Separate listening sockets, -bind=<addr>Pieter Wuille
2012-05-11Use NET_ identifiers in CNetAddr::GetGroup()Pieter Wuille
2012-05-11Add -noproxy to circumvent proxy for some networkPieter Wuille
2012-05-11Limited relaying/storing of foreign addressesPieter Wuille
Introduce a boolean variable for each "network" (ipv4, ipv6, tor, i2p), and track whether we are likely to able to connect to it. Addresses in "addr" messages outside of our network get limited relaying and are not stored in addrman.
2012-05-11Preliminary support for Tor/I2P hidden servicesPieter Wuille
There are plans to let Bitcoin function as Tor/I2P hidden service. To do so, we could use the established encoding provided by OnionCat and GarliCat (without actually using those tools) to embed Tor/I2P addresses in IPv6. This patch makes these addresses considered routable, so they can travel over the Bitcoin network in 'addr' messages. This will hopefully make it easier to deploy real hidden service support later.
2012-05-11IPv6 node supportPieter Wuille
This will make bitcoin relay valid routable IPv6 addresses, and when USE_IPV6 is enabled, listen on IPv6 interfaces and attempt connections to IPv6 addresses.
2012-05-09Clean up warningsPieter Wuille
* Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters * Remove xCXXFLAGS usage in makefile.unix * Fix several recent and older sign-compare warnings
2012-05-04Support for multiple local addressesPieter Wuille
2012-05-04Support connecting by hostnames passed to proxy (-proxydns)Pieter Wuille
2012-05-04refactor ConnectSocketPieter Wuille
2012-05-04SOCKS5 connect via hostnamePieter Wuille
2012-05-04SOCKS5 support by defaultPieter Wuille
Add -socks=<n> to select SOCKS version to use. 4 and 5 are supported, 5 is default.
2012-04-15Fix sign-compare warnings: netbase's Lookup* max-solutions may be unsignedJeff Garzik
2012-04-15Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik
foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
2012-02-24CAddrMan: stochastic address managerPieter Wuille
Design goals: * Only keep a limited number of addresses around, so that addr.dat does not grow without bound. * Keep the address tables in-memory, and occasionally write the table to addr.dat. * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. See comments in addrman.h for more detailed information.
2012-02-17fix typo in CNetAddr::IsRFC4843() (fixes #850)Wladimir J. van der Laan
2012-02-07Update all copyrights to 2012Gavin Andresen
2012-01-17Fix handling of default portsPieter Wuille
2012-01-16Merge branch 'keepnode' of https://github.com/TheBlueMatt/bitcoinGavin Andresen
2012-01-12Add -keepnode which attempts to -addnode and keep a connection openMatt Corallo
2012-01-12Compile with extra warnings turned on. And more makefile/code tidying up.Gavin Andresen
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings. Exceptions are: -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned. -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
2012-01-06Network stack refactorPieter Wuille
This introduces CNetAddr and CService, respectively wrapping an (IPv6) IP address and an IP+port combination. This functionality used to be part of CAddress, which also contains network flags and connection attempt information. These extra fields are however not always necessary. These classes, along with logic for creating connections and doing name lookups, are moved to netbase.{h,cpp}, which does not depend on headers.h. Furthermore, CNetAddr is mostly IPv6-ready, though IPv6 functionality is not yet enabled for the application itself.