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: about 2 months ago
JSON representation
V2Fly config json schema
- Host: GitHub
- URL: https://github.com/0x-jerry/v2fly-schema
- Owner: 0x-jerry
- License: mit
- Created: 2019-07-10T03:05:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-26T12:01:53.000Z (about 2 months ago)
- Last Synced: 2025-04-26T13:19:48.223Z (about 2 months ago)
- Topics: json-schema, v2ray-config-schema
- Language: TypeScript
- Homepage:
- Size: 707 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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/v2fly.schema.json"
}
]
}
```### Nodejs
安装:`pnpm i @0x-jerry/v2ray-schema -D`
`typescript`:
```ts
import type { V2FlyConfig } from '@0x-jerry/v2ray-schema'const v2raySchema: V2FlyConfig = {
...
}
```