Coder Social home page Coder Social logo

elegycloud / clash-for-linux-backup Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 685.0 18.4 MB

基于Clash Core 制作的Clash For Linux备份仓库 A Clash For Linux Backup Warehouse Based on Clash Core

License: GNU General Public License v3.0

HTML 5.51% Shell 72.29% Smarty 22.20%

clash-for-linux-backup's People

Contributors

elegycloud avatar iamfanic avatar yizuko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

clash-for-linux-backup's Issues

部署正常,无法访问外网

image
image
image
image

防火墙没有启动,排除端口没有开放的问题,另外在节点在windows和手机中都是可用的

很奇怪,感觉没忘记什么,另外我的是乌班图22.04版本

代理服务正常启动,但是无法成功链接代理服务

我使用普通用户和ROOT用户安装了clash,并且进行相应配置,成功运行了clash服务
但是不知道为什么,仍然没办法链接代理服务,在Clash Dashboard中我设置了代理节点、开启全局代理、关闭局域网连接等操作
但是仍然链接失败,如下图所示:

同时为了防止是因为端口的问题,我还关闭了防火墙:ufw disable这个命令,使用 ufw status 这个命令查询为inactive

image

但是他就是链接不上,测试的时候我以访问Google为目标,一直不行,Dashboard的线也是平的

重启电脑需要修改 .env文件

重启电脑需要修改配置文件使其生效
订阅的地址是正确的,但是每次重启需要添加备注地址,在取消备注(其实没有修改任何文件)这样才能正确下载订阅,不知道是不是我设备的问题,感觉有一点奇怪。

scripts/clash_proxy-selector.sh 切换节点失败

bash start.sh后启动正常。

CPU architecture: amd64

正在检测订阅地址...
Clash订阅地址可访问!                                      [  OK  ]

正在下载Clash配置文件...
配置文件config.yaml下载成功!                              [  OK  ]

判断订阅内容是否符合clash配置文件标准:
订阅内容符合clash标准

正在启动Clash服务...
服务启动成功!                                             [  OK  ]

Clash Dashboard 访问地址: http://<ip>:9090/ui

查看服务端口和环境变量均成功。执行scripts/clash_proxy-selector.sh选择不了节点。

(base) root@ubuntu:~/clash-for-linux-backup# bash scripts/clash_proxy-selector.sh 
========== Clash代理配置 ==========
1. 选择代理模式
2. 选择代理节点
3. 退出
===================================
请选择操作(输入编号):2
jq: error (at <stdin>:1): Cannot iterate over null (null)
========== 代理节点列表 ==========
===================================
请选择代理节点(输入编号):3
无效的选择!

服务似乎没有启动……

执行sudo bash start.sh后,各步骤全部显示ok,但proxy_on后netstat -tln | grep -E '9090|789.'无输出。
查看logs/clash.log后发现如下报错:

time="2024-01-12T16:43:06Z" level=fatal msg="Parse config error: yaml: unmarshal errors:\n  line 373: mapping key \"socks-port\" already defined at line 5"

使用ps -ef | grep 'clash-linux'也没有输出,似乎服务并没有启动
可能是因为什么原因导致的捏?

启动成功后并没有代理

输入 netstat -tln | grep -E '9090|789.'后显示的
tcp6 0 0 :::7890 :::* LISTEN
tcp6 0 0 :::7891 :::* LISTEN
tcp6 0 0 :::7892 :::* LISTEN
tcp6 0 0 :::9090 :::* LISTEN

在bash页面上也没有监控到流量

arm64的linux平台无法解析订阅

【标题】问题:arm64的linux平台无法解析订阅

是否自己检查过日志?
是,脚本全部运行完毕后,发现配置文件和web中均为代理,检查start.sh后发现仅对x86_64和amd64的平台进行了base64解码。

是否自己尝试解决此问题?
是,目前我的操作就是现在其他平台运行好后,把正确的config.yaml覆盖到我的arm64的linux上,然后删掉start.sh中覆盖config.yaml的命令

是否认真详细看过README.md?
是,已按照README中的步骤一步一步验证运行,且在其他平台成功运行了。

建议不要改系统设置

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
你的 /etc/profile.d/clash.sh 会把 xrdp 搞崩溃。

这是 xrdp 的调试过程。

+ export XDG_DATA_DIRS=/usr/local/share:/usr/share
+ snap_xdg_path=/var/lib/snapd/desktop
+ [ -n /usr/local/share:/usr/share ]
+ [ -n /usr/local/share:/usr/share ]
+ export XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
+ [ -r /etc/profile.d/bash_completion.sh ]
+ . /etc/profile.d/bash_completion.sh
+ [ x != x -a x$  != x -a x = x ]
+ [ -r /etc/profile.d/cedilla-portuguese.sh ]
+ . /etc/profile.d/cedilla-portuguese.sh
+ [  = pt -a en != pt ]
+ [ -r /etc/profile.d/clash.sh ]
+ . /etc/profile.d/clash.sh
/etc/xrdp/startwm.sh: 2: /etc/profile.d/clash.sh: Syntax error: "(" unexpected

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

