diff --git a/apps/warp-docker/README.md b/apps/warp-docker/README.md new file mode 100644 index 00000000..b8c79f5f --- /dev/null +++ b/apps/warp-docker/README.md @@ -0,0 +1,13 @@ +# warp-docker + +Run official [Cloudflare WARP](https://1.1.1.1/) client in Docker. + + +# 使用说明 + +检测是否运行正常,端口按需修改。 +``` +curl --socks5 127.0.0.1:40244 https://cloudflare.com/cdn-cgi/trace +``` + +如果输出包含 `warp=on` 或 `warp=plus`,说明容器工作正常。如果输出包含 `warp=off`,则表示容器未能连接到 `WARP` 服务 \ No newline at end of file diff --git a/apps/warp-docker/data.yml b/apps/warp-docker/data.yml new file mode 100644 index 00000000..b59262dc --- /dev/null +++ b/apps/warp-docker/data.yml @@ -0,0 +1,19 @@ +name: Warp-Docker +tags: + - 实用工具 +title: 在 Docker 中运行 Cloudflare WARP +description: 在 Docker 中运行 Cloudflare WARP +additionalProperties: + key: warp-docker + name: Warp-Docker + tags: + - Tool + shortDescZh: 在 Docker 中运行 Cloudflare WARP + shortDescEn: Run Cloudflare WARP in Docker + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://hub.docker.com/r/caomingjun/warp + github: https://github.com/cmj2002/warp-docker + document: https://github.com/cmj2002/warp-docker diff --git a/apps/warp-docker/latest/.env.sample b/apps/warp-docker/latest/.env.sample new file mode 100644 index 00000000..45d4174b --- /dev/null +++ b/apps/warp-docker/latest/.env.sample @@ -0,0 +1,5 @@ +CONTAINER_NAME="warp-docker" +DATA_PATH="./data" +PANEL_APP_PORT_HTTP="40244" +WARP_LICENSE_KEY="" +WARP_SLEEP="2" diff --git a/apps/warp-docker/latest/data.yml b/apps/warp-docker/latest/data.yml new file mode 100644 index 00000000..ca32f6e4 --- /dev/null +++ b/apps/warp-docker/latest/data.yml @@ -0,0 +1,31 @@ +additionalProperties: + formFields: + - default: 40244 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: 2 + edit: true + envKey: WARP_SLEEP + labelEn: Warp Sleep + labelZh: Warp 睡眠时间 + required: true + type: number + - default: "" + edit: true + envKey: WARP_LICENSE_KEY + labelEn: Warp License Key + labelZh: Warp 许可证密钥 + required: false + type: text + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data Path + labelZh: 数据路径 + required: true + type: text diff --git a/apps/warp-docker/latest/docker-compose.yml b/apps/warp-docker/latest/docker-compose.yml new file mode 100644 index 00000000..c3300652 --- /dev/null +++ b/apps/warp-docker/latest/docker-compose.yml @@ -0,0 +1,26 @@ +version: '3' +services: + warp: + image: caomingjun/warp:latest + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - '${PANEL_APP_PORT_HTTP}:1080' + environment: + - WARP_SLEEP=${WARP_SLEEP} + - WARP_LICENSE_KEY=${WARP_LICENSE_KEY} + cap_add: + - NET_ADMIN + sysctls: + - net.ipv6.conf.all.disable_ipv6=0 + - net.ipv4.conf.all.src_valid_mark=1 + volumes: + - '${DATA_PATH}:/var/lib/cloudflare-warp' + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/warp-docker/logo.png b/apps/warp-docker/logo.png new file mode 100644 index 00000000..9cec3e62 Binary files /dev/null and b/apps/warp-docker/logo.png differ