fscarmen / warp-sh

WARP script is move to: https://gitlab.com/fscarmen/warp
942 stars 203 forks source link

选择安装 CloudFlare Client 并设置为 WARP 模式之后,到了后台获取 WARP IP 中,最大尝试3次……那一步,机器失联。 #107

Open modimobeikete opened 1 month ago

modimobeikete commented 1 month ago

以下是ssh的情况:

脚本版本:3.1.3 功能新增:Linux Client 增加 MASQUE 协议可选项,Proxy 模式(菜单5)和 WarpProxy 模式(菜单14)都可以使用 系统信息: 当前操作系统:Ubuntu 22.04 LTS 内核:5.15.0-30-generic 处理器架构:amd64 虚拟化:kvm IPv4: xxx.xxx.xx.xx 中国 Chinanet IPv6:
WARP 网络接口未开启 Client 未安装 WireProxy 未安装

======================================================================================================================

  1. 为 IPv4 only 添加 WARP IPv4 网络接口 (bash menu.sh 4)
  2. 为 IPv4 only 添加 WARP IPv6 网络接口 (bash menu.sh 6)
  3. 为 IPv4 only 添加 WARP 双栈网络接口 (bash menu.sh d)
  4. 打开 WARP (warp o)
  5. 安装 CloudFlare Client 并设置为 Proxy 模式 (bash menu.sh c)
  6. 更换支持 Netflix 的 IP (warp i)
  7. 永久关闭 WARP 网络接口,并删除 WARP、 Linux Client 和 WireProxy (warp u)
  8. 刷 WARP+ 流量 (warp p)
  9. 升级内核、安装BBR、DD脚本 (warp b)
  10. 同步最新版本 (warp v)
  11. WARP 解锁 Netflix 等流媒体专业一键(支持多平台、多方式和 TG 通知)
  12. 安装 iptable + dnsmasq + ipset,让 WARP IPv4 only 接管流媒体流量 (不适用于 IPv6 only VPS) (bash menu.sh e)
  13. 安装 wireproxy,让 WARP 在本地创建一个 socks5 代理 (bash menu.sh w)
  14. 安装 CloudFlare Client 并设置为 WARP 模式 (bash menu.sh l)
  15. 退出脚本

    请选择: 14

    官方 Client bug,在隧道协议为 WireGuard 时,如使用 WARP+ license,不能使用 IPv6,详见社区:https://community.cloudflare.com/t/losing-ipv6-connectivity-with-warp/568971

    请选择 WARP 隧道协议:

  16. MASQUE (默认)
  17. WireGuard

    请选择: 1

    账户请选择:

  18. 使用免费账户 (默认)
  19. WARP+

    请选择: 1 进度 1/3: 安装 Client…… deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ jammy main Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
    Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
    Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
    Get:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1847 kB]
    Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
    Get:7 https://pkg.cloudflareclient.com jammy InRelease [2567 B]
    Get:8 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [298 kB]
    Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [13.3 kB]
    Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [2444 kB]
    Get:11 https://pkg.cloudflareclient.com jammy/main amd64 Packages [457 B]
    Get:12 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [421 kB]
    Get:13 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [584 B]
    Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [906 kB]
    Get:15 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [177 kB] Get:16 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [19.3 kB] Get:17 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [37.2 kB]
    Get:18 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [7588 B] Get:19 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [228 B] Get:20 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB]
    Get:21 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB] Get:22 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB] Get:23 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB] Get:24 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8372 B] Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2065 kB] Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [357 kB] Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [17.8 kB] Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [2504 kB] Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [432 kB]
    Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [616 B]
    Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1126 kB]
    Get:32 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [262 kB]
    Get:33 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [26.2 kB]
    Get:34 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [43.3 kB]
    Get:35 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [10.8 kB]
    Get:36 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [444 B]
    Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [67.8 kB]
    Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en [11.1 kB]
    Get:39 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [388 B]
    Get:40 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]
    Get:41 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [28.8 kB]
    Get:42 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [16.5 kB]
    Get:43 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [672 B]
    Get:44 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
    Fetched 33.9 MB in 12s (2779 kB/s)
    Reading package lists... Done Building dependency tree... Done Reading state information... Done 270 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: desktop-file-utils dirmngr gnupg gnupg-l10n gnupg-utils gnupg2 gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv libnspr4 libnss3 libnss3-tools Suggested packages: traceroute pinentry-gnome3 tor parcimonie xloadimage scdaemon The following NEW packages will be installed: cloudflare-warp desktop-file-utils gnupg2 libnss3-tools The following packages will be upgraded: dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv libnspr4 libnss3 13 upgraded, 4 newly installed, 0 to remove and 257 not upgraded. Need to get 43.0 MB of archives. After this operation, 109 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg-wks-client amd64 2.2.27-3ubuntu2.1 [62.7 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 dirmngr amd64 2.2.27-3ubuntu2.1 [293 kB]
    Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gnupg-utils amd64 2.2.27-3ubuntu2.1 [308 kB]
    Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg-wks-server amd64 2.2.27-3ubuntu2.1 [57.5 kB]
    Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg-agent amd64 2.2.27-3ubuntu2.1 [209 kB]
    Get:6 https://pkg.cloudflareclient.com jammy/main amd64 cloudflare-warp amd64 2024.6.497-1 [38.7 MB]
    Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg amd64 2.2.27-3ubuntu2.1 [519 kB]
    Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpgconf amd64 2.2.27-3ubuntu2.1 [94.2 kB]
    Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gnupg-l10n all 2.2.27-3ubuntu2.1 [54.4 kB]
    Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gnupg all 2.2.27-3ubuntu2.1 [315 kB]
    Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpgsm amd64 2.2.27-3ubuntu2.1 [197 kB]
    Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpgv amd64 2.2.27-3ubuntu2.1 [137 kB]
    Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 gnupg2 all 2.2.27-3ubuntu2.1 [5548 B]
    Get:14 http://archive.ubuntu.com/ubuntu jammy/main amd64 desktop-file-utils amd64 0.26-1ubuntu3 [55.9 kB]
    Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libnspr4 amd64 2:4.35-0ubuntu0.22.04.1 [119 kB]
    Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libnss3 amd64 2:3.98-0ubuntu0.22.04.2 [1347 kB]
    Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libnss3-tools amd64 2:3.98-0ubuntu0.22.04.2 [570 kB]
    Fetched 43.0 MB in 32s (1325 kB/s)
    (Reading database ... 64175 files and directories currently installed.) Preparing to unpack .../00-gpg-wks-client_2.2.27-3ubuntu2.1_amd64.deb ...

Progress: [ 0%] [.......................................................................................................................................................................................................] Unpacking gpg-wks-client (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) .....................................................................................................................................................]

