Skip to content
This repository was archived by the owner on Jan 3, 2021. It is now read-only.
This repository was archived by the owner on Jan 3, 2021. It is now read-only.

【功能请求】多文件配置添加将合并后的配置输出到文件的功能 #97

Open
@yomnxkcs

Description

@yomnxkcs

现在使用多文件配置的时候,最后配置合并成什么样基本靠猜。所以建议添加把合并后的配置输出到文件的功能,以便于发现、修改错误配置。具体大概像这样:
v2ray -c basic.json -c log.json -confdir /home/user/routings/ -debug > merged-config.json

另外 v2fly/v2ray-core PR #451 的合并规则看上去很美,但实用吗?用inbound来举个例子。
假设我想通过多配置文件功能把inbound由socks改成http。
socks的配置如下(已省略不重要的配置):

{
  "tag": "default-inbound",
  "protocol": "socks",
  "settings": {
    "accounts": [
      {
        "user": "Alice"
      }
    ]
  }
}

http的配置如下:

{
  "tag": "default-inbound",
  "protocol": "http",
  "settings": {
    "accounts": [
      {
        "user": "Bob"
      }
    ]
  }
}

如果我没理解错的话,合并后的settings -> accounts应该是Alice和Bob同时存在。显然这并不是我想要的结果。
对于这个特例也许有办法解决,但是还有routing等更复杂的情况呢?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions