Closed misslipan closed 9 months ago
I believe you could do this with your own torrent.Dialer and torrent.Listener. You will lose compatibility with regular BitTorrent clients unless they also use the same encryption you do.
The default for this situation in BitTorrent is to use the message stream encryption. If you believe someone is intentionally banning BitTorrent traffic, set the configuration to allow and require encryption to minimize the chance that your use of BitTorrent is detected.
I don't need to be compatible with regular ones, I just need to be able to use it myself. Is PEX this configuration? At present, I have created a hookconn myself. Before sending, I encrypted, received, and decrypted a downloaded file that was damaged
The following are two places where I added hookconn, both in the client.go file
If you hook connections to your own wrapping encryption, PEX will work within swarms of peers that are compatible with your own encryption, so there's no need to disable it. Your hooks look like they're in the correct places! If you think this is worth adding as a field in ClientConfig, or Torrent, feel free to open a PR.
Okay I think there's nothing else to do here.
I want to use ase encryption to transmit end-to-end block data. Currently, I use hook to connect all connections, but this method will result in slow download and incomplete download data on the download resource end. Do you have a better solution