|
|
nginx前置分流, xray后置的。
这是xray的配置
- {
- "log": {
- "loglevel": "warning",
- "access": "/var/log/xray/access.log",
- "error": "/var/log/xray/error.log"
- },
- "dns": {
- "servers": [
- "https+local://8.8.8.8/dns-query"
- ]
- },
- "routing": {
- "domainStrategy": "IPIfNonMatch",
- "domainMatcher": "mph",
- "rules": [
- // rules 自己配置
- ]
- },
- "inbounds": [
- {
- "listen": "127.0.0.1",
- "port": 41256, // 端口自己定义, 跟 nginx 配置中留存的端口一致
- "protocol": "vless",
- "settings": {
- "clients": [
- {
- "id": "xxxxxxxxxxxxx",
- "level": 0,
- "email": "",
- "flow": "xtls-rprx-vision"
- }
- ],
- "decryption": "none"
- },
- "sniffing": {
- "enabled": true,
- "destOverride": [
- "http",
- "tls"
- ]
- },
- "streamSettings": {
- "network": "tcp",
- "security": "tls",
- "tlsSettings": {
- "rejectUnknownSni": true,
- "certificates": [
- {
- "ocspStapling": 3600,
- "oneTimeLoading": false,
- "usage": "encipherment",
- "certificateFile": "/usr/ssl/chain.pem", // 证书地址
- "keyFile": "/usr/ssl/key.pem" // key地址
- }
- ]
- },
- "tcpSettings":{
- "acceptProxyProtocol": true,
- "header": {
- "type": "none"
- }
- }
- }
- }
- ],
- "outbounds": [
- {
- "protocol": "freedom",
- "tag": "direct",
- "settings": {
- "domainStrategy": "UseIP"
- }
- },
- {
- "protocol": "blackhole",
- "tag": "block",
- "settings": {
- "response": {
- "type": "http"
- }
- }
- }
- ]
- }
复制代码
这是nginx的配置
|
|