start.sh 报错

输入sudo bash start.sh报错
iwEcAqNqcGcDAQTRBQAF0QPBBrC_pVaDGIHs6AVwjG1A8VkAB9Ij0cC9CAAJomltCgAL0gADApg jpg_720x720q90

CLASH_URL在windows上已验证可用(目前在用),请问需要提前在Ubuntu系统设置系统代理吗,如果需要,需要怎么设置。

感谢大佬帮忙,太好用啦

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Clash订阅地址不可访问!

hm@nsdse:~/clash-for-linux-backup$ cat .env

Clash 订阅地址

export CLASH_URL='订阅地址'
export CLASH_SECRET='https://595780.xyz/api/v1/client/subscribe?token=b5b148494'(地址删除了部分内容,但确实没问题)
hm@nsdse:~/clash-for-linux-backup$ sudo bash start.sh
CPU architecture: x86_64

正在检测订阅地址...
curl: (6) Could not resolve host: xn--ces6a6602a5xi
curl: (6) Could not resolve host: xn--ces6a6602a5xi
curl: (6) Could not resolve host: xn--ces6a6602a5xi
curl: (6) Could not resolve host: xn--ces6a6602a5xi
curl: (6) Could not resolve host: xn--ces6a6602a5xi
curl: (6) Could not resolve host: xn--ces6a6602a5xi
Clash订阅地址不可访问! [FAILED]

如何换clash Dashboard 的 端口?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

gnutls_handshake() failed: The TLS connection was non-properly terminated.

Thank you for the great work. I had been using this tool for months, but recent days an issue occurred.

After proxy_on, I git clone a repo with error like this:

fatal: unable to access 'https://github.com/krychu/llama/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

the clash url is tested well in Mac an IOS environment.

config文件配置不成功

情况
我在虚拟机中按照教程配置.env文件后,运行start.sh脚本能够更新配置文件
在开发板上进行相同的操作后,得到的配置文件一直是如图所示。
这看起来像是一个默认文件,而不是机场的订阅文件
123
234

Unauthorized for login

Hello,what's the reason for this, well, I haven't sudo but the start.sh is succeed, is it can used?
image
image

image

启动失败

2024/02/19 Mon 16:12:36.432341 [468543 10739128][INFO] Generate target: Clash
2024/02/19 Mon 16:12:36.466407 [468543 10739128][WARN] Failed to fetch ruleset or ruleset is empty: 'rules/DivineEngine/Surge/Ruleset/Guard/Hijacking.list'!
2024/02/19 Mon 16:12:36.468796 [468543 10739128][WARN] Failed to fetch ruleset or ruleset is empty: 'rules/DivineEngine/Surge/Ruleset/Extra/Telegram/Telegram.list'!
2024/02/19 Mon 16:12:36.480100 [468543 10739128][INFO] Generate completed.
2024/02/19 Mon 16:12:36.481800 [468543 10739128][INFO] User Info for artifact 'test': Stream Used: 1.00 B Stream Total: N/A Expiry Time: N/A
2024/02/19 Mon 16:12:36.481878 [468543 10739128][INFO] Artifact 'test' generate SUCCESS!

2024/02/19 Mon 16:12:36.481964 [468543 10739128][INFO] Generating artifact 'test_profile'...
2024/02/19 Mon 16:12:36.482083 [468543 10739128][INFO] Trying to load profile 'profiles/example_profile.ini'.
2024/02/19 Mon 16:12:36.482166 [468543 10739128][INFO] Trying to parse profile 'profiles/example_profile.ini'.
2024/02/19 Mon 16:12:36.482371 [468543 10739128][VERB] Imported 0 item(s).
2024/02/19 Mon 16:12:36.482461 [468543 10739128][INFO] Fetching node data from url 'ss://[email protected]:1080#Example'.
2024/02/19 Mon 16:12:36.484715 [468543 10739128][VERB] Received Link.
2024/02/19 Mon 16:12:36.484884 [468543 10739128][INFO] Generate target: Clash
2024/02/19 Mon 16:12:36.513747 [468543 10739128][WARN] Failed to fetch ruleset or ruleset is empty: 'rules/DivineEngine/Surge/Ruleset/Guard/Hijacking.list'!
2024/02/19 Mon 16:12:36.516108 [468543 10739128][WARN] Failed to fetch ruleset or ruleset is empty: 'rules/DivineEngine/Surge/Ruleset/Extra/Telegram/Telegram.list'!
2024/02/19 Mon 16:12:36.520363 [468543 10739128][INFO] Generate completed.
2024/02/19 Mon 16:12:36.522044 [468543 10739128][INFO] Artifact 'test_profile' generate SUCCESS!

time="2024-02-19T16:16:51+08:00" level=fatal msg="Parse config error: proxy 0: ss 147.182.203.143:80 initialize error: cipher not supported"

有一个不知道算不算bug的东西

我用ubuntu20.04 的时候,如果没有安装curl(但是有wget)它不会往下执行start.sh,而是直接报:clash订阅地址不可访问
这个应该是启动脚本的判断有点问题
image

