1.. _user_agent:
2
3.. raw:: html
4
5	<a name="user_agent"></a>
6
7+------------+--------+-------------+
8| name       | type   | default     |
9+============+========+=============+
10| user_agent | string | libtorrent/ |
11+------------+--------+-------------+
12
13this is the client identification to the tracker. The recommended
14format of this string is: "client-name/client-version
15libtorrent/libtorrent-version". This name will not only be used when
16making HTTP requests, but also when sending extended headers to
17peers that support that extension. It may not contain \r or \n
18
19.. _announce_ip:
20
21.. raw:: html
22
23	<a name="announce_ip"></a>
24
25+-------------+--------+---------+
26| name        | type   | default |
27+=============+========+=========+
28| announce_ip | string | nullptr |
29+-------------+--------+---------+
30
31``announce_ip`` is the ip address passed along to trackers as the
32``&ip=`` parameter. If left as the default, that parameter is
33omitted.
34
35.. note::
36   This setting is only meant for very special cases where a seed is
37   running on the same host as the tracker, and the tracker accepts
38   the IP parameter (which normal trackers don't). Do not set this
39   option unless you also control the tracker.
40
41.. _handshake_client_version:
42
43.. raw:: html
44
45	<a name="handshake_client_version"></a>
46
47+--------------------------+--------+---------+
48| name                     | type   | default |
49+==========================+========+=========+
50| handshake_client_version | string | nullptr |
51+--------------------------+--------+---------+
52
53this is the client name and version identifier sent to peers in the
54handshake message. If this is an empty string, the user_agent is
55used instead. This string must be a UTF-8 encoded unicode string.
56
57.. _outgoing_interfaces:
58
59.. raw:: html
60
61	<a name="outgoing_interfaces"></a>
62
63+---------------------+--------+---------+
64| name                | type   | default |
65+=====================+========+=========+
66| outgoing_interfaces | string |         |
67+---------------------+--------+---------+
68
69This controls which IP address outgoing TCP peer connections are bound
70to, in addition to controlling whether such connections are also
71bound to a specific network interface/adapter (*bind-to-device*).
72
73This string is a comma-separated list of IP addresses and
74interface names. An empty string will not bind TCP sockets to a
75device, and let the network stack assign the local address.
76
77A list of names will be used to bind outgoing TCP sockets in a
78round-robin fashion. An IP address will simply be used to `bind()`
79the socket. An interface name will attempt to bind the socket to
80that interface. If that fails, or is unsupported, one of the IP
81addresses configured for that interface is used to `bind()` the
82socket to. If the interface or adapter doesn't exist, the
83outgoing peer connection will fail with an error message suggesting
84the device cannot be found. Adapter names on Unix systems are of
85the form "eth0", "eth1", "tun0", etc. This may be useful for
86clients that are multi-homed. Binding an outgoing connection to a
87local IP does not necessarily make the connection via the
88associated NIC/Adapter.
89
90When outgoing interfaces are specified, incoming connections or
91packets sent to a local interface or IP that's *not* in this list
92will be rejected with a peer_blocked_alert with
93``invalid_local_interface`` as the reason.
94
95Note that these are just interface/adapter names or IP addresses.
96There are no ports specified in this list. IPv6 addresses without
97port should be specified without enclosing ``[``, ``]``.
98
99.. _listen_interfaces:
100
101.. raw:: html
102
103	<a name="listen_interfaces"></a>
104
105+-------------------+--------+------------------------+
106| name              | type   | default                |
107+===================+========+========================+
108| listen_interfaces | string | 0.0.0.0:6881,[::]:6881 |
109+-------------------+--------+------------------------+
110
111a comma-separated list of (IP or device name, port) pairs. These are
112the listen ports that will be opened for accepting incoming uTP and
113TCP peer connections. These are also used for *outgoing* uTP and UDP
114tracker connections and DHT nodes.
115
116It is possible to listen on multiple interfaces and
117multiple ports. Binding to port 0 will make the operating system
118pick the port.
119
120.. note::
121   There are reasons to stick to the same port across sessions,
122   which would mean only using port 0 on the first start, and
123   recording the port that was picked for subsequent startups.
124   Trackers, the DHT and other peers will remember the port they see
125   you use and hand that port out to other peers trying to connect
126   to you, as well as trying to connect to you themselves.
127
128A port that has an "s" suffix will accept SSL peer connections. (note
129that SSL sockets are only available in builds with SSL support)
130
131A port that has an "l" suffix will be considered a local network.
132i.e. it's assumed to only be able to reach hosts in the same local
133network as the IP address (based on the netmask associated with the
134IP, queried from the operating system).
135
136if binding fails, the listen_failed_alert is posted. Once a
137socket binding succeeds (if it does), the listen_succeeded_alert
138is posted. There may be multiple failures before a success.
139
140If a device name that does not exist is configured, no listen
141socket will be opened for that interface. If this is the only
142interface configured, it will be as if no listen ports are
143configured.
144
145If no listen ports are configured (e.g. listen_interfaces is an
146empty string), networking will be disabled. No DHT will start, no
147outgoing uTP or tracker connections will be made. No incoming TCP
148or uTP connections will be accepted. (outgoing TCP connections
149will still be possible, depending on
150settings_pack::outgoing_interfaces).
151
152For example:
153``[::1]:8888`` - will only accept connections on the IPv6 loopback
154address on port 8888.
155
156``eth0:4444,eth1:4444`` - will accept connections on port 4444 on
157any IP address bound to device ``eth0`` or ``eth1``.
158
159``[::]:0s`` - will accept SSL connections on a port chosen by the
160OS. And not accept non-SSL connections at all.
161
162``0.0.0.0:6881,[::]:6881`` - binds to all interfaces on port 6881.
163
164``10.0.1.13:6881l`` - binds to the local IP address, port 6881, but
165only allow talking to peers on the same local network. The netmask
166is queried from the operating system. Interfaces marked ``l`` are
167not announced to trackers, unless the tracker is also on the same
168local network.
169
170Windows OS network adapter device name must be specified with GUID.
171It can be obtained from "netsh lan show interfaces" command output.
172GUID must be uppercased string embraced in curly brackets.
173``{E4F0B674-0DFC-48BB-98A5-2AA730BDB6D6}:7777`` - will accept
174connections on port 7777 on adapter with this GUID.
175
176For more information, see the `Multi-homed hosts`_ section.
177
178.. _`Multi-homed hosts`: manual-ref.html#multi-homed-hosts
179
180.. _proxy_hostname:
181
182.. raw:: html
183
184	<a name="proxy_hostname"></a>
185
186+----------------+--------+---------+
187| name           | type   | default |
188+================+========+=========+
189| proxy_hostname | string |         |
190+----------------+--------+---------+
191
192when using a proxy, this is the hostname where the proxy is running
193see proxy_type. Note that when using a proxy, the
194settings_pack::listen_interfaces setting is overridden and only a
195single interface is created, just to contact the proxy. This
196means a proxy cannot be combined with SSL torrents or multiple
197listen interfaces. This proxy listen interface will not accept
198incoming TCP connections, will not map ports with any gateway and
199will not enable local service discovery. All traffic is supposed
200to be channeled through the proxy.
201
202.. _proxy_username:
203
204.. _proxy_password:
205
206.. raw:: html
207
208	<a name="proxy_username"></a>
209	<a name="proxy_password"></a>
210
211+----------------+--------+---------+
212| name           | type   | default |
213+================+========+=========+
214| proxy_username | string |         |
215+----------------+--------+---------+
216| proxy_password | string |         |
217+----------------+--------+---------+
218
219when using a proxy, these are the credentials (if any) to use when
220connecting to it. see proxy_type
221
222.. _i2p_hostname:
223
224.. raw:: html
225
226	<a name="i2p_hostname"></a>
227
228+--------------+--------+---------+
229| name         | type   | default |
230+==============+========+=========+
231| i2p_hostname | string |         |
232+--------------+--------+---------+
233
234sets the i2p_ SAM bridge to connect to. set the port with the
235``i2p_port`` setting.
236
237.. _i2p: http://www.i2p2.de
238
239.. _peer_fingerprint:
240
241.. raw:: html
242
243	<a name="peer_fingerprint"></a>
244
245+------------------+--------+----------+
246| name             | type   | default  |
247+==================+========+==========+
248| peer_fingerprint | string | -LT12E0- |
249+------------------+--------+----------+
250
251this is the fingerprint for the client. It will be used as the
252prefix to the peer_id. If this is 20 bytes (or longer) it will be
253truncated to 20 bytes and used as the entire peer-id
254
255There is a utility function, generate_fingerprint() that can be used
256to generate a standard client peer ID fingerprint prefix.
257
258.. _dht_bootstrap_nodes:
259
260.. raw:: html
261
262	<a name="dht_bootstrap_nodes"></a>
263
264+---------------------+--------+--------------------------+
265| name                | type   | default                  |
266+=====================+========+==========================+
267| dht_bootstrap_nodes | string | dht.libtorrent.org:25401 |
268+---------------------+--------+--------------------------+
269
270This is a comma-separated list of IP port-pairs. They will be added
271to the DHT node (if it's enabled) as back-up nodes in case we don't
272know of any.
273
274Changing these after the DHT has been started may not have any
275effect until the DHT is restarted.
276
277.. _allow_multiple_connections_per_ip:
278
279.. raw:: html
280
281	<a name="allow_multiple_connections_per_ip"></a>
282
283+-----------------------------------+------+---------+
284| name                              | type | default |
285+===================================+======+=========+
286| allow_multiple_connections_per_ip | bool | false   |
287+-----------------------------------+------+---------+
288
289determines if connections from the same IP address as existing
290connections should be rejected or not. Rejecting multiple connections
291from the same IP address will prevent abusive
292behavior by peers. The logic for determining whether connections are
293to the same peer is more complicated with this enabled, and more
294likely to fail in some edge cases. It is not recommended to enable
295this feature.
296
297.. _send_redundant_have:
298
299.. raw:: html
300
301	<a name="send_redundant_have"></a>
302
303+---------------------+------+---------+
304| name                | type | default |
305+=====================+======+=========+
306| send_redundant_have | bool | true    |
307+---------------------+------+---------+
308
309``send_redundant_have`` controls if have messages will be sent to
310peers that already have the piece. This is typically not necessary,
311but it might be necessary for collecting statistics in some cases.
312
313.. _use_dht_as_fallback:
314
315.. raw:: html
316
317	<a name="use_dht_as_fallback"></a>
318
319+---------------------+------+---------+
320| name                | type | default |
321+=====================+======+=========+
322| use_dht_as_fallback | bool | false   |
323+---------------------+------+---------+
324
325``use_dht_as_fallback`` determines how the DHT is used. If this is
326true, the DHT will only be used for torrents where all trackers in
327its tracker list has failed. Either by an explicit error message or
328a time out. If this is false, the DHT is used regardless of if the
329trackers fail or not.
330
331.. _upnp_ignore_nonrouters:
332
333.. raw:: html
334
335	<a name="upnp_ignore_nonrouters"></a>
336
337+------------------------+------+---------+
338| name                   | type | default |
339+========================+======+=========+
340| upnp_ignore_nonrouters | bool | false   |
341+------------------------+------+---------+
342
343``upnp_ignore_nonrouters`` indicates whether or not the UPnP
344implementation should ignore any broadcast response from a device
345whose address is not on our subnet. i.e.
346it's a way to not talk to other people's routers by mistake.
347
348.. _use_parole_mode:
349
350.. raw:: html
351
352	<a name="use_parole_mode"></a>
353
354+-----------------+------+---------+
355| name            | type | default |
356+=================+======+=========+
357| use_parole_mode | bool | true    |
358+-----------------+------+---------+
359
360``use_parole_mode`` specifies if parole mode should be used. Parole
361mode means that peers that participate in pieces that fail the hash
362check are put in a mode where they are only allowed to download
363whole pieces. If the whole piece a peer in parole mode fails the
364hash check, it is banned. If a peer participates in a piece that
365passes the hash check, it is taken out of parole mode.
366
367.. _use_read_cache:
368
369.. raw:: html
370
371	<a name="use_read_cache"></a>
372
373+----------------+------+---------+
374| name           | type | default |
375+================+======+=========+
376| use_read_cache | bool | true    |
377+----------------+------+---------+
378
379enable and disable caching of blocks read from disk. the purpose of
380the read cache is partly read-ahead of requests but also to avoid
381reading blocks back from the disk multiple times for popular
382pieces.
383
384.. _coalesce_reads:
385
386.. _coalesce_writes:
387
388.. raw:: html
389
390	<a name="coalesce_reads"></a>
391	<a name="coalesce_writes"></a>
392
393+-----------------+------+---------+
394| name            | type | default |
395+=================+======+=========+
396| coalesce_reads  | bool | false   |
397+-----------------+------+---------+
398| coalesce_writes | bool | false   |
399+-----------------+------+---------+
400
401allocate separate, contiguous, buffers for read and write calls.
402Only used where writev/readv cannot be used will use more RAM but
403may improve performance
404
405.. _auto_manage_prefer_seeds:
406
407.. raw:: html
408
409	<a name="auto_manage_prefer_seeds"></a>
410
411+--------------------------+------+---------+
412| name                     | type | default |
413+==========================+======+=========+
414| auto_manage_prefer_seeds | bool | false   |
415+--------------------------+------+---------+
416
417if true, prefer seeding torrents when determining which torrents to give
418active slots to. If false, give preference to downloading torrents
419
420.. _dont_count_slow_torrents:
421
422.. raw:: html
423
424	<a name="dont_count_slow_torrents"></a>
425
426+--------------------------+------+---------+
427| name                     | type | default |
428+==========================+======+=========+
429| dont_count_slow_torrents | bool | true    |
430+--------------------------+------+---------+
431
432if ``dont_count_slow_torrents`` is true, torrents without any
433payload transfers are not subject to the ``active_seeds`` and
434``active_downloads`` limits. This is intended to make it more
435likely to utilize all available bandwidth, and avoid having
436torrents that don't transfer anything block the active slots.
437
438.. _close_redundant_connections:
439
440.. raw:: html
441
442	<a name="close_redundant_connections"></a>
443
444+-----------------------------+------+---------+
445| name                        | type | default |
446+=============================+======+=========+
447| close_redundant_connections | bool | true    |
448+-----------------------------+------+---------+
449
450``close_redundant_connections`` specifies whether libtorrent should
451close connections where both ends have no utility in keeping the
452connection open. For instance if both ends have completed their
453downloads, there's no point in keeping it open.
454
455.. _prioritize_partial_pieces:
456
457.. raw:: html
458
459	<a name="prioritize_partial_pieces"></a>
460
461+---------------------------+------+---------+
462| name                      | type | default |
463+===========================+======+=========+
464| prioritize_partial_pieces | bool | false   |
465+---------------------------+------+---------+
466
467If ``prioritize_partial_pieces`` is true, partial pieces are picked
468before pieces that are more rare. If false, rare pieces are always
469prioritized, unless the number of partial pieces is growing out of
470proportion.
471
472.. _rate_limit_ip_overhead:
473
474.. raw:: html
475
476	<a name="rate_limit_ip_overhead"></a>
477
478+------------------------+------+---------+
479| name                   | type | default |
480+========================+======+=========+
481| rate_limit_ip_overhead | bool | true    |
482+------------------------+------+---------+
483
484if set to true, the estimated TCP/IP overhead is drained from the
485rate limiters, to avoid exceeding the limits with the total traffic
486
487.. _announce_to_all_tiers:
488
489.. _announce_to_all_trackers:
490
491.. raw:: html
492
493	<a name="announce_to_all_tiers"></a>
494	<a name="announce_to_all_trackers"></a>
495
496+--------------------------+------+---------+
497| name                     | type | default |
498+==========================+======+=========+
499| announce_to_all_tiers    | bool | false   |
500+--------------------------+------+---------+
501| announce_to_all_trackers | bool | false   |
502+--------------------------+------+---------+
503
504``announce_to_all_trackers`` controls how multi tracker torrents
505are treated. If this is set to true, all trackers in the same tier
506are announced to in parallel. If all trackers in tier 0 fails, all
507trackers in tier 1 are announced as well. If it's set to false, the
508behavior is as defined by the multi tracker specification.
509
510``announce_to_all_tiers`` also controls how multi tracker torrents
511are treated. When this is set to true, one tracker from each tier
512is announced to. This is the uTorrent behavior. To be compliant
513with the Multi-tracker specification, set it to false.
514
515.. _prefer_udp_trackers:
516
517.. raw:: html
518
519	<a name="prefer_udp_trackers"></a>
520
521+---------------------+------+---------+
522| name                | type | default |
523+=====================+======+=========+
524| prefer_udp_trackers | bool | true    |
525+---------------------+------+---------+
526
527``prefer_udp_trackers``: true means that trackers
528may be rearranged in a way that udp trackers are always tried
529before http trackers for the same hostname. Setting this to false
530means that the tracker's tier is respected and there's no
531preference of one protocol over another.
532
533.. _disable_hash_checks:
534
535.. raw:: html
536
537	<a name="disable_hash_checks"></a>
538
539+---------------------+------+---------+
540| name                | type | default |
541+=====================+======+=========+
542| disable_hash_checks | bool | false   |
543+---------------------+------+---------+
544
545when set to true, all data downloaded from peers will be assumed to
546be correct, and not tested to match the hashes in the torrent this
547is only useful for simulation and testing purposes (typically
548combined with disabled_storage)
549
550.. _allow_i2p_mixed:
551
552.. raw:: html
553
554	<a name="allow_i2p_mixed"></a>
555
556+-----------------+------+---------+
557| name            | type | default |
558+=================+======+=========+
559| allow_i2p_mixed | bool | false   |
560+-----------------+------+---------+
561
562if this is true, i2p torrents are allowed to also get peers from
563other sources than the tracker, and connect to regular IPs, not
564providing any anonymization. This may be useful if the user is not
565interested in the anonymization of i2p, but still wants to be able
566to connect to i2p peers.
567
568.. _volatile_read_cache:
569
570.. raw:: html
571
572	<a name="volatile_read_cache"></a>
573
574+---------------------+------+---------+
575| name                | type | default |
576+=====================+======+=========+
577| volatile_read_cache | bool | false   |
578+---------------------+------+---------+
579
580``volatile_read_cache``, if this is set to true, read cache blocks
581that are hit by peer read requests are removed from the disk cache
582to free up more space. This is useful if you don't expect the disk
583cache to create any cache hits from other peers than the one who
584triggered the cache line to be read into the cache in the first
585place.
586
587.. _no_atime_storage:
588
589.. raw:: html
590
591	<a name="no_atime_storage"></a>
592
593+------------------+------+---------+
594| name             | type | default |
595+==================+======+=========+
596| no_atime_storage | bool | true    |
597+------------------+------+---------+
598
599``no_atime_storage`` this is a Linux-only option and passes in the
600``O_NOATIME`` to ``open()`` when opening files. This may lead to
601some disk performance improvements.
602
603.. _incoming_starts_queued_torrents:
604
605.. raw:: html
606
607	<a name="incoming_starts_queued_torrents"></a>
608
609+---------------------------------+------+---------+
610| name                            | type | default |
611+=================================+======+=========+
612| incoming_starts_queued_torrents | bool | false   |
613+---------------------------------+------+---------+
614
615``incoming_starts_queued_torrents``.  If a torrent
616has been paused by the auto managed feature in libtorrent, i.e. the
617torrent is paused and auto managed, this feature affects whether or
618not it is automatically started on an incoming connection. The main
619reason to queue torrents, is not to make them unavailable, but to
620save on the overhead of announcing to the trackers, the DHT and to
621avoid spreading one's unchoke slots too thin. If a peer managed to
622find us, even though we're no in the torrent anymore, this setting
623can make us start the torrent and serve it.
624
625.. _report_true_downloaded:
626
627.. raw:: html
628
629	<a name="report_true_downloaded"></a>
630
631+------------------------+------+---------+
632| name                   | type | default |
633+========================+======+=========+
634| report_true_downloaded | bool | false   |
635+------------------------+------+---------+
636
637when set to true, the downloaded counter sent to trackers will
638include the actual number of payload bytes downloaded including
639redundant bytes. If set to false, it will not include any redundancy
640bytes
641
642.. _strict_end_game_mode:
643
644.. raw:: html
645
646	<a name="strict_end_game_mode"></a>
647
648+----------------------+------+---------+
649| name                 | type | default |
650+======================+======+=========+
651| strict_end_game_mode | bool | true    |
652+----------------------+------+---------+
653
654``strict_end_game_mode`` controls when a
655block may be requested twice. If this is ``true``, a block may only
656be requested twice when there's at least one request to every piece
657that's left to download in the torrent. This may slow down progress
658on some pieces sometimes, but it may also avoid downloading a lot
659of redundant bytes. If this is ``false``, libtorrent attempts to
660use each peer connection to its max, by always requesting
661something, even if it means requesting something that has been
662requested from another peer already.
663
664.. _enable_outgoing_utp:
665
666.. _enable_incoming_utp:
667
668.. _enable_outgoing_tcp:
669
670.. _enable_incoming_tcp:
671
672.. raw:: html
673
674	<a name="enable_outgoing_utp"></a>
675	<a name="enable_incoming_utp"></a>
676	<a name="enable_outgoing_tcp"></a>
677	<a name="enable_incoming_tcp"></a>
678
679+---------------------+------+---------+
680| name                | type | default |
681+=====================+======+=========+
682| enable_outgoing_utp | bool | true    |
683+---------------------+------+---------+
684| enable_incoming_utp | bool | true    |
685+---------------------+------+---------+
686| enable_outgoing_tcp | bool | true    |
687+---------------------+------+---------+
688| enable_incoming_tcp | bool | true    |
689+---------------------+------+---------+
690
691Enables incoming and outgoing, TCP and uTP peer connections.
692``false`` is disabled and ``true`` is enabled. When outgoing
693connections are disabled, libtorrent will simply not make
694outgoing peer connections with the specific transport protocol.
695Disabled incoming peer connections will simply be rejected.
696These options only apply to peer connections, not tracker- or any
697other kinds of connections.
698
699.. _no_recheck_incomplete_resume:
700
701.. raw:: html
702
703	<a name="no_recheck_incomplete_resume"></a>
704
705+------------------------------+------+---------+
706| name                         | type | default |
707+==============================+======+=========+
708| no_recheck_incomplete_resume | bool | false   |
709+------------------------------+------+---------+
710
711``no_recheck_incomplete_resume`` determines if the storage should
712check the whole files when resume data is incomplete or missing or
713whether it should simply assume we don't have any of the data. If
714false, any existing files will be checked.
715By setting this setting to true, the files won't be checked, but
716will go straight to download mode.
717
718.. _anonymous_mode:
719
720.. raw:: html
721
722	<a name="anonymous_mode"></a>
723
724+----------------+------+---------+
725| name           | type | default |
726+================+======+=========+
727| anonymous_mode | bool | false   |
728+----------------+------+---------+
729
730``anonymous_mode``: When set to true, the client
731tries to hide its identity to a certain degree. The user-agent will be
732reset to an empty string (except for private torrents). Trackers
733will only be used if they are using a proxy server.
734The listen sockets are closed, and incoming
735connections will only be accepted through a SOCKS5 or I2P proxy (if
736a peer proxy is set up and is run on the same machine as the
737tracker proxy). Since no incoming connections are accepted,
738NAT-PMP, UPnP, DHT and local peer discovery are all turned off when
739this setting is enabled.
740
741If you're using I2P, it might make sense to enable anonymous mode
742as well.
743
744.. _report_web_seed_downloads:
745
746.. raw:: html
747
748	<a name="report_web_seed_downloads"></a>
749
750+---------------------------+------+---------+
751| name                      | type | default |
752+===========================+======+=========+
753| report_web_seed_downloads | bool | true    |
754+---------------------------+------+---------+
755
756specifies whether downloads from web seeds is reported to the
757tracker or not. Turning it off also excludes web
758seed traffic from other stats and download rate reporting via the
759libtorrent API.
760
761.. _seeding_outgoing_connections:
762
763.. raw:: html
764
765	<a name="seeding_outgoing_connections"></a>
766
767+------------------------------+------+---------+
768| name                         | type | default |
769+==============================+======+=========+
770| seeding_outgoing_connections | bool | true    |
771+------------------------------+------+---------+
772
773``seeding_outgoing_connections`` determines if seeding (and
774finished) torrents should attempt to make outgoing connections or
775not. It may be set to false in very
776specific applications where the cost of making outgoing connections
777is high, and there are no or small benefits of doing so. For
778instance, if no nodes are behind a firewall or a NAT, seeds don't
779need to make outgoing connections.
780
781.. _no_connect_privileged_ports:
782
783.. raw:: html
784
785	<a name="no_connect_privileged_ports"></a>
786
787+-----------------------------+------+---------+
788| name                        | type | default |
789+=============================+======+=========+
790| no_connect_privileged_ports | bool | false   |
791+-----------------------------+------+---------+
792
793when this is true, libtorrent will not attempt to make outgoing
794connections to peers whose port is < 1024. This is a safety
795precaution to avoid being part of a DDoS attack
796
797.. _smooth_connects:
798
799.. raw:: html
800
801	<a name="smooth_connects"></a>
802
803+-----------------+------+---------+
804| name            | type | default |
805+=================+======+=========+
806| smooth_connects | bool | true    |
807+-----------------+------+---------+
808
809``smooth_connects`` means the number of
810connection attempts per second may be limited to below the
811``connection_speed``, in case we're close to bump up against the
812limit of number of connections. The intention of this setting is to
813more evenly distribute our connection attempts over time, instead
814of attempting to connect in batches, and timing them out in
815batches.
816
817.. _always_send_user_agent:
818
819.. raw:: html
820
821	<a name="always_send_user_agent"></a>
822
823+------------------------+------+---------+
824| name                   | type | default |
825+========================+======+=========+
826| always_send_user_agent | bool | false   |
827+------------------------+------+---------+
828
829always send user-agent in every web seed request. If false, only
830the first request per http connection will include the user agent
831
832.. _apply_ip_filter_to_trackers:
833
834.. raw:: html
835
836	<a name="apply_ip_filter_to_trackers"></a>
837
838+-----------------------------+------+---------+
839| name                        | type | default |
840+=============================+======+=========+
841| apply_ip_filter_to_trackers | bool | true    |
842+-----------------------------+------+---------+
843
844``apply_ip_filter_to_trackers`` determines
845whether the IP filter applies to trackers as well as peers. If this
846is set to false, trackers are exempt from the IP filter (if there
847is one). If no IP filter is set, this setting is irrelevant.
848
849.. _ban_web_seeds:
850
851.. raw:: html
852
853	<a name="ban_web_seeds"></a>
854
855+---------------+------+---------+
856| name          | type | default |
857+===============+======+=========+
858| ban_web_seeds | bool | true    |
859+---------------+------+---------+
860
861when true, web seeds sending bad data will be banned
862
863.. _allow_partial_disk_writes:
864
865.. raw:: html
866
867	<a name="allow_partial_disk_writes"></a>
868
869+---------------------------+------+---------+
870| name                      | type | default |
871+===========================+======+=========+
872| allow_partial_disk_writes | bool | true    |
873+---------------------------+------+---------+
874
875when set to false, the ``write_cache_line_size`` will apply across
876piece boundaries. this is a bad idea unless the piece picker also
877is configured to have an affinity to pick pieces belonging to the
878same write cache line as is configured in the disk cache.
879
880.. _support_share_mode:
881
882.. raw:: html
883
884	<a name="support_share_mode"></a>
885
886+--------------------+------+---------+
887| name               | type | default |
888+====================+======+=========+
889| support_share_mode | bool | true    |
890+--------------------+------+---------+
891
892if false, prevents libtorrent to advertise share-mode support
893
894.. _support_merkle_torrents:
895
896.. raw:: html
897
898	<a name="support_merkle_torrents"></a>
899
900+-------------------------+------+---------+
901| name                    | type | default |
902+=========================+======+=========+
903| support_merkle_torrents | bool | true    |
904+-------------------------+------+---------+
905
906if this is false, don't advertise support for the Tribler merkle
907tree piece message
908
909.. _report_redundant_bytes:
910
911.. raw:: html
912
913	<a name="report_redundant_bytes"></a>
914
915+------------------------+------+---------+
916| name                   | type | default |
917+========================+======+=========+
918| report_redundant_bytes | bool | true    |
919+------------------------+------+---------+
920
921if this is true, the number of redundant bytes is sent to the
922tracker
923
924.. _listen_system_port_fallback:
925
926.. raw:: html
927
928	<a name="listen_system_port_fallback"></a>
929
930+-----------------------------+------+---------+
931| name                        | type | default |
932+=============================+======+=========+
933| listen_system_port_fallback | bool | true    |
934+-----------------------------+------+---------+
935
936if this is true, libtorrent will fall back to listening on a port
937chosen by the operating system (i.e. binding to port 0). If a
938failure is preferred, set this to false.
939
940.. _announce_crypto_support:
941
942.. raw:: html
943
944	<a name="announce_crypto_support"></a>
945
946+-------------------------+------+---------+
947| name                    | type | default |
948+=========================+======+=========+
949| announce_crypto_support | bool | true    |
950+-------------------------+------+---------+
951
952when this is true, and incoming encrypted connections are enabled,
953&supportcrypt=1 is included in http tracker announces
954
955.. _enable_upnp:
956
957.. raw:: html
958
959	<a name="enable_upnp"></a>
960
961+-------------+------+---------+
962| name        | type | default |
963+=============+======+=========+
964| enable_upnp | bool | true    |
965+-------------+------+---------+
966
967Starts and stops the UPnP service. When started, the listen port
968and the DHT port are attempted to be forwarded on local UPnP router
969devices.
970
971The upnp object returned by ``start_upnp()`` can be used to add and
972remove arbitrary port mappings. Mapping status is returned through
973the portmap_alert and the portmap_error_alert. The object will be
974valid until ``stop_upnp()`` is called. See upnp-and-nat-pmp_.
975
976.. _enable_natpmp:
977
978.. raw:: html
979
980	<a name="enable_natpmp"></a>
981
982+---------------+------+---------+
983| name          | type | default |
984+===============+======+=========+
985| enable_natpmp | bool | true    |
986+---------------+------+---------+
987
988Starts and stops the NAT-PMP service. When started, the listen port
989and the DHT port are attempted to be forwarded on the router
990through NAT-PMP.
991
992The natpmp object returned by ``start_natpmp()`` can be used to add
993and remove arbitrary port mappings. Mapping status is returned
994through the portmap_alert and the portmap_error_alert. The object
995will be valid until ``stop_natpmp()`` is called. See
996upnp-and-nat-pmp_.
997
998.. _enable_lsd:
999
1000.. raw:: html
1001
1002	<a name="enable_lsd"></a>
1003
1004+------------+------+---------+
1005| name       | type | default |
1006+============+======+=========+
1007| enable_lsd | bool | true    |
1008+------------+------+---------+
1009
1010Starts and stops Local Service Discovery. This service will
1011broadcast the info-hashes of all the non-private torrents on the
1012local network to look for peers on the same swarm within multicast
1013reach.
1014
1015.. _enable_dht:
1016
1017.. raw:: html
1018
1019	<a name="enable_dht"></a>
1020
1021+------------+------+---------+
1022| name       | type | default |
1023+============+======+=========+
1024| enable_dht | bool | true    |
1025+------------+------+---------+
1026
1027starts the dht node and makes the trackerless service available to
1028torrents.
1029
1030.. _prefer_rc4:
1031
1032.. raw:: html
1033
1034	<a name="prefer_rc4"></a>
1035
1036+------------+------+---------+
1037| name       | type | default |
1038+============+======+=========+
1039| prefer_rc4 | bool | false   |
1040+------------+------+---------+
1041
1042if the allowed encryption level is both, setting this to true will
1043prefer RC4 if both methods are offered, plain text otherwise
1044
1045.. _proxy_hostnames:
1046
1047.. raw:: html
1048
1049	<a name="proxy_hostnames"></a>
1050
1051+-----------------+------+---------+
1052| name            | type | default |
1053+=================+======+=========+
1054| proxy_hostnames | bool | true    |
1055+-----------------+------+---------+
1056
1057if true, hostname lookups are done via the configured proxy (if
1058any). This is only supported by SOCKS5 and HTTP.
1059
1060.. _proxy_peer_connections:
1061
1062.. raw:: html
1063
1064	<a name="proxy_peer_connections"></a>
1065
1066+------------------------+------+---------+
1067| name                   | type | default |
1068+========================+======+=========+
1069| proxy_peer_connections | bool | true    |
1070+------------------------+------+---------+
1071
1072if true, peer connections are made (and accepted) over the
1073configured proxy, if any. Web seeds as well as regular bittorrent
1074peer connections are considered "peer connections". Anything
1075transporting actual torrent payload (trackers and DHT traffic are
1076not considered peer connections).
1077
1078.. _auto_sequential:
1079
1080.. raw:: html
1081
1082	<a name="auto_sequential"></a>
1083
1084+-----------------+------+---------+
1085| name            | type | default |
1086+=================+======+=========+
1087| auto_sequential | bool | true    |
1088+-----------------+------+---------+
1089
1090if this setting is true, torrents with a very high availability of
1091pieces (and seeds) are downloaded sequentially. This is more
1092efficient for the disk I/O. With many seeds, the download order is
1093unlikely to matter anyway
1094
1095.. _proxy_tracker_connections:
1096
1097.. raw:: html
1098
1099	<a name="proxy_tracker_connections"></a>
1100
1101+---------------------------+------+---------+
1102| name                      | type | default |
1103+===========================+======+=========+
1104| proxy_tracker_connections | bool | true    |
1105+---------------------------+------+---------+
1106
1107if true, tracker connections are made over the configured proxy, if
1108any.
1109
1110.. _enable_ip_notifier:
1111
1112.. raw:: html
1113
1114	<a name="enable_ip_notifier"></a>
1115
1116+--------------------+------+---------+
1117| name               | type | default |
1118+====================+======+=========+
1119| enable_ip_notifier | bool | true    |
1120+--------------------+------+---------+
1121
1122Starts and stops the internal IP table route changes notifier.
1123
1124The current implementation supports multiple platforms, and it is
1125recommended to have it enable, but you may want to disable it if
1126it's supported but unreliable, or if you have a better way to
1127detect the changes. In the later case, you should manually call
1128``session_handle::reopen_network_sockets`` to ensure network
1129changes are taken in consideration.
1130
1131.. _dht_prefer_verified_node_ids:
1132
1133.. raw:: html
1134
1135	<a name="dht_prefer_verified_node_ids"></a>
1136
1137+------------------------------+------+---------+
1138| name                         | type | default |
1139+==============================+======+=========+
1140| dht_prefer_verified_node_ids | bool | true    |
1141+------------------------------+------+---------+
1142
1143when this is true, nodes whose IDs are derived from their source
1144IP according to `BEP 42`_ are preferred in the routing table.
1145
1146.. _piece_extent_affinity:
1147
1148.. raw:: html
1149
1150	<a name="piece_extent_affinity"></a>
1151
1152+-----------------------+------+---------+
1153| name                  | type | default |
1154+=======================+======+=========+
1155| piece_extent_affinity | bool | false   |
1156+-----------------------+------+---------+
1157
1158when this is true, create an affinity for downloading 4 MiB extents
1159of adjacent pieces. This is an attempt to achieve better disk I/O
1160throughput by downloading larger extents of bytes, for torrents with
1161small piece sizes
1162
1163.. _validate_https_trackers:
1164
1165.. raw:: html
1166
1167	<a name="validate_https_trackers"></a>
1168
1169+-------------------------+------+---------+
1170| name                    | type | default |
1171+=========================+======+=========+
1172| validate_https_trackers | bool | true    |
1173+-------------------------+------+---------+
1174
1175when set to true, the certificate of HTTPS trackers and HTTPS web
1176seeds will be validated against the system's certificate store
1177(as defined by OpenSSL). If the system does not have a
1178certificate store, this option may have to be disabled in order
1179to get trackers and web seeds to work).
1180
1181.. _ssrf_mitigation:
1182
1183.. raw:: html
1184
1185	<a name="ssrf_mitigation"></a>
1186
1187+-----------------+------+---------+
1188| name            | type | default |
1189+=================+======+=========+
1190| ssrf_mitigation | bool | true    |
1191+-----------------+------+---------+
1192
1193when enabled, tracker and web seed requests are subject to
1194certain restrictions.
1195
1196An HTTP(s) tracker requests to localhost (loopback)
1197must have the request path start with "/announce". This is the
1198conventional bittorrent tracker request. Any other HTTP(S)
1199tracker request to loopback will be rejected. This applies to
1200trackers that redirect to loopback as well.
1201
1202Web seeds that end up on the client's local network (i.e. in a
1203private IP address range) may not include query string arguments.
1204This applies to web seeds redirecting to the local network as
1205well.
1206
1207.. _allow_idna:
1208
1209.. raw:: html
1210
1211	<a name="allow_idna"></a>
1212
1213+------------+------+---------+
1214| name       | type | default |
1215+============+======+=========+
1216| allow_idna | bool | false   |
1217+------------+------+---------+
1218
1219when disabled, any tracker or web seed with an IDNA hostname
1220(internationalized domain name) is ignored. This is a security
1221precaution to avoid various unicode encoding attacks that might
1222happen at the application level.
1223
1224.. _tracker_completion_timeout:
1225
1226.. raw:: html
1227
1228	<a name="tracker_completion_timeout"></a>
1229
1230+----------------------------+------+---------+
1231| name                       | type | default |
1232+============================+======+=========+
1233| tracker_completion_timeout | int  | 30      |
1234+----------------------------+------+---------+
1235
1236``tracker_completion_timeout`` is the number of seconds the tracker
1237connection will wait from when it sent the request until it
1238considers the tracker to have timed-out.
1239
1240.. _tracker_receive_timeout:
1241
1242.. raw:: html
1243
1244	<a name="tracker_receive_timeout"></a>
1245
1246+-------------------------+------+---------+
1247| name                    | type | default |
1248+=========================+======+=========+
1249| tracker_receive_timeout | int  | 10      |
1250+-------------------------+------+---------+
1251
1252``tracker_receive_timeout`` is the number of seconds to wait to
1253receive any data from the tracker. If no data is received for this
1254number of seconds, the tracker will be considered as having timed
1255out. If a tracker is down, this is the kind of timeout that will
1256occur.
1257
1258.. _stop_tracker_timeout:
1259
1260.. raw:: html
1261
1262	<a name="stop_tracker_timeout"></a>
1263
1264+----------------------+------+---------+
1265| name                 | type | default |
1266+======================+======+=========+
1267| stop_tracker_timeout | int  | 5       |
1268+----------------------+------+---------+
1269
1270``stop_tracker_timeout`` is the number of seconds to wait when
1271sending a stopped message before considering a tracker to have
1272timed out. This is usually shorter, to make the client quit faster.
1273If the value is set to 0, the connections to trackers with the
1274stopped event are suppressed.
1275
1276.. _tracker_maximum_response_length:
1277
1278.. raw:: html
1279
1280	<a name="tracker_maximum_response_length"></a>
1281
1282+---------------------------------+------+-----------+
1283| name                            | type | default   |
1284+=================================+======+===========+
1285| tracker_maximum_response_length | int  | 1024*1024 |
1286+---------------------------------+------+-----------+
1287
1288this is the maximum number of bytes in a tracker response. If a
1289response size passes this number of bytes it will be rejected and
1290the connection will be closed. On gzipped responses this size is
1291measured on the uncompressed data. So, if you get 20 bytes of gzip
1292response that'll expand to 2 megabytes, it will be interrupted
1293before the entire response has been uncompressed (assuming the
1294limit is lower than 2 MiB).
1295
1296.. _piece_timeout:
1297
1298.. raw:: html
1299
1300	<a name="piece_timeout"></a>
1301
1302+---------------+------+---------+
1303| name          | type | default |
1304+===============+======+=========+
1305| piece_timeout | int  | 20      |
1306+---------------+------+---------+
1307
1308the number of seconds from a request is sent until it times out if
1309no piece response is returned.
1310
1311.. _request_timeout:
1312
1313.. raw:: html
1314
1315	<a name="request_timeout"></a>
1316
1317+-----------------+------+---------+
1318| name            | type | default |
1319+=================+======+=========+
1320| request_timeout | int  | 60      |
1321+-----------------+------+---------+
1322
1323the number of seconds one block (16 kiB) is expected to be received
1324within. If it's not, the block is requested from a different peer
1325
1326.. _request_queue_time:
1327
1328.. raw:: html
1329
1330	<a name="request_queue_time"></a>
1331
1332+--------------------+------+---------+
1333| name               | type | default |
1334+====================+======+=========+
1335| request_queue_time | int  | 3       |
1336+--------------------+------+---------+
1337
1338the length of the request queue given in the number of seconds it
1339should take for the other end to send all the pieces. i.e. the
1340actual number of requests depends on the download rate and this
1341number.
1342
1343.. _max_allowed_in_request_queue:
1344
1345.. raw:: html
1346
1347	<a name="max_allowed_in_request_queue"></a>
1348
1349+------------------------------+------+---------+
1350| name                         | type | default |
1351+==============================+======+=========+
1352| max_allowed_in_request_queue | int  | 500     |
1353+------------------------------+------+---------+
1354
1355the number of outstanding block requests a peer is allowed to queue
1356up in the client. If a peer sends more requests than this (before
1357the first one has been sent) the last request will be dropped. the
1358higher this is, the faster upload speeds the client can get to a
1359single peer.
1360
1361.. _max_out_request_queue:
1362
1363.. raw:: html
1364
1365	<a name="max_out_request_queue"></a>
1366
1367+-----------------------+------+---------+
1368| name                  | type | default |
1369+=======================+======+=========+
1370| max_out_request_queue | int  | 500     |
1371+-----------------------+------+---------+
1372
1373``max_out_request_queue`` is the maximum number of outstanding
1374requests to send to a peer. This limit takes precedence over
1375``request_queue_time``. i.e. no matter the download speed, the
1376number of outstanding requests will never exceed this limit.
1377
1378.. _whole_pieces_threshold:
1379
1380.. raw:: html
1381
1382	<a name="whole_pieces_threshold"></a>
1383
1384+------------------------+------+---------+
1385| name                   | type | default |
1386+========================+======+=========+
1387| whole_pieces_threshold | int  | 20      |
1388+------------------------+------+---------+
1389
1390if a whole piece can be downloaded in this number of seconds, or
1391less, the peer_connection will prefer to request whole pieces at a
1392time from this peer. The benefit of this is to better utilize disk
1393caches by doing localized accesses and also to make it easier to
1394identify bad peers if a piece fails the hash check.
1395
1396.. _peer_timeout:
1397
1398.. raw:: html
1399
1400	<a name="peer_timeout"></a>
1401
1402+--------------+------+---------+
1403| name         | type | default |
1404+==============+======+=========+
1405| peer_timeout | int  | 120     |
1406+--------------+------+---------+
1407
1408``peer_timeout`` is the number of seconds the peer connection
1409should wait (for any activity on the peer connection) before
1410closing it due to time out. 120 seconds is
1411specified in the protocol specification. After half
1412the time out, a keep alive message is sent.
1413
1414.. _urlseed_timeout:
1415
1416.. raw:: html
1417
1418	<a name="urlseed_timeout"></a>
1419
1420+-----------------+------+---------+
1421| name            | type | default |
1422+=================+======+=========+
1423| urlseed_timeout | int  | 20      |
1424+-----------------+------+---------+
1425
1426same as peer_timeout, but only applies to url-seeds. this is
1427usually set lower, because web servers are expected to be more
1428reliable.
1429
1430.. _urlseed_pipeline_size:
1431
1432.. raw:: html
1433
1434	<a name="urlseed_pipeline_size"></a>
1435
1436+-----------------------+------+---------+
1437| name                  | type | default |
1438+=======================+======+=========+
1439| urlseed_pipeline_size | int  | 5       |
1440+-----------------------+------+---------+
1441
1442controls the pipelining size of url and http seeds. i.e. the number of HTTP
1443request to keep outstanding before waiting for the first one to
1444complete. It's common for web servers to limit this to a relatively
1445low number, like 5
1446
1447.. _urlseed_wait_retry:
1448
1449.. raw:: html
1450
1451	<a name="urlseed_wait_retry"></a>
1452
1453+--------------------+------+---------+
1454| name               | type | default |
1455+====================+======+=========+
1456| urlseed_wait_retry | int  | 30      |
1457+--------------------+------+---------+
1458
1459number of seconds until a new retry of a url-seed takes place.
1460Default retry value for http-seeds that don't provide
1461a valid ``retry-after`` header.
1462
1463.. _file_pool_size:
1464
1465.. raw:: html
1466
1467	<a name="file_pool_size"></a>
1468
1469+----------------+------+---------+
1470| name           | type | default |
1471+================+======+=========+
1472| file_pool_size | int  | 40      |
1473+----------------+------+---------+
1474
1475sets the upper limit on the total number of files this session will
1476keep open. The reason why files are left open at all is that some
1477anti virus software hooks on every file close, and scans the file
1478for viruses. deferring the closing of the files will be the
1479difference between a usable system and a completely hogged down
1480system. Most operating systems also has a limit on the total number
1481of file descriptors a process may have open.
1482
1483.. _max_failcount:
1484
1485.. raw:: html
1486
1487	<a name="max_failcount"></a>
1488
1489+---------------+------+---------+
1490| name          | type | default |
1491+===============+======+=========+
1492| max_failcount | int  | 3       |
1493+---------------+------+---------+
1494
1495``max_failcount`` is the maximum times we try to
1496connect to a peer before stop connecting again. If a
1497peer succeeds, the failure counter is reset. If a
1498peer is retrieved from a peer source (other than DHT)
1499the failcount is decremented by one, allowing another
1500try.
1501
1502.. _min_reconnect_time:
1503
1504.. raw:: html
1505
1506	<a name="min_reconnect_time"></a>
1507
1508+--------------------+------+---------+
1509| name               | type | default |
1510+====================+======+=========+
1511| min_reconnect_time | int  | 60      |
1512+--------------------+------+---------+
1513
1514the number of seconds to wait to reconnect to a peer. this time is
1515multiplied with the failcount.
1516
1517.. _peer_connect_timeout:
1518
1519.. raw:: html
1520
1521	<a name="peer_connect_timeout"></a>
1522
1523+----------------------+------+---------+
1524| name                 | type | default |
1525+======================+======+=========+
1526| peer_connect_timeout | int  | 15      |
1527+----------------------+------+---------+
1528
1529``peer_connect_timeout`` the number of seconds to wait after a
1530connection attempt is initiated to a peer until it is considered as
1531having timed out. This setting is especially important in case the
1532number of half-open connections are limited, since stale half-open
1533connection may delay the connection of other peers considerably.
1534
1535.. _connection_speed:
1536
1537.. raw:: html
1538
1539	<a name="connection_speed"></a>
1540
1541+------------------+------+---------+
1542| name             | type | default |
1543+==================+======+=========+
1544| connection_speed | int  | 30      |
1545+------------------+------+---------+
1546
1547``connection_speed`` is the number of connection attempts that are
1548made per second. If a number < 0 is specified, it will default to
1549200 connections per second. If 0 is specified, it means don't make
1550outgoing connections at all.
1551
1552.. _inactivity_timeout:
1553
1554.. raw:: html
1555
1556	<a name="inactivity_timeout"></a>
1557
1558+--------------------+------+---------+
1559| name               | type | default |
1560+====================+======+=========+
1561| inactivity_timeout | int  | 600     |
1562+--------------------+------+---------+
1563
1564if a peer is uninteresting and uninterested for longer than this
1565number of seconds, it will be disconnected.
1566
1567.. _unchoke_interval:
1568
1569.. raw:: html
1570
1571	<a name="unchoke_interval"></a>
1572
1573+------------------+------+---------+
1574| name             | type | default |
1575+==================+======+=========+
1576| unchoke_interval | int  | 15      |
1577+------------------+------+---------+
1578
1579``unchoke_interval`` is the number of seconds between
1580chokes/unchokes. On this interval, peers are re-evaluated for being
1581choked/unchoked. This is defined as 30 seconds in the protocol, and
1582it should be significantly longer than what it takes for TCP to
1583ramp up to it's max rate.
1584
1585.. _optimistic_unchoke_interval:
1586
1587.. raw:: html
1588
1589	<a name="optimistic_unchoke_interval"></a>
1590
1591+-----------------------------+------+---------+
1592| name                        | type | default |
1593+=============================+======+=========+
1594| optimistic_unchoke_interval | int  | 30      |
1595+-----------------------------+------+---------+
1596
1597``optimistic_unchoke_interval`` is the number of seconds between
1598each *optimistic* unchoke. On this timer, the currently
1599optimistically unchoked peer will change.
1600
1601.. _num_want:
1602
1603.. raw:: html
1604
1605	<a name="num_want"></a>
1606
1607+----------+------+---------+
1608| name     | type | default |
1609+==========+======+=========+
1610| num_want | int  | 200     |
1611+----------+------+---------+
1612
1613``num_want`` is the number of peers we want from each tracker
1614request. It defines what is sent as the ``&num_want=`` parameter to
1615the tracker.
1616
1617.. _initial_picker_threshold:
1618
1619.. raw:: html
1620
1621	<a name="initial_picker_threshold"></a>
1622
1623+--------------------------+------+---------+
1624| name                     | type | default |
1625+==========================+======+=========+
1626| initial_picker_threshold | int  | 4       |
1627+--------------------------+------+---------+
1628
1629``initial_picker_threshold`` specifies the number of pieces we need
1630before we switch to rarest first picking. The first
1631``initial_picker_threshold`` pieces in any torrent are picked at random
1632, the following pieces are picked in rarest first order.
1633
1634.. _allowed_fast_set_size:
1635
1636.. raw:: html
1637
1638	<a name="allowed_fast_set_size"></a>
1639
1640+-----------------------+------+---------+
1641| name                  | type | default |
1642+=======================+======+=========+
1643| allowed_fast_set_size | int  | 5       |
1644+-----------------------+------+---------+
1645
1646the number of allowed pieces to send to peers that supports the
1647fast extensions
1648
1649.. _suggest_mode:
1650
1651.. raw:: html
1652
1653	<a name="suggest_mode"></a>
1654
1655+--------------+------+-------------------------------------+
1656| name         | type | default                             |
1657+==============+======+=====================================+
1658| suggest_mode | int  | settings_pack::no_piece_suggestions |
1659+--------------+------+-------------------------------------+
1660
1661``suggest_mode`` controls whether or not libtorrent will send out
1662suggest messages to create a bias of its peers to request certain
1663pieces. The modes are:
1664
1665* ``no_piece_suggestions`` which will not send out suggest messages.
1666* ``suggest_read_cache`` which will send out suggest messages for
1667  the most recent pieces that are in the read cache.
1668
1669.. _max_queued_disk_bytes:
1670
1671.. raw:: html
1672
1673	<a name="max_queued_disk_bytes"></a>
1674
1675+-----------------------+------+-------------+
1676| name                  | type | default     |
1677+=======================+======+=============+
1678| max_queued_disk_bytes | int  | 1024 * 1024 |
1679+-----------------------+------+-------------+
1680
1681``max_queued_disk_bytes`` is the maximum number of bytes, to
1682be written to disk, that can wait in the disk I/O thread queue.
1683This queue is only for waiting for the disk I/O thread to receive
1684the job and either write it to disk or insert it in the write
1685cache. When this limit is reached, the peer connections will stop
1686reading data from their sockets, until the disk thread catches up.
1687Setting this too low will severely limit your download rate.
1688
1689.. _handshake_timeout:
1690
1691.. raw:: html
1692
1693	<a name="handshake_timeout"></a>
1694
1695+-------------------+------+---------+
1696| name              | type | default |
1697+===================+======+=========+
1698| handshake_timeout | int  | 10      |
1699+-------------------+------+---------+
1700
1701the number of seconds to wait for a handshake response from a peer.
1702If no response is received within this time, the peer is
1703disconnected.
1704
1705.. _send_buffer_low_watermark:
1706
1707.. _send_buffer_watermark:
1708
1709.. _send_buffer_watermark_factor:
1710
1711.. raw:: html
1712
1713	<a name="send_buffer_low_watermark"></a>
1714	<a name="send_buffer_watermark"></a>
1715	<a name="send_buffer_watermark_factor"></a>
1716
1717+------------------------------+------+------------+
1718| name                         | type | default    |
1719+==============================+======+============+
1720| send_buffer_low_watermark    | int  | 10 * 1024  |
1721+------------------------------+------+------------+
1722| send_buffer_watermark        | int  | 500 * 1024 |
1723+------------------------------+------+------------+
1724| send_buffer_watermark_factor | int  | 50         |
1725+------------------------------+------+------------+
1726
1727``send_buffer_low_watermark`` the minimum send buffer target size
1728(send buffer includes bytes pending being read from disk). For good
1729and snappy seeding performance, set this fairly high, to at least
1730fit a few blocks. This is essentially the initial window size which
1731will determine how fast we can ramp up the send rate
1732
1733if the send buffer has fewer bytes than ``send_buffer_watermark``,
1734we'll read another 16 kiB block onto it. If set too small, upload
1735rate capacity will suffer. If set too high, memory will be wasted.
1736The actual watermark may be lower than this in case the upload rate
1737is low, this is the upper limit.
1738
1739the current upload rate to a peer is multiplied by this factor to
1740get the send buffer watermark. The factor is specified as a
1741percentage. i.e. 50 -> 0.5 This product is clamped to the
1742``send_buffer_watermark`` setting to not exceed the max. For high
1743speed upload, this should be set to a greater value than 100. For
1744high capacity connections, setting this higher can improve upload
1745performance and disk throughput. Setting it too high may waste RAM
1746and create a bias towards read jobs over write jobs.
1747
1748.. _choking_algorithm:
1749
1750.. _seed_choking_algorithm:
1751
1752.. raw:: html
1753
1754	<a name="choking_algorithm"></a>
1755	<a name="seed_choking_algorithm"></a>
1756
1757+------------------------+------+-----------------------------------+
1758| name                   | type | default                           |
1759+========================+======+===================================+
1760| choking_algorithm      | int  | settings_pack::fixed_slots_choker |
1761+------------------------+------+-----------------------------------+
1762| seed_choking_algorithm | int  | settings_pack::round_robin        |
1763+------------------------+------+-----------------------------------+
1764
1765``choking_algorithm`` specifies which algorithm to use to determine
1766how many peers to unchoke. The unchoking algorithm for
1767downloading torrents is always "tit-for-tat", i.e. the peers we
1768download the fastest from are unchoked.
1769
1770The options for choking algorithms are defined in the
1771choking_algorithm_t enum.
1772
1773``seed_choking_algorithm`` controls the seeding unchoke behavior.
1774i.e. How we select which peers to unchoke for seeding torrents.
1775Since a seeding torrent isn't downloading anything, the
1776tit-for-tat mechanism cannot be used. The available options are
1777defined in the seed_choking_algorithm_t enum.
1778
1779.. _cache_size:
1780
1781.. _cache_expiry:
1782
1783.. raw:: html
1784
1785	<a name="cache_size"></a>
1786	<a name="cache_expiry"></a>
1787
1788+--------------+------+---------+
1789| name         | type | default |
1790+==============+======+=========+
1791| cache_size   | int  | 2048    |
1792+--------------+------+---------+
1793| cache_expiry | int  | 300     |
1794+--------------+------+---------+
1795
1796``cache_size`` is the disk write and read cache. It is specified
1797in units of 16 kiB blocks. Buffers that are part of a peer's send
1798or receive buffer also count against this limit. Send and receive
1799buffers will never be denied to be allocated, but they will cause
1800the actual cached blocks to be flushed or evicted. If this is set
1801to -1, the cache size is automatically set based on the amount of
1802physical RAM on the machine. If the amount of physical RAM cannot
1803be determined, it's set to 1024 (= 16 MiB).
1804
1805``cache_expiry`` is the number of seconds from the last cached write
1806to a piece in the write cache, to when it's forcefully flushed to
1807disk.
1808
1809On 32 bit builds, the effective cache size will be limited to 3/4 of
18102 GiB to avoid exceeding the virtual address space limit.
1811
1812.. _disk_io_write_mode:
1813
1814.. _disk_io_read_mode:
1815
1816.. raw:: html
1817
1818	<a name="disk_io_write_mode"></a>
1819	<a name="disk_io_read_mode"></a>
1820
1821+--------------------+------+--------------------------------+
1822| name               | type | default                        |
1823+====================+======+================================+
1824| disk_io_write_mode | int  | settings_pack::enable_os_cache |
1825+--------------------+------+--------------------------------+
1826| disk_io_read_mode  | int  | settings_pack::enable_os_cache |
1827+--------------------+------+--------------------------------+
1828
1829determines how files are opened when they're in read only mode
1830versus read and write mode. The options are:
1831
1832enable_os_cache
1833  Files are opened normally, with the OS caching reads and writes.
1834disable_os_cache
1835  This opens all files in no-cache mode. This corresponds to the
1836  OS not letting blocks for the files linger in the cache. This
1837  makes sense in order to avoid the bittorrent client to
1838  potentially evict all other processes' cache by simply handling
1839  high throughput and large files. If libtorrent's read cache is
1840  disabled, enabling this may reduce performance.
1841
1842One reason to disable caching is that it may help the operating
1843system from growing its file cache indefinitely.
1844
1845.. _outgoing_port:
1846
1847.. _num_outgoing_ports:
1848
1849.. raw:: html
1850
1851	<a name="outgoing_port"></a>
1852	<a name="num_outgoing_ports"></a>
1853
1854+--------------------+------+---------+
1855| name               | type | default |
1856+====================+======+=========+
1857| outgoing_port      | int  | 0       |
1858+--------------------+------+---------+
1859| num_outgoing_ports | int  | 0       |
1860+--------------------+------+---------+
1861
1862this is the first port to use for binding outgoing connections to.
1863This is useful for users that have routers that allow QoS settings
1864based on local port. when binding outgoing connections to specific
1865ports, ``num_outgoing_ports`` is the size of the range. It should
1866be more than a few
1867
1868.. warning:: setting outgoing ports will limit the ability to keep
1869   multiple connections to the same client, even for different
1870   torrents. It is not recommended to change this setting. Its main
1871   purpose is to use as an escape hatch for cheap routers with QoS
1872   capability but can only classify flows based on port numbers.
1873
1874It is a range instead of a single port because of the problems with
1875failing to reconnect to peers if a previous socket to that peer and
1876port is in ``TIME_WAIT`` state.
1877
1878.. _peer_tos:
1879
1880.. raw:: html
1881
1882	<a name="peer_tos"></a>
1883
1884+----------+------+---------+
1885| name     | type | default |
1886+==========+======+=========+
1887| peer_tos | int  | 0x20    |
1888+----------+------+---------+
1889
1890``peer_tos`` determines the TOS byte set in the IP header of every
1891packet sent to peers (including web seeds). ``0x0`` means no marking,
1892``0x20`` represents the *QBone scavenger service*. For more
1893details, see QBSS_.
1894
1895.. _`QBSS`: http://qbone.internet2.edu/qbss/
1896
1897.. _active_downloads:
1898
1899.. _active_seeds:
1900
1901.. _active_checking:
1902
1903.. _active_dht_limit:
1904
1905.. _active_tracker_limit:
1906
1907.. _active_lsd_limit:
1908
1909.. _active_limit:
1910
1911.. raw:: html
1912
1913	<a name="active_downloads"></a>
1914	<a name="active_seeds"></a>
1915	<a name="active_checking"></a>
1916	<a name="active_dht_limit"></a>
1917	<a name="active_tracker_limit"></a>
1918	<a name="active_lsd_limit"></a>
1919	<a name="active_limit"></a>
1920
1921+----------------------+------+---------+
1922| name                 | type | default |
1923+======================+======+=========+
1924| active_downloads     | int  | 3       |
1925+----------------------+------+---------+
1926| active_seeds         | int  | 5       |
1927+----------------------+------+---------+
1928| active_checking      | int  | 1       |
1929+----------------------+------+---------+
1930| active_dht_limit     | int  | 88      |
1931+----------------------+------+---------+
1932| active_tracker_limit | int  | 1600    |
1933+----------------------+------+---------+
1934| active_lsd_limit     | int  | 60      |
1935+----------------------+------+---------+
1936| active_limit         | int  | 500     |
1937+----------------------+------+---------+
1938
1939for auto managed torrents, these are the limits they are subject
1940to. If there are too many torrents some of the auto managed ones
1941will be paused until some slots free up. ``active_downloads`` and
1942``active_seeds`` controls how many active seeding and downloading
1943torrents the queuing mechanism allows. The target number of active
1944torrents is ``min(active_downloads + active_seeds, active_limit)``.
1945``active_downloads`` and ``active_seeds`` are upper limits on the
1946number of downloading torrents and seeding torrents respectively.
1947Setting the value to -1 means unlimited.
1948
1949For example if there are 10 seeding torrents and 10 downloading
1950torrents, and ``active_downloads`` is 4 and ``active_seeds`` is 4,
1951there will be 4 seeds active and 4 downloading torrents. If the
1952settings are ``active_downloads`` = 2 and ``active_seeds`` = 4,
1953then there will be 2 downloading torrents and 4 seeding torrents
1954active. Torrents that are not auto managed are not counted against
1955these limits.
1956
1957``active_checking`` is the limit of number of simultaneous checking
1958torrents.
1959
1960``active_limit`` is a hard limit on the number of active (auto
1961managed) torrents. This limit also applies to slow torrents.
1962
1963``active_dht_limit`` is the max number of torrents to announce to
1964the DHT.
1965
1966``active_tracker_limit`` is the max number of torrents to announce
1967to their trackers.
1968
1969``active_lsd_limit`` is the max number of torrents to announce to
1970the local network over the local service discovery protocol.
1971
1972You can have more torrents *active*, even though they are not
1973announced to the DHT, lsd or their tracker. If some peer knows
1974about you for any reason and tries to connect, it will still be
1975accepted, unless the torrent is paused, which means it won't accept
1976any connections.
1977
1978.. _auto_manage_interval:
1979
1980.. raw:: html
1981
1982	<a name="auto_manage_interval"></a>
1983
1984+----------------------+------+---------+
1985| name                 | type | default |
1986+======================+======+=========+
1987| auto_manage_interval | int  | 30      |
1988+----------------------+------+---------+
1989
1990``auto_manage_interval`` is the number of seconds between the
1991torrent queue is updated, and rotated.
1992
1993.. _seed_time_limit:
1994
1995.. raw:: html
1996
1997	<a name="seed_time_limit"></a>
1998
1999+-----------------+------+--------------+
2000| name            | type | default      |
2001+=================+======+==============+
2002| seed_time_limit | int  | 24 * 60 * 60 |
2003+-----------------+------+--------------+
2004
2005this is the limit on the time a torrent has been an active seed
2006(specified in seconds) before it is considered having met the seed
2007limit criteria. See queuing_.
2008
2009.. _auto_scrape_interval:
2010
2011.. _auto_scrape_min_interval:
2012
2013.. raw:: html
2014
2015	<a name="auto_scrape_interval"></a>
2016	<a name="auto_scrape_min_interval"></a>
2017
2018+--------------------------+------+---------+
2019| name                     | type | default |
2020+==========================+======+=========+
2021| auto_scrape_interval     | int  | 1800    |
2022+--------------------------+------+---------+
2023| auto_scrape_min_interval | int  | 300     |
2024+--------------------------+------+---------+
2025
2026``auto_scrape_interval`` is the number of seconds between scrapes
2027of queued torrents (auto managed and paused torrents). Auto managed
2028torrents that are paused, are scraped regularly in order to keep
2029track of their downloader/seed ratio. This ratio is used to
2030determine which torrents to seed and which to pause.
2031
2032``auto_scrape_min_interval`` is the minimum number of seconds
2033between any automatic scrape (regardless of torrent). In case there
2034are a large number of paused auto managed torrents, this puts a
2035limit on how often a scrape request is sent.
2036
2037.. _max_peerlist_size:
2038
2039.. _max_paused_peerlist_size:
2040
2041.. raw:: html
2042
2043	<a name="max_peerlist_size"></a>
2044	<a name="max_paused_peerlist_size"></a>
2045
2046+--------------------------+------+---------+
2047| name                     | type | default |
2048+==========================+======+=========+
2049| max_peerlist_size        | int  | 3000    |
2050+--------------------------+------+---------+
2051| max_paused_peerlist_size | int  | 1000    |
2052+--------------------------+------+---------+
2053
2054``max_peerlist_size`` is the maximum number of peers in the list of
2055known peers. These peers are not necessarily connected, so this
2056number should be much greater than the maximum number of connected
2057peers. Peers are evicted from the cache when the list grows passed
205890% of this limit, and once the size hits the limit, peers are no
2059longer added to the list. If this limit is set to 0, there is no
2060limit on how many peers we'll keep in the peer list.
2061
2062``max_paused_peerlist_size`` is the max peer list size used for
2063torrents that are paused. This can be used to save memory for paused
2064torrents, since it's not as important for them to keep a large peer
2065list.
2066
2067.. _min_announce_interval:
2068
2069.. raw:: html
2070
2071	<a name="min_announce_interval"></a>
2072
2073+-----------------------+------+---------+
2074| name                  | type | default |
2075+=======================+======+=========+
2076| min_announce_interval | int  | 5 * 60  |
2077+-----------------------+------+---------+
2078
2079this is the minimum allowed announce interval for a tracker. This
2080is specified in seconds and is used as a sanity check on what is
2081returned from a tracker. It mitigates hammering mis-configured
2082trackers.
2083
2084.. _auto_manage_startup:
2085
2086.. raw:: html
2087
2088	<a name="auto_manage_startup"></a>
2089
2090+---------------------+------+---------+
2091| name                | type | default |
2092+=====================+======+=========+
2093| auto_manage_startup | int  | 60      |
2094+---------------------+------+---------+
2095
2096this is the number of seconds a torrent is considered active after
2097it was started, regardless of upload and download speed. This is so
2098that newly started torrents are not considered inactive until they
2099have a fair chance to start downloading.
2100
2101.. _seeding_piece_quota:
2102
2103.. raw:: html
2104
2105	<a name="seeding_piece_quota"></a>
2106
2107+---------------------+------+---------+
2108| name                | type | default |
2109+=====================+======+=========+
2110| seeding_piece_quota | int  | 20      |
2111+---------------------+------+---------+
2112
2113``seeding_piece_quota`` is the number of pieces to send to a peer,
2114when seeding, before rotating in another peer to the unchoke set.
2115
2116.. _max_rejects:
2117
2118.. raw:: html
2119
2120	<a name="max_rejects"></a>
2121
2122+-------------+------+---------+
2123| name        | type | default |
2124+=============+======+=========+
2125| max_rejects | int  | 50      |
2126+-------------+------+---------+
2127
2128``max_rejects`` is the number of piece requests we will reject in a
2129row while a peer is choked before the peer is considered abusive
2130and is disconnected.
2131
2132.. _recv_socket_buffer_size:
2133
2134.. _send_socket_buffer_size:
2135
2136.. raw:: html
2137
2138	<a name="recv_socket_buffer_size"></a>
2139	<a name="send_socket_buffer_size"></a>
2140
2141+-------------------------+------+---------+
2142| name                    | type | default |
2143+=========================+======+=========+
2144| recv_socket_buffer_size | int  | 0       |
2145+-------------------------+------+---------+
2146| send_socket_buffer_size | int  | 0       |
2147+-------------------------+------+---------+
2148
2149specifies the buffer sizes set on peer sockets. 0 means the OS
2150default (i.e. don't change the buffer sizes).
2151The socket buffer sizes are changed using setsockopt() with
2152SOL_SOCKET/SO_RCVBUF and SO_SNDBUFFER.
2153
2154.. _max_peer_recv_buffer_size:
2155
2156.. raw:: html
2157
2158	<a name="max_peer_recv_buffer_size"></a>
2159
2160+---------------------------+------+-----------------+
2161| name                      | type | default         |
2162+===========================+======+=================+
2163| max_peer_recv_buffer_size | int  | 2 * 1024 * 1024 |
2164+---------------------------+------+-----------------+
2165
2166the max number of bytes a single peer connection's receive buffer is
2167allowed to grow to.
2168
2169.. _read_cache_line_size:
2170
2171.. _write_cache_line_size:
2172
2173.. raw:: html
2174
2175	<a name="read_cache_line_size"></a>
2176	<a name="write_cache_line_size"></a>
2177
2178+-----------------------+------+---------+
2179| name                  | type | default |
2180+=======================+======+=========+
2181| read_cache_line_size  | int  | 32      |
2182+-----------------------+------+---------+
2183| write_cache_line_size | int  | 16      |
2184+-----------------------+------+---------+
2185
2186``read_cache_line_size`` is the number of blocks to read into the
2187read cache when a read cache miss occurs. Setting this to 0 is
2188essentially the same thing as disabling read cache. The number of
2189blocks read into the read cache is always capped by the piece
2190boundary.
2191
2192When a piece in the write cache has ``write_cache_line_size``
2193contiguous blocks in it, they will be flushed. Setting this to 1
2194effectively disables the write cache.
2195
2196.. _optimistic_disk_retry:
2197
2198.. raw:: html
2199
2200	<a name="optimistic_disk_retry"></a>
2201
2202+-----------------------+------+---------+
2203| name                  | type | default |
2204+=======================+======+=========+
2205| optimistic_disk_retry | int  | 10 * 60 |
2206+-----------------------+------+---------+
2207
2208``optimistic_disk_retry`` is the number of seconds from a disk
2209write errors occur on a torrent until libtorrent will take it out
2210of the upload mode, to test if the error condition has been fixed.
2211
2212libtorrent will only do this automatically for auto managed
2213torrents.
2214
2215You can explicitly take a torrent out of upload only mode using
2216set_upload_mode().
2217
2218.. _max_suggest_pieces:
2219
2220.. raw:: html
2221
2222	<a name="max_suggest_pieces"></a>
2223
2224+--------------------+------+---------+
2225| name               | type | default |
2226+====================+======+=========+
2227| max_suggest_pieces | int  | 16      |
2228+--------------------+------+---------+
2229
2230``max_suggest_pieces`` is the max number of suggested piece indices
2231received from a peer that's remembered. If a peer floods suggest
2232messages, this limit prevents libtorrent from using too much RAM.
2233
2234.. _local_service_announce_interval:
2235
2236.. raw:: html
2237
2238	<a name="local_service_announce_interval"></a>
2239
2240+---------------------------------+------+---------+
2241| name                            | type | default |
2242+=================================+======+=========+
2243| local_service_announce_interval | int  | 5 * 60  |
2244+---------------------------------+------+---------+
2245
2246``local_service_announce_interval`` is the time between local
2247network announces for a torrent.
2248This interval is specified in seconds.
2249
2250.. _dht_announce_interval:
2251
2252.. raw:: html
2253
2254	<a name="dht_announce_interval"></a>
2255
2256+-----------------------+------+---------+
2257| name                  | type | default |
2258+=======================+======+=========+
2259| dht_announce_interval | int  | 15 * 60 |
2260+-----------------------+------+---------+
2261
2262``dht_announce_interval`` is the number of seconds between
2263announcing torrents to the distributed hash table (DHT).
2264
2265.. _udp_tracker_token_expiry:
2266
2267.. raw:: html
2268
2269	<a name="udp_tracker_token_expiry"></a>
2270
2271+--------------------------+------+---------+
2272| name                     | type | default |
2273+==========================+======+=========+
2274| udp_tracker_token_expiry | int  | 60      |
2275+--------------------------+------+---------+
2276
2277``udp_tracker_token_expiry`` is the number of seconds libtorrent
2278will keep UDP tracker connection tokens around for. This is
2279specified to be 60 seconds. The higher this
2280value is, the fewer packets have to be sent to the UDP tracker. In
2281order for higher values to work, the tracker needs to be configured
2282to match the expiration time for tokens.
2283
2284.. _num_optimistic_unchoke_slots:
2285
2286.. raw:: html
2287
2288	<a name="num_optimistic_unchoke_slots"></a>
2289
2290+------------------------------+------+---------+
2291| name                         | type | default |
2292+==============================+======+=========+
2293| num_optimistic_unchoke_slots | int  | 0       |
2294+------------------------------+------+---------+
2295
2296``num_optimistic_unchoke_slots`` is the number of optimistic
2297unchoke slots to use.
2298Having a higher number of optimistic unchoke slots mean you will
2299find the good peers faster but with the trade-off to use up more
2300bandwidth. 0 means automatic, where libtorrent opens up 20% of your
2301allowed upload slots as optimistic unchoke slots.
2302
2303.. _max_pex_peers:
2304
2305.. raw:: html
2306
2307	<a name="max_pex_peers"></a>
2308
2309+---------------+------+---------+
2310| name          | type | default |
2311+===============+======+=========+
2312| max_pex_peers | int  | 50      |
2313+---------------+------+---------+
2314
2315the max number of peers we accept from pex messages from a single
2316peer. this limits the number of concurrent peers any of our peers
2317claims to be connected to. If they claim to be connected to more
2318than this, we'll ignore any peer that exceeds this limit
2319
2320.. _tick_interval:
2321
2322.. raw:: html
2323
2324	<a name="tick_interval"></a>
2325
2326+---------------+------+---------+
2327| name          | type | default |
2328+===============+======+=========+
2329| tick_interval | int  | 500     |
2330+---------------+------+---------+
2331
2332``tick_interval`` specifies the number of milliseconds between
2333internal ticks. This is the frequency with which bandwidth quota is
2334distributed to peers. It should not be more than one second (i.e.
23351000 ms). Setting this to a low value (around 100) means higher
2336resolution bandwidth quota distribution, setting it to a higher
2337value saves CPU cycles.
2338
2339.. _share_mode_target:
2340
2341.. raw:: html
2342
2343	<a name="share_mode_target"></a>
2344
2345+-------------------+------+---------+
2346| name              | type | default |
2347+===================+======+=========+
2348| share_mode_target | int  | 3       |
2349+-------------------+------+---------+
2350
2351``share_mode_target`` specifies the target share ratio for share
2352mode torrents. If set to 3, we'll try to upload 3
2353times as much as we download. Setting this very high, will make it
2354very conservative and you might end up not downloading anything
2355ever (and not affecting your share ratio). It does not make any
2356sense to set this any lower than 2. For instance, if only 3 peers
2357need to download the rarest piece, it's impossible to download a
2358single piece and upload it more than 3 times. If the
2359share_mode_target is set to more than 3, nothing is downloaded.
2360
2361.. _upload_rate_limit:
2362
2363.. _download_rate_limit:
2364
2365.. raw:: html
2366
2367	<a name="upload_rate_limit"></a>
2368	<a name="download_rate_limit"></a>
2369
2370+---------------------+------+---------+
2371| name                | type | default |
2372+=====================+======+=========+
2373| upload_rate_limit   | int  | 0       |
2374+---------------------+------+---------+
2375| download_rate_limit | int  | 0       |
2376+---------------------+------+---------+
2377
2378``upload_rate_limit`` and ``download_rate_limit`` sets
2379the session-global limits of upload and download rate limits, in
2380bytes per second. By default peers on the local network are not rate
2381limited.
2382
2383A value of 0 means unlimited.
2384
2385For fine grained control over rate limits, including making them apply
2386to local peers, see peer-classes_.
2387
2388.. _dht_upload_rate_limit:
2389
2390.. raw:: html
2391
2392	<a name="dht_upload_rate_limit"></a>
2393
2394+-----------------------+------+---------+
2395| name                  | type | default |
2396+=======================+======+=========+
2397| dht_upload_rate_limit | int  | 8000    |
2398+-----------------------+------+---------+
2399
2400``dht_upload_rate_limit`` sets the rate limit on the DHT. This is
2401specified in bytes per second. For busy boxes
2402with lots of torrents that requires more DHT traffic, this should
2403be raised.
2404
2405.. _unchoke_slots_limit:
2406
2407.. raw:: html
2408
2409	<a name="unchoke_slots_limit"></a>
2410
2411+---------------------+------+---------+
2412| name                | type | default |
2413+=====================+======+=========+
2414| unchoke_slots_limit | int  | 8       |
2415+---------------------+------+---------+
2416
2417``unchoke_slots_limit`` is the max number of unchoked peers in the
2418session. The number of unchoke slots may be ignored depending on
2419what ``choking_algorithm`` is set to. Setting this limit to -1
2420means unlimited, i.e. all peers will always be unchoked.
2421
2422.. _connections_limit:
2423
2424.. raw:: html
2425
2426	<a name="connections_limit"></a>
2427
2428+-------------------+------+---------+
2429| name              | type | default |
2430+===================+======+=========+
2431| connections_limit | int  | 200     |
2432+-------------------+------+---------+
2433
2434``connections_limit`` sets a global limit on the number of
2435connections opened. The number of connections is set to a hard
2436minimum of at least two per torrent, so if you set a too low
2437connections limit, and open too many torrents, the limit will not
2438be met.
2439
2440.. _connections_slack:
2441
2442.. raw:: html
2443
2444	<a name="connections_slack"></a>
2445
2446+-------------------+------+---------+
2447| name              | type | default |
2448+===================+======+=========+
2449| connections_slack | int  | 10      |
2450+-------------------+------+---------+
2451
2452``connections_slack`` is the number of incoming connections
2453exceeding the connection limit to accept in order to potentially
2454replace existing ones.
2455
2456.. _utp_target_delay:
2457
2458.. _utp_gain_factor:
2459
2460.. _utp_min_timeout:
2461
2462.. _utp_syn_resends:
2463
2464.. _utp_fin_resends:
2465
2466.. _utp_num_resends:
2467
2468.. _utp_connect_timeout:
2469
2470.. _utp_loss_multiplier:
2471
2472.. raw:: html
2473
2474	<a name="utp_target_delay"></a>
2475	<a name="utp_gain_factor"></a>
2476	<a name="utp_min_timeout"></a>
2477	<a name="utp_syn_resends"></a>
2478	<a name="utp_fin_resends"></a>
2479	<a name="utp_num_resends"></a>
2480	<a name="utp_connect_timeout"></a>
2481	<a name="utp_loss_multiplier"></a>
2482
2483+---------------------+------+---------+
2484| name                | type | default |
2485+=====================+======+=========+
2486| utp_target_delay    | int  | 100     |
2487+---------------------+------+---------+
2488| utp_gain_factor     | int  | 3000    |
2489+---------------------+------+---------+
2490| utp_min_timeout     | int  | 500     |
2491+---------------------+------+---------+
2492| utp_syn_resends     | int  | 2       |
2493+---------------------+------+---------+
2494| utp_fin_resends     | int  | 2       |
2495+---------------------+------+---------+
2496| utp_num_resends     | int  | 3       |
2497+---------------------+------+---------+
2498| utp_connect_timeout | int  | 3000    |
2499+---------------------+------+---------+
2500| utp_loss_multiplier | int  | 50      |
2501+---------------------+------+---------+
2502
2503``utp_target_delay`` is the target delay for uTP sockets in
2504milliseconds. A high value will make uTP connections more
2505aggressive and cause longer queues in the upload bottleneck. It
2506cannot be too low, since the noise in the measurements would cause
2507it to send too slow.
2508``utp_gain_factor`` is the number of bytes the uTP congestion
2509window can increase at the most in one RTT.
2510If this is set too high, the congestion controller reacts
2511too hard to noise and will not be stable, if it's set too low, it
2512will react slow to congestion and not back off as fast.
2513
2514``utp_min_timeout`` is the shortest allowed uTP socket timeout,
2515specified in milliseconds. The
2516timeout depends on the RTT of the connection, but is never smaller
2517than this value. A connection times out when every packet in a
2518window is lost, or when a packet is lost twice in a row (i.e. the
2519resent packet is lost as well).
2520
2521The shorter the timeout is, the faster the connection will recover
2522from this situation, assuming the RTT is low enough.
2523``utp_syn_resends`` is the number of SYN packets that are sent (and
2524timed out) before giving up and closing the socket.
2525``utp_num_resends`` is the number of times a packet is sent (and
2526lost or timed out) before giving up and closing the connection.
2527``utp_connect_timeout`` is the number of milliseconds of timeout
2528for the initial SYN packet for uTP connections. For each timed out
2529packet (in a row), the timeout is doubled. ``utp_loss_multiplier``
2530controls how the congestion window is changed when a packet loss is
2531experienced. It's specified as a percentage multiplier for
2532``cwnd``. Do not change this value unless you know what you're doing.
2533Never set it higher than 100.
2534
2535.. _mixed_mode_algorithm:
2536
2537.. raw:: html
2538
2539	<a name="mixed_mode_algorithm"></a>
2540
2541+----------------------+------+----------------------------------+
2542| name                 | type | default                          |
2543+======================+======+==================================+
2544| mixed_mode_algorithm | int  | settings_pack::peer_proportional |
2545+----------------------+------+----------------------------------+
2546
2547The ``mixed_mode_algorithm`` determines how to treat TCP
2548connections when there are uTP connections. Since uTP is designed
2549to yield to TCP, there's an inherent problem when using swarms that
2550have both TCP and uTP connections. If nothing is done, uTP
2551connections would often be starved out for bandwidth by the TCP
2552connections. This mode is ``prefer_tcp``. The ``peer_proportional``
2553mode simply looks at the current throughput and rate limits all TCP
2554connections to their proportional share based on how many of the
2555connections are TCP. This works best if uTP connections are not
2556rate limited by the global rate limiter (which they aren't by
2557default).
2558
2559.. _listen_queue_size:
2560
2561.. raw:: html
2562
2563	<a name="listen_queue_size"></a>
2564
2565+-------------------+------+---------+
2566| name              | type | default |
2567+===================+======+=========+
2568| listen_queue_size | int  | 5       |
2569+-------------------+------+---------+
2570
2571``listen_queue_size`` is the value passed in to listen() for the
2572listen socket. It is the number of outstanding incoming connections
2573to queue up while we're not actively waiting for a connection to be
2574accepted. 5 should be sufficient for any
2575normal client. If this is a high performance server which expects
2576to receive a lot of connections, or used in a simulator or test, it
2577might make sense to raise this number. It will not take affect
2578until the ``listen_interfaces`` settings is updated.
2579
2580.. _torrent_connect_boost:
2581
2582.. raw:: html
2583
2584	<a name="torrent_connect_boost"></a>
2585
2586+-----------------------+------+---------+
2587| name                  | type | default |
2588+=======================+======+=========+
2589| torrent_connect_boost | int  | 30      |
2590+-----------------------+------+---------+
2591
2592``torrent_connect_boost`` is the number of peers to try to connect
2593to immediately when the first tracker response is received for a
2594torrent. This is a boost to given to new torrents to accelerate
2595them starting up. The normal connect scheduler is run once every
2596second, this allows peers to be connected immediately instead of
2597waiting for the session tick to trigger connections.
2598This may not be set higher than 255.
2599
2600.. _alert_queue_size:
2601
2602.. raw:: html
2603
2604	<a name="alert_queue_size"></a>
2605
2606+------------------+------+---------+
2607| name             | type | default |
2608+==================+======+=========+
2609| alert_queue_size | int  | 1000    |
2610+------------------+------+---------+
2611
2612``alert_queue_size`` is the maximum number of alerts queued up
2613internally. If alerts are not popped, the queue will eventually
2614fill up to this level. Once the alert queue is full, additional
2615alerts will be dropped, and not delivered to the client. Once the
2616client drains the queue, new alerts may be delivered again. In order
2617to know that alerts have been dropped, see
2618session_handle::dropped_alerts().
2619
2620.. _max_metadata_size:
2621
2622.. raw:: html
2623
2624	<a name="max_metadata_size"></a>
2625
2626+-------------------+------+------------------+
2627| name              | type | default          |
2628+===================+======+==================+
2629| max_metadata_size | int  | 3 * 1024 * 10240 |
2630+-------------------+------+------------------+
2631
2632``max_metadata_size`` is the maximum allowed size (in bytes) to be
2633received by the metadata extension, i.e. magnet links.
2634
2635.. _checking_mem_usage:
2636
2637.. raw:: html
2638
2639	<a name="checking_mem_usage"></a>
2640
2641+--------------------+------+---------+
2642| name               | type | default |
2643+====================+======+=========+
2644| checking_mem_usage | int  | 1024    |
2645+--------------------+------+---------+
2646
2647the number of blocks to keep outstanding at any given time when
2648checking torrents. Higher numbers give faster re-checks but uses
2649more memory. Specified in number of 16 kiB blocks
2650
2651.. _predictive_piece_announce:
2652
2653.. raw:: html
2654
2655	<a name="predictive_piece_announce"></a>
2656
2657+---------------------------+------+---------+
2658| name                      | type | default |
2659+===========================+======+=========+
2660| predictive_piece_announce | int  | 0       |
2661+---------------------------+------+---------+
2662
2663if set to > 0, pieces will be announced to other peers before they
2664are fully downloaded (and before they are hash checked). The
2665intention is to gain 1.5 potential round trip times per downloaded
2666piece. When non-zero, this indicates how many milliseconds in
2667advance pieces should be announced, before they are expected to be
2668completed.
2669
2670.. _aio_threads:
2671
2672.. raw:: html
2673
2674	<a name="aio_threads"></a>
2675
2676+-------------+------+---------+
2677| name        | type | default |
2678+=============+======+=========+
2679| aio_threads | int  | 4       |
2680+-------------+------+---------+
2681
2682for some aio back-ends, ``aio_threads`` specifies the number of
2683io-threads to use.
2684
2685.. _tracker_backoff:
2686
2687.. raw:: html
2688
2689	<a name="tracker_backoff"></a>
2690
2691+-----------------+------+---------+
2692| name            | type | default |
2693+=================+======+=========+
2694| tracker_backoff | int  | 250     |
2695+-----------------+------+---------+
2696
2697``tracker_backoff`` determines how aggressively to back off from
2698retrying failing trackers. This value determines *x* in the
2699following formula, determining the number of seconds to wait until
2700the next retry:
2701
2702   delay = 5 + 5 * x / 100 * fails^2
2703
2704This setting may be useful to make libtorrent more or less
2705aggressive in hitting trackers.
2706
2707.. _share_ratio_limit:
2708
2709.. _seed_time_ratio_limit:
2710
2711.. raw:: html
2712
2713	<a name="share_ratio_limit"></a>
2714	<a name="seed_time_ratio_limit"></a>
2715
2716+-----------------------+------+---------+
2717| name                  | type | default |
2718+=======================+======+=========+
2719| share_ratio_limit     | int  | 200     |
2720+-----------------------+------+---------+
2721| seed_time_ratio_limit | int  | 700     |
2722+-----------------------+------+---------+
2723
2724when a seeding torrent reaches either the share ratio (bytes up /
2725bytes down) or the seed time ratio (seconds as seed / seconds as
2726downloader) or the seed time limit (seconds as seed) it is
2727considered done, and it will leave room for other torrents. These
2728are specified as percentages. Torrents that are considered done will
2729still be allowed to be seeded, they just won't have priority anymore.
2730For more, see queuing_.
2731
2732.. _peer_turnover:
2733
2734.. _peer_turnover_cutoff:
2735
2736.. _peer_turnover_interval:
2737
2738.. raw:: html
2739
2740	<a name="peer_turnover"></a>
2741	<a name="peer_turnover_cutoff"></a>
2742	<a name="peer_turnover_interval"></a>
2743
2744+------------------------+------+---------+
2745| name                   | type | default |
2746+========================+======+=========+
2747| peer_turnover          | int  | 4       |
2748+------------------------+------+---------+
2749| peer_turnover_cutoff   | int  | 90      |
2750+------------------------+------+---------+
2751| peer_turnover_interval | int  | 300     |
2752+------------------------+------+---------+
2753
2754peer_turnover is the percentage of peers to disconnect every
2755turnover peer_turnover_interval (if we're at the peer limit), this
2756is specified in percent when we are connected to more than limit *
2757peer_turnover_cutoff peers disconnect peer_turnover fraction of the
2758peers. It is specified in percent peer_turnover_interval is the
2759interval (in seconds) between optimistic disconnects if the
2760disconnects happen and how many peers are disconnected is
2761controlled by peer_turnover and peer_turnover_cutoff
2762
2763.. _connect_seed_every_n_download:
2764
2765.. raw:: html
2766
2767	<a name="connect_seed_every_n_download"></a>
2768
2769+-------------------------------+------+---------+
2770| name                          | type | default |
2771+===============================+======+=========+
2772| connect_seed_every_n_download | int  | 10      |
2773+-------------------------------+------+---------+
2774
2775this setting controls the priority of downloading torrents over
2776seeding or finished torrents when it comes to making peer
2777connections. Peer connections are throttled by the connection_speed
2778and the half-open connection limit. This makes peer connections a
2779limited resource. Torrents that still have pieces to download are
2780prioritized by default, to avoid having many seeding torrents use
2781most of the connection attempts and only give one peer every now
2782and then to the downloading torrent. libtorrent will loop over the
2783downloading torrents to connect a peer each, and every n:th
2784connection attempt, a finished torrent is picked to be allowed to
2785connect to a peer. This setting controls n.
2786
2787.. _max_http_recv_buffer_size:
2788
2789.. raw:: html
2790
2791	<a name="max_http_recv_buffer_size"></a>
2792
2793+---------------------------+------+------------+
2794| name                      | type | default    |
2795+===========================+======+============+
2796| max_http_recv_buffer_size | int  | 4*1024*204 |
2797+---------------------------+------+------------+
2798
2799the max number of bytes to allow an HTTP response to be when
2800announcing to trackers or downloading .torrent files via the
2801``url`` provided in ``add_torrent_params``.
2802
2803.. _max_retry_port_bind:
2804
2805.. raw:: html
2806
2807	<a name="max_retry_port_bind"></a>
2808
2809+---------------------+------+---------+
2810| name                | type | default |
2811+=====================+======+=========+
2812| max_retry_port_bind | int  | 10      |
2813+---------------------+------+---------+
2814
2815if binding to a specific port fails, should the port be incremented
2816by one and tried again? This setting specifies how many times to
2817retry a failed port bind
2818
2819.. _alert_mask:
2820
2821.. raw:: html
2822
2823	<a name="alert_mask"></a>
2824
2825+------------+------+---------+
2826| name       | type | default |
2827+============+======+=========+
2828| alert_mask | int  | int     |
2829+------------+------+---------+
2830
2831a bitmask combining flags from alert_category_t defining which
2832kinds of alerts to receive
2833
2834.. _out_enc_policy:
2835
2836.. _in_enc_policy:
2837
2838.. raw:: html
2839
2840	<a name="out_enc_policy"></a>
2841	<a name="in_enc_policy"></a>
2842
2843+----------------+------+---------------------------+
2844| name           | type | default                   |
2845+================+======+===========================+
2846| out_enc_policy | int  | settings_pack::pe_enabled |
2847+----------------+------+---------------------------+
2848| in_enc_policy  | int  | settings_pack::pe_enabled |
2849+----------------+------+---------------------------+
2850
2851control the settings for incoming and outgoing connections
2852respectively. see enc_policy enum for the available options.
2853Keep in mind that protocol encryption degrades performance in
2854several respects:
2855
28561. It prevents "zero copy" disk buffers being sent to peers, since
2857   each peer needs to mutate the data (i.e. encrypt it) the data
2858   must be copied per peer connection rather than sending the same
2859   buffer to multiple peers.
28602. The encryption itself requires more CPU than plain bittorrent
2861   protocol. The highest cost is the Diffie Hellman exchange on
2862   connection setup.
28633. The encryption handshake adds several round-trips to the
2864   connection setup, and delays transferring data.
2865
2866.. _allowed_enc_level:
2867
2868.. raw:: html
2869
2870	<a name="allowed_enc_level"></a>
2871
2872+-------------------+------+------------------------+
2873| name              | type | default                |
2874+===================+======+========================+
2875| allowed_enc_level | int  | settings_pack::pe_both |
2876+-------------------+------+------------------------+
2877
2878determines the encryption level of the connections. This setting
2879will adjust which encryption scheme is offered to the other peer,
2880as well as which encryption scheme is selected by the client. See
2881enc_level enum for options.
2882
2883.. _inactive_down_rate:
2884
2885.. _inactive_up_rate:
2886
2887.. raw:: html
2888
2889	<a name="inactive_down_rate"></a>
2890	<a name="inactive_up_rate"></a>
2891
2892+--------------------+------+---------+
2893| name               | type | default |
2894+====================+======+=========+
2895| inactive_down_rate | int  | 2048    |
2896+--------------------+------+---------+
2897| inactive_up_rate   | int  | 2048    |
2898+--------------------+------+---------+
2899
2900the download and upload rate limits for a torrent to be considered
2901active by the queuing mechanism. A torrent whose download rate is
2902less than ``inactive_down_rate`` and whose upload rate is less than
2903``inactive_up_rate`` for ``auto_manage_startup`` seconds, is
2904considered inactive, and another queued torrent may be started.
2905This logic is disabled if ``dont_count_slow_torrents`` is false.
2906
2907.. _proxy_type:
2908
2909.. raw:: html
2910
2911	<a name="proxy_type"></a>
2912
2913+------------+------+---------------------+
2914| name       | type | default             |
2915+============+======+=====================+
2916| proxy_type | int  | settings_pack::none |
2917+------------+------+---------------------+
2918
2919proxy to use. see proxy_type_t.
2920
2921.. _proxy_port:
2922
2923.. raw:: html
2924
2925	<a name="proxy_port"></a>
2926
2927+------------+------+---------+
2928| name       | type | default |
2929+============+======+=========+
2930| proxy_port | int  | 0       |
2931+------------+------+---------+
2932
2933the port of the proxy server
2934
2935.. _i2p_port:
2936
2937.. raw:: html
2938
2939	<a name="i2p_port"></a>
2940
2941+----------+------+---------+
2942| name     | type | default |
2943+==========+======+=========+
2944| i2p_port | int  | 0       |
2945+----------+------+---------+
2946
2947sets the i2p_ SAM bridge port to connect to. set the hostname with
2948the ``i2p_hostname`` setting.
2949
2950.. _i2p: http://www.i2p2.de
2951
2952.. _cache_size_volatile:
2953
2954.. raw:: html
2955
2956	<a name="cache_size_volatile"></a>
2957
2958+---------------------+------+---------+
2959| name                | type | default |
2960+=====================+======+=========+
2961| cache_size_volatile | int  | 256     |
2962+---------------------+------+---------+
2963
2964this determines the max number of volatile disk cache blocks. If the
2965number of volatile blocks exceed this limit, other volatile blocks
2966will start to be evicted. A disk cache block is volatile if it has
2967low priority, and should be one of the first blocks to be evicted
2968under pressure. For instance, blocks pulled into the cache as the
2969result of calculating a piece hash are volatile. These blocks don't
2970represent potential interest among peers, so the value of keeping
2971them in the cache is limited.
2972
2973.. _urlseed_max_request_bytes:
2974
2975.. raw:: html
2976
2977	<a name="urlseed_max_request_bytes"></a>
2978
2979+---------------------------+------+------------------+
2980| name                      | type | default          |
2981+===========================+======+==================+
2982| urlseed_max_request_bytes | int  | 16 * 1024 * 1024 |
2983+---------------------------+------+------------------+
2984
2985The maximum request range of an url seed in bytes. This value
2986defines the largest possible sequential web seed request. Lower values
2987are possible but will be ignored if they are lower then piece size.
2988This value should be related to your download speed to prevent
2989libtorrent from creating too many expensive http requests per
2990second. You can select a value as high as you want but keep in mind
2991that libtorrent can't create parallel requests if the first request
2992did already select the whole file.
2993If you combine bittorrent seeds with web seeds and pick strategies
2994like rarest first you may find your web seed requests split into
2995smaller parts because we don't download already picked pieces
2996twice.
2997
2998.. _web_seed_name_lookup_retry:
2999
3000.. raw:: html
3001
3002	<a name="web_seed_name_lookup_retry"></a>
3003
3004+----------------------------+------+---------+
3005| name                       | type | default |
3006+============================+======+=========+
3007| web_seed_name_lookup_retry | int  | 1800    |
3008+----------------------------+------+---------+
3009
3010time to wait until a new retry of a web seed name lookup
3011
3012.. _close_file_interval:
3013
3014.. raw:: html
3015
3016	<a name="close_file_interval"></a>
3017
3018+---------------------+------+---------------------+
3019| name                | type | default             |
3020+=====================+======+=====================+
3021| close_file_interval | int  | CLOSE_FILE_INTERVAL |
3022+---------------------+------+---------------------+
3023
3024the number of seconds between closing the file opened the longest
3025ago. 0 means to disable the feature. The purpose of this is to
3026periodically close files to trigger the operating system flushing
3027disk cache. Specifically it has been observed to be required on
3028windows to not have the disk cache grow indefinitely.
3029This defaults to 120 seconds on windows, and disabled on other
3030systems.
3031
3032.. _utp_cwnd_reduce_timer:
3033
3034.. raw:: html
3035
3036	<a name="utp_cwnd_reduce_timer"></a>
3037
3038+-----------------------+------+---------+
3039| name                  | type | default |
3040+=======================+======+=========+
3041| utp_cwnd_reduce_timer | int  | 100     |
3042+-----------------------+------+---------+
3043
3044When uTP experiences packet loss, it will reduce the congestion
3045window, and not reduce it again for this many milliseconds, even if
3046experiencing another lost packet.
3047
3048.. _max_web_seed_connections:
3049
3050.. raw:: html
3051
3052	<a name="max_web_seed_connections"></a>
3053
3054+--------------------------+------+---------+
3055| name                     | type | default |
3056+==========================+======+=========+
3057| max_web_seed_connections | int  | 3       |
3058+--------------------------+------+---------+
3059
3060the max number of web seeds to have connected per torrent at any
3061given time.
3062
3063.. _resolver_cache_timeout:
3064
3065.. raw:: html
3066
3067	<a name="resolver_cache_timeout"></a>
3068
3069+------------------------+------+---------+
3070| name                   | type | default |
3071+========================+======+=========+
3072| resolver_cache_timeout | int  | 1200    |
3073+------------------------+------+---------+
3074
3075the number of seconds before the internal host name resolver
3076considers a cache value timed out, negative values are interpreted
3077as zero.
3078
3079.. _send_not_sent_low_watermark:
3080
3081.. raw:: html
3082
3083	<a name="send_not_sent_low_watermark"></a>
3084
3085+-----------------------------+------+---------+
3086| name                        | type | default |
3087+=============================+======+=========+
3088| send_not_sent_low_watermark | int  | 16384   |
3089+-----------------------------+------+---------+
3090
3091specify the not-sent low watermark for socket send buffers. This
3092corresponds to the, Linux-specific, ``TCP_NOTSENT_LOWAT`` TCP socket
3093option.
3094
3095.. _rate_choker_initial_threshold:
3096
3097.. raw:: html
3098
3099	<a name="rate_choker_initial_threshold"></a>
3100
3101+-------------------------------+------+---------+
3102| name                          | type | default |
3103+===============================+======+=========+
3104| rate_choker_initial_threshold | int  | 1024    |
3105+-------------------------------+------+---------+
3106
3107the rate based choker compares the upload rate to peers against a
3108threshold that increases proportionally by its size for every
3109peer it visits, visiting peers in decreasing upload rate. The
3110number of upload slots is determined by the number of peers whose
3111upload rate exceeds the threshold. This option sets the start
3112value for this threshold. A higher value leads to fewer unchoke
3113slots, a lower value leads to more.
3114
3115.. _upnp_lease_duration:
3116
3117.. raw:: html
3118
3119	<a name="upnp_lease_duration"></a>
3120
3121+---------------------+------+---------+
3122| name                | type | default |
3123+=====================+======+=========+
3124| upnp_lease_duration | int  | 3600    |
3125+---------------------+------+---------+
3126
3127The expiration time of UPnP port-mappings, specified in seconds. 0
3128means permanent lease. Some routers do not support expiration times
3129on port-maps (nor correctly returning an error indicating lack of
3130support). In those cases, set this to 0. Otherwise, don't set it any
3131lower than 5 minutes.
3132
3133.. _max_concurrent_http_announces:
3134
3135.. raw:: html
3136
3137	<a name="max_concurrent_http_announces"></a>
3138
3139+-------------------------------+------+---------+
3140| name                          | type | default |
3141+===============================+======+=========+
3142| max_concurrent_http_announces | int  | 50      |
3143+-------------------------------+------+---------+
3144
3145limits the number of concurrent HTTP tracker announces. Once the
3146limit is hit, tracker requests are queued and issued when an
3147outstanding announce completes.
3148
3149