轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
wslproxy

bwalia/wslproxy

bwalia

OpenResty-based API Gateway with Auto SSL, Reverse Proxy, and Admin Dashboard

下载次数: 0状态:社区镜像维护者:bwalia仓库类型:镜像最近更新:3 个月前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

镜像简介
下载命令
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。
点击查看

WSLProxy Docker Guide

Complete guide for deploying WSLProxy using Docker in various scenarios.

Quick Start

Pull Latest Image

bash
docker pull bwalia/wslproxy:latest

Run with Default Configuration

bash
docker run -d \
  --name wslproxy \
  -p 80:80 \
  -p 443:443 \
  -p 8080:8080 \
  bwalia/wslproxy:latest

Available Docker Images

Main Images (Published to Docker Hub)

ImagePurposeTags
bwalia/wslproxyFull WSLProxy OpenResty applicationlatest, <commit-sha>
bwalia/wslproxy-alternateWSLProxy alternate build variantlatest, <commit-sha>
bwalia/node-appNode.js sample backend APIlatest, <commit-sha>
bwalia/s3-browser-appS3 browser applicationlatest, <commit-sha>

Architecture Overview

┌─────────────────────────────────────────────────────────┐
│                   wslproxy Container                     │
├─────────────────────────────────────────────────────────┤
│                                                           │
│  OpenResty (Nginx with Lua)                             │
│  ├─ SSL/TLS Termination (auto-ssl)                     │
│  ├─ Lua API Gateway                                     │
│  ├─ Reverse Proxy                                       │
│  ├─ Prometheus Metrics                                  │
│  ├─ Traffic Logging & Analytics                         │
│  └─ Admin Dashboard (React)                             │
│                                                           │
│  Port 80   - HTTP                                       │
│  Port 443  - HTTPS                                      │
│  Port 8080 - Admin Dashboard & Metrics                  │
│                                                           │
└─────────────────────────────────────────────────────────┘
       ↓                    ↓                    ↓
   Upstream Servers   Configuration   Redis Cache

Deployment Scenarios

Scenario 1: Development Setup

Quick local development with hot-reload capabilities:

bash
docker-compose -f docker-compose-dev.yml up -d

See docker-compose-dev.yml below for details.

Features:

  • Hot-reload of Lua files
  • Volume mounts for development
  • Redis for session storage
  • Admin dashboard on http://localhost:8080

Scenario 2: Production Deployment

Single container production deployment:

bash
docker run -d \
  --name wslproxy-prod \
  --restart always \
  -p 80:80 \
  -p 443:443 \
  -p 8080:8080 \
  -e NGINX_CONFIG_DIR=/opt/nginx \
  -v wslproxy-data:/opt/nginx/data \
  -v wslproxy-certs:/etc/resty-auto-ssl \
  bwalia/wslproxy:latest

With Redis backend:

bash
# Start Redis
docker run -d \
  --name wslproxy-redis \
  --restart always \
  redis:alpine

# Start WSLProxy with Redis
docker run -d \
  --name wslproxy-prod \
  --restart always \
  --link wslproxy-redis:redis \
  -p 80:80 \
  -p 443:443 \
  -p 8080:8080 \
  -e REDIS_HOST=redis \
  -e REDIS_PORT=6379 \
  -v wslproxy-data:/opt/nginx/data \
  -v wslproxy-certs:/etc/resty-auto-ssl \
  bwalia/wslproxy:latest

Scenario 3: Kubernetes Deployment

Using Helm chart (recommended):

bash
helm install wslproxy ./infra/helm-charts/wslproxy \
  -n wslproxy \
  --create-namespace \
  -f values-prod.yaml

See infra/helm-charts/wslproxy/ for Helm configuration.

Scenario 4: Multi-Node Cluster with Persistent Storage

Using Docker Compose with shared volumes:

yaml
version: '3.8'
services:
  wslproxy-1:
    image: bwalia/wslproxy:latest
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - wslproxy-config:/opt/nginx
      - wslproxy-certs:/etc/resty-auto-ssl
    environment:
      REDIS_HOST: redis
      NGINX_CONFIG_DIR: /opt/nginx
    depends_on:
      - redis

  wslproxy-2:
    image: bwalia/wslproxy:latest
    ports:
      - "8080:80"
      - "8443:443"
      - "8081:8080"
    volumes:
      - wslproxy-config:/opt/nginx
      - wslproxy-certs:/etc/resty-auto-ssl
    environment:
      REDIS_HOST: redis
      NGINX_CONFIG_DIR: /opt/nginx
    depends_on:
      - redis

  redis:
    image: redis:alpine
    volumes:
      - redis-data:/data