Clash Dashboard

请问有Clash Dashboard的详细用法嘛,Label(Opentional)以及Add的用法,我无法登陆,谢谢

无故网络高占用

在这个项目原作者没有删库的时候我就遇到过这个问题,当时原作者好像说的是流量回环,具体原因未知,基本把带宽占满了,好像也没有修复。
如图,此时并没有在下载东西,重启服务器后,只要运行clash,就会这样。
shutdown停止clash后,网络占用即恢复正常。

image image

关于dashboard的一些问题

作者您好,有一些问题想询问下您:

  1. 我在服务器上部署之后,由于是命令行操作,无法在服务器的浏览器中进行操作;
  2. 因此,我们将服务器上的地址进行了windows的端口映射,映射出来的链接为http://127.0.0.1:9090/ui/。
  3. 在chrome中对该地址进行访问后,我得到的界面为
    image
  4. 此时,这里的API Base URL我将http://127.0.0.1:9090以及http://<服务器IP>:9090都尝试了下,并且按照要求输入了Secret,并且点击了Add,之后又点击了下面的**http://127.0.0.1:9090**,但是点击之后,我只能看到那个dashboard闪烁了一下,然而我并进不去。
    因此,想请教下您,谢谢!
    此外,还有一个问题,我先前尝试了使用bash scripts/clash_proxy-selector.sh,但是在选择节点的时候,我得到的输出为:
    image
    这是怎么回事?又该如何处理?
    谢谢!

issueの提问艺术

注意:当你在使用此项目时,遇到任何无法独自解决的问题请优先前往 Issues 寻找解决方法。由于空闲时间有限,后续将不再对Issues中 “已经解答”、“已有解决方案” 的问题进行重复性的回答。

【标题】问题:xxxxxxxx
『问答(需全部复制并回答)』

是否自己检查过日志?:【是/否】

是否自己尝试解决此问题?:【是/否】
是否认真详细看过README.md?【是/否】

是否会提供日志并简单概括问题?【是/否】
【联系方式,方便联系(邮件)】
【内容】
xxxxxxxx
【图片】
114514.jpg
IMG_20231122_125141

netstat -tln | grep -E '9090|789.' 没有显示端口开放

# sudo bash start.sh 
CPU architecture: amd64

正在检测订阅地址...
Clash订阅地址可访问!                                      [  OK  ]

正在下载Clash配置文件...
配置文件config.yaml下载成功!                              [  OK  ]

判断订阅内容是否符合clash配置文件标准:
订阅内容符合clash标准

正在启动Clash服务...
服务启动成功!                                             [  OK  ]

Clash Dashboard 访问地址: http://<ip>:9090/ui
Secret: 1234

     く__,.ヘヽ.        /  ,ー、 〉
           \ ', !-─‐-i  /  /´
          /`ー'       L//`ヽ、
         /   /,   /|   ,   ,       ',
        イ   / /-‐/  i  L_ ハ ヽ!   i
        レ ヘ 7イ`ト   レ'ァ-ト、!ハ|   |
          !,/7 '0'     ´0iソ|    |
          |.从     _     ,,,, / |./    |
          レ'| i>.、,,__  _,.イ /   .i   |
           レ'| | / k_7_/レ'ヽ,  ハ.  |
             | |/i 〈|/   i  ,.ヘ |  i  |
            .|/ /  i:    ヘ!    \  |
             kヽ>、ハ    _,.ヘ、    /、!
             !'〈//`T´', \ `'7'ーr'
             レ'ヽL__|___i,___,ンレ|ノ
                  ト-,/  |___./
                  'ー'    !_,.:
本项目完全免费,若你是收费买的,恭喜您,您被骗了!
项目地址:https://github.com/Elegybackup/clash-for-linux-backup
项目随时会寄,且行且珍惜!
请执行以下命令加载环境变量: source /etc/profile.d/clash.sh

请执行以下命令开启系统代理: proxy_on

若要临时关闭系统代理,请执行: proxy_off

# source /etc/profile.d/clash.sh
# proxy_on
[√] 已开启代理

#netstat -tln | grep -E '9090|789.'

此时netstat返回为空,没有端口开放

订阅格式不对是为什么,我win端都能用啊

root@orangepi5plus:~/clash-for-linux/scripts# bash clash_profile_conversion.sh
cat: /temp/clash.yaml: No such file or directory
解码后的内容不符合clash标准,尝试将其转换为标准格式
clash_profile_conversion.sh: line 24: /logs/subconverter.log: No such file or directory
awk: cannot open /temp/clash_config.yaml (No such file or directory)
配置文件转换标准格式失败

是否可以教学一下如何让终端可以链接到外网,我可以在chrome上使用hugging face,但是一旦call python去调用模型,就会显示失败。

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Clash Dashboard 访问地址: http://<ip>:9090/ui 为什么我这里就没有弹出ip的具体地址呢?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

ipv4和ipv6

可以在代理里指定使用ipv4和ipv6流量吗?
在issue里没有看到ipv4和ipv6相关字眼。是在9090/ui/#/rules里配置的吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.