ToutyRater / v2ray-guide

https://toutyrater.github.io/
1.65k stars 447 forks source link

请教一个问题, 关于v2ray 转发的 #114

Open whale-fall-wh opened 7 months ago

whale-fall-wh commented 7 months ago
{
    "log": {
        "access": "",
        "error": "",
        "loglevel": "info"
    },
    "inbounds": [{
            "port": 1081,
            "listen": "0.0.0.0",
            "protocol": "socks",
            "settings": {
                "auth": "noauth",
                "udp": true,
                "ip": "127.0.0.1",
                "clients": null
            },
            "streamSettings": null
        },
        {
            "listen": "0.0.0.0",
            "port": 1080,
            "protocol": "vmess",
            "settings": {
                "clients": [{
                    "id": "dcd8eb99-a80a-4bcf-b61f-2c38b8d5c1f3",
                    "security": "auto",
                    "alterId": 0
                }]
            }
        }
    ],
    "outbounds": [{
            "protocol": "vmess",
            "settings": {
                "vnext": [{
                    "address": "xxx",
                    "port": 443,
                    "users": [{
                        "id": "xxx",
                        "alterId": 0,
                        "email": "t@t.tt",
                        "security": "auto"
                    }]
                }]
            },
            "streamSettings": {
                "network": "ws",
                "security": "tls",
                "tlsSettings": {
                    "allowInsecure": false,
                    "serverName": "xxx"
                },
                "wsSettings": {
                    "path": "/neqqvws",
                    "headers": {
                        "Host": "xxx"
                    }
                }
            },
            "mux": {
                "enabled": false,
                "concurrency": -1
            }
        },
        {
            "protocol": "HTTP",
            "settings": {
                "servers": [{
                    "address": "192.168.50.211",
                    "port": 8888,
                    "users": []
                }]
            },
            "tag": "LY"
        }
    ],
    "dns": {
        "servers": [
            "8.8.8.8",
            "8.8.4.4",
            "localhost"
        ]
    },
    "routing": {
        "domainStrategy": "IPIfNonMatch",
        "rules": [{
                "type": "field",
                "ip": [
                    "10.0.0.0/8"
                ],
                "outboundTag": "LY"
            },
            {
                "type": "field",
                "domain": [
                    "domain:test.com"
                ],
                "outboundTag": "LY"
            }
        ]
    }
}

上面是我中转 V2ray 的配置, 开了两个Inbounds,一个是socks,一个是vmess, 当我用socks时,访问test.com能走到 指定LY这个tag的出站配置,但我用vmess 入站时,走的还是默认的vps,这个可能是哪里有问题?

入站的Vmess 就是默认的配置