Preparing to unpack .../01-dirmngr_2.2.27-3ubuntu2.1_amd64.deb ..........................................................................................................................................................]

Unpacking dirmngr (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ............................................................................................................................................................]

Preparing to unpack .../02-gnupg-utils_2.2.27-3ubuntu2.1_amd64.deb ......................................................................................................................................................]

Unpacking gnupg-utils (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ........................................................................................................................................................]

Preparing to unpack .../03-gpg-wks-server_2.2.27-3ubuntu2.1_amd64.deb ...................................................................................................................................................]

Unpacking gpg-wks-server (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) .....................................................................................................................................................]

Preparing to unpack .../04-gpg-agent_2.2.27-3ubuntu2.1_amd64.deb ........................................................................................................................................................]

Unpacking gpg-agent (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ..........................................................................................................................................................]

Preparing to unpack .../05-gpg_2.2.27-3ubuntu2.1_amd64.deb ..............................................................................................................................................................]

Unpacking gpg (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ................................................................................................................................................................]

Preparing to unpack .../06-gpgconf_2.2.27-3ubuntu2.1_amd64.deb ..........................................................................................................................................................]

Unpacking gpgconf (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ............................................................................................................................................................]

Preparing to unpack .../07-gnupg-l10n_2.2.27-3ubuntu2.1_all.deb .........................................................................................................................................................]

