Published on

docker运行cloudflare-warp

Authors

起因

某些网站会屏蔽IDC机房的ip,导致网页打不开。用cloudflare-warp可以获取新的ip,从而绕过 某些网站的ip封锁。bing-chat还是无法访问

安装

docker-compose.yaml

version: '3'

services:
warp:
  image: caomingjun/warp
  container_name: warp
  restart: always
  ports:
    - '1080:1080'
  environment:
    - WARP_SLEEP=2
    # - WARP_LICENSE_KEY= # optional
  cap_add:
    - NET_ADMIN
  sysctls:
    - net.ipv6.conf.all.disable_ipv6=0
    - net.ipv4.conf.all.src_valid_mark=1
  volumes:
    - ./<自己建个目录>:/var/lib/cloudflare-warp

docker-compose up -d 启动

curl --socks5 127.0.0.1:1080 https://cloudflare.com/cdn-cgi/trace

运行上面的命令,返回warp=onwarp=plus说明成功了。

参考博客