v2ray mkcp原生搭建

1.更新服务器

1
yum update -y   #温馨提示:更新大概几分钟请耐心等待

设置硬件时钟调整为与本地时钟一致,同步上海时间

1
2
timedatectl set-local-rtc 1
timedatectl set-timezone Asia/Shanghai

2.安装v2ray官方代码(老版本代码)

1
bash <(curl -L -s https://install.direct/go.sh)
1
vi /etc/v2ray/config.json #配置文件

service v2ray start|stop|status|reload|restart|force-reload 控制 V2Ray 的运行

3.v2ray服务端配置

config.json 配置代码 {伪装协议utp、srtp、wechat-video、dtls、wireguard 或者 none}这几个分别将 mKCP 数据伪装成 BT 下载、视频通话、微信视频通话、dtls、wireguard以及不进行伪装。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"inbounds": [
{
"port": 端口, //自定义端口
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811", //自定义UUID
"alterId": 32 //额外ID不要设置太大推荐4~50
}
]
},
"streamSettings": {
"network": "mkcp", //此处的 mkcp 也可写成 kcp,两种写法是起同样的效果
"kcpSettings": {
"uplinkCapacity": 5,
"downlinkCapacity": 100,
"congestion": true,
"header": {
"type": "这里替换伪装" //伪装协议utp、srtp、wechat-video、dtls、wireguard 或者 none
}
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}

4.安装bbr

温馨提示:如果没有安装wget请执行 yum install wget

1
2
yum -y install wget
wget "https://raw.githubusercontent.com/ComeBey/rootfw-bbr/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

 
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×