summaryrefslogtreecommitdiff
path: root/src/DefaultBtAnnounce.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-01-12 17:46:20 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-01-12 17:46:20 +0900
commitc653c72dc84b7c5fe99f2aa189e9cf1da80a9ed5 (patch)
treeec0497de2d684cc0b5030c94e0334c73754b8954 /src/DefaultBtAnnounce.cc
parentcc36df2625c1fee8e4f013becff07d3b4c38b12d (diff)
Add --bt-force-encryption option
This option requires BitTorrent message payload encryption with arc4. This is a shorthand of --bt-requre-crypto --bt-min-crypto-level=arc4. If true is given, deny legacy BitTorrent handshake and only use Obfuscation handshake and always encrypt message payload. This option defaults to false.
Diffstat (limited to 'src/DefaultBtAnnounce.cc')
-rw-r--r--src/DefaultBtAnnounce.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DefaultBtAnnounce.cc b/src/DefaultBtAnnounce.cc
index a5a73bb0..f7d491cf 100644
--- a/src/DefaultBtAnnounce.cc
+++ b/src/DefaultBtAnnounce.cc
@@ -189,7 +189,8 @@ std::string DefaultBtAnnounce::getAnnounceUrl() {
uri += "&trackerid=";
uri += util::torrentPercentEncode(trackerId_);
}
- if(option_->getAsBool(PREF_BT_REQUIRE_CRYPTO)) {
+ if(option_->getAsBool(PREF_BT_FORCE_ENCRYPTION) ||
+ option_->getAsBool(PREF_BT_REQUIRE_CRYPTO)) {
uri += "&requirecrypto=1";
} else {
uri += "&supportcrypto=1";