// Ignore return value, errors are ok
setsockopt(fd_, SOL_SOCKET, SO_NO_TRANSPARENT_TLS, nullptr, 0);
}
+ if (noTSocks_) {
+ VLOG(4) << "Disabling TSOCKS for fd " << fd_;
+ // Ignore return value, errors are ok
+ setsockopt(fd_, SOL_SOCKET, SO_NO_TSOCKS, nullptr, 0);
+ }
#endif
int rv = fsp::connect(fd_, saddr, len);
if (rv < 0) {
#define SO_NO_TRANSPARENT_TLS 200
#endif
+#if defined __linux__ && !defined SO_NO_TSOCKS
+#define SO_NO_TSOCKS 201
+#endif
+
#ifdef _MSC_VER
// We do a dynamic_cast on this, in
// AsyncTransportWrapper::getUnderlyingTransport so be safe and
noTransparentTls_ = true;
}
+ void disableTSocks() {
+ noTSocks_ = true;
+ }
+
enum class StateEnum : uint8_t {
UNINIT,
CONNECTING,
bool tfoAttempted_{false};
bool tfoFinished_{false};
bool noTransparentTls_{false};
+ bool noTSocks_{false};
// Whether to track EOR or not.
bool trackEor_{false};