Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

流量少一点(1.5倍流量)适合网络较好的脚本 #9

Open
zzlinwq opened this issue Nov 13, 2022 · 10 comments
Open

流量少一点(1.5倍流量)适合网络较好的脚本 #9

zzlinwq opened this issue Nov 13, 2022 · 10 comments

Comments

@zzlinwq
Copy link

zzlinwq commented Nov 13, 2022

流量少一点(1.5倍流量)适合网络较好的脚本

@zzlinwq
Copy link
Author

zzlinwq commented Nov 13, 2022

流量少一点(1.5倍流量)适合网络较好的脚本

wg-for-game.zip

@zzlinwq
Copy link
Author

zzlinwq commented Nov 13, 2022

用法:
wget https://github.com/lmc999/WireguardForGame/files/9996797/wg-for-game.zip
unzip wg-for-game.zip
chmod +x wg-for-game.sh
./wg-for-game.sh

@zzlinwq
Copy link
Author

zzlinwq commented Nov 19, 2022

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

chmod 600 /etc/wireguard/wg0.conf

@zzlinwq
Copy link
Author

zzlinwq commented Nov 29, 2022

修改/etc/wireguard/wg0.conf mtu为1200比较稳定。

@zzlinwq
Copy link
Author

zzlinwq commented Nov 29, 2022

启动wg0
wg-quick up wg0
#关闭wg0
wg-quick down wg0

@zzlinwq
Copy link
Author

zzlinwq commented Dec 3, 2022

winpcap,Tunsafe软件包下载链接
Uploading 20221109.zip…

@zzlinwq
Copy link
Author

zzlinwq commented Dec 3, 2022

20221109.zip

@zzlinwq
Copy link
Author

zzlinwq commented Dec 3, 2022

服务端配置例子:
[Interface]
PrivateKey = 8Dp1EzZb1wQ/ZLvc3tLGFgTt15Reh7cXMJYYRVtSqlE=
Address = 10.100.0.1/24
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 1195
DNS = 8.8.8.8
MTU = 1200
[Peer]
PublicKey = rkMAQ3Il7DtA0ueJbUIMgjfowcsP4l+bE81TJPXASkU=
AllowedIPs = 10.100.0.2/32

[Peer]
PublicKey = 3DH7o/QlTMzr2n0ljkg+hgQzG69tBXL6j4VN+SE2eTM=
AllowedIPs = 10.100.0.3/32

@zzlinwq
Copy link
Author

zzlinwq commented Dec 3, 2022

客户端配置
[Interface]
PrivateKey = wInyYiytSq8DOsalJ+HYfEKccSby8h+QVbcLDI08BEQ=
Address = 10.100.0.2/24
PreUp = start D:\software\TunSafe\bat\start.bat
PreUp = ping -n 4 127.1 >nul
PostUp = start D:\software\TunSafe\bat\routes-up.bat
PostDown = start D:\software\TunSafe\bat\routes-down.bat
PostDown = start D:\software\TunSafe\bat\stop.bat
DNS = 8.8.8.8
MTU = 1200
[Peer]
PublicKey = DqWnFFxDJHnZTkoMJioTBxD6YG9ZBgtm6+/6tsp4tHU=
Endpoint = 127.0.0.1:2099
AllowedIPs = 0.0.0.0/0, ::0/0
PersistentKeepalive = 25

@dyingway
Copy link

[21:49:26] Retrying handshake, attempt 2...
[21:49:32] Retrying handshake, attempt 3...
[21:49:38] Retrying handshake, attempt 4...
[21:49:43] Retrying handshake, attempt 5...
[21:49:48] Retrying handshake, attempt 6...
[21:49:53] Retrying handshake, attempt 7...
[21:49:59] Retrying handshake, attempt 8...
[21:50:05] Retrying handshake, attempt 9...
[21:50:10] Retrying handshake, attempt 10...
[21:50:15] Retrying handshake, attempt 11...
[21:50:21] Retrying handshake, attempt 12...

wireguard握手就不成功。。。估计被屏蔽的太厉害把,但愿是我设置不对。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants