Skip to content

Instantly share code, notes, and snippets.

@rogerlin0330
Created July 21, 2019 07:41
Show Gist options
  • Save rogerlin0330/8d6681c948776b56b3607a02e7ea3f82 to your computer and use it in GitHub Desktop.
Save rogerlin0330/8d6681c948776b56b3607a02e7ea3f82 to your computer and use it in GitHub Desktop.
Configuration sample file for v2ray (https://github.com/v2ray/v2ray-core) which should be located in path: /etc/v2ray and renamed to config.json according to v2ray.service (https://gist.github.com/rogerlin0330/7823c8db35c32d9bcfa646060e098702)
{
"log": {
"loglevel": "warning",
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log"
},
"inbounds": [
{
"port": 1081,
"listen": "0.0.0.0",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth",
"udp": false
}
}
],
"outbounds": [{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "www.xxxxx.tech",
"port": 443,
"users": [
{
"id": "xxxxxxxxxxxxxxxxxxxxx",
"alterId": 64
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"wsSettings": {
"path": "/xxxxx"
}
}
}],
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"outboundTag": "direct",
"domain": ["geosite:cn"]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:cn",
"geoip:private"
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment