1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-14 16:25:57 -05:00
v2fly/release/config/config.json

121 lines
3.2 KiB
JSON
Raw Normal View History

2018-11-04 06:56:31 -05:00
// 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.v2ray.com/
2018-10-03 14:32:32 -04:00
{
"log": {
2018-11-04 06:56:31 -05:00
// By default, V2Ray writes access log to stdout.
// "access": "/path/to/access/log/file",
// By default, V2Ray write error log to stdout.
// "error": "/path/to/error/log/file",
// Log level, one of "debug", "info", "warning", "error", "none"
2018-10-03 14:32:32 -04:00
"loglevel": "warning"
},
2018-11-04 06:56:31 -05:00
// List of inbound proxy configurations.
"inbounds": [{
// Port to listen on. You may need root access if the value is less than 1024.
2018-10-03 14:32:32 -04:00
"port": 1080,
2018-11-04 06:56:31 -05:00
// IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
2018-10-03 14:32:32 -04:00
"listen": "127.0.0.1",
2018-11-04 06:56:31 -05:00
// Tag of the inbound proxy. May be used for routing.
"tag": "socks-inbound",
// Protocol name of inbound proxy.
2018-10-03 14:32:32 -04:00
"protocol": "socks",
2018-11-04 06:56:31 -05:00
// Settings of the protocol. Varies based on protocol.
2018-10-03 14:32:32 -04:00
"settings": {
"auth": "noauth",
"udp": false,
"ip": "127.0.0.1"
}
2018-11-04 06:56:31 -05:00
}],
// List of outbound proxy configurations.
"outbounds": [{
// Protocol name of the outbound proxy.
2018-10-03 14:32:32 -04:00
"protocol": "freedom",
2018-11-04 06:56:31 -05:00
// Settings of the protocol. Varies based on protocol.
2018-10-03 14:32:32 -04:00
"settings": {},
2018-11-04 06:56:31 -05:00
// Tag of the outbound. May be used for routing.
2018-10-03 14:32:32 -04:00
"tag": "direct"
2018-11-04 06:56:31 -05:00
},{
"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.
//"transport": {},
// Routing controls how traffic from inbounds are sent to outbounds.
"routing": {
"domainStrategy": "IPOnDemand",
"rules":[{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "blocked"
}]
2018-10-03 14:32:32 -04:00
},
2018-11-04 06:56:31 -05:00
// Dns settings for domain resolution.
"dns": {
// Static hosts, similar to hosts file.
"hosts": {
// Blacklist all Baidu domains, including all sub domains.
"domain:baidu.com": "127.0.0.1"
},
"servers": [
{
2018-11-05 16:13:45 -05:00
"address": "114.114.114.114",
2018-11-04 06:56:31 -05:00
"port": 53,
2018-11-05 16:13:45 -05:00
// List of domains that use this DNS first.
2018-11-04 06:56:31 -05:00
"domains": [
"domain:v2ray.com"
2018-11-05 03:56:38 -05:00
]
2018-11-04 06:56:31 -05:00
},
"8.8.8.8",
2018-11-05 16:13:45 -05:00
"1.1.1.1",
2018-11-04 06:56:31 -05:00
"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.'
2018-10-03 14:32:32 -04:00
"policy": {
2018-11-04 06:56:31 -05:00
// Connection policys by user levels
2018-10-03 14:32:32 -04:00
"levels": {
2018-11-04 06:56:31 -05:00
"0": {
"uplinkOnly": 0,
"downlinkOnly": 0
}
},
"system": {
"statsInboundUplink": false,
"statsInboundDownlink": false
2018-10-03 14:32:32 -04:00
}
2018-11-04 06:56:31 -05:00
},
// Stats enables internal stats counter.
// This setting can be used together with Policy and Api.
//"stats":{},
// Api enables gRPC APIs for external programs to communicate with V2Ray instance.
//"api": {
//"tag": "api",
//"services": [
// "HandlerService",
// "LoggerService",
// "StatsService"
//]
//},
// You may add other entries to the configuration, but they will not be recognized by V2Ray.
"other": {}
2018-10-03 14:32:32 -04:00
}