diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-01-12 17:46:20 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-01-12 17:46:20 +0900 |
| commit | c653c72dc84b7c5fe99f2aa189e9cf1da80a9ed5 (patch) | |
| tree | ec0497de2d684cc0b5030c94e0334c73754b8954 /src/OptionHandlerFactory.cc | |
| parent | cc36df2625c1fee8e4f013becff07d3b4c38b12d (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/OptionHandlerFactory.cc')
| -rw-r--r-- | src/OptionHandlerFactory.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index f2f4eec9..8542900c 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -1758,6 +1758,18 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers() handlers.push_back(op); } { + OptionHandler* op(new BooleanOptionHandler + (PREF_BT_FORCE_ENCRYPTION, + TEXT_BT_FORCE_ENCRYPTION, + A2_V_FALSE, + OptionHandler::OPT_ARG)); + op->addTag(TAG_BITTORRENT); + op->setInitialOption(true); + op->setChangeGlobalOption(true); + op->setChangeOptionForReserved(true); + handlers.push_back(op); + } + { OptionHandler* op(new NumberOptionHandler (PREF_BT_KEEP_ALIVE_INTERVAL, NO_DESCRIPTION, |
