v2
2025/6/30大约 2 分钟约 491 字
start
setsid ./v2ray
configure
{
"log": {
"access": ".log_access",
"error": ".log_error",
"loglevel": "warning"
},
"routing": {
"rules": [
{
"inboundTag": [
"api"
],
"outboundTag": "api",
"type": "field"
},
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"type": "field"
}
]
},
"dns": null,
"inbounds": [
{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"streamSettings": null,
"tag": "api",
"sniffing": null
},
{
# proxy
"listen": null,
"port": 24331,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "8774089e-6a40-4bb7-f71e-qb0460bb3c8f",
"alterId": 0
}
],
"disableInsecureEncryption": false
},
"streamSettings": {
"network": "tcp",
"security": "none",
"tcpSettings": {
"header": {
"type": "http",
"request": {
"method": "GET",
"path": [
"/"
],
"headers": {}
},
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Host": [
"a.189.cn"
]
}
}
}
}
},
"tag": "inbound-24331",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
},
{
#deirect
"listen": null,
"port": 24332,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "0a0eb176-9583-45c3-ea32-3bc0a45af520",
"alterId": 0
}
],
"disableInsecureEncryption": false
},
"streamSettings": {
"network": "tcp",
"security": "none",
"tcpSettings": {
"header": {
"type": "none"
}
}
},
"tag": "inbound-24332",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"transport": null,
"policy": {
"system": {
"statsInboundDownlink": true,
"statsInboundUplink": true
}
},
"api": {
"services": [
"HandlerService",
"LoggerService",
"StatsService"
],
"tag": "api"
},
"stats": {},
"reverse": null,
"fakeDns": null
}
client clash
# HTTP 端口
port: 7890
# SOCKS5 端口
socks-port: 7891
# Linux 及 macOS 的 redir 端口
# redir-port: 7892
allow-lan: false
# 仅适用于设置 allow-lan 为 true 时
# "*": 绑定所有 IP 地址
# 192.168.122.11: 绑定单个 IPv4 地址
# "[aaaa::a8aa:ff:fe09:57d8]": 绑定单个 IPv6 地址
# bind-address: "*"
# Rule / Global / Direct (默认为 Rule 模式)
mode: Global
# 设置输出日志的等级 (默认为 info)
# info / warning / error / debug / silent
log-level: info
# RESTful API for clash
external-controller: 127.0.0.1:9090
# you can put the static web resource (such as clash-dashboard) to a directory, and clash would serve in `${API}/ui`
# input is a relative path to the configuration directory or an absolute path
# external-ui: folder
# Secret for RESTful API (Optional)
# secret: ""
# 实验性功能
#experimental:
#ignore-resolve-fail: true # 忽略 DNS 解析失败,默认值为true
# interface-name: en0 # 出站接口名称
# 本地 SOCKS5/HTTP(S) 服务器认证
# authentication:
# - "user1:pass1"
# - "user2:pass2"
# # 实验性 hosts, 支持通配符(如 *.clash.dev 甚至 *.foo.*.examplex.com )
# # 静态域的优先级高于通配符域(foo.example.com > *.example.com)
#hosts:
#'mtalk.google.com': 108.177.125.188
proxies:
- name: "免流"
type: vmess
server: 101.43.62.33
port: 24331
uuid: 8774089e-6a40-4bb7-f71e-qb0460bb3c8f
alterId: 0
cipher: auto
# udp: true
network: http
http-opts:
method: "GET"
path:
- '/'
# - '/video'
headers:
Host:
- a.189.cn
# Connection:
# - keep-alive
- name: "代理腾讯"
type: vmess
server: 101.43.62.33
port: 24332
uuid: 0a0eb176-9583-45c3-ea32-3bc0a45af520
alterId: 0
cipher: auto
# udp: true
network: tcp
#http-opts:
# method: "GET"
# path:
# - '/'
# - '/video'
# headers:
# host:
# - a.189.cn
# Connection:
# - keep-alive