Open Kaidoz opened 3 months ago
Trouble solved. Added code before "StartAsync":
foreach (var trackerUrl in await GetTrackers())
{
var uri = new Uri(trackerUrl);
await manager.TrackerManager.AddTrackerAsync(uri);
}
Trouble solved. Added code before "StartAsync":
foreach (var trackerUrl in await GetTrackers()) { var uri = new Uri(trackerUrl); await manager.TrackerManager.AddTrackerAsync(uri); }
It'd probably be easier if the appropriate trackers are included in the .torrent file when creating it. Failing that, DHT should make this work too, though the initial peer discovery could be slow if there are only one or two actual peers accessing the torrent :)
That said, is there anything I need to do on the library side or was this simply a setup issue for the torrents you're working with?
Trouble solved. Added code before "StartAsync":
foreach (var trackerUrl in await GetTrackers()) { var uri = new Uri(trackerUrl); await manager.TrackerManager.AddTrackerAsync(uri); }
It'd probably be easier if the appropriate trackers are included in the .torrent file when creating it. Failing that, DHT should make this work too, though the initial peer discovery could be slow if there are only one or two actual peers accessing the torrent :)
That said, is there anything I need to do on the library side or was this simply a setup issue for the torrents you're working with?
Trackers have been added to torrent file. If upload a torrent file to qBitTorrent it works fine.
Hrm, then what exactly do you mean by the previous code snippet where you said "adding this to StartAsync fixed the issue"?
Where exactly did you add that tracker code? I thought this was in your own app/library, which made me think you were adding extra trackers beyond what was contained in the .torrent file itself.
Hrm, then what exactly do you mean by the previous code snippet where you said "adding this to StartAsync fixed the issue"?
Where exactly did you add that tracker code? I thought this was in your own app/library, which made me think you were adding extra trackers beyond what was contained in the .torrent file itself.
When creating a torrent, I create it as follows:
internal async Task<Torrent> CreateTorrent(string folderPath, string game)
{
var creator = new TorrentCreator();
var files = new TorrentFileSource(folderPath);
creator.Announces.Add(await GetTrackers());
string path = GetTorrentFile(game);
await using var stream = new FileStream(path, FileMode.Create);
await creator.CreateAsync(files, stream);
return await Torrent.LoadAsync(path);
}
When I load a torrent file, I dont get a seeding due to lack of trackers. It worked only when I added them manually
Can you share an example of one of those torrents where the trackers don't show up correctly?
I wonder if you're accidentally adding all of the trackers in 1 tier when you create the torrent , versus adding each tracker as a separate tier when you do it manually.
However the way that operates should be the same in all spec compliant torrent clients so it's surprising that one client would work better than another
Can you share an example of one of those torrents where the trackers don't show up correctly?
I wonder if you're accidentally adding all of the trackers in 1 tier when you create the torrent , versus adding each tracker as a separate tier when you do it manually.
However the way that operates should be the same in all spec compliant torrent clients so it's surprising that one client would work better than another Rust.zip
Code GetTrackers:
private static async Task<List<string>> GetTrackers()
{
try
{
string text = await new HttpClient().GetStringAsync("https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt");
List<string> trackers = new List<string>();
string[] lines = text.Split("\n");
foreach (var line in lines)
{
if (string.IsNullOrWhiteSpace(line) == false)
{
trackers.Add(line.Trim());
}
}
SaveCacheTrackers(trackers);
return trackers;
}
catch
{
return GetLocalTrackers();
}
}
Having the same issue here (on 3.0.2). My torrents have the trackers added to them but they won't start sending data unless I manually add the tracker. The state of the torrent says "seeding" but no bytes are leaving. Using the same torrent with the same tracker with two different clients (qBittorrent and Transmission) works right away.
It's a bit problematic for private torrents as the API doesn't allow manually adding trackers to them.
Could both of you try the new alpha release - 3.0.3-alpha.unstable.rev0003
? It has definitely not been tested as thoroughly as I'd like, but it does contain some fixes for the kind of issue you're describing.
In addition, can you attach a logger for both the leecher client and seeder client and share the logs with me? It may have some private data (IP addresses of peers, filepaths for your torrent etc) so please review before sharing. Trim/redact anything you want redacted. It might help me figure out what the issue is if the new release doesn't help!
There's a problem with the client seeding. I am using home pc.
I tried to seeding torrent in every possible way, but attempts were unsuccessful. I take a torrent file, start its "StartAsync", after checking the hash, the seeding starts, but it is not actually there.
If I take the torrent file and start it in qBitTorrent - seeding goes.
I tried to switch off the firewall, also changed ports and various parameters.
Code: `
public class ManageTorrentSeedService { private ClientEngine _engine;
}`