aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-04-20 16:35:11 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-04-20 16:37:38 +0200
commitb6ea3bcede1cbbf89486b9d67329e0110c4624ae (patch)
treefabff7884ea479e390b893e5aa2bbe9fbbde87c9 /src/netbase.h
parent71900b4426adc96322c432a42b952c685f8b3b7f (diff)
parent6be3562e507d6a3e4c318f79c89e1def073b430c (diff)
Merge pull request #5911
6be3562 rpc-tests: Add proxy test (Wladimir J. van der Laan) 67a7949 privacy: Stream isolation for Tor (Wladimir J. van der Laan)
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/netbase.h b/src/netbase.h
index b42c2dffa4..6d2ca4afb2 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -168,15 +168,25 @@ class CService : public CNetAddr
}
};
-typedef CService proxyType;
+class proxyType
+{
+public:
+ proxyType(): randomize_credentials(false) {}
+ proxyType(const CService &proxy, bool randomize_credentials=false): proxy(proxy), randomize_credentials(randomize_credentials) {}
+
+ bool IsValid() const { return proxy.IsValid(); }
+
+ CService proxy;
+ bool randomize_credentials;
+};
enum Network ParseNetwork(std::string net);
std::string GetNetworkName(enum Network net);
void SplitHostPort(std::string in, int &portOut, std::string &hostOut);
-bool SetProxy(enum Network net, CService addrProxy);
+bool SetProxy(enum Network net, const proxyType &addrProxy);
bool GetProxy(enum Network net, proxyType &proxyInfoOut);
bool IsProxy(const CNetAddr &addr);
-bool SetNameProxy(CService addrProxy);
+bool SetNameProxy(const proxyType &addrProxy);
bool HaveNameProxy();
bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true);
bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true);