-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
domain based access #49
Comments
That's a very good question! I've always used this library on my home network, so I've never tried it on a VPN myself. My NAS is a Linux powered Synology, but I'm pretty sure I tested it against one of my Windows PCs running Windows 10 without issue as well. That error is triggered here when a call to You can inspect the code in that repo if you want and see if you notice anything. It's all low-level TCP interactions, and I'm not sure if enabling a VPN on an iOS device will automatically handle that on the system level or if the code here needs to do something as well. |
OK, I think I found something You are setting here the hostName as Domain, this could be the reason for my problem :). But in this case it shouldn't be a VPN problem I'll check it tomorrow |
I hardcoded the domain name for testing purpose and got immediatly the number of folders on root. Maybe you could add another method which accepts domains if it's provided/needed? Another approach could be to parse the domain out of the hostName f.e.:
|
Oh wow! Nicely done! Hmm, okay. I wonder what the best way of supporting this would be then. What's stopping you from simply doing I wonder if just renaming public references of |
OK, it surprises me that it works with this approach, because normally the full name is "servername.domain.com" In this case we are not really providing the servername and I'm not sure how stable this is. PS: I changed the title of the issue |
Hmm, looking at the libdsm headers again, and in there, both I think your suggestion might have been right the first time. It might be worth making |
Yes, thanks to their good naming of variables the bug was easy to find, when I investigated your first answer. There are several other SMB libraries on github who use libdsm and have the same bug. Yes, I think this would be a more secure/stable approach to establish the connection. Or consider maybe adding another initializer which expects a |
Is your latest example code works with domain/username method? |
hello @tnavadiya, I solved this issue for my purpose by providing the domain name as hostName because otherwise you have to change the TOSMBSession method In fact by doing this, you are then just accessing the Server over the IP Address |
Is it possible to access a SMB Share over VPN?
My current approach looks like this
This is the error message I get
fatal error: 'try!' expression unexpectedly raised an error: Error Domain=TOSMBClient Code=1003 "Login authentication failed." UserInfo={NSLocalizedDescription=Login authentication failed.}: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-802.0.53/src/swift/stdlib/public/core/ErrorType.swift, line 182
The same way works for a NAS (buffalo) which is physically in the same room.
Is it possible it fails because the SMB I try to access is on a Windows Server?
Hardware / Software
TOSMBClient v1.0.7 over cocoapods
Testing on iOS Simulator 10.0
I'm using this library with Swift 3
Goals
Connect to SMB share which is reachable over VPN
The text was updated successfully, but these errors were encountered: