吐槽
自从回到家后,从原来的联通网络环境变成了电信,访问国外网站一直成了我头疼的事情,直连基本没速度5、6k/s的速度,被迫开全局好的时候2M/s,下午晚上20k/s 。很多时候是崩溃的,只好用联通卡开热点,才能体验BiuBiu的速度。
别人推荐用kcp模式,kcp我尝试过了,刚开始很爽,几分钟后运营商开始限速,QOS质量很低,仿佛在步行。
今天问了问imlala
大佬他用什么服务器,他回答我说:"我就用套路云阿,还开了台upcloud圣何赛玩美服游戏" 我去,我也是用套路云阿,怎么电信这么不给力,还CN2呢。接着我问他"你是直接tcp?" 他说嗯。于是推荐我用kcptun+udp2raw
因为udp2raw
只会把udp伪装成tcp,本质上还是udp,所以不会影响kcptun的效果。也正因为这样, 才能保证速度的同时,让QOS质量较高,不会被运营商干
lala
平常是用v2ray+tcp
,ss+kcptun+udp2raw
,正好v2ray有优化过的mkcp模式,直接mkcp+udp2raw
就行了!看来我还是不能只ws+tls
,要多整点东西,下面开搞
部署

先贴出要用到的项目的地址:
v2ray_guide: https://guide.v2fly.org/advanced/mkcp.html
udp2raw-tunnel: https://github.com/wangyu-/udp2raw-tunnel
首先在服务器上安装程序udp2raw
mkdir /opt/udp2raw && cd /opt/udp2raw wget https://github.com/wangyu-/udp2raw-tunnel/releases/download/20190716.test.0/udp2raw_binaries.tar.gz tar xvf udp2raw_binaries.tar.gz
假设你服务器上v2ray的mkcp开的端口是30000,udp2raw开的端口是30001
将udp2raw 交由systemd管理vim /etc/systemd/system/udp2raw.service
[Unit] Description=udp2raw server systemd service Documentation=https://github.com/wangyu-/udp2raw-tunnel After=network.target [Service] Type=simple User=root ExecStart=/opt/udp2raw/udp2raw_amd64_hw_aes -s -l 0.0.0.0:30001 -r 127.0.0.1:30000 -k 'passwd' --raw-mode faketcp -a --fix-gro Restart=on-failure [Install] WantedBy=multi-user.target
然后:wq
保存
systemctl enable udp2raw.service
systemctl start udp2raw
# 可以检查下udp2raw是否正常启动
systemctl status udp2raw
然后配置v2ray
vim /etc/v2ray/config.json
在你原来的配置基础上添加
"port": 30000,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 16
}
]
},
"streamSettings": {
"network": "mkcp",
"kcpSettings": {
"uplinkCapacity": 5,
"downlinkCapacity": 100,
"readBufferSize": 2
"mtu": 1350,
"tti": 50,
"congestion": true,
"header": {
"type": "none"
}
}
}
之后/usr/bin/v2ray/v2ray -test -config /etc/v2ray/config.json
测试下没有问题服务端就配置完成了
接下来是客户端的配置
同样下载客户端的程序
window+mac: https://github.com/wangyu-/udp2raw-multiplatform/releases
Linux: https://github.com/wangyu-/udp2raw-tunnel/releases
Github下载加速: https://gh.sky-and-poem.fun/
由于我现在用的是Kubuntu, 所以这里我演示Linux端的配置方法, 其他平台参考:
https://github.com/wangyu-/udp2raw-multiplatform/wiki/%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8
假设v2ray监听10808端口outbound端口为30000
mkdir -p ~/opt/udp2raw && cd ~/opt/udp2raw
tar xvf udp2raw_binaries.tar.gz
编辑本地的v2ray config
sudo vim /etc/v2ray/config.json
{
"inbounds": [
{
"port": 10808,
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth"
}
}
],
"outbounds": [
{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "127.0.0.1",
"port": 30000,
"users": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 16
}
]
}
]
},
"streamSettings": {
"network": "mkcp",
"kcpSettings": {
"uplinkCapacity": 5,
"downlinkCapacity": 100,
"congestion": true,
"header": {
"type": "none"
}
}
}
}
]
}
然后测试v2ray是否正常/usr/bin/v2ray/v2ray -test -config /etc/v2ray/config.json
接下来用systemd
来管理udp2raw
sudo vim /etc/systemd/system/udp2raw.service
[Unit] Description=udp2raw client systemd service Documentation=https://github.com/wangyu-/udp2raw-tunnel After=network.target [Service] Type=simple User=root ExecStart=/home/bobmaster/opt/udp2raw/udp2raw_amd64_hw_aes -c -l 0.0.0.0:30000 -r 你的服务器ip:30001 --raw-mode faketcp -a -k "passwd" --fix-gro Restart=on-failure [Install] WantedBy=multi-user.target
请自行替换程序路径, 30001为服务器udp2raw开放的端口:wq
保存
sudo systemctl enable udp2raw.service
sudo systemctl start udp2raw.service
# 检查运行状态
sudo systemctl status udp2raw.service
将浏览器用swithyomega管理

然后就可以畅游互联网了!
赶紧看个4K视频解下胸闷

为了更稳定目前采用ws/tcp+tls
中转的方式改善电信线路问题,比如宿迁联通拉伯力、lightsail韩国,广移拉香港或者套cf走香港等
mkcp还是不适合搞大流量,拿来打游戏比较好,不然可能会遇到断流的情况
PS: 现在墙很少封ip了
本评论由Telegram Bot回复~❤️
本评论由Telegram Bot回复~❤️