Soulseek 6.1.2
See the version list below for details.
dotnet add package Soulseek --version 6.1.2
NuGet\Install-Package Soulseek -Version 6.1.2
<PackageReference Include="Soulseek" Version="6.1.2" />
paket add Soulseek --version 6.1.2
#r "nuget: Soulseek, 6.1.2"
// Install Soulseek as a Cake Addin #addin nuget:?package=Soulseek&version=6.1.2 // Install Soulseek as a Cake Tool #tool nuget:?package=Soulseek&version=6.1.2
Soulseek.NET
A .NET Standard client library for the Soulseek network.
Quick Start
Install from NuGet.
Connect to a Soulseek server
var client = new SoulseekClient();
await client.ConnectAsync("Username", "Password");
Search for something
IEnumerable<SearchResponse> responses = await Client.SearchAsync(SearchQuery.FromText("some search"));
Note: SearchAsync
accepts a SearchQuery
with the constructor SearchQuery(string query, IEnumerable<string> exclusions, int? minimumBitrate, int? minimumFileSize, int? minimumFilesInFolder, bool isVBR, bool isCBR)
, allowing all of the options provided by the official client.
SearchResponse
has the following shape:
int FileCount
IReadOnlyCollection<File> Files
int LockedFileCount
IReadOnlyCollection<File> LockedFiles
int FreeUploadSlots
long QueueLength
int Token
int UploadSpeed
string Username
File
has a number of properties; you'll need for Filename
and Size
for downloading.
Download a file
byte[] file = await Client.DownloadAsync(username: "some username", filename: "some fully qualified filename", size: 42);
OR (ideally)
var fs = new FileStream("c:\downloads\local filename", FileMode.Create);
await Client.DownloadAsync(username: "some username", filename: "some fully qualified filename", outputStream: fs, size: 42);
Note: Download to a stream where possible to reduce memory overhead.
Documentation
The external interface of the library is sparse and well documented; the best resource is the code itself. Of particular interest:
Example Web Application
Note that the example application as been superseded by slskd and will no longer be maintained.
Included is a small web application which serves as an example.
It's important to note that there are currently no controls over uploads; anything you share can be downloaded by any number of people at any given time. With this in mind, consider sharing a small number of files from the example.
It's also important to note that some displays in the application poll the daemon for updates; this is inefficient, and you really shouldn't use this application over a mobile data connection.
Running with Docker
A Docker image containing the application can be pulled from jpdillingham/slsk-web-example.
A minimal run
would look like:
docker run -i \
-p 5000:5000 \
-v <path/to/downloads>:/var/slsk/download \
-v <path/to/shared>:/var/slsk/shared \
-e "SLSK_USERNAME=<your username>" \
-e "SLSK_PASSWORD=<your password>" \
jpdillingham/slsk-web-example:latest
The application will then be accessible on port 5000 (e.g. http://localhost:5000). With this configuration the application won't be able to accept incoming connections and won't connect to the distributed network. You may receive limited search results and users won't find your files via search. Other users may have difficulty browsing your shares.
The full set of options is as follows:
docker run -i \
-p 5000:5000 \
-p 50000:50000 \
-v <path/to/downloads>:/var/slsk/download \
-v <path/to/shared>:/var/slsk/shared \
-e "SLSK_USERNAME=<your username>" \
-e "SLSK_PASSWORD=<your password>" \
-e "SLSK_LISTEN_PORT=50000" \
-e "SLSK_CONNECT_TIMEOUT=5000" \
-e "SLSK_INACTIVITY_TIMEOUT=15000" \
-e "SLSK_READ_BUFFER_SIZE=16384" \
-e "SLSK_WRITE_BUFFER_SIZE=16384" \
-e "SLSK_ENABLE_DNET=true" \
-e "SLSK_DNET_CHILD_LIMIT=10" \
-e "SLSK_DIAGNOSTIC=Info" \
-e "SLSK_SHARED_CACHE_TTL=3600000" \
-e "SLSK_ENABLE_SECURITY=true" \
-e "SLSK_SECURITY_TOKEN_TTL=604800000" \
-e "SLSK_ROOM_MESSAGE_LIMIT=250" \
-e "SLSK_BASE_PATH=/"
jpdillingham/slsk-web-example:latest
With this configuration the application will listen on port 50000 and will connect to the distributed network, allowing up to 10 child connections. The application shouldn't have any trouble connecting provided you've forwarded port 50000 properly, and will receive and respond to distributed search requests.
If SLSK_ENABLE_SECURITY
is true
, you will be prompted to log in. Supply the values you specified for the SLSK_USERNAME
and SLSK_PASSWORD
fields. Setting this option to false
will disable the prompt.
If you would like to run the application behind a reverse proxy, set SLSK_BASE_PATH
to your proxied path.
For convenience, two scripts, run
and start
, have been included in examples/Web/bin
for running the example interactively and as a daemon, respectively.
Running without Docker
The example application is split into two projects; a .NET 5.0 WebAPI and a React application bootstrapped with create-react-app. If you'd like to run these outside of Docker you'll need to start both applications; dotnet run
for the API and yarn|npm start
for the React application. You can connect to http://localhost:3000, or the API serves Swagger UI at http://localhost:5000/swagger.
A build script included in the bin
directory of the example which will build the React app, copy the static files to the wwwroot directory of the API, build the API, then attempt to build the Docker image.
See also
References
Alternative Clients and Libraries
Much of Soulseek.NET was made possible by the work of others. The following resources were used as a reference:
- nicotine-plus
- livelook by @misterhat
- museek-plus by @eLvErDe
- slsk-client by @f-hj.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.7.0)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- System.Memory (>= 4.5.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Soulseek:
Repository | Stars |
---|---|
slskd/slskd
A modern client-server application for the Soulseek file sharing network.
|
|
fiso64/slsk-batchdl
A batch downloader for Soulseek
|
Version | Downloads | Last updated |
---|---|---|
6.5.0 | 1,677 | 6/22/2024 |
6.4.1 | 1,151 | 2/19/2024 |
6.4.0 | 259 | 2/18/2024 |
6.3.0 | 717 | 1/14/2024 |
6.2.0 | 1,105 | 11/30/2023 |
6.1.3 | 699 | 11/11/2023 |
6.1.2 | 434 | 11/11/2023 |
6.1.1 | 3,064 | 12/31/2022 |
6.1.0 | 920 | 12/25/2022 |
6.0.0 | 1,021 | 11/27/2022 |
6.0.0-pre.4 | 108 | 11/26/2022 |
6.0.0-pre.3 | 170 | 11/23/2022 |
6.0.0-pre.2 | 99 | 11/23/2022 |
6.0.0-pre.1 | 940 | 10/16/2022 |
5.1.5 | 1,562 | 9/8/2022 |
5.1.4 | 877 | 9/8/2022 |
5.1.3 | 1,048 | 9/1/2022 |
5.1.2 | 928 | 9/1/2022 |
5.1.1 | 1,011 | 8/27/2022 |
5.1.0 | 1,410 | 8/3/2022 |
5.0.0 | 1,360 | 7/6/2022 |
4.5.3 | 1,387 | 5/12/2022 |
4.5.2 | 1,722 | 4/21/2022 |
4.5.1 | 1,035 | 4/11/2022 |
4.5.0 | 1,153 | 3/13/2022 |
4.4.5 | 1,061 | 2/21/2022 |
4.4.4 | 1,071 | 2/21/2022 |
4.4.3 | 973 | 2/10/2022 |
4.4.2 | 1,123 | 2/2/2022 |
4.4.1 | 957 | 1/31/2022 |
4.4.0 | 1,016 | 1/29/2022 |
4.3.0 | 946 | 1/23/2022 |
4.2.0 | 961 | 1/18/2022 |
4.1.0 | 1,018 | 1/13/2022 |
4.0.0 | 769 | 1/7/2022 |
3.4.2 | 810 | 12/22/2021 |
3.4.1 | 898 | 12/22/2021 |
3.4.0 | 856 | 12/20/2021 |
3.3.2 | 913 | 12/13/2021 |
3.3.1 | 846 | 12/12/2021 |
3.2.1 | 2,083 | 11/26/2021 |
3.1.2 | 860 | 11/23/2021 |
3.1.1 | 850 | 11/22/2021 |
3.1.0 | 1,052 | 11/21/2021 |
3.0.0 | 1,537 | 11/20/2021 |
3.0.0-pre-991116210933 | 707 | 11/16/2021 |
3.0.0-pre-991115211729 | 733 | 11/15/2021 |
3.0.0-pre-991115211101 | 681 | 11/15/2021 |
3.0.0-pre-991115210834 | 753 | 11/15/2021 |
3.0.0-pre-991114210811 | 683 | 11/14/2021 |
3.0.0-pre-991113212349 | 723 | 11/14/2021 |
3.0.0-pre-991113212333 | 733 | 11/14/2021 |
3.0.0-pre-991113212231 | 709 | 11/14/2021 |
3.0.0-pre-991113210753 | 780 | 11/13/2021 |
3.0.0-pre-991113210652 | 760 | 11/13/2021 |
3.0.0-pre-918211156 | 965 | 9/18/2021 |
3.0.0-pre-916212204 | 690 | 9/17/2021 |
3.0.0-pre-913212123 | 784 | 9/14/2021 |
3.0.0-pre-913211833 | 717 | 9/13/2021 |
3.0.0-pre-905211220 | 813 | 9/5/2021 |
3.0.0-pre-828211031 | 832 | 8/29/2021 |
3.0.0-pre-70321953 | 721 | 7/4/2021 |
3.0.0-pre-62621233 | 1,282 | 6/26/2021 |
3.0.0-pre-60821754 | 835 | 6/8/2021 |
3.0.0-pre-52521953 | 788 | 5/26/2021 |
3.0.0-pre-1102210644 | 888 | 11/2/2021 |
2.3.8 | 1,020 | 5/15/2021 |
2.3.7 | 911 | 5/11/2021 |
2.3.6-pre | 723 | 5/11/2021 |
2.3.5-pre | 780 | 5/10/2021 |
2.3.4-pre | 743 | 5/10/2021 |
2.3.3 | 874 | 5/10/2021 |
2.3.2 | 919 | 5/7/2021 |
2.3.1 | 906 | 5/4/2021 |
2.3.0 | 887 | 5/2/2021 |
2.3.0-pre | 692 | 5/1/2021 |
2.2.1 | 898 | 3/22/2021 |
2.2.0 | 977 | 3/19/2021 |
2.1.1 | 902 | 3/22/2021 |
2.1.0 | 915 | 3/10/2021 |
2.0.4 | 993 | 3/9/2021 |
2.0.3 | 910 | 2/23/2021 |
2.0.2 | 920 | 2/18/2021 |
2.0.1 | 883 | 2/14/2021 |
2.0.0 | 1,400 | 1/29/2021 |
1.0.1 | 1,041 | 1/12/2021 |
1.0.0 | 1,419 | 12/31/2020 |
1.0.0-rc3.1 | 250 | 9/9/2020 |
1.0.0-rc3 | 915 | 9/2/2020 |
1.0.0-rc2.3 | 274 | 8/27/2020 |
1.0.0-rc2.2 | 274 | 8/27/2020 |
1.0.0-rc2.1 | 307 | 5/16/2020 |
1.0.0-rc2 | 840 | 5/5/2020 |
1.0.0-rc1 | 860 | 4/7/2020 |
0.9.9.1-beta | 947 | 4/6/2020 |
0.9.9-beta | 870 | 4/5/2020 |
0.9.7-beta | 912 | 2/2/2020 |
0.9.6-beta | 896 | 2/2/2020 |
0.9.5-beta | 936 | 2/2/2020 |
0.9.4-beta | 955 | 2/2/2020 |
0.9.3-beta | 888 | 2/1/2020 |
0.9.2-beta | 920 | 2/1/2020 |
0.9.1-beta | 921 | 2/1/2020 |
0.9.0-beta | 968 | 2/1/2020 |