Network#
Process#
- First, I read How to make Alibaba Cloud server in China download Github code at high speed, but it is purely command line and uses pm2.
- Because the latency is quite high, I wanted to switch nodes. First, I researched how to do it using the command line. It is indeed possible, as explained in Switching nodes using Clash-API, but it didn't work when I tried it. It returned
{"message":"Body invalid"}
. I saw that someone else raised the same issue, but I still couldn't successfully make the change. Moreover, it would be quite troublesome to make changes like this. So, I thought about creating a UI for it. - Then, I referred to How to use Clash elegantly on Linux. Docker made the configuration much simpler. But I still encountered some problems: mainly because I was being clever and modified
- ./config.yaml:/root/.config/clash/config.yaml
- ./Country.mmdb:/root/.config/clash/Country.mmdb
I realized after debugging that there was no need to modify them. Another issue was that when configuring external-controller: :9090
, I mistakenly changed it to 127.0.0.1:9090
.
- The above article missed the step of exposing the interface. How to configure terminal proxy for laboratory server and Several methods to make the terminal go through a proxy in Linux explained it well.
Takeaways#
- Learned how to write configuration files.
- Learned how to check if in proxy state:
curl cip.cc
, but the address I received was different from the actual node I was using.
Reference links#
- Switching nodes using Clash-API
- Changing node proxy through RESTful API returns {"message":"Body invalid"}
- How to make Alibaba Cloud server in China download Github code at high speed
- How to use Clash elegantly on Linux
- How to configure terminal proxy for laboratory server
- Several methods to make the terminal go through a proxy in Linux
- Configuration