Skip to content

fallbacks在核心内部不通过tcp或者domainsocket传输的可能性? #2

Closed

Description

如题,目前fallbacks只能通过tcp或者domainsocket,而这不可避免地带来性能损失。如果fallbacks的目标为核心的另外一个inbound,是否有实现直接在核心内部传输的可能性?
关于配置文件配置文件部分,我首先想到的是使用原本就有的tag标签,然后增加给dest指定tag的功能
比如这个配置https://github.com/v2fly/v2ray-examples/blob/master/VLESS-TCP-TLS-WS%20(recommended)/config_server.json
可以修改为:

{
    "log": {
        "loglevel": "warning"
    },
    "inbounds": [
        {
            "port": 443,
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": "", // 填写你的 UUID
                        "level": 0,
                        "email": "[email protected]"
                    }
                ],
                "decryption": "none",
                "fallbacks": [
                    {
                        "dest": 80
                    },
                    {
                        "path": "/websocket", // 必须换成自定义的 PATH
                        "dest": "tag:websocket",
                    }
                ]
            },
            "streamSettings": {
                "network": "tcp",
                "security": "tls",
                "tlsSettings": {
                    "alpn": [
                        "http/1.1"
                    ],
                    "certificates": [
                        {
                            "certificateFile": "/path/to/fullchain.crt", // 换成你的证书,绝对路径
                            "keyFile": "/path/to/private.key" // 换成你的私钥,绝对路径
                        }
                    ]
                }
            }
        },
        {
            "tag": "websocket",
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": "", // 填写你的 UUID
                        "level": 0,
                        "email": "[email protected]"
                    }
                ],
                "decryption": "none"
            },
            "streamSettings": {
                "network": "ws",
                "security": "none",
                "wsSettings": {
                    "path": "/websocket" // 必须换成自定义的 PATH,需要和上面的一致
                }
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom"
        }
    ]
}

Activity

  1. RPRX commented on Nov 21, 2020

    @RPRX
    Member

    一直有这样的计划,但当前的 tag 不带底层传输方式,所以需要另一种 tag 机制。

  2. RPRX commented on Nov 26, 2020

    @RPRX
    Member

    根据我对 core 的了解,要实现这样的功能,以及从根本上解决性能问题,重开一个新的架构或许更合适。

  3. added a commit that references this issue on Jan 11, 2025
  4. added a commit that references this issue on Aug 21, 2025
  5. added 2 commits that reference this issue on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions