summaryrefslogtreecommitdiff
blob: 6f10e257d20b28a48944144a7b5fb4c9da57bfe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
[folders]
# DISTFILES_DIR
# Define a dir to store distfiles
# Default:
# distfiles_dir=./distfiles
distfiles_dir=./distfiles

# SEGMENTS_DIR
# Define a dir to store distfiles' segments
# Default:
# segments_dir=./tmp
segments_dir=./tmp

[portage]
# SYNOPSIS: fetch_only=0 | 1
# NOT IMPLEMENTED YET: fetch_only=0

[distfiles]
# MAX_CONNECTION_NUM_PER_DISTFILE
# Each distfile can have up to max_connection_num_per_distfile simultaneous
# connections.
# default:
# max_connection_num_per_distfile=3
max_connection_num_per_distfile=3

[segments]
# MAX_SEGMENT_SIZE
# Define maximum segment size in bytes.
# Default:
# max_segment_size=500000
max_segment_size=adf500000

# SYNOPSIS: resume_on=0 | 1
# - If resume_on set to 1:
# Before starting downloading a segment segget checks whether this segment is 
# already downloaded, checks segments size and if size mathces considers this 
# segment to be downloaded and skips downloading process.
# - If resume_on set to 0:
# Segget always starts new fetch for a segment regardless of the fact whether it
# is downloaded or not.
# Default:
# resume_on=1
resume_on=false

# MAX_TRIES
# If segment download was unsuccessful, new attempts are made. When attempts
# number reaches max_tries, segment gets FAILED status and error logged to error_log
# Default:
# max_tries=10
max_tries=10

[connections]
# MAX_CONNECTIONS
# Define maximum number of connections
max_connections=10

# CONNECTION_TIMEOUT
# Set the number of seconds to wait while trying to connect. Use 0 to wait 
# indefinitely. Pass a long. It should contain the maximum time in seconds that 
# you allow the connection to the server to take. This only limits the connection
# phase, once it has connected, this option is of no more use. Set to zero to 
# disable connection timeout (it will then only timeout on the system's internal 
# timeouts). See also the TIMEOUT option.
# Default:
# connection_timeout=15
connection_timeout=15

# FTP_RESPONSE_TIMEOUT
# Set a timeout period (in seconds) on the amount of time that the server is 
# allowed to take in order to generate a response message for a command before the
# session is considered hung. While awaiting for a response, this value overrides 
# TIMEOUT. It is recommended that if used in conjunction with TIMEOUT, you set 
# FTP_RESPONSE_TIMEOUT to a value smaller than TIMEOUT.
# Default:
# ftp_response_timeout=180
ftp_response_timeout=180

# TIMEOUT
# maximum amount of time to download segment in seconds
# Set the maximum number of seconds for a connection to execute.
# Pass a long as parameter containing the maximum time in seconds that you allow 
# the transfer operation to take. Normally, name lookups can take a considerable 
# time and limiting operations to less than a few minutes risk aborting perfectly
# normal operations.
# Default:
# timeout=500
timeout=500

# LOW_CONNECTION_SPEED_LIMIT
# Define the low speed limit for connection. Pass a long as parameter. It 
# contains the transfer speed in bytes per second that the transfer should be 
# below during LOW_CONNECTION_SPEED_TIME seconds to consider it too slow and abort.
# Default:
# low_connection_speed_limit=1000
low_connection_speed_limit=1000

# LOW_CONNECTION_SPEED_TIME
# Pass a long as parameter. It contains the time in seconds that the transfer 
# should be below the LOW_CONNECTION_SPEED_LIMIT to consider it too slow and abort.
# Default:
# low_connection_speed_time=10
low_connection_speed_time=10

# MAX_CONNECTION_SPEED
# If a download exceeds this speed (counted in bytes per second) on cumulative 
# average during the transfer, the transfer will pause to keep the average rate 
# less than or equal to the parameter value. Defaults to unlimited speed.
# Default:
# max_connection_speed=0
max_connection_speed=3000

