noseeflower
  • 技术杂谈
    • linux使用clash
  • Appium
    • Appium安装与环境配置
    • python运行和模拟器配置
    • Appium Inspector与元素定位
  • bug-hunter
    • 文件上传漏洞
Powered by GitBook
On this page
  • 首先第一步更新系统
  • 下载clash
  • 设置配置文件
  • 在服务器中
  1. 技术杂谈

linux使用clash

首先第一步更新系统

sudo apt-get update

下载clash

新建一个目录来存放clash

mkdir clash

随后进入目录

cd clash

下载clash

请务必根据自己的系统来灵活调整下载的版本,查询系统详情的命令为uname -a

wget https://github.com/doreamon-design/clash/releases/download/v2.0.24/clash_2.0.24_linux_amd64.tar.gz

解压

#注意活用tab键补齐
tar -zxvf clash_2.0.24_linux_amd64.tar.gz

重命名方便使用

mv clash_2.0.24_linux_amd64.tar.gz clash

赋予clash可执行权限

chmod 777 clash

设置配置文件

#订阅链接请自行替换,另外curl获取的链接一定要加上引号
curl -f "订阅链接" >> config.yaml

成功后会在当前目录生成一个config.yaml文件

运行以下命令启动clash

#运行的时候会使用当前文件夹的config.yaml文件
./clash -d ./

命令运行时会自动配置所需文件,需要等待一会儿

设置命令行代理

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890
#访问下google看看是否有返回
curl "www.google.com"

取消命令行代理

unset http_proxy
unset https_proxy

在服务器中

可以配合screen命令进行使用

#下载screen
apt-get install screen

#创建一个screen,clash这个字段可自行替换
screen -S clash

现在我们就能在一个单独的窗口运行clash

想要退出screen让它在后台运行,按下Ctrl+A+D即可

#再回到screen界面
screen -r clash

想要删除screen,进入想要删除的screen中,按下Ctrl+D

NextAppium安装与环境配置

Last updated 7 months ago