V2ray配置文件翻译

Leon
2021-08-23 / 0 评论 / 1,459 阅读 / 正在检测是否收录...
// Config file of V2Ray. This file follows standard JSON format, with comments support.
// Uncomment entries below to satisfy your needs. Also read our manual for more detail at
// https://www.v2fly.org/
// V2Ray的配置文件。 该文件遵循标准的JSON格式,支持注释。
// 取消注释后的项目以满足您的需要。另请阅读我们的手册以获取更多详细信息
{
  // 日志配置,表示 V2Ray 如何输出日志。
  "log": {
    // By default, V2Ray writes access log to stdout.
    // 默认情况下,V2Ray访问日志标准输出写入文件。
    // "access": "/path/to/access/log/file",

    // By default, V2Ray write error log to stdout.
    // 默认情况下,V2Ray错误日志标准输出写入文件。
    // "error": "/path/to/error/log/file",

    // Log level, one of "debug", "info", "warning", "error", "none"
    // 日志的级别, 期望值:"debug", "info", "warning", "error", "none"
    "loglevel": "warning"
  },
  // List of inbound proxy configurations.
  // 入站代理配置列表。
  "inbounds": [
    // 一个数组,每个元素是一个入站连接配置。
    {
    // Port to listen on. You may need root access if the value is less than 1024.
    // 监听端口。如果端口号小于1024则需要root权限。
    "port": 1080,

    // IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
    // 监听地址。改成“0.0.0.0”来监听所有网络接口。
    "listen": "127.0.0.1",

    // Tag of the inbound proxy. May be used for routing.
    // 入站代理标签。可用于路由。
    "tag": "socks-inbound",

    // Protocol name of inbound proxy.
    // 入站代理的协议名称。
    "protocol": "socks",

    // Settings of the protocol. Varies based on protocol.
    // 协议的设置。因协议而异。
    "settings": {
      "auth": "noauth",
      "udp": false,
      "ip": "127.0.0.1"
    },

    // Enable sniffing on TCP connection.
    // 在TCP连接上启用嗅探。
    "sniffing": {
      "enabled": true,
      // Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS.
      // 如果连接是HTTP或HTTPS,目标域将被覆盖为连接携带的域。
      "destOverride": ["http", "tls"]
    }
  }],
  // List of outbound proxy configurations.
  // 出站代理配置列表。
  "outbounds": [
    // 一个数组,每个元素是一个出站连接配置。列表中的第一个元素作为主出站协议。当路由匹配不存在或没有匹配成功时,流量由主出站协议发出。
    {
    // Protocol name of the outbound proxy.
    // 出站代理的协议名称。
    "protocol": "freedom",

    // Settings of the protocol. Varies based on protocol.
    // 协议设置。因协议而异。
    "settings": {},

    // Tag of the outbound. May be used for routing.
    // 出站代理标签。可用于路由。
    "tag": "direct"
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }],

  // Transport is for global transport settings. If you have multiple transports with same settings
  // (say mKCP), you may put it here, instead of in each individual inbound/outbounds.
  // 传输用于全局传输设置。 如果您有多个具有相同设置的传输
  //(比如mKCP),你可以把它放在这里,而不是在每个单独的入站/出站。

  //"transport": {},
  // 用于配置 V2Ray 如何与其它服务器建立和使用网络连接。

  // Routing controls how traffic from inbounds are sent to outbounds.
  // 路由控制如何将来自入站的流量发送到出站。
  "routing": {
    // 路由配置。
    "domainStrategy": "IPOnDemand",
    "rules":[
      {
        // Blocks access to private IPs. Remove this if you want to access your router.
        // 阻止对私有IP的访问。如果您想访问您的路由器,请删除它。
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      },
      {
        // Blocks major ads.
        // 阻止主要广告。
        "type": "field",
        "domain": ["geosite:category-ads"],
        "outboundTag": "blocked"
      }
    ]
  },

  // Dns settings for domain resolution.
  // 域名解析的 Dns 设置。
  "dns": {
    // 内置的DNS服务器,若此项不存在,则默认使用本机的DNS设置。
    // Static hosts, similar to hosts file.
    // 静态hosts,类似于主机文件。
    "hosts": {
      // Match v2fly.org to another domain on CloudFlare. This domain will be used when querying IPs for v2fly.org.
      // 将v2fly.org匹配到CloudFlare上的另一个域名。 查询v2fly.org的IPs时将使用此域。
      "domain:v2fly.org": "www.vicemc.net",

      // The following settings help to eliminate DNS poisoning in mainland China.
      // It is safe to comment these out if this is not the case for you.
      // 以下设置有助于消除中国大陆的DNS污染。
      // 如果您不是这种情况,可以安全地将这些注释掉。
      "domain:github.io": "pages.github.com",
      "domain:wikipedia.org": "www.wikimedia.org",
      "domain:shadowsocks.org": "electronicsrealm.com"
    },
    "servers": [
      "1.1.1.1",
      {
        "address": "114.114.114.114",
        "port": 53,
        // List of domains that use this DNS first.
        // 优先使用此DNS的域名列表。
        "domains": [
          "geosite:cn"
        ]
      },
      "8.8.8.8",
      "localhost"
    ]
  },

  // Policy controls some internal behavior of how V2Ray handles connections.
  // It may be on connection level by user levels in 'levels', or global settings in 'system.'
  // 策略控制V2Ray如何处理连接的一些内部行为。
  // 它可能在'levels'中的用户级别的连接级别,或'system'中的全局设置。
  "policy": {
    // Connection policys by user levels
    // 用户级别的连接策略
    // 本地策略可进行一些权限相关的配置。
    "levels": {
      "0": {
        "uplinkOnly": 0,
        "downlinkOnly": 0
      }
    },
    "system": {
      "statsInboundUplink": false,
      "statsInboundDownlink": false,
      "statsOutboundUplink": false,
      "statsOutboundDownlink": false
    }
  },

  // Stats enables internal stats counter.
  // This setting can be used together with Policy and Api. 
  // Stats启用内部统计计数器。
  // 此设置可以与Policy和Api一起使用。
  //"stats":{},
  // 当此项存在时,开启统计信息。



  // Api enables gRPC APIs for external programs to communicate with V2Ray instance.
  // Api为外部程序启用gRPC API与V2Ray实例通信。
  //"api": {
    // 内置的远程控置 API。
    //"tag": "api",
    //"services": [
    //  "HandlerService",
    //  "LoggerService",
    //  "StatsService"
    //]
  //},

  // You may add other entries to the configuration, but they will not be recognized by V2Ray.
  // 您可以在配置中添加其他项目,但它们不会被V2Ray识别。
  // "reverse": {},
  // 反向代理配置。

  "other": {}
}
0

评论 (0)

取消