ClashForAndroid
ClashForAndroid copied to clipboard
[BUG] 应用崩溃
描述此错误
打开app后提示应用崩溃。多次出现。
如何复现该错误
步骤 1: 从桌面打开app 步骤 2: 应用崩溃 步骤 3: ... ...
设备信息
- 机型:Galaxy S21
- 系统类型:One ui 4.0
- Android 版本:12
应用信息
- 版本:2.5.4-premium
- 安装包文件名:cfa-2.5.4-premium-arm64-v8a-release.apk
- 应用来源:github release
配置文件
allow-lan: false log-level: info mode: Script
proxy-providers:
Dlercloud:
type: http
path: ./providers/dlercloud.yaml
url:
health-check:
enable: false
url: http://cp.cloudflare.com/generate_204
interval: 86400
proxy-groups:
- name: "PROXY"
type: select
proxies:
- DIRECT use:
- Dlercloud
- name: "Netflix"
type: select
proxies:
- PROXY use:
- Dlercloud
- name: "Tiktok"
type: select
proxies:
- PROXY use:
- Dlercloud
- name: "Streaming"
type: select
proxies:
- PROXY use:
- Dlercloud
- name: "StreamingSE"
type: select
proxies:
- DIRECT
- PROXY use:
- Dlercloud
- name: "Final"
type: select
proxies:
- PROXY
- DIRECT
- REJECT
rule-providers: myproxy: type: http behavior: classical path: ./RuleSet/proxy.yaml url: interval: 86400
Unbreak:
type: http
behavior: classical
path: ./RuleSet/Unbreak.yaml
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/Unbreak.yaml
interval: 86400
Netflix:
type: http
behavior: classical
path: ./RuleSet/StreamingMedia/Netflix.yaml
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/StreamingMedia/Video/Netflix.yaml
interval: 86400
Tiktok:
type: http
behavior: classical
path: ./RuleSet/StreamingMedia/Tiktok.yaml
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/StreamingMedia/Video/TikTok.yaml
interval: 86400
Streaming:
type: http
behavior: classical
path: "./rule_provider/Streaming.yaml"
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/StreamingMedia/Streaming.yaml
interval: 86400
StreamingSE:
type: http
behavior: classical
path: ./RuleSet/StreamingMedia/StreamingSE.yaml
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/StreamingMedia/StreamingSE.yaml
interval: 86400
Global:
type: http
behavior: classical
path: ./RuleSet/Global.yaml
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/Global.yaml
interval: 86400
China: type: http behavior: classical path: ./RuleSet/China.yaml url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/China.yaml interval: 86400
ChinaIP: type: http behavior: ipcidr path: ./RuleSet/Extra/ChinaIP.yaml url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles/Clash/RuleSet/Extra/ChinaIP.yaml interval: 86400
rules:
- IP-CIDR,104.24.163.121/32,DIRECT,no-resolve
- RULE-SET,myproxy,PROXY
- RULE-SET,Unbreak,DIRECT
- RULE-SET,Netflix,Netflix
- RULE-SET,Tiktok,Tiktok
- RULE-SET,Streaming,Streaming
- RULE-SET,StreamingSE,StreamingSE
- RULE-SET,Global,PROXY
- RULE-SET,China,DIRECT
- IP-CIDR,192.168.0.0/16,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT
- IP-CIDR,172.16.0.0/12,DIRECT
- IP-CIDR,127.0.0.0/8,DIRECT
- IP-CIDR,100.64.0.0/10,DIRECT
- IP-CIDR,224.0.0.0/4,DIRECT
- RULE-SET,ChinaIP,DIRECT
- GEOIP,CN,DIRECT
- MATCH,Final
script:
code: |
def main(ctx, metadata):
ruleset_action = {
"myproxy": "PROXY",
"Unbreak": "DIRECT",
"Netflix": "Netflix",
"Tiktok": "Tiktok",
"Streaming": "Streaming",
"StreamingSE": "StreamingSE",
"Global": "PROXY",
"China": "DIRECT",
"ChinaIP": "DIRECT"
}
if metadata["network"] == "udp":
dport = metadata["dst_port"]
if dport == "443":
ctx.log('[Script] matched QUIC traffic use reject')
return "REJECT"
ruleset_list = [r for r in ruleset_action]
for rule_name in ruleset_list:
if ctx.rule_providers[rule_name].match(metadata):
ctx.log('[Script] matched %s' % rule_name)
return ruleset_action[rule_name]
ip = metadata["dst_ip"] or ctx.resolve_ip(metadata["host"])
if ip == "":
return "DIRECT"
code = ctx.geoip(ip)
if code == "LAN" or code == "CN":
return "DIRECT"
ctx.log('[Script] Geoip')
return "Final"
ctx.log('[Script] FINAL')
日志
见屏幕截图
屏幕截图

附加信息
No response
2.5.5版比较不会出现该问题。 三星提供了免费的远程调试,不知道能否帮助到开发者。https://developer.samsung.com/remote-test-lab
@Olivercoco 这个现象在 AppCenter 里也有多次上报 之前调试过 没有任何发现 系统给出的退出原因也是 KILL 只能猜测是后台进程被系统杀掉了
@Kr328 好。我之前有尝试过“电池-无限制”,还是有出现,这部分我会再次尝试。虽然显示崩溃,但功能是完全正常的,只是需要多一个“返回”的动作。
@Olivercoco 现在的逻辑是
在 短时间内 :background 进程连续死亡两次 才会打开这个界面
仅一次死亡会快速的再次重启后台进程也不会出现这个界面
遇到同样的问题 请问解决了目前?刚开始能正常运行,后续重新拉取配置后就应用崩溃,表现形式和楼主一致