boypt / vmess2json

Scripts parse vmess:// links into v2ray config json and vice versa.
MIT License
461 stars 124 forks source link

How to convert a json to vmess? #15

Open agn-7 opened 1 year ago

agn-7 commented 1 year ago

I use json2vmess.py without any result. what actually should I do?

Here's the v2ray client config file:

{
    "log": {
        "loglevel": "warning"
    },
    "inbounds": [{
            "port": 1080,
            "protocol": "socks",
            "settings": {
                "udp": true
            }
        },
        {
            "port": 8880,
            "protocol": "http",
            "allowTransparent": false,
            "userLevel": 0
        }
    ],
    "outbounds": [{
            "protocol": "vmess",
            "settings": {
                "vnext": [{
                    "address": "xxxx",
                    "port": 18345,
                    "users": [{
                        "id": "xxxx",
                        "alterId": 0,
                        "security": "aes-128-gcm"

                    }]
                }]
            },
            "streamSettings": {
                "network": "ws",
                "wsSettings": {
                    "path": "/vmess"

                }
            }
        },
        {
            "protocol": "freedom",
            "tag": "direct"
        }
    ],
    "routing": {
        "domainStrategy": "IPOnDemand",
        "rules": [

            {

                "domain": ["ext:iran.dat:ir"],
                "outboundTag": "direct",
                "type": "field"
            },
            {

                "domain": ["regexp:.*\\.ir$"],
                "outboundTag": "direct",
                "type": "field"
            },
            {
                "domain": ["regexp:.*\\.cab$"],
                "outboundTag": "direct",
                "type": "field"
            },
            {

                "domain": ["ext:iran.dat:other"],
                "outboundTag": "direct",
                "type": "field"
            },
            {
                "domain": ["ext:iran.dat:other"],
                "outboundTag": "direct",
                "type": "field"
            }
        ]
    }
}
OpenJarvisAI commented 1 month ago

This script does not work