volumes:
  wslproxy-config:
  wslproxy-certs:
  redis-data:

Configuration

Environment Variables

VariableDefaultPurpose
NGINX_CONFIG_DIR/opt/nginxConfiguration directory path
REDIS_HOSTlocalhostRedis server hostname
REDIS_PORT6379Redis server port
DNS_RESOLVER127.0.0.11DNS resolver for requests
PRIMARY_DNS_RESOLVER8.8.8.8Primary DNS for ACME
SECONDARY_DNS_RESOLVER8.8.4.4Secondary DNS for ACME
SSL_STAGINGfalseUse Let's Encrypt staging environment
SSL_OCSP_STAPLINGtrueEnable OCSP stapling

Volume Mounts

bash
# Data persistence
-v /path/to/config:/opt/nginx/data

# SSL certificates (auto-renewing)
-v /path/to/certs:/etc/resty-auto-ssl

# Configuration files
-v /path/to/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf

# Custom Lua scripts
-v /path/to/api:/usr/local/openresty/nginx/html/api

Settings File (settings.json)

The container requires a settings.json file in the data volume:

json
{
  "instance_id": "my-proxy",
  "instance_name": "My Proxy Instance",
  "env_profile": "prod",
  "redis_host": "redis",
  "storage_type": "disk",
  "env_vars": {
    "REDIS_HOST": "redis",
    "REDIS_PORT": 6379,
    "CONTROL_PLANE_API_URL": "https://example.com/api",
    "FRONT_URL": "https://example.com"
  },
  "super_user": {
    "email": "admin@example.com",
    "password": "hashed_password",
    "username": "admin"
  }
}

Port Mappings

PortProtocolPurpose
80HTTPStandard web traffic
443HTTPSEncrypted web traffic
8080HTTPAdmin Dashboard & Prometheus metrics
8500HTTPConsul API (optional)

Health Checks

Container Health

bash
docker exec wslproxy curl -f http://localhost:8080/health || exit 1

Nginx Configuration Test

bash
docker exec wslproxy openresty -t

API Health Check

bash
curl -s http://localhost:8080/api/health

Logging

View Logs

bash
# Real-time logs
docker logs -f wslproxy

# Last 100 lines
docker logs --tail 100 wslproxy

# With timestamps
docker logs -f -t wslproxy

Access Nginx Error Log

bash
docker exec wslproxy tail -f /usr/local/openresty/nginx/logs/error.log

Access Nginx Access Log

bash
docker exec wslproxy tail -f /usr/local/openresty/nginx/logs/access.log

Monitoring & Metrics

Prometheus Metrics

bash
curl http://localhost:8080/metrics

Metrics Available

  • nginx_http_requests_total - Total HTTP requests
  • nginx_http_request_duration_seconds - Request latency
  • nginx_http_request_size_bytes - Request size
  • nginx_http_response_size_bytes - Response size
  • nginx_http_errors_total - Total errors by status code

Upgrading

Pull Latest Version

bash
docker pull bwalia/wslproxy:latest

Update Running Container

bash
# Stop old container
docker stop wslproxy

# Remove old container (if needed)
docker rm wslproxy

# Start new container
docker run -d \
  --name wslproxy \
  -p 80:80 \
  -p 443:443 \
  -p 8080:8080 \
  -v wslproxy-data:/opt/nginx/data \
  -v wslproxy-certs:/etc/resty-auto-ssl \
  bwalia/wslproxy:latest

Zero-Downtime Upgrade (with load ***)

bash
# 1. Start new container
docker run -d --name wslproxy-new bwalia/wslproxy:latest

# 2. Point load balancer to new container
# 3. Wait for requests to drain from old container
# 4. Stop old container
docker stop wslproxy

# 5. Rename new container
docker rename wslproxy-new wslproxy

Troubleshooting

Container Won't Start

bash
# Check logs
docker logs wslproxy

# Check if Nginx configuration is valid
docker exec wslproxy openresty -t

# Check port availability
netstat -tuln | grep -E ':(80|443|8080)'

High Memory Usage

bash
# Check memory usage
docker stats wslproxy

# Reduce worker processes
# Modify nginx.conf: worker_processes auto; → worker_processes 2;

SSL Certificate Issues

bash
# Check certificate directory
docker exec wslproxy ls -la /etc/resty-auto-ssl

