本帖最后由 mujj 于 2023-3-31 20:46 编辑
国内服务器需要以下配置。(被中转的v2服务器也是同样的配置)
额外ID:0
加密方式:auto
传输协议:tcp
伪装类型:http
不启用tls
然后中转另一个国外v2ray服务器,并进行国内外ip分流。
国内ip直接连接,
国外ip通过中转的v2服务器连接。
自建只会用x-ui或者一键脚本。
问了chatGPT,也不行。
给个参考地址:https://toutyrater.github.io/advanced/vps_relay.html
这个也是试过了,不行。
===========================================
搞定了,给所有用家宽免流的MJJ。
- {
- "log": {
- "loglevel": "warning"
- },
- "inbounds": [//国内服务器配置
- {
- "listen": "0.0.0.0", //0.0.0.0 不用动
- "port": 3602, //国内端口
- "protocol": "vmess",
- "settings": {
- "clients": [
- {
- "id": "7baea154-fe59-45b2-f2fc-c9ce21a9fbd4",
- "alterId": 0
- }
- ],
- "disableInsecureEncryption": false
- },
- "streamSettings": {
- "network": "tcp",
- "security": "none",
- "tcpSettings": {
- "header": {
- "type": "http",
- "request": {
- "method": "GET",
- "path": [
- "/"
- ],
- "headers": {}
- },
- "response": {
- "version": "1.1",
- "status": "200",
- "reason": "OK",
- "headers": {}
- }
- }
- }
- },
- "tag": "inbound-1",
- "sniffing": {
- "enabled": true,
- "destOverride": [
- "http",
- "tls"
- ]
- }
- }
- ],
- "outbounds": [
- //国外服务器
- {
- "tag": "proxy",
- "protocol": "vmess",
- "settings": {
- "vnext": [
- {
- "address": "43.0.0.0", //国外ip
- "port": 3603, //国外端口
- "users": [
- {
- "id": "7baea154-fe59-45b2-f2fc-c9ce21a9fbd4",
- "alterId": 0,
- "email": "[email protected]",
- "security": "auto"
- }
- ]
- }
- ]
- },
- "streamSettings": {
- "network": "tcp",
- "tcpSettings": {
- "header": {
- "type": "http",
- "request": {
- "version": "1.1",
- "method": "GET",
- "path": [
- "/"
- ],
- "headers": {
- "Host": [
- ""
- ],
- "User-Agent": [
- ""
- ],
- "Accept-Encoding": [
- "gzip, deflate"
- ],
- "Connection": [
- "keep-alive"
- ],
- "Pragma": "no-cache"
- }
- }
- }
- }
- },
- "mux": {
- "enabled": true,
- "concurrency": 8
- }
- },
- {
- "tag": "direct",
- "protocol": "freedom",
- "settings": {}
- },
- {
- "tag": "blocked",
- "protocol": "blackhole",
- "settings": {}
- }
- ],
- "routing": {
- "domainStrategy": "IPIfNonMatch",
- "rules": [
- {
- "type": "field",
- "outboundTag": "direct",
- "domain": [
- "geosite:cn" //直连国内域名
- ],
- "enabled": true
- },
- {
- "type": "field",
- "outboundTag": "direct",
- "ip": [
- "geoip:cn" //直连国内ip
- ],
- "enabled": true
- },
- {
- "type": "field",
- "ip": [
- "geoip:private"
- ],
- "outboundTag": "blocked"
- }
- ]
- }
- }
复制代码 |