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