Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/0x-jerry/v2fly-schema
- Owner: 0x-jerry
- License: mit
- Created: 2019-07-10T03:05:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T06:54:22.000Z (10 days ago)
- Last Synced: 2024-11-05T07:31:48.528Z (10 days ago)
- Topics: json-schema, v2ray-config-schema
- Language: TypeScript
- Homepage:
- Size: 503 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
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/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 = {
...
}
```