[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyOptions
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyOptions.ml |
Date: |
Tue, 26 Jul 2005 16:31:42 -0400 |
Index: mldonkey/src/networks/donkey/donkeyOptions.ml
diff -u mldonkey/src/networks/donkey/donkeyOptions.ml:1.27
mldonkey/src/networks/donkey/donkeyOptions.ml:1.28
--- mldonkey/src/networks/donkey/donkeyOptions.ml:1.27 Thu Jul 14 14:05:25 2005
+++ mldonkey/src/networks/donkey/donkeyOptions.ml Tue Jul 26 20:31:40 2005
@@ -24,60 +24,58 @@
let donkey_ini = create_options_file "donkey.ini"
let donkey_section = file_section donkey_ini ["Donkey"] "Donkey options"
-
+
let initial_score = define_expert_option donkey_section ["initial_score"] ""
int_option 5
-
-let max_xs_packets = define_expert_option donkey_section ["max_xs_packets"]
+
+let max_xs_packets = define_expert_option donkey_section ["max_xs_packets"]
"Max number of UDP packets per round for eXtended Search" int_option 30
let max_dialog_history = define_expert_option donkey_section
["max_dialog_history"]
"Max number of messages of Chat remembered" int_option 30
-
+
let donkey_port = define_option donkey_section ["port"] "The port used for
connection by other donkey clients." int_option 4662
-let check_client_connections_delay =
- define_expert_option donkey_section ["check_client_connections_delay"]
+let check_client_connections_delay =
+ define_expert_option donkey_section ["check_client_connections_delay"]
"Delay used to request file sources" float_option 180.0
-
-let check_connections_delay =
- define_expert_option donkey_section ["check_connections_delay"]
+
+let check_connections_delay =
+ define_expert_option donkey_section ["check_connections_delay"]
"The delay between server connection rounds" float_option 5.0
-
+
let max_connected_servers = define_option donkey_section
- ["max_connected_servers"]
+ ["max_connected_servers"]
"The number of servers you want to stay connected to" int_option 3
-let max_udp_sends = define_expert_option donkey_section ["max_udp_sends"]
- "The number of UDP packets you send every check_client_connections_delay"
+let max_udp_sends = define_expert_option donkey_section ["max_udp_sends"]
+ "The number of UDP packets you send every check_client_connections_delay"
int_option 10
let max_server_age = define_expert_option donkey_section ["max_server_age"]
"max number of days after which an unconnected server is removed" int_option 2
-let reliable_sources = define_option donkey_section ["reliable_sources"]
+let reliable_sources = define_option donkey_section ["reliable_sources"]
"Should mldonkey try to detect sources responsible for corruption and ban
them" bool_option true
-let emule_compression = define_option donkey_section ["emule_compression"]
+let emule_compression = define_option donkey_section ["emule_compression"]
"Should mldonkey accept compressed packets from emule" bool_option true
-
-let ban_identity_thieves = define_option donkey_section
["ban_identity_thieves"]
+
+let ban_identity_thieves = define_option donkey_section
["ban_identity_thieves"]
"Should mldonkey try to detect sources masquerading as others and ban them"
bool_option true
-let max_allowed_connected_servers () =
+let max_allowed_connected_servers () =
BasicSocket.mini 5 !!max_connected_servers
-(*
-let local_index_find_cmd = define_expert_option donkey_section
+(*
+let local_index_find_cmd = define_expert_option donkey_section
["local_index_find_cmd"] "A command used locally to find more results
during a search"
string_option "" (* (cmd_basedir ^ "local_index_find") *)
-let local_index_add_cmd = define_expert_option donkey_section
+let local_index_add_cmd = define_expert_option donkey_section
["local_index_add_cmd"] "A command used locally to add new results
to a local index after a search"
string_option "" (* (cmd_basedir ^ "local_index_add") *)
-*)
-
-
+*)
let compute_md4_delay = define_expert_option donkey_section
["compute_md4_delay"]
"The delay between computations of the md4 of chunks"
@@ -86,13 +84,13 @@
let _ =
option_hook compute_md4_delay (fun _ ->
if !!compute_md4_delay < 0.1 then compute_md4_delay =:= 0.1)
-
-let server_black_list = define_option donkey_section
+
+let server_black_list = define_option donkey_section
["server_black_list"] "A list of server IP to remove from server list.
Servers on this list can't be added, and will eventually be removed"
(list_option Ip.option) []
-
-let force_high_id = define_option donkey_section ["force_high_id"]
+
+let force_high_id = define_option donkey_section ["force_high_id"]
"immediately close connection to servers that don't grant a High ID"
bool_option false
@@ -126,34 +124,34 @@
between servers" int_option 1
let walker_server_lifetime = define_expert_option donkey_section
- ["walker_server_lifetime"]
+ ["walker_server_lifetime"]
"The maximal delay a connection with a server should last when walking
through the list (should be greater than become_master_delay)" int_option 300
-
+
(* let max_sources_age = define_expert_option donkey_section
["max_source_age"] "Sources that have not been connected for this number
of days are removed"
int_option 3 *)
-
+
let max_indirect_connections = define_option donkey_section
- ["max_indirect_connections"]
+ ["max_indirect_connections"]
"Maximal number of indirect connections at any moment"
int_option (!!max_opened_connections/2)
-
+
let log_clients_on_console = define_expert_option donkey_section
- ["log_clients_on_console"]
+ ["log_clients_on_console"]
""
bool_option false
let propagate_sources = define_expert_option donkey_section
["propagate_sources"]
"Allow mldonkey to propagate your sources to other donkey clients"
bool_option true
-
+
let max_sources_per_file = define_option donkey_section
["max_sources_per_file"]
"Maximal number of sources for each file"
int_option 20000
-open Md4
-
+open Md4
+
let mldonkey_md4 md4 =
let md4 = Md4.direct_to_string md4 in
md4.[5] <- Char.chr 14;
@@ -165,60 +163,60 @@
let client_md4 = define_option donkey_section ["client_md4"]
"The MD4 of this client" Md4.option (mldonkey_md4 (Md4.random ()))
-
+
let _ =
- option_hook client_md4 (fun _ ->
+ option_hook client_md4 (fun _ ->
let m = mldonkey_md4 !!client_md4 in
if m <> !!client_md4 then
client_md4 =:= m)
let black_list = define_expert_option donkey_section ["black_list"]
"" bool_option true
-
-let port_black_list = define_expert_option donkey_section
+
+let port_black_list = define_expert_option donkey_section
["port_black_list"] "A list of ports that specify servers to remove
from server list. Servers with ports on this list can't be added, and
will eventually be removed"
(list_option int_option) []
-
-let queued_timeout =
- define_expert_option donkey_section ["queued_timeout"]
+
+let queued_timeout =
+ define_expert_option donkey_section ["queued_timeout"]
"How long should we wait in the queue of another client"
- float_option 1800.
-
-let upload_timeout =
- define_expert_option donkey_section ["upload_timeout"]
+ float_option 1800.
+
+let upload_timeout =
+ define_expert_option donkey_section ["upload_timeout"]
"How long can a silent client stay in the upload queue"
- float_option 1800.
-
-let upload_lifetime =
- define_expert_option donkey_section ["upload_lifetime"]
+ float_option 1800.
+
+let upload_lifetime =
+ define_expert_option donkey_section ["upload_lifetime"]
"How long a downloading client can stay in my upload queue (in minutes >5)"
- int_option 90
-
-let dynamic_upload_lifetime =
- define_expert_option donkey_section ["dynamic_upload_lifetime"]
+ int_option 90
+
+let dynamic_upload_lifetime =
+ define_expert_option donkey_section ["dynamic_upload_lifetime"]
"Each client upload lifetime depends on download-upload ratio"
- bool_option false
-
-let dynamic_upload_threshold =
- define_expert_option donkey_section ["dynamic_upload_threshold"]
+ bool_option false
+
+let dynamic_upload_threshold =
+ define_expert_option donkey_section ["dynamic_upload_threshold"]
"Uploaded zones (1 zone = 180 kBytes) needed to enable the dynamic upload
lifetime"
int_option 10
-let random_order_download =
- define_option donkey_section ["random_order_download"]
+let random_order_download =
+ define_option donkey_section ["random_order_download"]
"Should we try to download chunks in random order (false = linearly) ?"
bool_option true
-
-let connected_server_timeout =
+
+let connected_server_timeout =
define_expert_option donkey_section ["connected_server_timeout"]
"How long can a silent server stay connected"
float_option 1800.
-
+
let upload_power = define_expert_option donkey_section ["upload_power"]
"The weight of upload on a donkey connection compared to upload on other
- peer-to-peer networks. Setting it to 5 for example means that a donkey
+ peer-to-peer networks. Setting it to 5 for example means that a donkey
connection will be allowed to send 5 times more information per second than
an Open Napster connection. This is done to favorise donkey connections
over other networks, where upload is less efficient, without preventing
@@ -231,35 +229,40 @@
let min_left_servers = define_expert_option donkey_section ["min_left_servers"]
"Minimal number of servers remaining after remove_old_servers"
int_option 20
-
+
let servers_walking_period = define_expert_option donkey_section
["servers_walking_period"]
"How often should we check all servers (minimum 4 hours, 0 to disable)"
int_option 6
-
+
let _ =
option_hook servers_walking_period (fun _ ->
if !!servers_walking_period > 0 &&
!!servers_walking_period < 4 then
servers_walking_period =:= 4)
-
+
let keep_cancelled_in_old_files = define_expert_option donkey_section
- ["keep_cancelled_in_old_files"]
+ ["keep_cancelled_in_old_files"]
"Are the cancelled files added to the old files list to prevent
re-download ?"
bool_option false
-
+
+let keep_downloaded_in_old_files = define_expert_option donkey_section
+ ["keep_downloaded_in_old_files"]
+ "Are the downloaded files added to the old files list to prevent
re-download ?"
+ bool_option false
+
let send_warning_messages = define_expert_option donkey_section
["send_warning_messages"] "true if you want your mldonkey to lose some
upload bandwidth sending messages to clients which are banned :)"
bool_option false
-
+
let ban_queue_jumpers = define_expert_option donkey_section
["ban_queue_jumpers"] "true if you want your client to ban
clients that try queue jumping (3 reconnections faster than 9 minutes)"
bool_option true
-
+
let use_server_ip = define_expert_option donkey_section
["use_server_ip"] "true if you want your client IP to be set from servers
ID" bool_option true
-
+
let ban_period = define_expert_option donkey_section
["ban_period"] "Set the number of hours you want client to remain banned"
int_option 1
@@ -268,49 +271,46 @@
["good_client_rank"]
"Set the maximal rank of a client to be kept as a client"
int_option 500
-
+
let min_users_on_server = define_option donkey_section ["min_users_on_server"]
"min connected users for each server" int_option 0
-let login = define_option donkey_section ["login"]
+let login = define_option donkey_section ["login"]
"login of client on eDonkey network (nothing default to global one)"
string_option ""
let overnet_options_section_name = "Overnet"
let overnet_section = file_section donkey_ini [ overnet_options_section_name ]
- "Overnet options"
+ "Overnet options"
-let overnet_port =
- define_option overnet_section [overnet_options_section_name; "port"]
- "port for overnet"
+let overnet_port =
+ define_option overnet_section [overnet_options_section_name; "port"]
+ "port for overnet"
int_option (2000 + Random.int 20000)
-
-
-
+
(* let source_management = define_expert_option donkey_section
["source_management"] "Which source management to use:
1: based on separate time queues, shared by files (2.02-1...2.02-5)
2: based on unified queues with scores, shared by files (2.02-6...2.02-9)
3: based on separate file queues (2.02-10)
" int_option 3 *)
-
-let sources_per_chunk =
+
+let sources_per_chunk =
define_expert_option donkey_section ["sources_per_chunk"]
"How many sources to use to download each chunk"
int_option 3
-
(* This option is used to avoid the delay when connecting to a server before
sending the list of shared files, which is only sent to master servers. *)
-let immediate_master =
- define_expert_option donkey_section ["immediate_master"]
+let immediate_master =
+ define_expert_option donkey_section ["immediate_master"]
"(only for development tests)" bool_option false
-let become_master_delay =
- define_expert_option donkey_section ["become_master_delay"]
+let become_master_delay =
+ define_expert_option donkey_section ["become_master_delay"]
"(only for development tests)" int_option 120
-let gui_donkey_options_panel =
+let gui_donkey_options_panel =
[
(* "Maximal Source Age", shortname max_sources_age, "T"; *)
"Maximal Server Age", shortname max_server_age, "T";
@@ -325,9 +325,9 @@
"Max Sources Per Download", shortname max_sources_per_file, "T";
"Port", shortname donkey_port, "T";
"Login", shortname login, "T";
- "Download Chunks in Random order", shortname random_order_download, "B";
+ "Download Chunks in Random order", shortname random_order_download, "B";
"Sources Per Chunk", shortname sources_per_chunk, "T";
"Prevent Re-download of Cancelled Files", shortname
keep_cancelled_in_old_files, "B";
+ "Prevent Re-download of Downloaded Files", shortname
keep_downloaded_in_old_files, "B";
"Dynamic Slot Allocation", shortname dynamic_slots, "B";
]
-