
{
    "log": {
        "loglevel": "error"
    },
        "routing": {
        "rules": [
            {
                "type": "field",
                "ip": [
                    "geoip:private"
                ],
                "outboundTag": "direct"
            }
        ]
    },
    "inbounds": [
        {
            "listen": "127.0.0.1",
            "port": {{port}},
            "protocol": "socks"
        }
    ],
    "outbounds": [
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "{{server_address}}",
                        "port": {{server_port}},
                        "users": [
                            {
                                "id": "{{uuid}}", 
                                "encryption": "none",
                                
                                "flow": {% if type=='tcp' %} "xtls-rprx-vision"{% else %} "" {% endif %}
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "{{type}}",
                "security": "reality",
                "realitySettings": {
                    "fingerprint": "chrome",
                    "serverName": "{{sni}}",
                    "publicKey": "{{public_key}}", 
                    "shortId": "{{short_id}}" 
                }
                {% if type=='grpc' %}
                ,"grpcSettings": {
                    "serviceName": "{{serviceName}}", // 与服务端一致
                    "multiMode": {% if mode=='gun' %} false {%else%} true {%endif%},
                    "idle_timeout": 60,
                    "health_check_timeout": 20
                }
                {%endif%}
            },
            "tag": "proxy"
        },
        {
            "protocol": "freedom",
            "tag": "direct"
        }
    ]
}
