Git Product home page Git Product logo

wireguardforgame's Introduction

WireguardForGame

介绍

Wireguard走UDP协议,部分运营商会对UDP进行限速QOS处理使连接速度不理想或出现丢包情况。若串联udp2raw可将UDP流量伪装成TCP流量避免被运营商QOS。另外同时再串联udpspeeder多倍发包可降低游戏丢包率。本项目脚本会在服务器搭建Wireguard、udp2raw、udpspeeder服务,同时本地使用Tunsafe连接Wireguard时会自动运行大陆IP分流脚本,udp2raw和udpspeeder程序。

本项目脚本根据Atrandys一键脚本修改,请支持原作者,项目地址:https://github.com/atrandys/wireguard

事前准备

电脑需安装好winpcap或npcap,下载地址请自行百度。

目前脚本只支持centos7

使用方法

yum install -y wget && wget https://raw.githubusercontent.com/lmc999/WireguardForGame/master/wg-for-game.sh && chmod +x wg-for-game.sh && ./wg-for-game.sh

执行此命令消除报警提示 sudo chmod 600 /etc/wireguard/wg0.conf

用Winscp等软件登入VPS,下载目录/etc/wireguard/中的client.conf到Tunsafe配置文件目录

下载Tunsafe用批处理文件文件master.zip

解压缩文件,并将文件夹内的所有文件解压到 D:\software\TunSafe\bat

本教程Tunsafe默认安装路径 D:\software\TunSafe,如果你的安装路径不一样请注意修改clien.conf中的批处理程序的路径.同时建议安装路径不要有空格。

用记事本打开start.bat,修改44.55.66.77为你Wireguard服务器ip

开启Tunsafe的Pre/Post命令功能。在"Option"选择"Allow Pre/Post Commands"

TunSafe选中client.conf, connect即可自动分流和串联udp2raw + udpspeeder

Wireguard配合游戏规则使用

本项目搭建成功后默认是大陆白名单模式,可以直接进行游戏。

但同时Wireguard的Windows客户端Tunsafe支持添加路由规则,指定具体路由走wireguard代理,原理与SSTAP的游戏规则相同。使用方法是往Tunsafe配置文件中的AllowIPs参数添加游戏路由表。这里以PUBG亚服规则为例子,请参考sample.conf

目前已有成熟的游戏规则项目,项目原本为SSTAP服务,但其实只需将该项目中的对应游戏规则添加到Wireguard中照样可正常使用。

项目传送门:https://github.com/FQrabbit/SSTap-Rule

wireguardforgame's People

Contributors

lmc999 avatar syh0304 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.