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 request] Clash 订阅时,自动注释配置中的端口 #2434

Closed
Miroxyz opened this issue Jun 28, 2022 · 2 comments
Closed

[Feature request] Clash 订阅时,自动注释配置中的端口 #2434

Miroxyz opened this issue Jun 28, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Miroxyz
Copy link
Contributor

Miroxyz commented Jun 28, 2022

使用 v2rayN 可以正确订阅解析 clash 配置。但是启动后会出现如下提示:

time="2022-06-28T09:06:32+08:00" level=fatal msg="Parse config error: yaml: unmarshal errors:\n  line 892: mapping key \"port\" already defined at line 8\n  line 893: mapping key \"socks-port\" already defined at line 11"

手动编辑 v2rayN 订阅生成的配置,把 clash 配置里的几行和端口相关的配置注释掉,就可以正确使用了,注释如下:

# HTTP 代理端口
#port: 7890 

# SOCKS5 代理端口
#socks-port: 7891 

# Linux 和 macOS 的 redir 代理端口
#redir-port: 7892 

是否可以在订阅 clash 配置时,在创建配置之前,解析 clash yaml 配置时自动将相关的端口给注释掉?

@Miroxyz Miroxyz added the enhancement New feature or request label Jun 28, 2022
@2dust
Copy link
Owner

2dust commented Jun 28, 2022

v2rayN-test1.zip

测试下

@Miroxyz
Copy link
Contributor Author

Miroxyz commented Jun 28, 2022

可以了,感谢大佬。

@2dust 2dust closed this as completed Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants