V2ray-core: 快速配置---开启KCP,TCP+动态端口

Created on 26 Sep 2016  ·  7Comments  ·  Source: v2ray/v2ray-core

同时开启KCP,TCP+动态端口

{

"log": {
        "access": "/var/log/v2ray/access.log",  //访问日志路径自行修改
        "error": "/var/log/v2ray/error.log",    //错误日志路径自行修改
        "loglevel": "warning"
},

"inbound": {
        "port": 28000,       //kcp (udp) 监听端口
        "protocol": "vmess",
        "settings": {
            "clients": [
                {
                    "id": "xx--xx-xx-xx",  //替换你的UUID不能重复,客户端记得对应
                    "level": 1,            //客户端记得对应
                    "alterId": 100         //客户端记得对应
                }
            ]
        },
        "streamSettings": {
            "network": "kcp"  //启用kcp
        }
},

"inboundDetour": [               //举例如果只想使用KCP一种inboundDetour的整个段就可以全部
  {
            "port": 28000,       //tcp (tcp) 监听端口
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "xx--xx-xx-xx",  //替换你的UUID不能重复
                        "level": 1,
                        "alterId": 100
                    }
                ]
            }
  },
  {
            "port": 28001,       //kcp (udp) 动态端口主监听端口
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "xx--xx-xx-xx",  //替换你的UUID不能重复
                        "level": 1,
                        "alterId": 100
                    }
                ],
                "detour": {
                    "to": "detour-kcp"
                }
            },
            "streamSettings": {
                "network": "kcp"
            }
  },
  {
            "port": 28001,       //tcp (tcp) 动态端口主监听端口
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "xx--xx-xx-xx",  //替换你的UUID不能重复
                        "level": 1,
                        "alterId": 100
                    }
                ],
                "detour": {
                    "to": "detour-tcp"
                }
            }
  },
  {
            "protocol": "vmess",
            "port": "50001-50100",   //kcp (udp)动态端口监听范围 
            "tag": "detour-kcp",
            "settings": {},
            "allocate": {
                "strategy": "random", //随机
                "concurrency": 2,     //开放2个端口
                "refresh": 5          //5分钟刷新一次
            },
            "streamSettings": {
                "network": "kcp"
            }
  },
  {
            "protocol": "vmess",
            "port": "50001-50100",   //tcp (tcp)动态端口监听范围 
            "tag": "detour-tcp",
            "settings": {},
            "allocate": {
                "strategy": "random",
                "concurrency": 2,
                "refresh": 5
            }
  }
],

"outbound": {
        "protocol": "freedom",
        "settings": {}
},

"outboundDetour": [
        {
            "protocol": "blackhole",
            "settings": {},
            "tag": "blocked"
        }
],

"routing": {
        "strategy": "rules",
        "settings": {
            "rules": [
                {
                    "type": "field",
                    "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",
                        "::1/128",
                        "fc00::/7",
                        "fe80::/10"
                    ],
                    "outboundTag": "blocked"
                }
            ]
        }
},

"transport": {
        "tcpSettings": {
            "connectionReuse": true
        },
        "kcpSettings": {
            "mtu": 1350,
            "tti": 20,
            "uplinkCapacity": 12,
            "downlinkCapacity": 100,
            "congestion": false,
            "readBufferSize": 1,
            "writeBufferSize": 1,
            "header": {
                "type": "none"
            }
        }
    }
}

Most helpful comment

All 7 comments

如果再增加shadowsocks,应该怎么配置?
streamSettings 对tcp连接也还是写上才有对称美感哇。

这两行:
"port": 28000, //kcp (udp) 监听端口
"port": 28000, //tcp (tcp) 监听端口
不冲突吗?

@YugWu 一个TCP一个UDP怎么冲突

难道共同监听一个端口

wtlusvm [email protected]于2016年11月7日周一 下午6:03写道:

@YugWu https://github.com/YugWu 一个TCP一个UDP怎么冲突


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/v2ray/v2ray-core/issues/267#issuecomment-258793955,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APXibfQg-13Ku7IQThRmLIWvJYgT4vXEks5q7veGgaJpZM4KGfsC
.

协议不同不是说了么,你还要学习一个啊

2016年11月7日星期一,WuMingyu [email protected] 写道:

难道共同监听一个端口

wtlusvm <[email protected]
下午6:03写道:

@YugWu https://github.com/YugWu 一个TCP一个UDP怎么冲突


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/v2ray/v2ray-core/issues/267#issuecomment-258793955,
or mute the thread
13Ku7IQThRmLIWvJYgT4vXEks5q7veGgaJpZM4KGfsC>
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/v2ray/v2ray-core/issues/267#issuecomment-258794437,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIpaLYlgQONLS10mgOT_xpYXLRpX7fiyks5q7vgHgaJpZM4KGfsC
.

哈,这样啊,受教了

Rememberli [email protected]于2016年11月7日周一 下午6:07写道:

协议不同不是说了么,你还要学习一个啊

2016年11月7日星期一,WuMingyu [email protected] 写道:

难道共同监听一个端口

wtlusvm <[email protected]
下午6:03写道:

@YugWu https://github.com/YugWu 一个TCP一个UDP怎么冲突


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
<https://github.com/v2ray/v2ray-core/issues/267#issuecomment-258793955
,
or mute the thread
13Ku7IQThRmLIWvJYgT4vXEks5q7veGgaJpZM4KGfsC>
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/v2ray/v2ray-core/issues/267#issuecomment-258794437,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AIpaLYlgQONLS10mgOT_xpYXLRpX7fiyks5q7vgHgaJpZM4KGfsC

.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/v2ray/v2ray-core/issues/267#issuecomment-258794700,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APXibfVXQt0w4HuXCyJwTPNnRfPozoxcks5q7vhWgaJpZM4KGfsC
.

Was this page helpful?
0 / 5 - 0 ratings