Network#
Process#
- First, I looked at how to make the Alibaba Cloud server in China download Github code at high speed, but this is pure command line, using pm2.
- Because the latency is relatively high, I want to switch nodes. First, I studied how to implement it using the command line. It can indeed be done. Switching nodes using Clash-API has an introduction, but it doesn't work when I try to operate it. It returns
{"message":"Body invalid"}
. I saw that someone else raised an issue, but I still couldn't successfully make the change. It's quite troublesome to make changes like this. So I thought about whether I could create a UI. - Then, referring to how to use Clash elegantly on Linux, Docker made these configurations much simpler. But I still encountered some problems: mainly because I was too clever and modified
- ./config.yaml:/root/.config/clash/config.yaml
- ./Country.mmdb:/root/.config/clash/Country.mmdb
After debugging, I found that there was no need to modify them. Another issue was that when configuring external-controller: :9090
, I changed it to 127.0.0.1:9090
by myself.
- The above article missed the step of exposing the interface. How to configure terminal proxy for the laboratory server, Several methods to make the terminal go through a proxy in Linux, these two articles explain it well.
Gains#
- Learned how to write configuration files.
- Learned how to check if in proxy state:
curl cip.cc
, but the address obtained is different from the node I actually use.
Reference Links#
- Switching nodes using Clash-API
- Changing node proxy through RESTful API returns {"message":"Body invalid"}
- How to make the Alibaba Cloud server in China download Github code at high speed
- How to use Clash elegantly on Linux
- How to configure terminal proxy for the laboratory server
- Several methods to make the terminal go through a proxy in Linux
- Configuration