SmbConfig

data class SmbConfig(val dialects: List<SmbDialect> = listOf( SmbDialect.SMB_3_1_1, SmbDialect.SMB_3_0_2, SmbDialect.SMB_3_0_0, SmbDialect.SMB_2_1_0, SmbDialect.SMB_2_0_2, ), val ciphers: List<SmbCipherId> = listOf( SmbCipherId.AES_128_GCM, SmbCipherId.AES_128_CCM, ), val encryptionPolicy: SmbEncryptionPolicy = SmbEncryptionPolicy.NEGOTIATE, val preferEncryption: Boolean = false, val alwaysSign: Boolean = false, val verifyServerSignatures: Boolean = true, val queryDirectoryBufferSize: Int = 64 * 1024, val randomAccessBufferSize: Int = SmbRandomAccessFile.DEFAULT_BUFFER_SIZE, val connectTimeout: Duration = 10.seconds, val requestTimeout: Duration = 30.seconds)

Configuration options for an SmbClient connection.

Constructors

Link copied to clipboard
constructor(dialects: List<SmbDialect> = listOf( SmbDialect.SMB_3_1_1, SmbDialect.SMB_3_0_2, SmbDialect.SMB_3_0_0, SmbDialect.SMB_2_1_0, SmbDialect.SMB_2_0_2, ), ciphers: List<SmbCipherId> = listOf( SmbCipherId.AES_128_GCM, SmbCipherId.AES_128_CCM, ), encryptionPolicy: SmbEncryptionPolicy = SmbEncryptionPolicy.NEGOTIATE, preferEncryption: Boolean = false, alwaysSign: Boolean = false, verifyServerSignatures: Boolean = true, queryDirectoryBufferSize: Int = 64 * 1024, randomAccessBufferSize: Int = SmbRandomAccessFile.DEFAULT_BUFFER_SIZE, connectTimeout: Duration = 10.seconds, requestTimeout: Duration = 30.seconds)
constructor(dialects: List<SmbDialect> = listOf( SmbDialect.SMB_3_1_1, SmbDialect.SMB_3_0_2, SmbDialect.SMB_3_0_0, SmbDialect.SMB_2_1_0, SmbDialect.SMB_2_0_2, ), ciphers: List<SmbCipherId> = listOf( SmbCipherId.AES_128_GCM, SmbCipherId.AES_128_CCM, ), encryptionPolicy: SmbEncryptionPolicy = SmbEncryptionPolicy.NEGOTIATE, preferEncryption: Boolean = false, alwaysSign: Boolean = false, verifyServerSignatures: Boolean = true, queryDirectoryBufferSize: Int = 64 * 1024, randomAccessBufferSize: Int = SmbRandomAccessFile.DEFAULT_BUFFER_SIZE, connectTimeoutMillis: Long, requestTimeoutMillis: Long, deprecatedMarker: Unit = Unit)

Creates an SmbConfig specifying connectTimeoutMillis (and optionally requestTimeoutMillis) in milliseconds.

Properties

Link copied to clipboard
val alwaysSign: Boolean

Whether to sign all unencrypted SMB packets even when the server does not require signing.

Link copied to clipboard
val ciphers: List<SmbCipherId>

SMB 3.1.1 encryption ciphers offered during negotiation, ordered by preference.

Link copied to clipboard
val connectTimeout: Duration

TCP socket connection timeout.

Link copied to clipboard

TCP socket connection timeout in milliseconds.

Link copied to clipboard
val dialects: List<SmbDialect>

SMB dialects offered during SMB2 NEGOTIATE, ordered by preference.

Link copied to clipboard

Policy governing SMB 3.x packet encryption.

Link copied to clipboard
val preferEncryption: Boolean

Whether to proactively enable encryption under SmbEncryptionPolicy.NEGOTIATE whenever the server supports SMB 3.x encryption.

Link copied to clipboard

Default maximum output buffer size in bytes for each SMB2 QUERY_DIRECTORY request.

Link copied to clipboard

Default read buffer size in bytes for SmbRandomAccessFile.

Link copied to clipboard
val requestTimeout: Duration

Timeout for each SMB request/response exchange.

Link copied to clipboard

Timeout in milliseconds for each SMB request/response exchange.

Link copied to clipboard

Whether to verify cryptographic signatures on signed responses from the server.