opt-script icon indicating copy to clipboard operation
opt-script copied to clipboard

K2的1003版本的固件,v2ray解析json配置文件出错

Open 19504643 opened this issue 3 years ago • 0 comments

即使使用刚解压出来的config.json文件,将里面的协议修改为vmess,都会出现这个错误

Oct 11 15:33:51 【vmess】: 开始生成 ss_tproxy 配置
Oct 11 15:33:51 【vmess】: 提取 outbounds 生成 ss_tproxy 配置
Oct 11 15:33:51 【vmess】: 错误 outbounds 提出失败,请填写配正确的出站协议!vmess、vless、shadowsocks、socks、http、mtproto、trojan
Oct 11 15:33:51 【v2ray】: 配置文件转换 Protobuf 格式配置 /opt/bin/v2ray_config.pb
Oct 11 15:33:54 【v2ray】: 错误! /opt/bin/v2ray_config.pb 内容为空, 10 秒后自动尝试重新启动
Oct 11 15:34:12 【v2ray】:  /opt/ 在内存储存
Oct 11 15:34:12 【v2ray】: 内存不足100M
Oct 11 15:34:12 【v2ray】: 使用 ss_tproxy 分流(降低负载,适合低配路由)
Oct 11 15:34:25 【v2ray】: 找到 /opt/bin/v2ray /opt/bin/v2ctl
Oct 11 15:34:25 【v2ray】: 运行 v2ray_script
Oct 11 15:34:28 【vmess】: 开始生成 ss_tproxy 配置
Oct 11 15:34:28 【vmess】: 提取 outbounds 生成 ss_tproxy 配置
Oct 11 15:34:29 【vmess】: 错误 outbounds 提出失败,请填写配正确的出站协议!vmess、vless、shadowsocks、socks、http、mtproto、trojan
Oct 11 15:34:29 【v2ray】: 配置文件转换 Protobuf 格式配置 /opt/bin/v2ray_config.pb
Oct 11 15:34:32 【v2ray】: 错误! /opt/bin/v2ray_config.pb 内容为空, 10 秒后自动尝试重新启动

config.json文件如下:

// Uncomment entries below to satisfy your needs. Also read our manual for more detail at
// https://www.v2ray.com/
{
  "log": {
    // By default, V2Ray writes access log to stdout.
    // "access": "/path/to/access/log/file",

    // By default, V2Ray write error log to stdout.
    // "error": "/path/to/error/log/file",

    // Log level, one of "debug", "info", "warning", "error", "none"
    "loglevel": "warning"
  },
  // List of inbound proxy configurations.
  "inbounds": [{
    // Port to listen on. You may need root access if the value is less than 1024.
    "port": 1080,

    // IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
    "listen": "127.0.0.1",

    // Tag of the inbound proxy. May be used for routing.
    "tag": "socks-inbound",

    // Protocol name of inbound proxy.
    "protocol": "socks",

    // Settings of the protocol. Varies based on protocol.
    "settings": {
      "auth": "noauth",
      "udp": false,
      "ip": "127.0.0.1"
    },

    // Enable sniffing on TCP connection.
    "sniffing": {
      "enabled": true,
      // Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS.
      "destOverride": ["http", "tls"]
    }
  }],
  // List of outbound proxy configurations.
  "outbounds": [{
    // Protocol name of the outbound proxy.
    "protocol": "vmess",

    // Settings of the protocol. Varies based on protocol.
    "settings": {},

    // Tag of the outbound. May be used for routing.
    "tag": "direct"
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }],

  // Transport is for global transport settings. If you have multiple transports with same settings
  // (say mKCP), you may put it here, instead of in each individual inbound/outbounds.
  //"transport": {},

  // Routing controls how traffic from inbounds are sent to outbounds.
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules":[
      {
        // Blocks access to private IPs. Remove this if you want to access your router.
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      },
      {
        // Blocks major ads.
        "type": "field",
        "domain": ["geosite:category-ads"],
        "outboundTag": "blocked"
      }
    ]
  },

  // Dns settings for domain resolution.
  "dns": {
    // Static hosts, similar to hosts file.
    "hosts": {
      // Match v2ray.com to another domain on CloudFlare. This domain will be used when querying IPs for v2ray.com.
      "domain:v2ray.com": "www.vicemc.net",

      // The following settings help to eliminate DNS poisoning in mainland China.
      // It is safe to comment these out if this is not the case for you.
      "domain:github.io": "pages.github.com",
      "domain:wikipedia.org": "www.wikimedia.org",
      "domain:shadowsocks.org": "electronicsrealm.com"
    },
    "servers": [
      "1.1.1.1",
      {
        "address": "114.114.114.114",
        "port": 53,
        // List of domains that use this DNS first.
        "domains": [
          "geosite:cn"
        ]
      },
      "8.8.8.8",
      "localhost"
    ]
  },

  // Policy controls some internal behavior of how V2Ray handles connections.
  // It may be on connection level by user levels in 'levels', or global settings in 'system.'
  "policy": {
    // Connection policys by user levels
    "levels": {
      "0": {
        "uplinkOnly": 0,
        "downlinkOnly": 0
      }
    },
    "system": {
      "statsInboundUplink": false,
      "statsInboundDownlink": false,
      "statsOutboundUplink": false,
      "statsOutboundDownlink": false
    }
  },

  // Stats enables internal stats counter.
  // This setting can be used together with Policy and Api. 
  //"stats":{},

  // Api enables gRPC APIs for external programs to communicate with V2Ray instance.
  //"api": {
    //"tag": "api",
    //"services": [
    //  "HandlerService",
    //  "LoggerService",
    //  "StatsService"
    //]
  //},

  // You may add other entries to the configuration, but they will not be recognized by V2Ray.
  "other": {}
}

19504643 avatar Oct 11 '20 07:10 19504643