![]() |
VOOZH | about |
dotnet add package SMBLibrary.ForXamarin --version 1.4.6.1
NuGet\Install-Package SMBLibrary.ForXamarin -Version 1.4.6.1
<PackageReference Include="SMBLibrary.ForXamarin" Version="1.4.6.1" />
<PackageVersion Include="SMBLibrary.ForXamarin" Version="1.4.6.1" />Directory.Packages.props
<PackageReference Include="SMBLibrary.ForXamarin" />Project file
paket add SMBLibrary.ForXamarin --version 1.4.6.1
#r "nuget: SMBLibrary.ForXamarin, 1.4.6.1"
#:package SMBLibrary.ForXamarin@1.4.6.1
#addin nuget:?package=SMBLibrary.ForXamarin&version=1.4.6.1Install as a Cake Addin
#tool nuget:?package=SMBLibrary.ForXamarin&version=1.4.6.1Install as a Cake Tool
This is a fork of Tal Aloni's SMBLibrary, that a workaround for the issue where iOS does not discard resources in Socket.
Modified only client logic, not server.
SMBLibrary is an open-source C# SMB 1.0/CIFS, SMB 2.0, SMB 2.1 and SMB 3.0 server and client implementation.
SMBLibrary gives .NET developers an easy way to share a directory / file system / virtual file system, with any operating system that supports the SMB protocol.
SMBLibrary is modular, you can take advantage of Integrated Windows Authentication and the Windows storage subsystem on a Windows host or use independent implementations that allow for cross-platform compatibility.
SMBLibrary shares can be accessed from any Windows version since Windows NT 4.0.
• NetBIOS over TCP (port 139)
• Direct TCP hosting (port 445)
By default, Windows already use ports 139 and 445. there are several techniques to free / utilize those ports:
Disable the "Server" service (p.s. "TCP\IP NETBIOS Helper" should be enabled).
Windows bind port 139 to the first IP addres of every adapter, while port 445 is bound globally. This means that if you'll disable port 445 (or block it using a firewall), you'll be able to use a different service on port 139 for every IP address.
To free port 139 for a given adapter, go to 'Internet Protocol (TCP/IP) Properties' > Advanced > WINS, and select 'Disable NetBIOS over TCP/IP'. Uncheck 'File and Printer Sharing for Microsoft Networks' to ensure Windows will not answer to SMB traffic on port 445 for this adapter.
It's important to note that disabling NetBIOS over TCP/IP will also disable NetBIOS name service for that adapter (a.k.a. WINS), This service uses UDP port 137. SMBLibrary offers a name service of its own.
You can install a virtual network adapter driver for Windows to be used solely with SMBLibrary:
It's possible to prevent Windows from using port 445 by removing all of the '\Device\Tcpip_{..}' and '\Device\Tcpip6_{..}' entries from the `Bind' registry key under 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Linkage'.
if you want localhost access from Windows explorer to work as expected, you must specify the IP address that you selected (\\127.0.0.1 or \\localhost will not work as expected), in addition, I have observed that when connecting to the first IP address of a given adapter, Windows will only attempt to connect to port 445.
Using PCap.Net you can programmatically setup a virtual Network adapter and intercept SMB traffic (similar to how a virtual machine operates), You should use the ARP protocol to notify the network about the new IP address, and then process the incoming SMB traffic using SMBLibrary, good luck!
Any directory / filesystem / object you wish to share must implement the IFileSystem interface (or the lower-level INTFileStore interface).
You can share anything from actual directories to custom objects, as long as they expose a directory structure.
Client code examples can be found .
SMBLibrary - Cross-platform server and client implementation.
SMBLibrary.Win32 - Allows utilizing Integrated Windows Authentication and/or the Windows storage subsystem on a Windows host.
SMBLibrary.Adapters - IFileSystem to INTFileStore adapter for SMBLibrary.
If you have any question, feel free to contact me.
Tal Aloni
** ↑ This is the original SMBLibrary owner. If you have any problems with SMBLibrary.ForXamarin, please send issues on this repository, not to the original owner.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on SMBLibrary.ForXamarin:
| Package | Downloads |
|---|---|
|
EzSmb
It's easy to use, and supports SMB ver2 for Windows 10. Xamarin & .NET Core can access Windows Shared Folders and NAS without using mpr.dll or Netapi32.dll. Supports .Net Standard 2.0. |
|
|
EASYTools.EzSmb
It's easy to use, and supports SMB ver2 for Windows 10. Xamarin & .NET Core can access Windows Shared Folders and NAS without using mpr.dll or Netapi32.dll. Supports .Net Standard 2.0. |
|
|
EzSmb.Next
It's easy to use, and supports SMB ver2 for Windows 10. Xamarin & .NET Core can access Windows Shared Folders and NAS without using mpr.dll or Netapi32.dll. Supports .Net Standard 2.0. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.6.1 | 533,612 | 6/25/2021 |
add socket dispose.