Briefly
When using QT's Maintenancetool program to update online, there is a problem, that is download.qt.io , access is too slow, always fail. So want to use the domestic mirror station to update.
Using QT's Mirror station method is also very simple, download Update.xml and Update_orig.xml back, and then modify the inside url can, this online has a lot of tutorials.
But this method is not very useful, but also need to manually download some metadata files back.
Recently in the study of Traefik, so it was used to do a simple proxy forwarding, to achieve the purpose of accelerating.
Traefik Introduction
Tr?f?k is a modern HTTP reverse proxy, load Balancing tool that is created to make deploying microservices more convenient. It supports a variety of backgrounds (Docker, Swarm, Kubernetes, Marathon, Mesos, Consul, Etcd, Zookeeper, Boltdb, Rest API, file ...) to automate and dynamically apply its profile settings.
About the introduction of Traefik, online information is not many, you can see its official website and a domestic site
- Official website https://traefik.io/
- Domestic station http://traefik.cn/
Agent Setup specific procedures
1. Download Traefik Program
This can go to GitHub to download the source code back to their own, but also can be directly downloaded compiled files. Because Traefik is compiled using the Go language, all dependencies are within a program, with no messy dependencies.
Release version https://github.com/containous/traefik/releases
2, write the configuration file, add the front and back to configure the agent.
I use the mirror station of Tsinghua University, the speed is relatively fast. Address: https://mirrors.tuna.tsinghua.edu.cn/qt/
Once the configuration file is written, it can be run directly.
./traefik --c config.toml
How to write the configuration file, you can crossing the online documents. If you need Chinese, you can also see here http://docs.traefik.cn/basics
The configuration file is as follows:
# entry point [entrypoints] # HTTP entry point, only HTTP is enough [entrypoints.http] address = ": 80" # Use 80 port, so useful after # Admin interface listening port [web] Address = ": 8012" [web.statistics] reccenterror = 10# profile monitoring (changes without restarting the service program, automatically updated) [File]filename = "./config.toml" Watch = true# Backend server definition [backends] # define backend, here I directly use the name of the tuna [Backends.tuna] # Setting the maximum number of connections, in fact can not set [Backends.tuna.maxconn] Amount = Extractorfunc = "Request.host" # backend server, you can add multiple [backends.tuna.servers.server1] urls = "https://mirrors-i.tuna.tsinghua.edu.cn" # The URL of the Tsinghua Mirror station is used here weight = 10 # front-end forwarding rule definition [frontends] # defines a front end that you access TR Eafik the entry point, the rule used to determine how to forward [Frontends.tuna] # This front end forwards to the back end backend = "Tuna" Passhostheader = false # Here cannot be true, otherwise forwarding will be an unhealthy redirect, causing the server to return an error # routing rule, or multiple [frontends.tuna.routes.test_1] rule = "ADDPREFIX:/QT" # to add a prefix, that is, access At the entry point, add a prefix to the path inside the URL/qt to access the backend # such as access to Http://127.0.0.1/online/qtsdkrepository/wind Ows_x86/android/ # then it will be forwarded to the backend https://mirrors-i.tuna.tsinghua.edu.cn/qt/online/qtsdkrepository/windows_x86 /android/
3, modify the Hosts file, the download.qt.io resolution to the ' 127.0.0.1.
4, finish the above steps, you can visit directly in the browser download.qt.io to see if it is normal.
Then use the Maintenancetool program in the QT installation directory directly to upgrade the update.
Note that the source of the use of Zhong Ke, because the file is not complete, the following problems may occur, the source of bjtu can not be used, it is empty inside, just a fake. The source of the use of Tsinghua is no problem.
Use Træf?k (Traefik) to accelerate QT online updates