Unpacking gnupg-l10n (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) .........................................................................................................................................................]

Preparing to unpack .../08-gnupg_2.2.27-3ubuntu2.1_all.deb ...##.........................................................................................................................................................]

Unpacking gnupg (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ...#####......................................................................................................................................................]

Preparing to unpack .../09-gpgsm_2.2.27-3ubuntu2.1_amd64.deb ...#####....................................................................................................................................................]

Unpacking gpgsm (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ...##########.................................................................................................................................................]

Preparing to unpack .../10-gpgv_2.2.27-3ubuntu2.1_amd64.deb ...############..............................................................................................................................................]

Unpacking gpgv (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ...#################...........................................................................................................................................]

Setting up gpgv (2.2.27-3ubuntu2.1) ...##########################################........................................................................................................................................]

Progress: [ 33%] [##################################################################.....................................................................................................................................] Selecting previously unselected package gnupg2.########################################..................................................................................................................................] (Reading database ... 64175 files and directories currently installed.) Preparing to unpack .../0-gnupg2_2.2.27-3ubuntu2.1_all.deb ...

Unpacking gnupg2 (2.2.27-3ubuntu2.1) ...##################################################...............................................................................................................................]

Selecting previously unselected package desktop-file-utils.#################################.............................................................................................................................] Preparing to unpack .../1-desktop-file-utils_0.26-1ubuntu3_amd64.deb ...

Unpacking desktop-file-utils (0.26-1ubuntu3) ...###############################################..........................................................................................................................]

Preparing to unpack .../2-libnspr4_2%3a4.35-0ubuntu0.22.04.1_amd64.deb ...########################.......................................................................................................................]

Unpacking libnspr4:amd64 (2:4.35-0ubuntu0.22.04.1) over (2:4.32-3build1) ...#########################....................................................................................................................]

Preparing to unpack .../3-libnss3_2%3a3.98-0ubuntu0.22.04.2_amd64.deb ...###############################.................................................................................................................]

Unpacking libnss3:amd64 (2:3.98-0ubuntu0.22.04.2) over (2:3.68.2-0ubuntu1) ...#############################..............................................................................................................]

Selecting previously unselected package libnss3-tools.########################################################...........................................................................................................] Preparing to unpack .../4-libnss3-tools_2%3a3.98-0ubuntu0.22.04.2_amd64.deb ...

Unpacking libnss3-tools (2:3.98-0ubuntu0.22.04.2) ...############################################################........................................................................................................]

Selecting previously unselected package cloudflare-warp.############################################################.....................................................................................................] Preparing to unpack .../5-cloudflare-warp_2024.6.497-1_amd64.deb ...

Unpacking cloudflare-warp (2024.6.497-1) ...##########################################################################...................................................................................................]

Setting up desktop-file-utils (0.26-1ubuntu3) ...########################################################################................................................................................................]

Progress: [ 54%] [##########################################################################################################.............................................................................................] Setting up libnspr4:amd64 (2:4.35-0ubuntu0.22.04.1) ...########################################################################..........................................................................................]

Progress: [ 57%] [################################################################################################################.......................................................................................] Setting up gnupg-l10n (2.2.27-3ubuntu2.1) ...########################################################################################....................................................................................]

Progress: [ 59%] [######################################################################################################################.................................................................................] Setting up gpgconf (2.2.27-3ubuntu2.1) ...#################################################################################################..............................................................................]

Progress: [ 62%] [############################################################################################################################...........................................................................] Setting up gpg (2.2.27-3ubuntu2.1) ...##########################################################################################################.........................................................................]

Progress: [ 65%] [#################################################################################################################################......................................................................] Setting up gnupg-utils (2.2.27-3ubuntu2.1) ...########################################################################################################...................................................................]

Progress: [ 68%] [#######################################################################################################################################................................................................] Setting up gpg-agent (2.2.27-3ubuntu2.1) ...################################################################################################################.............................................................]

Progress: [ 71%] [#############################################################################################################################################..........................................................] Setting up gpgsm (2.2.27-3ubuntu2.1) ...##########################################################################################################################.......................................................]

Progress: [ 74%] [###################################################################################################################################################....................................................] Setting up libnss3:amd64 (2:3.98-0ubuntu0.22.04.2) ...#################################################################################################################..................................................]

Progress: [ 77%] [########################################################################################################################################################...............................................] Setting up dirmngr (2.2.27-3ubuntu2.1) ...###################################################################################################################################............................................]

Progress: [ 80%] [##############################################################################################################################################################.........................................] Setting up gpg-wks-server (2.2.27-3ubuntu2.1) ...##################################################################################################################################......................................]

Progress: [ 83%] [####################################################################################################################################################################...................................] Setting up libnss3-tools (2:3.98-0ubuntu0.22.04.2) ...###################################################################################################################################................................]

Progress: [ 86%] [##########################################################################################################################################################################.............................] Setting up gpg-wks-client (2.2.27-3ubuntu2.1) ...##############################################################################################################################################..........................]

Progress: [ 88%] [###############################################################################################################################################################################........................] Setting up gnupg (2.2.27-3ubuntu2.1) ...############################################################################################################################################################.....................]

Progress: [ 91%] [#####################################################################################################################################################################################..................] Setting up gnupg2 (2.2.27-3ubuntu2.1) ...#################################################################################################################################################################...............]

Progress: [ 94%] [###########################################################################################################################################################################################............] Setting up cloudflare-warp (2024.6.497-1) ...###################################################################################################################################################################.........]

Created symlink /etc/systemd/system/multi-user.target.wants/warp-svc.service → /lib/systemd/system/warp-svc.service.###############################################################################################......]

Processing triggers for libc-bin (2.35-0ubuntu3) ...##################################################################################################################################################################...] Processing triggers for man-db (2.10.2-1) ... Processing triggers for install-info (6.8-4build1) ... NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.15.0-30-generic NEEDRESTART-KEXP: 5.15.0-30-generic NEEDRESTART-KSTA: 1 NEEDRESTART-SVC: udisks2.service 进度 2/3: 设置 Client 模式 后台获取 WARP IP 中,最大尝试3次…… 第1次尝试 第2次尝试 第3次尝试

连接断开 我想了很久也想不通怎么可能会出现这种情况,明明现在可以用MASQUE协议,但依然会导致连不上,甚至机器失联。 还有

fscarmen commented 1 month ago

失联应该不会啊,因为有个 exclude 0.0.0.0 的,非全局,现在国内估计用 masque 也无用了,凉凉了。

modimobeikete commented 1 month ago

如果这么说的话,那就真的奇怪了。我用的服务器国内的NAT服务器 。的确是按照你的说法的话,是连不上的。但问题在于,在finalshell上,第一次断开连接后,finalshell连不上,然后我用web端的ssh,连上了,不能用warp快捷指令,只能bash menu.sh,然后进去后尝试按1,连接client,结果web端ssh也连不上了。麻烦的是,这个服务器不能使用novnc连接。 另外,我也试过使用proxy模式,但会提示:创建 Socks5 代理失败,问题反馈:[https://github.com/fscarmen/warp-sh/issues]

fscarmen commented 1 month ago

如果是这样,建议你不要用脚本,手动看看

curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list

sudo apt-get update && sudo apt-get install cloudflare-warp

echo -e "<dict>\n    <key>warp_tunnel_protocol</key>\n    <string>masque</string>\n</dict>" > /var/lib/cloudflare-warp/mdm.xml

warp-cli --accept-tos registration new

warp-cli --accept-tos add-excluded-route 0.0.0.0/0

warp-cli --accept-tos add-excluded-route ::0/0

# 看看上面设置的是否生效
warp-cli --accept-tos settings

warp-cli --accept-tos mode warp

warp-cli --accept-tos connect
ubuntu $ curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
ubuntu $ echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ focal main
ubuntu $ sudo apt-get update && sudo apt-get install cloudflare-warp
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 https://pkg.cloudflareclient.com focal InRelease [2567 B]
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:6 https://pkg.cloudflareclient.com focal/main amd64 Packages [459 B]
Fetched 3026 B in 1s (3807 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  desktop-file-utils gnupg2 libnspr4 libnss3 libnss3-tools nftables
Suggested packages:
  traceroute firewalld
The following NEW packages will be installed:
  cloudflare-warp desktop-file-utils gnupg2 libnss3-tools nftables
The following packages will be upgraded:
  libnspr4 libnss3
2 upgraded, 5 newly installed, 0 to remove and 185 not upgraded.
Need to get 41.8 MB of archives.
After this operation, 114 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 nftables amd64 0.9.3-2 [51.2 kB]
Get:2 https://pkg.cloudflareclient.com focal/main amd64 cloudflare-warp amd64 2024.6.497-1 [39.1 MB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 gnupg2 all 2.2.19-3ubuntu2.2 [5316 B]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 desktop-file-utils amd64 0.24-1ubuntu3 [50.6 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libnspr4 amd64 2:4.35-0ubuntu0.20.04.1 [108 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libnss3 amd64 2:3.98-0ubuntu0.20.04.2 [1391 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libnss3-tools amd64 2:3.98-0ubuntu0.20.04.2 [1055 kB]
Fetched 41.8 MB in 2s (26.0 MB/s)      
Selecting previously unselected package nftables.
(Reading database ... 72827 files and directories currently installed.)
Preparing to unpack .../0-nftables_0.9.3-2_amd64.deb ...
Unpacking nftables (0.9.3-2) ...
Selecting previously unselected package gnupg2.
Preparing to unpack .../1-gnupg2_2.2.19-3ubuntu2.2_all.deb ...
Unpacking gnupg2 (2.2.19-3ubuntu2.2) ...
Selecting previously unselected package desktop-file-utils.
Preparing to unpack .../2-desktop-file-utils_0.24-1ubuntu3_amd64.deb ...
Unpacking desktop-file-utils (0.24-1ubuntu3) ...
Preparing to unpack .../3-libnspr4_2%3a4.35-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnspr4:amd64 (2:4.35-0ubuntu0.20.04.1) over (2:4.25-1) ...
Preparing to unpack .../4-libnss3_2%3a3.98-0ubuntu0.20.04.2_amd64.deb ...
Unpacking libnss3:amd64 (2:3.98-0ubuntu0.20.04.2) over (2:3.49.1-1ubuntu1.8) ...
Selecting previously unselected package libnss3-tools.
Preparing to unpack .../5-libnss3-tools_2%3a3.98-0ubuntu0.20.04.2_amd64.deb ...
Unpacking libnss3-tools (2:3.98-0ubuntu0.20.04.2) ...
Selecting previously unselected package cloudflare-warp.
Preparing to unpack .../6-cloudflare-warp_2024.6.497-1_amd64.deb ...
Unpacking cloudflare-warp (2024.6.497-1) ...
Setting up gnupg2 (2.2.19-3ubuntu2.2) ...
Setting up nftables (0.9.3-2) ...
Setting up desktop-file-utils (0.24-1ubuntu3) ...
Setting up libnspr4:amd64 (2:4.35-0ubuntu0.20.04.1) ...
Setting up libnss3:amd64 (2:3.98-0ubuntu0.20.04.2) ...
Setting up libnss3-tools (2:3.98-0ubuntu0.20.04.2) ...
Setting up cloudflare-warp (2024.6.497-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/warp-svc.service → /lib/systemd/system/warp-svc.service.
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
ubuntu $ warp-cli --accept-tos registration new
Success
ubuntu $ warp-cli --accept-tos add-excluded-route 0.0.0.0/0
Warning: The "add-excluded-route" command will be deprecated in a future release. Please use "tunnel ip add" instead

Success
ubuntu $ warp-cli --accept-tos add-excluded-route ::0/0
Warning: The "add-excluded-route" command will be deprecated in a future release. Please use "tunnel ip add" instead

Success
ubuntu $ warp-cli --accept-tos settings
Merged configuration:
(derived)       Always On: false
(default)       Switch Locked: false
(default)       Mode: Warp
(Not set)       WARP tunnel protocol: WireGuard
(default)       Disabled for Wifi: false
(default)       Disabled for Ethernet: false
(Not set)       Resolve via: cloudflare-dns.com @ [162.159.36.1, 2606:4700:4700::1111]
(Not set)       qlog logging: Disabled
(default)       Onboarding: true
(user set)      Exclude mode, with hosts/ips:
  10.0.0.0/8
  100.64.0.0/10
  169.254.0.0/16
  172.16.0.0/12
  192.0.0.0/24
  192.168.0.0/16
  224.0.0.0/24
  240.0.0.0/4
  239.255.255.250/32
  255.255.255.255/32
  fe80::/10
  fd00::/8
  ff01::/16
  ff02::/16
  ff03::/16
  ff04::/16
  ff05::/16
  fc00::/7
  17.249.0.0/16
  17.252.0.0/16
  17.57.144.0/22
  17.188.128.0/18
  17.188.20.0/23
  2620:149:a44::/48
  2403:300:a42::/48
  2403:300:a51::/48
  2a01:b740:a42::/48
  0.0.0.0/0 (CLI exclude)
  ::/0 (CLI exclude)

(default)       Fallback domains:
  intranet
  internal
  private
  localdomain
  domain
  lan
  home
  host
  corp
  local
  localhost
  home.arpa
  invalid
  test
(Not set)       Daemon Teams Auth: false
(default)       Disable Auto Fallback: false
(Not set)       Allow Updates: true

ubuntu $ warp-cli --accept-tos mode warp
Success
ubuntu $ warp-cli --accept-tos connect
Success
ubuntu $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:6c:ca:a2 brd ff:ff:ff:ff:ff:ff
    inet 172.30.1.2/24 brd 172.30.1.255 scope global dynamic enp1s0
       valid_lft 86312476sec preferred_lft 86312476sec
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:1b:8c:5e:7b brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
4: CloudflareWARP: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc mq state UNKNOWN group default qlen 500
    link/none 
    inet 172.16.0.2/32 scope global CloudflareWARP
       valid_lft forever preferred_lft forever
    inet6 2606:4700:110:8d5e:994f:7265:201f:e80e/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::54f2:1aff:c75f:5c13/64 scope link stable-privacy 
       valid_lft forever preferred_lft forever
ubuntu $ curl --interface CloudflareWARP -4 ip.sb
104.28.200.91
ubuntu $ curl ip.sb
148.113.1.115
ubuntu $ echo -e "<dict>\n    <key>warp_tunnel_protocol</key>\n    <string>masque</string>\n</dict>" > /var/lib/cloudflare-warp/mdm.xml
ubuntu $ service warp-svc restart
ubuntu $ warp-cli --accept-tos settings
Merged configuration:
(derived)       Always On: true
(default)       Switch Locked: false
(user set)      Mode: Warp
(local policy)  WARP tunnel protocol: MASQUE
(default)       Disabled for Wifi: false
(default)       Disabled for Ethernet: false
(Not set)       Resolve via: cloudflare-dns.com @ [162.159.36.1, 2606:4700:4700::1111]
(user set)      qlog logging: Enabled
(default)       Onboarding: true
(user set)      Exclude mode, with hosts/ips:
  10.0.0.0/8
  100.64.0.0/10
  169.254.0.0/16
  172.16.0.0/12
  192.0.0.0/24
  192.168.0.0/16
  224.0.0.0/24
  240.0.0.0/4
  239.255.255.250/32
  255.255.255.255/32
  fe80::/10
  fd00::/8
  ff01::/16
  ff02::/16
  ff03::/16
  ff04::/16
  ff05::/16
  fc00::/7
  17.249.0.0/16
  17.252.0.0/16
  17.57.144.0/22
  17.188.128.0/18
  17.188.20.0/23
  2620:149:a44::/48
  2403:300:a42::/48
  2403:300:a51::/48
  2a01:b740:a42::/48
  0.0.0.0/0 (CLI exclude)
  ::/0 (CLI exclude)

(default)       Fallback domains:
  intranet
  internal
  private
  localdomain
  domain
  lan
  home
  host
  corp
  local
  localhost
  home.arpa
  invalid
  test
(Not set)       Daemon Teams Auth: false
(default)       Disable Auto Fallback: false
(Not set)       Allow Updates: true

ubuntu $ curl --interface CloudflareWARP -4 ip.sb
104.28.164.48
ubuntu $ curl -4 ip.sb
148.113.1.115

image

modimobeikete commented 1 month ago

我已经按照你发的命令来进行手动操作了,但结果依然不太理想: root@ubuntu:~# curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg root@ubuntu:~# echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ jammy main root@ubuntu:~# sudo apt-get update && sudo apt-get install cloudflare-warp Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:3 https://pkg.cloudflareclient.com jammy InRelease [2567 B]
Get:4 https://pkg.cloudflareclient.com jammy/main amd64 Packages [457 B]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1848 kB] Get:6 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] Get:7 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [299 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [13.3 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [19.4 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1395 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/main Translation-en [510 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy/main amd64 c-n-f Metadata [30.3 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [129 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy/restricted Translation-en [18.6 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 c-n-f Metadata [488 B]
Get:17 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Get:18 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8372 B]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2066 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [357 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [17.8 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [2504 kB]
Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [432 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [616 B]
Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1128 kB]
Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [263 kB]
Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [26.3 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [43.3 kB]
Get:33 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [10.8 kB]
Get:34 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [444 B]
Get:35 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [67.7 kB]
Get:36 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en [11.1 kB]
Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [388 B]
Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]
Get:39 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [28.8 kB]
Get:40 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [16.5 kB]
Get:41 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [672 B]
Get:42 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 32.3 MB in 3min 0s (179 kB/s)
Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: desktop-file-utils gnupg2 libnss3-tools Suggested packages: traceroute The following NEW packages will be installed: cloudflare-warp desktop-file-utils gnupg2 libnss3-tools 0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded. Need to get 39.3 MB of archives. After this operation, 109 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 gnupg2 all 2.2.27-3ubuntu2.1 [5548 B]
Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 desktop-file-utils amd64 0.26-1ubuntu3 [55.9 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libnss3-tools amd64 2:3.98-0ubuntu0.22.04.2 [570 kB] Get:4 https://pkg.cloudflareclient.com jammy/main amd64 cloudflare-warp amd64 2024.6.497-1 [38.7 MB] Fetched 39.3 MB in 5min 10s (127 kB/s)
Selecting previously unselected package gnupg2. (Reading database ... 36120 files and directories currently installed.) Preparing to unpack .../gnupg2_2.2.27-3ubuntu2.1_all.deb ... Unpacking gnupg2 (2.2.27-3ubuntu2.1) ... Selecting previously unselected package desktop-file-utils. Preparing to unpack .../desktop-file-utils_0.26-1ubuntu3_amd64.deb ... Unpacking desktop-file-utils (0.26-1ubuntu3) ... Selecting previously unselected package libnss3-tools. Preparing to unpack .../libnss3-tools_2%3a3.98-0ubuntu0.22.04.2_amd64.deb ... Unpacking libnss3-tools (2:3.98-0ubuntu0.22.04.2) ... Selecting previously unselected package cloudflare-warp. Preparing to unpack .../cloudflare-warp_2024.6.497-1_amd64.deb ... Unpacking cloudflare-warp (2024.6.497-1) ... Setting up gnupg2 (2.2.27-3ubuntu2.1) ... Setting up desktop-file-utils (0.26-1ubuntu3) ... Setting up libnss3-tools (2:3.98-0ubuntu0.22.04.2) ... Setting up cloudflare-warp (2024.6.497-1) ... Created symlink /etc/systemd/system/multi-user.target.wants/warp-svc.service → /lib/systemd/system/warp-svc.service. Processing triggers for man-db (2.10.2-1) ... Scanning processes...
Scanning candidates...
Scanning linux images...

Running kernel seems to be up-to-date.

Restarting services... systemctl restart packagekit.service polkit.service Service restarts being deferred: /etc/needrestart/restart.d/dbus.service systemctl restart networkd-dispatcher.service systemctl restart unattended-upgrades.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host. root@ubuntu:~# echo -e "\n warp_tunnel_protocol\n masque\n" > /var/lib/cloudflare-warp/mdm.xml root@ubuntu:~# warp-cli --accept-tos registration new Success root@ubuntu:~# warp-cli --accept-tos add-excluded-route 0.0.0.0/0 Warning: The "add-excluded-route" command will be deprecated in a future release. Please use "tunnel ip add" instead

Success root@ubuntu:~# warp-cli --accept-tos add-excluded-route ::0/0 Warning: The "add-excluded-route" command will be deprecated in a future release. Please use "tunnel ip add" instead

Success root@ubuntu:~# warp-cli --accept-tos settings Merged configuration: (derived) Always On: false (default) Switch Locked: false (default) Mode: Warp (local policy) WARP tunnel protocol: MASQUE (default) Disabled for Wifi: false (default) Disabled for Ethernet: false (Not set) Resolve via: cloudflare-dns.com @ [162.159.36.1, 2606:4700:4700::1111] (Not set) qlog logging: Disabled (default) Onboarding: true (user set) Exclude mode, with hosts/ips: 10.0.0.0/8 100.64.0.0/10 169.254.0.0/16 172.16.0.0/12 192.0.0.0/24 192.168.0.0/16 224.0.0.0/24 240.0.0.0/4 239.255.255.250/32 255.255.255.255/32 fe80::/10 fd00::/8 ff01::/16 ff02::/16 ff03::/16 ff04::/16 ff05::/16 fc00::/7 17.249.0.0/16 17.252.0.0/16 17.57.144.0/22 17.188.128.0/18 17.188.20.0/23 2620:149:a44::/48 2403:300:a42::/48 2403:300:a51::/48 2a01:b740:a42::/48 0.0.0.0/0 (CLI exclude) ::/0 (CLI exclude)

(default) Fallback domains: intranet internal private localdomain domain lan home host corp local localhost home.arpa invalid test (Not set) Daemon Teams Auth: false (default) Disable Auto Fallback: false (Not set) Allow Updates: true

root@ubuntu:~# warp-cli --accept-tos mode warp Success root@ubuntu:~# warp-cli --accept-tos connect Success root@ubuntu:~# 连接断开 就算有一次成功了,但安装3x-ui后,ipv4直接消失了。 QQ20240927-171342

fscarmen commented 1 month ago

失联这块我也想不明白为什么了