0.2.2 • Published 3 years ago

@exyz/v2ray-schema v0.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

V2ray config json schema

根据 V2Ray.config.d.ts 自动生成 V2Ray.config.schema.json

raw schema content: https://raw.githubusercontent.com/cwxyz007/v2ray-config-json-schema/master/V2Ray.config.schema.json

使用方式

Visual Studio Code

官方文档: json-schemas-and-settings

示例:

在项目中添加 .vscode/settings.json 配置文件,并设置 json.schemas 字段如下:

{
  "json.schemas": [
    {
      "fileMatch": ["/*.json", "/*.jsonc"],
      "url": "https://raw.githubusercontent.com/cwxyz007/v2ray-config-json-schema/master/V2Ray.config.schema.json"
    }
  ]
}

Nodejs

安装:yarn add @exyz/v2ray-schema

typescript:

import { IV2Ray } from '@exyz/v2ray-schems'

const v2raySchema: IV2Ray = {
  ...
}

Deno

import { IV2Ray } from 'https://raw.githubusercontent.com/0x-jerry/v2ray-config-json-schema/master/v2ray-schema.ts'

const v2raySchema: IV2Ray = {
  ...
}
0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.2

3 years ago