修正 wss 模板

This commit is contained in:
kirikira 2017-12-04 22:42:23 +08:00
parent bddebc53b6
commit 64e9d06a87
2 changed files with 195 additions and 188 deletions

198
websocket+TLS/config_client.json Executable file → Normal file
View File

@ -1,105 +1,111 @@
{ {
"outbound": { "outbound": {
"streamSettings": { "streamSettings": {
"network": "ws", "network": "ws",
"kcpSettings": null, "kcpSettings": null,
"wsSettings": { "wsSettings": {
"headers": { "headers": {
"host": "example.domain" "host": "example.domain"
},
"path": ""
},
"tcpSettings": null,
"tlsSettings": {},
"security": "tls"
}, },
"tag": "agentout", "path": ""
"protocol": "vmess", },
"mux": { "tcpSettings": null,
"enabled": true, "tlsSettings": {},
"concurrency": 8 "security": "tls"
},
"settings": {
"vnext": [{
"users": [{
"alterId": 100,
"security": "aes-128-gcm",
"id": "e2b39869-7e9e-411b-a561-00904419bed9"
}],
"port": 443,
"address": "example.domain"
}]
}
}, },
"log": { "tag": "agentout",
"access": "", "protocol": "vmess",
"loglevel": "debug", "mux": {
"error": "" "enabled": true
}, },
"outboundDetour": [{ "settings": {
"tag": "direct", "vnext": [
"protocol": "freedom",
"settings": {
"response": null
}
},
{ {
"tag": "blockout", "users": [
"protocol": "blackhole", {
"settings": { "alterId": 100,
"response": { "security": "aes-128-gcm",
"type": "http" "id": "0cdf8a45-303d-4fed-9780-29aa7f54175e"
}
} }
],
"port": 443,
"address": "example.domain"
} }
], ]
"inbound": {
"streamSettings": null,
"settings": {
"ip": "127.0.0.1",
"udp": true,
"clients": null,
"auth": "noauth"
},
"protocol": "socks",
"port": 10086,
"listen": "0.0.0.0"
},
"inboundDetour": null,
"routing": {
"settings": {
"rules": [{
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"domain": null,
"type": "field",
"port": null,
"outboundTag": "direct"
}],
"domainStrategy": "IPIfNonMatch"
},
"strategy": "rules"
},
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
} }
},
"log": {
"access": "",
"loglevel": "info",
"error": ""
},
"outboundDetour": [
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"response": null
}
},
{
"tag": "blockout",
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
}
}
],
"inbound": {
"streamSettings": null,
"settings": {
"ip": "127.0.0.1",
"udp": true,
"clients": null,
"auth": "noauth"
},
"protocol": "socks",
"port": 1080,
"listen": "0.0.0.0"
},
"inboundDetour": null,
"routing": {
"settings": {
"rules": [
{
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"domain": null,
"type": "field",
"port": null,
"outboundTag": "direct"
}
],
"domainStrategy": "IPIfNonMatch"
},
"strategy": "rules"
},
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
}
} }

View File

@ -1,91 +1,92 @@
{ {
"outbound": { "outbound": {
"streamSettings": null, "streamSettings": null,
"tag": null, "tag": null,
"protocol": "freedom", "protocol": "freedom",
"mux": null, "mux": null,
"settings": null "settings": null
}, },
"log": { "log": {
"access": "/var/log/v2ray/access.log", "access": "/var/log/v2ray/access.log",
"loglevel": "info", "loglevel": "error",
"error": "/var/log/v2ray/error.log" "error": "/var/log/v2ray/error.log"
}, },
"outboundDetour": [{ "inboundDetour": null,
"tag": "blocked", "inbound": {
"protocol": "blackhole", "streamSettings": {
"settings": null "network": "ws",
}], "kcpSettings": null,
"inbound": { "wsSettings": {
"streamSettings": { "headers": {
"network": "kcp", "host": "example.domain"
"kcpSettings": {
"uplinkCapacity": 100,
"downlinkCapacity": 100,
"readBufferSize": 2,
"mtu": 1350,
"header": {
"type": "srtp",
"request": null,
"response": null
},
"tti": 50,
"congestion": false,
"writeBufferSize": 2
},
"wsSettings": null,
"tcpSettings": null,
"tlsSettings": {
"certificates": [{
"keyFile": "/path/to/example.domain.key",
"certificateFile": "/path/to/example.domain/fullchain.cer"
}]
},
"security": "tls"
}, },
"settings": { "path": "",
"ip": null, "connectionReuse": true
"udp": true, },
"clients": [{ "tcpSettings": null,
"alterId": 100, "tlsSettings": {
"security": "aes-128-gcm", "certificates": [
"id": "e2b39869-7e9e-411b-a561-00904419bed9" {
}], "keyFile": "/path/to/example.domain.key",
"auth": null "certificateFile": "/path/to/example.domain/fullchain.cer"
}, }
"protocol": "vmess", ]
"port": 443, },
"listen": null "security": "tls"
}, },
"inboundDetour": null, "listen": null,
"routing": { "protocol": "vmess",
"settings": { "port": 443,
"rules": [{ "settings": {
"ip": [ "ip": null,
"0.0.0.0/8", "udp": true,
"10.0.0.0/8", "clients": [
"100.64.0.0/10", {
"127.0.0.0/8", "alterId": 100,
"169.254.0.0/16", "security": "aes-128-gcm",
"172.16.0.0/12", "id": "0cdf8a45-303d-4fed-9780-29aa7f54175e"
"192.0.0.0/24", }
"192.0.2.0/24", ],
"192.168.0.0/16", "auth": null
"198.18.0.0/15", }
"198.51.100.0/24", },
"203.0.113.0/24", "outboundDetour": [
"::1/128", {
"fc00::/7", "tag": "blocked",
"fe80::/10" "protocol": "blackhole",
], "settings": null
"domain": null, }
"type": "field", ],
"port": null, "routing": {
"outboundTag": "blocked" "strategy": "rules",
}], "settings": {
"domainStrategy": null "rules": [
}, {
"strategy": "rules" "ip": [
}, "0.0.0.0/8",
"dns": null "10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"domain": null,
"type": "field",
"port": null,
"outboundTag": "blocked"
}
],
"domainStrategy": null
}
},
"dns": null
} }