clash
带桌面版本
1. 去github下载Linux版本的clash for windows
- 下载到的文件结构如下:
1
2
3
4LICENSE.electron.txt chrome_100_percent.pak libEGL.so libvulkan.so.1 snapshot_blob.bin
LICENSES.chromium.html chrome_200_percent.pak libGLESv2.so locales v8_context_snapshot.bin
cfw chrome_crashpad_handler libffmpeg.so resources vk_swiftshader_icd.json
chrome-sandbox icudtl.dat libvk_swiftshader.so resources.pak - 其中cfw是clash for windows的缩写
./cfw
就可以运行clash for windows
2. 设置为应用
1 | cd ~/.local/share/applications #个人应用的放置地点 |
clash.desktop的文件信息如下:
1 | [Desktop Entry] |
3. 搜索clash for windows即可
终端版本
1. 去github下载Linux版本的clash-core
2. 解压之后仅有一个文件,要给权限
chmod +x clash
3. 加配置文件
1 | mkdir /opt/clash #将clash可执行文件和yaml文件放在此目录下 |
config.yaml为配置文件,如果不指定,默认配置文件在~/.config/clash
4. 配置为系统服务
1 | vim /etc/systemd/system/clash.service |
clash.service文件内容如下:
1 | [Unit] |
- 启用即可
1
2
3systemctl daemon-reload
systemctl start clash
systemctl status clash
5. 终端上网
How do I use clash proxy wsl in windows?
可以在~/.bashrc
中通过alias
命令进行变量开关定义
1 | alias proxy="export http_proxy=http://127.0.0.1:7890;export https_proxy=http://127.0.0.1:7890" |
记得source ~/.bashrc
6. 下载UI
在/opt/clash
下建一个ui
文件夹,并将文件ui的文件移动到该目录下:
CNAME assets index.html manifest.webmanifest sw.js workbox-e0782b83.js
- 其中index.html即为页面,需要在clash的config.yaml文件中指向一下
- 在
external-controller: 0.0.0.0:9090
的下方添加external-ui: /opt/clash/ui
systemctl restart clash
- 通过
127.0.0.1:9090/ui
访问即可
- 在
docker版本
1 | sudo apt install docker.io |
在docker官网查找镜像dreamacro/clash
1 | docker pull dreamacro/clash |
--name clash
: 名字起做clash-p
: 端口映射-v
: 文件映射dreamacro/clash
: 启动镜像的名字
使用docker logs -f 容器ID
查看日志docker ps
查看可查看容器ID
实验室服务器
1 | # 设置代理 |
References
V2ray
下载 v2ray core的Linux版本,例如
v2ray-linux-64.zip
unzip
其中的v2ray
为可执行文件,config.json
为配置文件,配置文件可以通过v2rayN
的 导出所选服务器为客户端配置 进行导出。./v2ray -config config.json
运行即可,回显如下:
1 | V2Ray 4.28.2 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.2 linux/amd64) |
-------------本文结束感谢您的阅读-------------
本文链接: http://corner430.github.io/2023/04/11/Ubuntu%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!
