Added SNI option for TLS connections

Disabled by default, add `"sni": true,` to pool config to enable it.
This commit is contained in:
SChernykh 2023-09-29 08:33:01 +02:00
parent e855723cd9
commit 0a3313cb76
5 changed files with 13 additions and 3 deletions

View file

@ -70,6 +70,7 @@ public:
static const char *kSOCKS5;
static const char *kSubmitToOrigin;
static const char *kTls;
static const char* kSni;
static const char *kUrl;
static const char *kUser;
static const char* kSpendSecretKey;
@ -95,6 +96,7 @@ public:
inline bool isNicehash() const { return m_flags.test(FLAG_NICEHASH); }
inline bool isTLS() const { return m_flags.test(FLAG_TLS) || m_url.isTLS(); }
inline bool isSNI() const { return m_flags.test(FLAG_SNI); }
inline bool isValid() const { return m_url.isValid(); }
inline const Algorithm &algorithm() const { return m_algorithm; }
inline const Coin &coin() const { return m_coin; }
@ -138,6 +140,7 @@ private:
FLAG_ENABLED,
FLAG_NICEHASH,
FLAG_TLS,
FLAG_SNI,
FLAG_MAX
};