# View certificate details
docker exec wslproxy openssl x509 -in /etc/resty-auto-ssl/certs/example.com.crt -text -noout

DNS Resolution Issues

bash
# Test DNS inside container
docker exec wslproxy nslookup google.com

# Check resolver configuration
docker exec wslproxy cat /usr/local/openresty/nginx/conf/nginx.conf | grep resolver

Security Best Practices

  1. Use specific image tags (not latest in production)

    bash
    docker run bwalia/wslproxy:abc123def456
    
  2. Run as non-root (already configured in image)

    bash
    docker run --user nobody bwalia/wslproxy:latest
    
  3. Use read-only filesystem where possible

    bash
    docker run --read-only --tmpfs /tmp bwalia/wslproxy:latest
    
  4. Restrict capabilities

    bash
    docker run --cap-drop=ALL --cap-add=NET_BIND_SERVICE \
      bwalia/wslproxy:latest
    
  5. Use secrets for sensitive data

    bash
    docker run \
      --secret db_password \
      -e DB_PASSWORD_FILE=/run/secrets/db_password \
      bwalia/wslproxy:latest
    
  6. Regular updates

    bash
    docker pull bwalia/wslproxy:latest
    docker-compose up -d  # Automatically uses latest
    

Docker Compose Templates

Development (docker-compose-dev.yml)

yaml
version: '3.8'

services:
  wslproxy:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        APP_ENV: dev
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - ./api:/usr/local/openresty/nginx/html/api
      - ./html:/usr/local/openresty/nginx/html
      - ./openresty-admin/src:/usr/local/openresty/nginx/html/openresty-admin/src
      - ./data:/opt/nginx/data
      - wslproxy-certs:/etc/resty-auto-ssl
    environment:
      NGINX_CONFIG_DIR: /opt/nginx
      REDIS_HOST: redis
      REDIS_PORT: 6379
    depends_on:
      - redis

  redis:
    image: redis:alpine
    ports:
      - "6379:6379"
    volumes:
      - redis-data:/data

Production (docker-compose-prod.yml)

yaml
version: '3.8'

services:
  wslproxy:
    image: bwalia/wslproxy:latest
    restart: always
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - wslproxy-data:/opt/nginx/data
      - wslproxy-certs:/etc/resty-auto-ssl
    environment:
      NGINX_CONFIG_DIR: /opt/nginx
      REDIS_HOST: redis
      REDIS_PORT: 6379
    depends_on:
      - redis
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

  redis:
    image: redis:alpine
    restart: always
    volumes:
      - redis-data:/data
    command: redis-server --appendonly yes

volumes:
  wslproxy-data:
  wslproxy-certs:
  redis-data:

Building from Source

Build Image Locally

bash
docker build -t wslproxy:dev .

Build with Specific Environment

bash
docker build \
  --build-arg APP_ENV=prod \
  -t wslproxy:prod \
  .

Build Multiple Architectures (with buildx)

bash
docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t bwalia/wslproxy:latest \
  --push \
  .

CI/CD Pipeline

Images are automatically built and pushed to Docker Hub on:

  • Every push to main branch
  • Manual workflow dispatch

See .github/workflows/k3s-build-push-deploy.yaml for automation details.

Tags Applied

  • bwalia/wslproxy:latest - Latest version
  • bwalia/wslproxy:<commit-sha> - Specific commit

Support & Issues

For issues, bugs, or feature requests:

  1. Check existing issues on GitHub
  2. Review logs: docker logs wslproxy
  3. Test Nginx configuration: docker exec wslproxy openresty -t
  4. Create detailed bug report with logs

License

See LICENSE file for details.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 wslproxy 镜像标签

docker pull docker.xuanyuan.run/bwalia/wslproxy:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull bwalia/wslproxy:<标签>

更多 wslproxy 镜像推荐

bwalia/opsapi logo

bwalia/opsapi

bwalia
暂无描述
1万+ 次下载
12 天前更新
bwalia/node-app logo

bwalia/node-app

bwalia
暂无描述
1万+ 次下载
3 个月前更新

查看更多 wslproxy 相关镜像

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

一键安装

一键安装 Docker

Linux Docker 一键安装

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
bwalia/wslproxy
教程轩辕镜像功能与使用教程
定价查看流量套餐与价格
热门查看热门 Docker 镜像推荐
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
商务合作:点击复制邮箱
用户协议·隐私政策·©2024-2026 源码跳动
用户协议·隐私政策©2024-2026 杭州源码跳动科技有限公司商务合作:点击复制邮箱