diff options
| author | Bitflash <admin@bitflash.network> | 2026-08-12 10:18:14 -0300 |
|---|---|---|
| committer | Bitflash <admin@bitflash.network> | 2026-08-12 10:18:14 -0300 |
| commit | c330b8e5e1c057049b5b361908c94f41344dff80 (patch) | |
| tree | 44e70a657e4fa70205d9d318839ac68f175a1fb9 /src/net.cpp | |
| parent | 026ec904b7bde4898fbb889b7758dbcb13bf860a (diff) | |
| parent | 066379ebcb1dac720221fe1a1841fa6f59df21d9 (diff) | |
Merge pull request 'net: add optional SOCKS5 outbound proxy' (#27) from socks5-proxy into main
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index b9bb95d..fe9964e 100644 --- a/src/net.cpp +++ b/src/net.cpp | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <openssl/rand.h> | 17 | #include <openssl/rand.h> |
| 18 | #include "btfaddr.h" | 18 | #include "btfaddr.h" |
| 19 | #include "btftunnel.h" | 19 | #include "btftunnel.h" |
| 20 | #include "proxy.h" | ||
| 20 | 21 | ||
| 21 | void ThreadReconnectCachedBtfPeers(void* parg); | 22 | void ThreadReconnectCachedBtfPeers(void* parg); |
| 22 | void ThreadMessageHandler2(void* parg); | 23 | void ThreadMessageHandler2(void* parg); |
| @@ -361,6 +362,9 @@ string GetDiagnosticsText() | |||
| 361 | 362 | ||
| 362 | bool GetMyExternalIP(unsigned int& ipRet) | 363 | bool GetMyExternalIP(unsigned int& ipRet) |
| 363 | { | 364 | { |
| 365 | if (BtfSocks5ProxyEnabled()) | ||
| 366 | return error("GetMyExternalIP() skipped while SOCKS5 proxy is enabled\n"); | ||
| 367 | |||
| 364 | // Try several plain-text IP echo services in order. | 368 | // Try several plain-text IP echo services in order. |
| 365 | // Each returns just the IPv4 address as the first line of the HTTP body. | 369 | // Each returns just the IPv4 address as the first line of the HTTP body. |
| 366 | struct { const char* host; const char* path; } services[] = { | 370 | struct { const char* host; const char* path; } services[] = { |