Merge branch 'add-more-peer-info'
This commit is contained in:
commit
aa3aa52350
|
@ -510,33 +510,33 @@ extension TunnelKitProvider {
|
|||
log.info("App version: \(appVersion)")
|
||||
}
|
||||
|
||||
// log.info("Address: \(endpoint.hostname):\(endpoint.port)")
|
||||
log.info("Protocols: \(endpointProtocols)")
|
||||
log.info("Cipher: \(cipher.rawValue)")
|
||||
log.info("Digest: \(digest.rawValue)")
|
||||
// log.info("\tAddress: \(endpoint.hostname):\(endpoint.port)")
|
||||
log.info("\tProtocols: \(endpointProtocols)")
|
||||
log.info("\tCipher: \(cipher)")
|
||||
log.info("\tDigest: \(digest)")
|
||||
if let _ = ca {
|
||||
log.info("CA verification: enabled")
|
||||
log.info("\tCA verification: enabled")
|
||||
} else {
|
||||
log.info("CA verification: disabled")
|
||||
log.info("\tCA verification: disabled")
|
||||
}
|
||||
if let _ = clientCertificate {
|
||||
log.info("Client verification: enabled")
|
||||
log.info("\tClient verification: enabled")
|
||||
} else {
|
||||
log.info("Client verification: disabled")
|
||||
log.info("\tClient verification: disabled")
|
||||
}
|
||||
log.info("MTU: \(mtu)")
|
||||
log.info("Compression framing: \(compressionFraming)")
|
||||
log.info("\tMTU: \(mtu)")
|
||||
log.info("\tCompression framing: \(compressionFraming)")
|
||||
if let keepAliveSeconds = keepAliveSeconds {
|
||||
log.info("Keep-alive: \(keepAliveSeconds) seconds")
|
||||
log.info("\tKeep-alive: \(keepAliveSeconds) seconds")
|
||||
} else {
|
||||
log.info("Keep-alive: default")
|
||||
log.info("\tKeep-alive: default")
|
||||
}
|
||||
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds {
|
||||
log.info("Renegotiation: \(renegotiatesAfterSeconds) seconds")
|
||||
log.info("\tRenegotiation: \(renegotiatesAfterSeconds) seconds")
|
||||
} else {
|
||||
log.info("Renegotiation: never")
|
||||
log.info("\tRenegotiation: never")
|
||||
}
|
||||
log.info("Debug: \(shouldDebug)")
|
||||
log.info("\tDebug: \(shouldDebug)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,12 @@
|
|||
//
|
||||
|
||||
import Foundation
|
||||
import __TunnelKitNative
|
||||
|
||||
struct CoreConfiguration {
|
||||
static let identifier = "com.algoritmico.TunnelKit"
|
||||
|
||||
static let version = "1.1.0-dev"
|
||||
|
||||
// MARK: Session
|
||||
|
||||
|
@ -58,8 +62,11 @@ struct CoreConfiguration {
|
|||
|
||||
static let peerInfo = [
|
||||
"IV_VER=2.4",
|
||||
"IV_PLAT=mac",
|
||||
"IV_UI_VER=\(identifier) \(version)",
|
||||
"IV_PROTO=2",
|
||||
"IV_NCP=2",
|
||||
"IV_SSL=\(CryptoBox.version())",
|
||||
""
|
||||
].joined(separator: "\n")
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@interface CryptoBox : NSObject
|
||||
|
||||
+ (NSString *)version;
|
||||
+ (BOOL)preparePRNGWithSeed:(const uint8_t *)seed length:(NSInteger)length;
|
||||
|
||||
- (instancetype)initWithCipherAlgorithm:(nullable NSString *)cipherAlgorithm
|
||||
|
@ -66,6 +67,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
hmacLength:(NSInteger *)hmacLength
|
||||
error:(NSError **)error;
|
||||
|
||||
|
||||
// encrypt/decrypt are mutually thread-safe
|
||||
- (id<Encrypter>)encrypter;
|
||||
- (id<Decrypter>)decrypter;
|
||||
|
|
|
@ -63,6 +63,11 @@
|
|||
{
|
||||
}
|
||||
|
||||
+ (NSString *)version
|
||||
{
|
||||
return [NSString stringWithCString:OpenSSL_version(OPENSSL_VERSION) encoding:NSASCIIStringEncoding];
|
||||
}
|
||||
|
||||
+ (BOOL)preparePRNGWithSeed:(const uint8_t *)seed length:(NSInteger)length
|
||||
{
|
||||
unsigned char x[1];
|
||||
|
|
|
@ -1050,14 +1050,14 @@ public class SessionProxy {
|
|||
|
||||
let pushedFraming = pushReply.compressionFraming
|
||||
if let negFraming = pushedFraming {
|
||||
log.debug("Negotiated compression framing: \(negFraming.rawValue)")
|
||||
log.info("Negotiated compression framing: \(negFraming.rawValue)")
|
||||
}
|
||||
if let negPing = pushReply.ping {
|
||||
log.debug("Negotiated keep-alive: \(negPing) seconds")
|
||||
log.info("Negotiated keep-alive: \(negPing) seconds")
|
||||
}
|
||||
let pushedCipher = pushReply.cipher
|
||||
if let negCipher = pushedCipher {
|
||||
log.debug("Negotiated cipher: \(negCipher.rawValue)")
|
||||
log.info("Negotiated cipher: \(negCipher.rawValue)")
|
||||
}
|
||||
|
||||
let bridge: EncryptionBridge
|
||||
|
|
Loading…
Reference in New Issue