Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 希望可以将配置文件自动重命名后保存 #819

Closed
3 tasks done
github-h opened this issue Nov 6, 2024 · 6 comments
Closed
3 tasks done

[Feature] 希望可以将配置文件自动重命名后保存 #819

github-h opened this issue Nov 6, 2024 · 6 comments

Comments

@github-h
Copy link

github-h commented Nov 6, 2024

Verify steps

  • 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • 我已经使用公测版本测试过,问题依旧存在 I have tested using the test mod, and the issue still exists.
  • 我已经仔细看过 常见问题 并无法自行解决问题

Description

1.9.1rc10 使用6-2 完整的订阅信息配置功能时部分机场下载的配置文件并没有后缀名 这会导致脚本识别失败并直接打印了整个配置文件

希望能加一个不管获取的配置文件是何种形式,都自动更名为config.yaml并尝试导入

@juewuy
Copy link
Owner

juewuy commented Nov 6, 2024

@github-h 一直都是会自动改名

@github-h
Copy link
Author

github-h commented Nov 6, 2024

@github-h 一直都是会自动改名

那好奇这是哪里出了问题
图片
图片

这个配置文件在线订阅就不太行 上传完整配置文件没啥问题
CFW也能正常导入这个配置文件
图片

@github-h
Copy link
Author

github-h commented Nov 6, 2024

这个是能正常导入的config
图片
图片

这个是不能正常导入的config(打印所有节点信息的)
图片
图片

怀疑是不是跟节点配置文件的格式有关?一个是多行一个是一行

@juewuy
Copy link
Owner

juewuy commented Nov 6, 2024

    ```

sed -n "/^proxies:/,/^[a-z]/ { /^[a-z]/d; p; }" "$core_config_new" >"$TMPDIR"/proxies.yaml
if ! grep -q 'server:' "$TMPDIR"/proxies.yaml && ! grep -q 'proxy-providers:' "$core_config_new"; then

这是相关的判断逻辑

@github-h
Copy link
Author

github-h commented Nov 6, 2024

    ```

sed -n "/^proxies:/,/^[a-z]/ { /^[a-z]/d; p; }" "$core_config_new" >"$TMPDIR"/proxies.yaml if ! grep -q 'server:' "$TMPDIR"/proxies.yaml && ! grep -q 'proxy-providers:' "$core_config_new"; then

这是相关的判断逻辑

发现问题了 能否改为判断的是 server 而不是 server:

图片
图片

@juewuy
Copy link
Owner

juewuy commented Nov 6, 2024

@github-h OK

@juewuy juewuy closed this as completed Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants