summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add try...catch blocks and correct default settings in .conf filesHEADmasterKostyantyn Ovechko2010-08-165-317/+376
|
* Move example from net0.py to net0_example.pyKostyantyn Ovechko2010-08-162-12/+16
|
* Erase deprecated lines in Makefile filesKostyantyn Ovechko2010-08-163-30/+0
|
* Resize webui imagesKostyantyn Ovechko2010-08-1610-0/+0
|
* Add show_help() function to tuiclientKostyantyn Ovechko2010-08-164-9/+25
|
* Add try...catch blocks to a few functions in request toolKostyantyn Ovechko2010-08-164-137/+69
|
* Add show_help() function and remove deprecated code lines.Kostyantyn Ovechko2010-08-1618-474/+243
|
* Fix pkgconfig problem with libcrypto++, and rename segget.* to seggetd.*Kostyantyn Ovechko2010-08-1411-34/+35
|
* Move /tmp folders/files to /var/tmpKostyantyn Ovechko2010-08-1478-290/+0
|
* Add arguments to request tool: --help, --keep-pkglist-file.Kostyantyn Ovechko2010-08-147-73/+92
| | | | | --help Show the help. --keep-pkglist-file Do NOT delete pkg.list file after sending request to segget daemon.
* Add install option to MakefilesKostyantyn Ovechko2010-08-1211-32/+57
| | | | +Fix pathes by default
* Adjust default folders.Kostyantyn Ovechko2010-08-1211-69/+26
| | | | | | | | | | | | | By default segget daemon will use the following folders for its files: /etc/seggetd - for config files for seggetd, tuiclient and request tool /usr/bin - binary files: seggetd, tuiclient, request /usr/share/seggetd/scripts - for user-side python script files /usr/share/seggetd/webui - for webui files /tmp/seggetd/pkg.list - to save distfile list generated by portage and parse it by request tool to segget daemon /tmp/seggetd/segments - to store segments /usr/portage/distfiles - to store ready to use distfiles /var/log/seggetd - to store log files
* Fix tuiclient scrollwindow when there're no lines.Kostyantyn Ovechko2010-08-124-10/+17
|
* Add [colors] section to tuiclient.conf fileKostyantyn Ovechko2010-08-1113-36/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [colors] Define color scheme for tuiclient. Avaible colors are: COLOR_BLACK COLOR_RED COLOR_GREEN COLOR_YELLOW COLOR_BLUE COLOR_MAGENTA COLOR_CYAN COLOR_WHITE Defaults: when tuiclient connected to seggetd: color_distfile_added_connected_fg=COLOR_WHITE color_distfile_added_connected_bg=COLOR_BLACK color_distfile_waiting_connected_fg=COLOR_BLUE color_distfile_waiting_connected_bg=COLOR_BLACK color_distfile_script_rejected_connected_fg=COLOR_YELLOW color_distfile_script_rejected_connected_bg=COLOR_BLACK color_distfile_downloading_connected_fg=COLOR_CYAN color_distfile_downloading_connected_bg=COLOR_BLACK color_distfile_downloaded_connected_fg=COLOR_GREEN color_distfile_downloaded_connected_bg=COLOR_BLACK color_distfile_failed_connected_fg=COLOR_RED color_distfile_failed_connected_bg=COLOR_BLACK color_distfiles_window_connected_fg=COLOR_WHITE color_distfiles_window_connected_bg=COLOR_BLACK color_scroll_window_connected_fg=COLOR_GREEN color_scroll_window_connected_bg=COLOR_BLACK color_downloads_connected_fg=COLOR_WHITE color_downloads_connected_bg=COLOR_BLACK color_info_connected_fg=COLOR_BLACK color_info_connected_bg=COLOR_CYAN color_status_connected_fg=COLOR_GREEN color_status_connected_bg=COLOR_BLACK when tuiclient disconnected from seggetd: color_distfile_added_disconnected_fg=COLOR_WHITE color_distfile_added_disconnected_bg=COLOR_BLACK color_distfile_waiting_disconnected_fg=COLOR_WHITE color_distfile_waiting_disconnected_bg=COLOR_BLACK color_distfile_script_rejected_disconnected_fg=COLOR_WHITE color_distfile_script_rejected_disconnected_bg=COLOR_BLACK color_distfile_downloading_disconnected_fg=COLOR_WHITE color_distfile_downloading_disconnected_bg=COLOR_BLACK color_distfile_downloaded_disconnected_fg=COLOR_WHITE color_distfile_downloaded_disconnected_bg=COLOR_BLACK color_distfile_failed_disconnected_fg=COLOR_WHITE color_distfile_failed_disconnected_bg=COLOR_BLACK color_distfiles_window_disconnected_fg=COLOR_WHITE color_distfiles_window_disconnected_bg=COLOR_BLACK color_scroll_window_disconnected_fg=COLOR_WHITE color_scroll_window_disconnected_bg=COLOR_BLACK color_downloads_disconnected_fg=COLOR_BLACK color_downloads_disconnected_bg=COLOR_WHITE color_info_disconnected_fg=COLOR_WHITE color_info_disconnected_bg=COLOR_BLACK color_status_disconnected_fg=COLOR_BLACK color_status_disconnected_bg=COLOR_RED
* Fix warnings: unused return value.Kostyantyn Ovechko2010-08-115-15/+24
|
* Replace tuiclient argument: --wait-distfile=df_name by ↵Kostyantyn Ovechko2010-08-108-48/+148
| | | | | | | --wait-distfiles=df_name1,df_name2,...,df_nameN Tuiclient waits until all distfiles are downloaded. If at least one of the specified distfiles is not in the queue tuiclient will exit immediately.
* Replace default folders.Kostyantyn Ovechko2010-08-1011-44/+77
| | | | | | | distfiles_dir=/usr/portage/distfiles segments_dir=/tmp/seggetd/segments scripts_dir=/usr/share/seggetd/scripts logs_dir=/var/log/seggetd
* Replace <meta http-equiv=\"refresh\" content=\"1\" > in WebUI by ↵Kostyantyn Ovechko2010-08-103-215/+276
| | | | XMLHttpRequest()
* Add statistics to WebUI: general stats, and stats for mirrors.Kostyantyn Ovechko2010-08-0815-30/+155
|
* Replace img alt=text with <td bgcolor=#XXXXXX> in WebUI.Kostyantyn Ovechko2010-08-072-19/+28
|
* Add RSS feed to seggetdKostyantyn Ovechko2010-08-078-5/+162
| | | | | | | | | | | | | | | | | | | | | | | | PROVIDE_MIRROR_TO_OTHERS_URL Specify url to the provided mirror. This option is used to generate rss feed. By default UI_IP is used for this. Default: provide_mirror_to_others_url=ui_ip [rss] RSS feed provides information on the files added (symlinked) to PROVIDE_MIRROR_DIR and can be accessed from feedreader via http://ui_ip:ui_port/rss.xml RSS_TITLE Specify a title for the RSS feed Default: rss_title=Seggetd feed RSS_DESCRIPTION Specify description for the RSS feed Default: rss_description=Files downloaded by seggetd and provided in the local mirror
* Add WebUI supportKostyantyn Ovechko2010-08-0720-83/+467
| | | | | | | | [ui_server] tuiclient monitors segget's activity by establishing tcp connection with segget daemon (ui_server part of it). Same ip and port are used for WebUI which can be accessed from web browser via http://ui_ip:ui_port/
* Use .o files instead of .cpp in tuiclient.hKostyantyn Ovechko2010-08-0516-27/+106
|
* Fix: scrolling for distfile queue list.Kostyantyn Ovechko2010-08-041-1/+1
|
* Add check if only local networks and proxy_fetcher networks are used and if ↵Kostyantyn Ovechko2010-08-0412-27/+68
| | | | | | all their mirrors failed consider fetching to be failded. In such case distfile should be considered failed, since no other options left.
* Add DSCRIPTREJECTED status for distfiles.Kostyantyn Ovechko2010-08-0419-63/+151
|
* Add --wait-distfile=distfile_name option to cli of tuiclientKostyantyn Ovechko2010-08-0416-105/+478
| | | | tuiclient checks distfile status, and returns when distfile is downloaded or not in the queue.
* Provide more info on distfiles to tuiclients.Kostyantyn Ovechko2010-08-0313-25/+61
| | | | | Provide info on distfiles that are already in the list or just added, but not in progress (not started yet or already downloaded) to ui_server/tui_clients.
* Add distfiles window to tuiclient.Kostyantyn Ovechko2010-08-0324-102/+449
| | | | Distfiles window shows progress on distfile downloads.
* Add [scripting_and_scheduling] section to segget.conf file.Kostyantyn Ovechko2010-07-3017-33/+662
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [scripting_and_scheduling] Segget provides Python scripting functionalyty to support scheduling. Each time segget tries to start a new connection certain network it calls a python script (client.py) to accept or reject this connection and if necessary adjusts its settings. PYTHON_PATH Define path to python Default: python_path=/usr/bin/python SCRIPTS_DIR Define a path to the dir with python scripts. Before establishing connection for a particular segment via network# segget checks SCRIPTS_DIR. If SCRIPTS_DIR contains net#.py file, segget will launch schedule() function from this file to apply settings for connetion and accept or reject this segment for the moment. net#.py file is a python script file with a user-writen schedule() function. It's necessary to import functions before using get("variable"), set("variable",value), accept_segment() and reject_segment() in schedule(). get() function can obtain values for the following variables: connection.num, connection.url, connection.max_speed_limit, network.num, network.mode, network.active_connections_count, distfile.name, distfile.size, distfile.dld_segments_count, distfile.segments_count, distfile.active_connections_count, segment.num, segment.try_num, segment.size, segment.range set() function can change connection.max_speed_limit, see example: -----------------EXAMPLE STARTS----------------- from functions import * import time; def schedule(): localtime = time.localtime(time.time()); hour=localtime[3]; # disable downloading distfiles that have size more than 5 000 000 bytes # from 8-00 to 22-00. if hour>8 and hour<22 and (get("distfile.size"))>5000000: print "reject because distfile is too big" reject_segment() # set speed limit 50 000 cps for distfiles larger than 1 000 000 bytes if get("distfile.size")>1000000: print "limit connection speed" set(connection.max_speed_limit, 50000) accept_segment() -----------------EXAMPLE ENDS----------------- From example above localtime returns following tuple: Index Attributes Values 0 tm_year e.i.: 2008 1 tm_mon 1 to 12 2 tm_mday 1 to 31 3 tm_hour 0 to 23 4 tm_min 0 to 59 5 tm_sec 0 to 61 (60 or 61 are leap-seconds) 6 tm_wday 0 to 6 (0 is Monday) 7 tm_yday 1 to 366 (Julian day) 8 tm_isdst -1, 0, 1, -1 means library determines DST Therefore localtime[3] provides hours. Segment will be accecpted by default if it was neither accepted nor rejected during the schedule() function. sagget saves logs of resulting stdout and stderr in the log folder separatly for each network. Hence, if there's an error in net3.py file python error message would be saved to net3_script_stderr.log. Results of print would be saved in net3_script_stdout.log. Default: scripts_dir=./scripts SCRIPT_SOCKET_PATH Segget uses AF_UNIX domain sockets for communication with python. Specify path for the socket on your filesystem. Default: script_socket_path=/tmp/segget_script_socket
* Add options: GENERAL_LOG_TIME_FORMAT, ERROR_LOG_TIME_FORMAT and ↵Kostyantyn Ovechko2010-07-287-22/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEBUG_LOG_TIME_FORMAT to segget.conf file GENERAL_LOG_TIME_FORMAT Set time format for general log as a string containing any combination of regular characters and special format specifiers. These format specifiers are replaced by the function to the corresponding values to represent the time specified in timeptr. They all begin with a percentage (%) sign, and are: %a Abbreviated weekday name [For example: Thu] %A Full weekday name [For example: Thursday] %b Abbreviated month name [For example: Aug] %B Full month name [For example: August] %c Date and time representation [For example: Thu Aug 23 14:55:02 2001] %d Day of the month (01-31) [For example: 23] %H Hour in 24h format (00-23) [For example: 14] %I Hour in 12h format (01-12) [For example: 02] %j Day of the year (001-366) [For example: 235] %m Month as a decimal number (01-12) [For example: 08] %M Minute (00-59) [For example: 55] %p AM or PM designation [For example: PM] %S Second (00-61) [For example: 02] %U Week number with the first Sunday as the first day of week one (00-53) [For example: 33] %w Weekday as a decimal number with Sunday as 0 (0-6) [For example: 4] %W Week number with the first Monday as the first day of week one (00-53) [For example: 34] %x Date representation [For example: 08/23/01] %X Time representation [For example: 14:55:02] %y Year, last two digits (00-99) [For example: 01] %Y Year [For example: 2001] %Z Timezone name or abbreviation [For example: CDT] %% A % sign [For example: %] For instace general_log_time_format=Time: %m/%d %X Default: general_log_time_format=%m/%d %X ERROR_LOG_TIME_FORMAT Set time format for error log as a string containing any combination of regular characters and special format specifiers. See GENERAL_LOG_TIME_FORMAT for details on format specifiers. Default: error_log_time_format=%m/%d %X DEBUG_LOG_TIME_FORMAT Set time format for debug log as a string containing any combination of regular characters and special format specifiers. See GENERAL_LOG_TIME_FORMAT for details on format specifiers. Default: debug_log_time_format=%m/%d %X
* Show network_type in tui.Kostyantyn Ovechko2010-07-283-72/+34
|
* Add BIND_LOCAL_PORT and BIND_LOCAL_PORT_RANGE options to network#.conf filesKostyantyn Ovechko2010-07-285-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | | BIND_LOCAL_PORT This sets the local port number of the socket used for connection. This option can be used in combination with BIND_INTERFACE and you are recommended to use BIND_LOCAL_PORT_RANGE as well when this is set. Set to 0 - to disable binding. Valid port numbers are 1 - 65535. Minimum value: 0 (no binding) Maximum value: 65535 Default: bind_local_port=0 BIND_LOCAL_PORT_RANGE If BIND_LOCAL_PORT=0 this option will be ignored. This is the number of attempts segget should make to find a working local port number. It starts with the given BIND_LOCAL_PORT 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. Minimum value: 1 Maximum value: 65535 Default: bind_local_port_range=20
* Add option proxy_type to network#.conf filesKostyantyn Ovechko2010-07-287-556/+35
| | | | | | | | | | | | | SYNOPSIS: PROXY_TYPE = 0 | 1 | 2 | 3 | 4 | 5 0 - HTTP 1 - HTTP_1_0 2 - SOCKS4 3 - SOCKS4a 4 - SOCKS5 5 - SOCKS5_HOSTNAME Specify type of the proxy. Default: proxy_type=0
* Add options FOLLOW_LOCATION and MAX_REDIRS to network#.conf filesKostyantyn Ovechko2010-07-286-12/+87
| | | | | | | | | | | | | | | | | | | | | SYNOPSIS: FOLLOW_LOCATION= 0 | 1 A parameter set to 1 tells segget to follow any Location: header that the server sends as part of an HTTP header. This means that the segget will re-send the same request on the new location and follow new Location: headers all the way until no more such headers are returned. MAX_REDIRS can be used to limit the number of redirects segget will follow. Default: follow_location=1 MAX_REDIRS The set number will be the redirection limit. If that many redirections have been followed, the next redirect will cause an error. This option only makes sense if the FOLLOW_LOCATION is used at the same time. Setting the limit to 0 will make segget refuse any redirect. Minimum value: 0 Maximum value: 100 Default: max_redirs=5
* Add CoralCDN supportKostyantyn Ovechko2010-07-2813-30/+101
| | | | | Add option to network#.conf files: [mode]
* Add segments counters to stats and tui.Kostyantyn Ovechko2010-07-273-1/+9
|
* Add log and error_log windows to tuiclientKostyantyn Ovechko2010-07-2718-72/+325
|
* Add command line option --pkglist-file to request applicationKostyantyn Ovechko2010-07-263-65/+68
| | | | | E.i.: $request --pkglist-file=/home/user/mypkg.list
* Check all set checksums, checksums are optionalKostyantyn Ovechko2010-07-264-44/+135
|
* Implement checks for both (proxy_fetcher and request_server) queues.Kostyantyn Ovechko2010-07-265-57/+63
| | | | | | | | | | There're 2 queues: proxy_fetcher queue and request_server queue. Note: Segget processes request_server queue first and if no segment was chosen switches to proxy_fetcher queue. Before adding a distifile to any of the queues it's necessary to check both queues, since distfile may already be in one of them.
* Add request tool.Kostyantyn Ovechko2010-07-2432-116/+2860
| | | | | Request tool reads list of distfiles from ./pkg.list file and requests seggetd daemon to download distfiles from the list.
* Add /etc/init.d/seggetd script to start|stop|restart|status segget daemonKostyantyn Ovechko2010-07-231-0/+90
|
* Add command line arguments: --no-daemon and --conf-dir=specify_conf_dir_hereKostyantyn Ovechko2010-07-234-10/+34
| | | | | Arguments are optional. If no arguments provided, segget will run in a daemon mode and use /etc/seggetd dir to read configuration files.
* Add daemon mode to seggetKostyantyn Ovechko2010-07-232-42/+92
|
* Add explanations for CURL error codes to logs.Kostyantyn Ovechko2010-07-213-9/+23
|
* Separate logging into log.h and log.cpp files. Add option value "none" to ↵Kostyantyn Ovechko2010-07-217-97/+171
| | | | disable logs.
* Add to tui: ETA, AVG speed and active/total connectionsKostyantyn Ovechko2010-07-2112-77/+229
|
* Consider distfile failed if one of its segments is failedKostyantyn Ovechko2010-07-201-1/+2
|
* Fix: error with connection countersKostyantyn Ovechko2010-07-203-15/+31
|