Skip to main content

xray绑定出口网卡{

  1. xray绑定出口网卡
    {
        "inbounds": [
            {
                // 此处省略具体 inbound 配置
                "tag": "inbound-xxx"
            }
        ],
        "outbounds": [
            {
                "protocol": "freedom",
                "streamSettings": {
                    "sockopt": {
                        "tcpFastOpen": true,
                        "interface": "WARP"// 指定使用名为 WARP 的网卡
                    }
                },
                "settings": {
                    "domainStrategy": "AsIs"
                },
                "tag": "my-warp"
            }
        ],
        "routing": {
            "rules": [
                {// 将 inbound 和 outbound 通过路由绑定:inbound-xxx -> my-warp
                    "inboundTag": [
                        "inbound-xxx"
                    ],
                    "network": "tcp,udp",
                    "outboundTag": "my-warp",
                    "type": "field"
                }
            ]
        }
    }

    #network