用 v2ray 内置的 mKCP 加速游戏的话,配置要简单很多,但效果没有 kcptun+udp2raw 好。也算是一种可行的方法吧,想偷懒的话可以试试这个方法。。
安装 v2ray:
<span class="pln">apt </span><span class="pun">-</span><span class="pln">y update apt </span><span class="pun">-</span><span class="pln">y install curl bash </span><span class="pun"><(</span><span class="pln">curl </span><span class="pun">-</span><span class="pln">L </span><span class="pun">-</span><span class="pln">s https</span><span class="pun">:</span><span class="com">//install.direct/go.sh)</span>
生成一个 uuid 复制下来:
<span class="pln">cat </span><span class="pun">/</span><span class="pln">proc</span><span class="pun">/</span><span class="pln">sys</span><span class="pun">/</span><span class="pln">kernel</span><span class="pun">/</span><span class="pln">random</span><span class="pun">/</span><span class="pln">uuid</span>
编辑 v2ray 配置文件:
<span class="pln">nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">v2ray</span><span class="pun">/</span><span class="pln">config</span><span class="pun">.</span><span class="pln">json</span>
写入如下配置:
<span class="pun">{</span> <span class="str">"inbounds"</span><span class="pun">:</span> <span class="pun">[</span> <span class="pun">{</span> <span class="str">"port"</span><span class="pun">:</span> <span class="lit">50000</span><span class="pun">,</span> <span class="str">"protocol"</span><span class="pun">:</span> <span class="str">"vmess"</span><span class="pun">,</span> <span class="str">"settings"</span><span class="pun">:</span> <span class="pun">{</span> <span class="str">"clients"</span><span class="pun">:</span> <span class="pun">[</span> <span class="pun">{</span> <span class="str">"id"</span><span class="pun">:</span> <span class="str">"你的 UUID"</span><span class="pun">,</span> <span class="str">"alterId"</span><span class="pun">:</span> <span class="lit">64</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">},</span> <span class="str">"streamSettings"</span><span class="pun">:</span> <span class="pun">{</span> <span class="str">"network"</span><span class="pun">:</span><span class="str">"kcp"</span><span class="pun">,</span> <span class="str">"kcpSettings"</span><span class="pun">:</span> <span class="pun">{</span> <span class="str">"mtu"</span><span class="pun">:</span> <span class="lit">1350</span><span class="pun">,</span> <span class="str">"tti"</span><span class="pun">:</span> <span class="lit">20</span><span class="pun">,</span> <span class="str">"uplinkCapacity"</span><span class="pun">:</span> <span class="lit">30</span><span class="pun">,</span> <span class="str">"downlinkCapacity"</span><span class="pun">:</span> <span class="lit">100</span><span class="pun">,</span> <span class="str">"congestion"</span><span class="pun">:</span> <span class="kwd">true</span><span class="pun">,</span> <span class="str">"header"</span><span class="pun">:</span> <span class="pun">{</span> <span class="str">"type"</span><span class="pun">:</span> <span class="str">"utp"</span> <span class="pun">}</span> <span class="pun">}</span> <span class="pun">}</span> <span class="pun">}</span> <span class="pun">],</span> <span class="str">"outbounds"</span><span class="pun">:</span> <span class="pun">[</span> <span class="pun">{</span> <span class="str">"protocol"</span><span class="pun">:</span> <span class="str">"freedom"</span><span class="pun">,</span> <span class="str">"settings"</span><span class="pun">:</span> <span class="pun">{}</span> <span class="pun">}</span> <span class="pun">]</span> <span class="pun">}</span>
关于这个 mKCP 里面涉及到的一些可配置参数,可以参考这里:
https://www.v2ray.com/chapter_02/transport/mkcp.html
测试配置是否正常:
<span class="str">/usr/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">v2ray</span><span class="pun">/</span><span class="pln">v2ray </span><span class="pun">-</span><span class="pln">config </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">v2ray</span><span class="pun">/</span><span class="pln">config</span><span class="pun">.</span><span class="pln">json </span><span class="pun">-</span><span class="pln">test</span>
正常的话重启下 v2ray 即可完成服务端的配置:
<span class="pln">systemctl restart v2ray systemctl status v2ray</span>
客户端在 v2rayN 上添加一个节点:
接着右键将你添加的这个节点设置为活动服务器:
再点击参数设置,找到基础设置,按下图配置:
最后在 SSTap 上添加一个 socks5 代理,按下图配置: