mirror of
https://gitlab.com/fscarmen/warp.git
synced 2026-06-25 15:42:40 +08:00
Update warp.sh
This commit is contained in:
@@ -29,12 +29,6 @@ if grep -q -E -i "debian" /etc/issue; then
|
||||
# 安装 wgcf
|
||||
curl -fsSL git.io/wgcf.sh | bash
|
||||
|
||||
# 注册 WARP 账户 (将生成 wgcf-account.toml 文件保存账户信息)
|
||||
echo | wgcf register
|
||||
|
||||
# 生成 Wire-Guard 配置文件 (wgcf-profile.conf)
|
||||
wgcf generate
|
||||
|
||||
|
||||
# Ubuntu 运行以下脚本
|
||||
elif grep -q -E -i "ubuntu" /etc/issue; then
|
||||
@@ -51,12 +45,6 @@ if grep -q -E -i "debian" /etc/issue; then
|
||||
# 安装 wgcf
|
||||
curl -fsSL git.io/wgcf.sh | bash
|
||||
|
||||
# 注册 WARP 账户 (将生成 wgcf-account.toml 文件保存账户信息)
|
||||
echo | wgcf register
|
||||
|
||||
# 生成 Wire-Guard 配置文件 (wgcf-profile.conf)
|
||||
wgcf generate
|
||||
|
||||
|
||||
# Debian 运行以下脚本
|
||||
elif grep -q -E -i "centos" /etc/issue; then
|
||||
@@ -73,16 +61,17 @@ if grep -q -E -i "debian" /etc/issue; then
|
||||
# 添加执行权限
|
||||
chmod +x /usr/bin/wireguard-go wgcf
|
||||
|
||||
# 注册 WARP 账户 (将生成 wgcf-account.toml 文件保存账户信息)
|
||||
echo | ./wgcf register
|
||||
|
||||
# 生成 Wire-Guard 配置文件 (wgcf-profile.conf)
|
||||
./wgcf generate
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# 以下为三个系统共同部分
|
||||
|
||||
# 注册 WARP 账户 (将生成 wgcf-account.toml 文件保存账户信息)
|
||||
echo | /root/warp/wgcf register
|
||||
|
||||
# 生成 Wire-Guard 配置文件 (wgcf-profile.conf)
|
||||
/root/warp/wgcf generate
|
||||
|
||||
# 修改配置文件 wgcf-profile.conf 的内容,使得 IPv4 的流量均被 WireGuard 接管,让 IPv4 的流量通过 WARP IPv6 节点以 NAT 的方式访问外部 IPv4 网络
|
||||
sed -i 10d wgcf-profile.conf | sed -i 's#engage.cloudflareclient.com#[2606:4700:d0::a29f:c001]#g' wgcf-profile.conf
|
||||
|
||||
@@ -102,4 +91,4 @@ echo 'precedence ::ffff:0:0/96 100' | tee -a /etc/gai.conf
|
||||
cd /root/ && rm -rf /root/warp/ /root/warp.sh
|
||||
|
||||
# 有wgcf的网络接口即为成功
|
||||
ip a
|
||||
ip a
|
||||
|
||||
Reference in New Issue
Block a user