DragonFruit.OnionFruit.Native.osx 13.5.4.1

dotnet add package DragonFruit.OnionFruit.Native.osx --version 13.5.4.1                
NuGet\Install-Package DragonFruit.OnionFruit.Native.osx -Version 13.5.4.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DragonFruit.OnionFruit.Native.osx" Version="13.5.4.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DragonFruit.OnionFruit.Native.osx --version 13.5.4.1                
#r "nuget: DragonFruit.OnionFruit.Native.osx, 13.5.4.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DragonFruit.OnionFruit.Native.osx as a Cake Addin
#addin nuget:?package=DragonFruit.OnionFruit.Native.osx&version=13.5.4.1

// Install DragonFruit.OnionFruit.Native.osx as a Cake Tool
#tool nuget:?package=DragonFruit.OnionFruit.Native.osx&version=13.5.4.1                

OnionFruit Native Libraries

Provides native libraries from the Tor website as pacakges for supported operating systems

alternate text is missing from this package README image alternate text is missing from this package README image

Example Locator Script

When publishing, the correct binaries are copied directly to the output folder. If in debug or non-publish build, the files can be found under runtimes/{rid}/{arch}/native

public static class TorResolver
{
    /// <summary>
    /// Attempts to locate the tor executable, returning the full path if found.
    /// </summary>
    /// <remarks>
    /// Currently not supported on linux platforms
    /// </remarks>
    [UnsupportedOSPlatform("ios")]
    [UnsupportedOSPlatform("linux")]
    [UnsupportedOSPlatform("android")]
    public static string LocateTorExecutable()
    {
        var filename = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "tor.exe" : "tor";
        return EnumeratePotentialDirectories().Select(targetDir => Path.Combine(targetDir, filename)).FirstOrDefault(File.Exists);
    }

    private static IEnumerable<string> EnumeratePotentialDirectories()
    {
        // app dir (in case of published program)
        yield return AppDomain.CurrentDomain.BaseDirectory;

        // native executable location (debug/local build)
        string platformName;

        if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
        {
            platformName = "win";
        }
        else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
        {
            platformName = "osx";
        }
        else
        {
            throw new PlatformNotSupportedException("OnionFruit NativeLibs are currently only available on Windows and macOS");
        }

        var genericRid = $"{platformName}-{RuntimeInformation.OSArchitecture.ToString().ToLowerInvariant()}";
        yield return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "runtimes", genericRid, "native");
    }
}

License

The project is licensed under the MIT Licence. Please note the Tor is distributed under a different license, which has been provided with the binaries

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.5.4.1 144 9/18/2024
12.5.2.1 385 8/15/2023