Giter Site home page Giter Site logo

v2ray-tools's Introduction

V2Ray Tools

Installaction

npm -g install v2ray-tools

Usage

v2ray-tools [command]

Commands:
  v2ray-tools vmess2config  convert vmess url into v2ray config
  v2ray-tools vmesstest     test avaliability for server from url
  v2ray-tools config2vmess  convert v2ray config file into vmess url

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]
v2ray-tools vmess2config

convert vmess url into v2ray config

Options:
  --base     base v2ray config file path              [default: "src/base.json"]
  --url      vmess url                                                [required]
  --port     port for listen                           [number] [default: 10800]
  --listen   listen interface
v2ray-tools config2vmess

convert v2ray config file into vmess url

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]
  --path     the path for the v2ray config file                       [required]
v2ray-tools vmesstest

test avaliability for server from url

Options:
  --base        base v2ray config file path           [default: "src/base.json"]
  --url         vmess url                                     [array] [required]
  --port        base port for listen                   [number] [default: 10800]
  --listen      listen interface
  --test-url                                 [default: "https://www.google.com"]
  --v2ray-path                                                [default: "v2ray"]

Todo

  • parser vmess url
  • convert vmess url into v2ray config
  • convert v2ray config file into vmess url
  • avaliability test for server from vmess url
  • maxium speed test for server
  • read urls from file for test
  • Electron GUI

v2ray-tools's People

Contributors

alisawari avatar kltk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

v2ray-tools's Issues

Error while converting config to url

C:\v2ray-windows-64>v2ray-tools config2vmess --path="C:\v2ray-windows-64\clientConfig.json"
TypeError: Cannot read property 'split' of undefined
    at createVmessObj (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\src\config2vmess.js:51:34)
    at createEncodedUrl (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\src\config2vmess.js:85:22)
    at config2vmess (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\src\config2vmess.js:97:21)
    at Object.config2VmessHandler [as handler] (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\src\cli.js:41:20)
    at Object.runCommand (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\node_modules\yargs\lib\command.js:240:40)
    at Object.parseArgs [as _parseArgs] (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\node_modules\yargs\yargs.js:1105:41)
    at Object.get [as argv] (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\node_modules\yargs\yargs.js:1033:21)
    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\v2ray-tools\src\cli.js:77:10)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
false

C:\v2ray-windows-64>

Note it is also unable to process // comments white become common in some applications (those applications tend to remove comment and then process the file.

{
  "inbounds": [{
    "port": <XXXX>,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "settings": {
      "udp": true
    }
  }],
  "outbounds": [{
    "protocol": "vmess",
    "settings": {
      "vnext": [{
        "address": "<IP V4>",
        "port": <XXXXX>,
        "users": [{ "id": "<A GUID VALUE>" }]
      }]
    }
  },{
    "protocol": "freedom",
    "tag": "direct",
    "settings": {}
  }],
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [{
      "type": "field",
      "ip": ["geoip:private"],
      "outboundTag": "direct"
    }]
  }
}

TypeError: Cannot read properties of undefined (reading 'split')

I'm covertering client side config using v2ray-tools config2vmess --path config.json

TypeError: Cannot read properties of undefined (reading 'split')
    at createVmessObj (/usr/local/lib/node_modules/v2ray-tools/src/config2vmess.js:50:46)
    at createEncodedUrl (/usr/local/lib/node_modules/v2ray-tools/src/config2vmess.js:78:22)
    at config2vmess (/usr/local/lib/node_modules/v2ray-tools/src/config2vmess.js:90:21)
    at Object.config2VmessHandler [as handler] (/usr/local/lib/node_modules/v2ray-tools/src/cli.js:41:20)
    at Object.runCommand (/usr/local/lib/node_modules/v2ray-tools/node_modules/yargs/lib/command.js:240:40)
    at Object.parseArgs [as _parseArgs] (/usr/local/lib/node_modules/v2ray-tools/node_modules/yargs/yargs.js:1105:41)
    at Object.get [as argv] (/usr/local/lib/node_modules/v2ray-tools/node_modules/yargs/yargs.js:1033:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/v2ray-tools/src/cli.js:77:10)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
false

Failed to use v2ray-tools vmesstest

Hello, I'm trying to use this amazing tool to connect my vmess server and make a VPN GUI client. However, I got this error when using vmesstest. Can u give me some help about this? Thanks a lot!
image

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.