config.json 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // Config file of V2Ray. This file follows standard JSON format, with comments support.
  2. // Uncomment entries below to satisfy your needs. Also read our manual for more detail at
  3. // https://www.v2ray.com/
  4. {
  5. "log": {
  6. // By default, V2Ray writes access log to stdout.
  7. // "access": "/path/to/access/log/file",
  8. // By default, V2Ray write error log to stdout.
  9. // "error": "/path/to/error/log/file",
  10. // Log level, one of "debug", "info", "warning", "error", "none"
  11. "loglevel": "warning"
  12. },
  13. // List of inbound proxy configurations.
  14. "inbounds": [{
  15. // Port to listen on. You may need root access if the value is less than 1024.
  16. "port": 1080,
  17. // IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
  18. "listen": "127.0.0.1",
  19. // Tag of the inbound proxy. May be used for routing.
  20. "tag": "socks-inbound",
  21. // Protocol name of inbound proxy.
  22. "protocol": "socks",
  23. // Settings of the protocol. Varies based on protocol.
  24. "settings": {
  25. "auth": "noauth",
  26. "udp": false,
  27. "ip": "127.0.0.1"
  28. }
  29. }],
  30. // List of outbound proxy configurations.
  31. "outbounds": [{
  32. // Protocol name of the outbound proxy.
  33. "protocol": "freedom",
  34. // Settings of the protocol. Varies based on protocol.
  35. "settings": {},
  36. // Tag of the outbound. May be used for routing.
  37. "tag": "direct"
  38. },{
  39. "protocol": "blackhole",
  40. "settings": {},
  41. "tag": "blocked"
  42. }],
  43. // Transport is for global transport settings. If you have multiple transports with same settings
  44. // (say mKCP), you may put it here, instead of in each individual inbound/outbounds.
  45. //"transport": {},
  46. // Routing controls how traffic from inbounds are sent to outbounds.
  47. "routing": {
  48. "domainStrategy": "IPOnDemand",
  49. "rules":[{
  50. "type": "field",
  51. "ip": ["geoip:private"],
  52. "outboundTag": "blocked"
  53. }]
  54. },
  55. // Dns settings for domain resolution.
  56. "dns": {
  57. // Static hosts, similar to hosts file.
  58. "hosts": {
  59. // Blacklist all Baidu domains, including all sub domains.
  60. "domain:baidu.com": "127.0.0.1"
  61. },
  62. "servers": [
  63. {
  64. "address": "114.114.114.114",
  65. "port": 53,
  66. // List of domains that use this DNS first.
  67. "domains": [
  68. "domain:v2ray.com"
  69. ]
  70. },
  71. "8.8.8.8",
  72. "1.1.1.1",
  73. "localhost"
  74. ]
  75. },
  76. // Policy controls some internal behavior of how V2Ray handles connections.
  77. // It may be on connection level by user levels in 'levels', or global settings in 'system.'
  78. "policy": {
  79. // Connection policys by user levels
  80. "levels": {
  81. "0": {
  82. "uplinkOnly": 0,
  83. "downlinkOnly": 0
  84. }
  85. },
  86. "system": {
  87. "statsInboundUplink": false,
  88. "statsInboundDownlink": false
  89. }
  90. },
  91. // Stats enables internal stats counter.
  92. // This setting can be used together with Policy and Api.
  93. //"stats":{},
  94. // Api enables gRPC APIs for external programs to communicate with V2Ray instance.
  95. //"api": {
  96. //"tag": "api",
  97. //"services": [
  98. // "HandlerService",
  99. // "LoggerService",
  100. // "StatsService"
  101. //]
  102. //},
  103. // You may add other entries to the configuration, but they will not be recognized by V2Ray.
  104. "other": {}
  105. }