Sign inSign up

zpfield/v2ray-prometheus

By zpfield

Updated about 5 years ago

Image
0

913

zpfield/v2ray-prometheus repository overview

描述

v2ray with prometheus/node_exporter

后续需要配合 prometheus_server 实现监控功能

选配 Grafana

镜像版本信息

V2ray

Image tag = v2ray/official:latest (2017-07-06)

node_exporter

version = 1.1.2

platform = linux

arch = amd64

端口信息

V2ray端口 取决于配置信息

9100:node_exporter端口

docker-compose 配置信息(部分)

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

config.json

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"
    }
   ]
 }
}

Tag summary

Content type

Image

Digest

Size

42.5 MB

Last updated

about 5 years ago

docker pull zpfield/v2ray-prometheus