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 according to user settings, download updates, and provide links for easy sharing and downloading of software in special network environments. It is more convenient to use with UpdateFetchWeb. You can go to the demo website to experience it: UpdateFetch Web (vfly2.com)

Project address: AhFeil/UpdateFetch: Regularly check and download the latest version of software, making it easy to share and download software in special network environments (github.com)

The motivation for creating this project is that under the "Great Firewall," domestic machines need a VPN to install a server status probe. Although it can be manually uploaded, it is inconvenient to write a script. Later, it was discovered that this project is also convenient for sharing useful apps on GitHub with others, making it easy for them to update software. Therefore, UpdateFetchWeb was developed as the front end.

image

Features#

  1. Convenient for directly downloading software in China, such as xray and serverstatus-rust, without the need for a proxy every time.
  2. Convenient for sharing software with general users and facilitating their updates, such as Bitwarden and Element.

Usage#

First, install: Deployment process of the latest version of UpdateFetch for checking and downloading software (vfly2.com)

Then write your own download items so that the program will check and update them every day.

Download item configuration file#

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


GitHub website release download

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 idea.

# Taking xray as an example
xray_binary:   # Name of the download item, when uploaded, a directory with the same name will be created; and it will be used in the downloader
  name: xray   # Software name, used to rename the downloaded file, recommended to be all lowercase, cannot contain -
  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, ${} wrapped 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 actually filled in the sample_url, and the right side 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 actually filled in the sample_url
    arm64: arm64-v8a
    amd64: '64'

# Finally, the downloader will combine 4 download links and download them. Assuming the latest version found is v1.8.7, the 4 URLs are:
# 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 download

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

Install UpdateFetchWeb#

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

UpdateFetch is only used for downloading and does not have a user-interactive interface, while UpdateFetchWeb displays the content it downloads on a web page for easy use. Demo website: UpdateFetch Web (vfly2.com)

Adding a front-end webpage requires a few additional steps:

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

Installation process: Installation process of updatefetchWeb (vfly2.com)


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

For example, to get the file of xray for the Windows platform and 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. There are aliases for the system and architecture. Windows can be filled with 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.