-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
In my iOS app I have to go through the available wifi interface even if there isn't any Internet on it. But by default, iOS will go through the cellular network.
This is a big problem to me. I need to be able to specify the interface type.
I believe this translates to using SSH_OPTIONS_BINDADDR but I can't find this option in the mft library.
Is there a workaround?
If not, would it be possible to add this?
var bindAddress: String = ""
public init(hostname: String, port: Int, username: String, password: String, bindAddress: String = "") {
self.hostname = hostname
self.port = port
self.username = username
self.password = password
self.bindAddress = bindAddress
self.prvKeyPath = ""
self.prvKey = ""
self.passphrase = ""
self.sshAgentSocketPath = ""
}
func _connect() throws {
session = ssh_new()
...
if self.bindAddress != "" {
if ssh_options_set(session, SSH_OPTIONS_BINDADDR, self.bindAddress) < 0 {
defer {
ssh_free(session)
session = nil
}
throw error_ssh()
}
}
...
Then I would be able to specify the network type like this:
var sftp: MFTSftpConnection!
sftp = MFTSftpConnection(
hostname: host, port: port, username: username,
password: password, bindAddress: myWifiIpAddress)
Metadata
Metadata
Assignees
Labels
No labels