upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/proxy.h
diff options
context:
space:
mode:
authorbitflash <admin@bitflash.network>2026-08-12 10:31:29 -0300
committerbitflash <admin@bitflash.network>2026-08-12 10:31:29 -0300
commitc8d798807e69ddbe55bfab8a34286ab75b786cb5 (patch)
tree81b5d44e5193f220b64097f496e314e04caf2db8 /src/proxy.h
parentc5f6b52c0d1d65f7bf8cd745a7a212bc6b2fe318 (diff)
parentd0ebe648f333def99fababd65f6b929448616d56 (diff)
test merge
# Conflicts: # src/makefile.mingw
Diffstat (limited to 'src/proxy.h')
-rw-r--r--src/proxy.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/proxy.h b/src/proxy.h
new file mode 100644
index 0000000..6429cf2
--- /dev/null
+++ b/src/proxy.h
@@ -0,0 +1,34 @@
1// Copyright (c) 2026 Bitflash developers
2// Distributed under the MIT/X11 software license.
3//
4// Optional SOCKS5 outbound proxy support. This is transport plumbing only:
5// no consensus, wallet, mining, or .btf identity data depends on it.
6
7#ifndef BITFLASH_PROXY_H
8#define BITFLASH_PROXY_H
9
10#ifdef _WIN32
11#ifndef WIN32_LEAN_AND_MEAN
12#define WIN32_LEAN_AND_MEAN 1
13#endif
14#include <winsock2.h>
15#else
16#include "compat.h"
17#endif
18
19#include <string>
20
21bool BtfParseSocks5Proxy(const std::string& spec, std::string& hostOut,
22 unsigned short& portOut, std::string& errOut);
23bool BtfSetSocks5Proxy(const std::string& spec, std::string& errOut);
24bool BtfEnableTorProxy(const std::string& spec, std::string& errOut);
25void BtfClearSocks5Proxy();
26bool BtfSocks5ProxyEnabled();
27bool BtfTorProxyEnabled();
28bool BtfIsTorOnionHost(const std::string& host);
29std::string BtfSocks5ProxyName();
30
31SOCKET BtfConnectSocket(const std::string& destHost, unsigned short destPort,
32 int nSockSite, int nTimeoutSecs);
33
34#endif