Closed ghost closed 3 years ago
Don't know if it is pertinent but I'm trying to connect two machines on a local network, and I'm using the external ip address with the same port number on both machines, which seemed to work earlier on before i changed something in the code, (the external IP addresses were routed to there respective internal IP addresses but it didn't connect, now it doesn't seem to happen and both machines try to connect to the external IP address unsuccessfully (i get: connection failed EncryptionNegiotiationFailed, which i assume is because either machine is not reaching the other one and is possibly trying to connect to itself? Because i have the same allowed encryption on both sides) then it continues trying to connect to seemingly random IP addresses (but the same ip addresses every time) and succeeds in connecting to some (I'm assuming this is DHT i have no idea why this is happening).
I've managed to connect the two peers but I'm still getting attempts at connecting to other IPs that I'm not adding as peers:
Connection failed: http://89.17.132.197:55123/ - EncryptionNegiotiationFailed (my IP)
Connection failed: ipv4://89.17.132.197:55123/ - HandshakeFailed
Connection failed: ipv4://89.17.132.197:55123/ - HandshakeFailed
Connection failed: ipv4://89.17.132.197:55123/ - HandshakeFailed
Connection failed: ipv4://89.17.132.197:55123/ - HandshakeFailed
Connection failed: ipv4://89.17.132.197:55123/ - HandshakeFailed
Thread started:
Although the torrent doesn't seed, shouldn't it be enough to assign the directory where file resides like so:
TorrentManager manager = await this.Engine.AddAsync(magnet, save_directory);
where save_directory is the directory where the file contained in the torrent resides, and then to do manager.StartAsync(); ?
TorrentSettingsBuilder settings_builder = new TorrentSettingsBuilder {
AllowDht = false,
AllowInitialSeeding = true,
CreateContainingDirectory = false
};
TorrentManager manager = await this.Engine.AddAsync(magnet, save_directory, settings_builder.ToSettings());
this solved my problem
I'm creating a private torrent and then trying to add peers manually instead of using a tracker, i have yet to complete the functionality that adds peers on both sides but i add the correct peer information on one side and after that the torrent adds some other IPs that have not been added as peers and the torrent is created as private, is there some way to prevent this (possibly by disabling DHT completely globally in the engine?)
Here is my torrent creation code:
engine settings:
Then i add the peer manually using: