Git Product home page Git Product logo

Comments (5)

rikkix avatar rikkix commented on June 2, 2024

According to
https://github.com/2dust/v2rayN/wiki/%E5%88%86%E4%BA%AB%E9%93%BE%E6%8E%A5%E6%A0%BC%E5%BC%8F%E8%AF%B4%E6%98%8E(ver-2)
, that URI does not meet specifications

from v2gen.

hongyi-zhao avatar hongyi-zhao commented on June 2, 2024

But as I have told you, you can try it youself:

This one will work with v2ray:

{
  "inbounds": [
    {
      "port": 1080,
      "protocol": "socks",
      "settings": {
        "udp": true
      }
    }
  ],
  "outbounds": [
    {
      "mux": {
        "enabled": true
      },
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "www.kernels.bid",
            "port": 443,
            "users": [
              {
                "alterId": 0,
                "id": "4f822b71-10a1-9e37-84c8-780cc3cfd2c6"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
     //     "wsSettings": {
      //  "path": "{{path}}",
       // "headers": {
        //  "Host": "/ws"
       // }
     // }
      "wsSettings": {
         "path": "/ws"
       }
      }
    }
  ]
}

This one will not work:

{
  "inbounds": [
    {
      "port": 1080,
      "protocol": "socks",
      "settings": {
        "udp": true
      }
    }
  ],
  "outbounds": [
    {
      "mux": {
        "enabled": true
      },
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "www.kernels.bid",
            "port": 443,
            "users": [
              {
                "alterId": 0,
                "id": "4f822b71-10a1-9e37-84c8-780cc3cfd2c6"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
          "wsSettings": {
        "path": "{{path}}",
        "headers": {
          "Host": "/ws"
        }
      }
      // "wsSettings": {
       //    "path": "/ws"
       //  }
      }
    }
  ]
}

from v2gen.

hongyi-zhao avatar hongyi-zhao commented on June 2, 2024

Though I can start v2ray with the former config, but when do the data transfering, it will give the following errors:


$ ./v2ray -cong ~/Downloads/config.json 
V2Ray 4.20.0 (V2Fly, a community-driven edition of V2Ray.) Custom
A unified platform for anti-censorship.
2019/09/14 17:15:11 [Warning] v2ray.com/core: V2Ray 4.20.0 started
2019/09/14 17:15:29 [Warning] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://www.kernels.bid/{{path}}): 404 Not Found > websocket: bad handshake] > v2ray.com/core/common/retry: all retry attempts failed

from v2gen.

rikkix avatar rikkix commented on June 2, 2024

vmess://eyJwcyI6IltmcmVlLXNzLnNpdGVdd3d3Lmtlcm5lbHMuYmlkIiwiYWRkIjoid3d3Lmtlcm5lbHMuYmlkIiwicG9ydCI6IjQ0MyIsImlkIjoiNGY4MjJiNzEtMTBhMS05ZTM3LTg0YzgtNzgwY2MzY2ZkMmM2IiwiYWlkIjoiMCIsIm5ldCI6IndzIiwidHlwZSI6Im5vbmUiLCJob3N0IjoiL3dzIiwidGxzIjoidGxzIn0=
does not meet specifications.

If I modify the code, other correct URIs will not work to it.

If you like, the code is licensed under MIT LICENSE, you can adapt it by your own freely.

from v2gen.

rikkix avatar rikkix commented on June 2, 2024

Though I can start v2ray with the former config, but when do the data transfering, it will give the following errors:


$ ./v2ray -cong ~/Downloads/config.json 
V2Ray 4.20.0 (V2Fly, a community-driven edition of V2Ray.) Custom
A unified platform for anti-censorship.
2019/09/14 17:15:11 [Warning] v2ray.com/core: V2Ray 4.20.0 started
2019/09/14 17:15:29 [Warning] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://www.kernels.bid/{{path}}): 404 Not Found > websocket: bad handshake] > v2ray.com/core/common/retry: all retry attempts failed

Certainly, that URI does not meet specifications.

after decoding it, it is

{"ps":"[free-ss.site]www.kernels.bid","add":"www.kernels.bid","port":"443","id":"4f822b71-10a1-9e37-84c8-780cc3cfd2c6","aid":"0","net":"ws","type":"none","host":"/ws","tls":"tls"}

However, "host" should be like example.ltd, "path" should be like /ws

from v2gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.