You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
3.1 KiB

7 years ago
# vTemplate
7 years ago
4 years ago
这是一个社会实验性质的项目,提供标准的 V2Ray 配置模板。
4 years ago
## 贡献指南
4 years ago
欢迎你将自己使用的配置制作模板,提交 PR。
4 years ago
4 years ago
模板应遵守以下标准:
- 缩进使用 2 个空格
- 方 (花) 括号不换行
- 不需要的字段应该移除
- `log` 部分只留 `loglevel`
- 对于 `outbounds`,客户端应有 `proxy``direct`,服务端应有 `direct``block`
- 除非特定场景的模板,否则只处理 `geoip:private``direct` (服务端处理到 `block`)
- 除非特定场景的模板,配置文件中应不写 DNS
- `uuid` 应留空,由用户自行填写。
- `routing` 中的 `domainStrategy` 保持默认,即 `AsIs`
4 years ago
4 years ago
### 举例
4 years ago
```yaml
4 years ago
{
"log": {
"loglevel": "warning"
},
"routing": {},
"inbounds": [],
"outbounds": []
}
```
### 客户端
```yaml
4 years ago
{
"log": {
"loglevel": "warning"
},
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"ip": [
"geoip:private"
],
"outboundTag": "direct",
"port": null,
"type": "field"
}
]
},
"inbounds": [
{
"port": 1234,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "e2b39869-7e9e-411b-a561-00904419bed9",
"alterId": 100,
"testsEnabled": "VMessAEAD"
}
]
},
"tag": "tcp",
"streamSettings": {
"network": "tcp"
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {
},
"tag": "direct"
}
]
}
```
### 服务端
```yaml
4 years ago
{
"log": {
"loglevel": "warning"
},
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"port": null,
"type": "field"
}
]
},
"inbounds": [
{
"port": 1234,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "e2b39869-7e9e-411b-a561-00904419bed9",
"alterId": 100,
"testsEnabled": "VMessAEAD"
}
]
},
"tag": "tcp",
"streamSettings": {
"network": "tcp"
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {
},
"tag": "direct"
},
{
"protocol": "blackhole",
"settings": {
},
"tag": "blocked"
}
]
}
```
4 years ago
## 如何选取适合自己的配置:
![](how-to-choose/how-to-choose-a-v2ray-plan.png)
附加说明:<br>
尽管 Websocket+TLS+Web 可能称得上是现阶段最好的方案,但**绝对**不是推荐新手一上来就尝试的方案,更不是 V2Ray 唯一的用法。<br>
同时,你应当了解,每个地区的网络状况不同 (主要指对不同协议的 QoS 程度),你可以将所有配置都尝试一遍来寻找最适合自己的,尽量少问、最好不问“为什么我的 V2Ray 这么慢?”这样的问题。
4 years ago
## 最后
7 years ago
4 years ago
祝你玩的愉快,感谢原始作者 KiriKira 和 Project V 的所有开发人员,以及 v2ray.fun 的作者。