Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/0x-jerry/v2fly-schema

V2Fly config json schema
https://github.com/0x-jerry/v2fly-schema

json-schema v2ray-config-schema

Last synced: 4 days ago
JSON representation

V2Fly config json schema

Awesome Lists containing this project

README

        

# V2ray config json schema

根据 [v2fly](https://v2fly.org/) 文档,自动生成 JSON Schema 和 TypeScript typedef

## 使用方式

### Visual Studio Code

官方文档: [json-schemas-and-settings](https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings)

示例:

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

```json
{
"json.schemas": [
{
"fileMatch": ["/*.json", "/*.jsonc"],
"url": "https://raw.githubusercontent.com/0x-jerry/v2ray-config-json-schema/master/v4.schema.json"
}
]
}
```

### Nodejs

安装:`yarn add @0x-jerry/v2ray-schema`

`typescript`:

```ts
import type { V4Config } from '@0x-jerry/v2ray-schema'

const v2raySchema: V4Config = {
...
}
```

### Deno

```ts
import { V4Config } from 'npm:@0x-jerry/v2ray-schema'

const v2raySchema: V4Config = {
...
}
```