AhFei

AhFei

简洁的写作需要勇气

UpdateFetch - GitHub & F-Droid Software Version Update Regular Check and Download

UpdateFetch can check software on platforms such as GitHub and F-Droid based on user settings, download updates, and provide links for easy sharing and downloading of software in special network environments. It works in conjunction with UpdateFetchWeb for a more convenient experience. You can visit the demo webpage here: UpdateFetch Web (vfly2.com)

Project repository: AhFeil/UpdateFetch: Regularly check and download the latest version of software for easy sharing and downloading in special network environments (github.com)

The motivation behind creating this project was the need to use a serverstatus probe on domestic machines behind the "Great Firewall" in China, which requires a VPN. Although manual uploading is possible, it is inconvenient to write scripts. Later, it was discovered that this project also makes it convenient to share useful apps on GitHub with others, allowing them to easily update their software. Therefore, UpdateFetchWeb was developed as the front-end.

image

Features#

  1. Convenient direct software downloads in China, such as xray and serverstatus-rust, without the need for a proxy every time.
  2. Convenient software sharing for regular users, as well as easy updates for them, such as Bitwarden and Element.

Usage#

First, install: Installation steps for UpdateFetch, which checks and downloads the latest version of software (vfly2.com)

Then, configure your own download items so that the program will check and update them daily.

Download Item Configuration File#

For easy management, this project will rename the downloaded files in the format: software-name-system-architecture-version.extension, with each part connected by a -. Therefore, the software name cannot contain - as it will cause errors in the program.


GitHub website release downloads

This project was initially inspired by a shell script for automatically downloading the latest version on Linux, so the GitHub downloader is based on this script's idea.

# Using xray as an example
xray_binary:   # Download item name, a directory with the same name will be created during upload; also used by the downloader
  name: xray   # Software name, used to rename the downloaded file, recommended to be all lowercase and without -
  website: github   # Which downloader to use
  project_name: XTLS/Xray-core
  sample_url: https://github.com/XTLS/Xray-core/releases/download/${tag}/Xray-${system}-${ARCHITECTURE}${suffix_name}   # Download link in the release, ${} will be replaced with actual values during download
  system:   # Which systems the software should be downloaded for, the left side is the standard name used for renaming, in the list on the right, the left item should be filled in the sample_url, and the right item is the corresponding extension
    windows: [windows, .zip]
    linux: [linux, .zip]
  architecture:   # Which architectures the software should be downloaded for, the left side is the standard name used for renaming, and the right side is what should be filled in the sample_url
    arm64: arm64-v8a
    amd64: '64'

# Finally, the downloader will generate 4 download links and download them. Assuming the latest version is v1.8.7, the 4 URLs will be
# https://github.com/XTLS/Xray-core/releases/download/v1.8.7/Xray-windows-arm64-v8a.zip
# https://github.com/XTLS/Xray-core/releases/download/v1.8.7/Xray-windows-64.zip
# https://github.com/XTLS/Xray-core/releases/download/v1.8.7/Xray-linux-arm64-v8a.zip
# https://github.com/XTLS/Xray-core/releases/download/v1.8.7/Xray-linux-64.zip

FDroid downloads

SchildChat:
  name: schildchat
  website: fdroid
  project_name: de.spiritcroc.riotx   # The last part of the software's page on the FDroid website is used here
  # Since all apps on FDroid are for the Android platform, the system does not need to be specified
  architecture:
    arm64: arm64-v8a

Installing UpdateFetchWeb#

Project repository: AhFeil/updatefetchWeb: Display the content downloaded by UpdateFetch on a webpage for easy use. updatefetchWeb is the front-end of UpdateFetch. (github.com)

UpdateFetch is only used for downloading and does not have a user interface. UpdateFetchWeb displays the downloaded content on a webpage for easy use. Demo webpage: UpdateFetch Web (vfly2.com)

To add the front-end webpage, a few additional steps are required:

  1. Install UpdateFetchWeb and add users, categories, and tokens.
  2. In the UpdateFetch configuration file, fill in the token and URL from the previous step.
  3. Run UpdateFetch to automatically send the update information to the webpage.

Installation process: Installation steps for updatefetchWeb (vfly2.com)


In addition, UpdateFetchWeb has a more practical feature that automatically redirects to the download URL of the latest version in a certain format.

For example, to obtain the file for xray on the Windows platform with the AMD64 architecture, you can directly access http://ip:7699/xray-win-amd64, and this program will redirect to the latest URL.

The format is: software-name-system-architecture, where the software name must be the first part. There are aliases for the system and architecture. For example, Windows can be filled as win or windows. Please refer to the settings.py file for specific settings.

Example with a bash script:

url="http://updatefetch.vfly2.com/xray-linux-arm64"
# Get the final redirected URL
redirect_url=$(curl -Ls -o /dev/null -w %{url_effective} $url)
# Download the file
curl -LO "$redirect_url"
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.