v2ray with prometheus/node_exporter
后续需要配合 prometheus_server 实现监控功能
选配 Grafana
Image tag = v2ray/official:latest (2017-07-06)
version = 1.1.2
platform = linux
arch = amd64
V2ray端口 取决于配置信息
9100:node_exporter端口
xxx:
image: zpfield/v2ray-prometheus
ports:
- "yourPort:yourPortInConfig"
- "yourNEProt:9100"
volumes:
- {ca证书Path}/ca:/root/ca
- {v2ray配置Path}:/etc/v2ray
- {日志文件Path}:/var/log/v2ray
restart: always
v2ray配置Path 中 需要放置
config.json文件
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbounds": [
{
"port": {yourPort},
"listen": "0.0.0.0",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": {randomId},
"level": 1,
"alterId": 32
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"serverName": "{yourDomain}",
"allowInsecure": false,
"certificates": [
{
"certificateFile": "/root/ca/{full_chain}",
"keyFile": "/root/ca/{privateKey}"
}
]
},
"wsSettings": {
"path": "{yourUrlPath}",
"headers": {}
}
},
"tag": "",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"rules": [
{
"ip": ["geoip:private"],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": ["bittorrent"],
"type": "field"
}
]
}
}
Content type
Image
Digest
Size
42.5 MB
Last updated
about 5 years ago
docker pull zpfield/v2ray-prometheus