# CURRENT_SPEED_TIME_INTERVAL_MSECS
# segget transfers may have bursty nature of their traffic. Therefore, while
# measuring current speed segget actually calculates average speed during
# current_speed_time_interval_msecs, defined in milliseconds.
# Min limit:100
# Max limit: 60000
# Default:
# current_speed_time_interval_msecs=1000
current_speed_time_interval_msecs=3000

# NOT IMPLEMENTED YET: max_total_speed=50000

# BIND INTERFACE / IP
# Pass a string as parameter. This sets the interface name to use as outgoing 
# network interface. The name can be an interface name, an IP address, or a host 
# name. No binding is set by default.
# Default:
# bind_interface=none
bind_interface=none

# BIND LOCALPORT
# Pass a long. This sets the local port number of the socket used for connection.
# This can be used in combination with BIND_INTERFACE and you are recommended to
# use BIND_LOCALPORTRANGE as well when this is set.
# Valid port numbers are 1 - 65535.

# BIND_LOCALPORTRANGE
# Pass a long. This is the number of attempts segget should make to find a 
# working local port number. It starts with the given BIND_LOCALPORT and adds 
# one to the number for each retry. Setting this to 1 or below will make segget 
# do only one try for the exact port number. Port numbers by nature are scarce 
# resources that will be busy at times so setting this value to something too 
# low might cause unnecessary connection setup failures. 

[mirrors]
# MAX_CONNECTIONS_NUM_PER_MIRROR
# Define how many simultaneous downloads from one mirror segget is allowed to 
# have. While choosing a mirror segget will skip mirrors with 
# max_connections_num_per_mirror active downloads.
# Default:
# max_connections_num_per_mirror=1
max_connections_num_per_mirror=1

# SYNOPSIS: collect_benchmark_stats_on=0 | 1
# - If set to 1, stats on mirrors performance will be collected.
# default:
# collect_benchmark_stats_on=1 (Note: at the moment can NOT be changed)
collect_benchmark_stats_on=1

# SYNOPSIS: use_benchmark_stats=0 | 1
# If use_benchmark_stats=1 statistics on mirrors is used to rate them 
# and therefore improve performance.
# Each time connection from a particular mirror closes mirror->dld_time, 
# and mirror->dld_size get increased (in case of unsuccessful connection
# only time gets increased), so avg speed for a mirror can be
# calculated:
# 
#           mirror->avg_speed=mirror->dld_size/mirror->dld_time.       (1)
#
# When new segment is going to be started segget goes through the list of
# the mirrors distfile/segment has, and asks each mirror for self_rating:
#
#          "ulong self_rating=mirror->mirror_on_the_wall();". 
#
# This way segget chooses a mirror with the best self_rating. To calculate 
# self_rating mirrors use the following formula:
#
#               self_rating=dld_time/dld_size*honesty.                 (2)
#
# So mirrors actually say how bad they are.
# Even mirrors can have critical times, so to give mirrors another chance 
# honesty was added to the formula (2). honesty can get values in 
# interval (0,1]. Each time connection from a mirror opens or closes mirror
# sets its honesty=1. If mirror was asked for self_evaluation with 
# mirror->mirror_on_the_wall(), but wasn't chosen its honesty decreases
# somewhat (see [mirror].benchmark_oblivion option), so next time it will 
# lie little bit more about how bad it's.
# Default:
# use_benchmark_results=1
# ***Note: at the moment use_benchmark_results can NOT be set to 0
use_benchmark_stats=1

# BENCHMARK_OBLIVION
# benchmark_oblivion option allows to adjust how fast segget "forgets" 
# benchmarking statistics on mirrors performance. 
# Each time mirror->mirror_on_the_wall() called, mirror decreases its
# honesty (to have more chances next time) using the following formula:
#
#       honesty=honesty*100/(100+settings.benchmark_oblivion)         (3)
#
# Therefore, setting benchmark_oblivion=100 will make mirror look twice
# less bad next time mirror->mirror_on_the_wall() called.
# Default:
# benchmark_oblivion=5
benchmark_oblivion=5

