Closed LaplaceTor closed 1 year ago
ShellClash will not overly proxies: during starting or download configs
ShellClash will not overly proxies: during starting or download configs
I just uploaded my config which is converted locally via subconverter, but I cannot pass the configuration check you build in, the config work fine on desktop and mobile I got a lot strict config validation, looks like it cannot check where the value should end, fix after do something such as add " " each value, remove the space or blank line etc.
yaml_p=$(grep -n "^prox" $yaml | head -1 | cut -d ":" -f 1) #获取节点起始行号
yaml_r=$(grep -n "^rules:" $yaml | head -1 | cut -d ":" -f 1) #获取规则起始行号
if [ "$yaml_p" -lt "$yaml_r" ];then
sed -n "${yaml_p},${yaml_r}p" $yaml > $tmpdir/proxy.yaml
cat $yaml | sed -n "${yaml_r},\$p" | sed '1d' | sed 's/^ *-/ -/g' > $tmpdir/rule.yaml #切割rule并对齐
else
cat $yaml | sed -n "${yaml_r},${yaml_p}p" | sed '1d' | sed '$d' | sed 's/^ *-/ -/g' > $tmpdir/rule.yaml #切割rule并对齐
sed -n "${yaml_p},\$p" $yaml > $tmpdir/proxy.yaml
sed -n "${yaml_r}p" $yaml >> $tmpdir/proxy.yaml #将rule字段附在末尾
fi
Everything before the first "^prox" or "^rules:" will be drop.
Verify steps
Description
My config looks like
Then it told me that alterId missing, fixed with rewrite
uuid: 31
touuid: '31'
Each extra line for reading would get a reply that it ask for an expect word
,
or}
Shellclash Version 1.7.4d