aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-24 19:02:21 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-31 18:12:35 +0200
commit587f929c6462698a674fe8add2f301161219d05a (patch)
tree1a1f3dde2af5e4fe19a66d692df94e8b223560db /src/netbase.h
parent50fac686541686191647ddabd87d6dae75c24c52 (diff)
Rework network config settings
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/netbase.h b/src/netbase.h
index 2cbc8bd8a2..0f6fc9b499 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -28,8 +28,8 @@ enum Network
NET_MAX
};
-enum Network ParseNetwork(std::string net);
-void SetNoProxy(enum Network net, bool fNoProxy = true);
+extern int nConnectTimeout;
+extern bool fNameLookup;
/** IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) */
class CNetAddr
@@ -132,6 +132,12 @@ class CService : public CNetAddr
)
};
+enum Network ParseNetwork(std::string net);
+bool SetProxy(enum Network net, CService addrProxy, int nSocksVersion = 5);
+bool GetProxy(enum Network net, CService &addrProxy);
+bool IsProxy(const CNetAddr &addr);
+bool SetNameProxy(CService addrProxy, int nSocksVersion = 5);
+bool GetNameProxy();
bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true);
bool LookupHostNumeric(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions = 0);
bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true);
@@ -140,11 +146,4 @@ bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0);
bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nConnectTimeout);
bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault = 0, int nTimeout = nConnectTimeout);
-// Settings
-extern int nSocksVersion;
-extern int fUseProxy;
-extern bool fProxyNameLookup;
-extern bool fNameLookup;
-extern CService addrProxy;
-
#endif