[protocols]
# SYNOPSIS: http_on=0 | 1
# Default: 
# http_on=1
# NOT IMPLEMENTED YET: http_on=1

# SYNOPSIS: ftp_on=0 | 1
# Default: 
# ftp_on=1
# NOT IMPLEMENTED YET: ftp_on=1

[local-mirrors]

[schedule]


[user-data]
# USER_AGENT
# Set the User-Agent: header in the http request sent to the remote server. 
# This can be used to fool servers or scripts.
# Default:
# user_agent=segget
user_agent=segget

# Specify the user and password for authentication on a ftp servers.
# NOT IMPLEMENTED YET: ftp-user=anonymous
# NOT IMPLEMENTED YET: ftp-password=me@mail.ru

[proxy]
# PROXY_IP_OR_NAME
# Specify a proxy to use (address and port).
# Set HTTP proxy to use. The parameter should be a string holding the proxy host
# name or dotted IP address. To specify port number in this string, 
# append :[port] to the end of the host name. The proxy string may be prefixed 
# with [protocol]:// since any such prefix will be ignored. The proxy's port 
# number may optionally be specified with the separate option. If not specified,
# by default port 1080 will be used for proxies.
# When you tell segget to use an HTTP proxy, segget will transparently convert 
# operations to HTTP even if you specify an FTP URL etc.
# Segget respects the environment variables http_proxy, ftp_proxy, all_proxy etc,
# if any of those are set. The PROXY option does however override any possibly 
# set environment variables.
# Default:
# proxy_ip_or_name=none
proxy_ip_or_name=none

# PROXY_PORT
# Set the proxy port to connect to unless it is specified in the PROXY option.
# Default:
# proxy_port=3128
proxy_port=3128

# PROXY_USER
# Set user name to use for the transfer while connecting to Proxy.
# The PROXY_USER option should be used in same way as the PROXY_PASSWORD is used.
# In order to specify the password to be used in conjunction with the user name
# use the PROXY_PASSWORD option.
# Default:
# proxy_user=none
proxy_user=none

# PROXY_PASSWORD
# Set password to use for the transfer while connecting to Proxy.
# The PROXY_PASSWORD option should be used in conjunction with the PROXY_USER 
# option.
# Default:
# proxy_password=none
proxy_password=none

# SYNOPSIS: proxy_off=0 | 1
# Setting the proxy_off=1 will explicitly disable the use of a proxy, even if 
# there is an environment variable set for it.
# Default:
# proxy_off=1
proxy_off=1

[proxy-fetcher]
# Specify proxy-fetcher address and port
# NOT IMPLEMENTED YET: proxy-fetcher-ip=none
# NOT IMPLEMENTED YET: proxy-fetcher-port=none
# Specify the user and password for authentication on a proxy-fetcher-server.
# proxy-fetcher-user=user
# proxy-fetcher-password=password

# Set to forbid direct connections to Internet servers if it's possible to use 
# proxy-fetcher.
# NOT IMPLEMENTED YET: use-proxy-fetcher-demon-if-possible=1
# Set to forbid direct connections to Internet servers.
# NOT IMPLEMENTED YET: use-proxy-fetcher-demon-only=0
# Set to forbid using proxy-fetcher.
# NOT IMPLEMENTED YET: no-proxy-fetcher

[mirroring]
# MIRROR_DIR
# Define a dir to store distfiles for mirroring.
# Default:
# mirror_dir=./mirror
# NOT IMPLEMENTED YET: mirror_dir=./mirror

[logs]
# LOGS_DIR
# Define a dir to store log files.
# Default:
# logs_dir=./logs
logs_dir=./logs

# GENERAL_LOG_FILE
# Define a file name to store general log.
# Default:
# general_log_file=segget.log
general_log_file=segget.log

# ERROR_LOG_FILE
# Define a file name to store error log.
# Default:
# error_log_file=segget.log
error_log_file=error.log

# DEBUG_LOG_FILE
# Define a file name to store debug log.
# Default:
# debug_log_file=segget.log
debug_log_file=debug.log