专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
wslproxy

bwalia/wslproxy

bwalia

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

下载次数: 0状态:社区镜像维护者:bwalia仓库类型:镜像最近更新:1 个月前
轩辕镜像,不浪费每一次拉取。点击查看
镜像简介
标签下载
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。点击查看

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万+ 次下载
4 天前更新
bwalia/node-app logo

bwalia/node-app

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

查看更多 wslproxy 相关镜像

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

Harbor 镜像源配置

Harbor Proxy Repository 对接专属域名

Portainer 镜像源配置

Portainer Registries 加速拉取

Nexus 镜像源配置

Nexus3 Docker Proxy 内网缓存

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

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

镜像拉取常见问题

使用与功能问题

配置了专属域名后,docker search 为什么会报错?

docker search 限制

Docker Hub 上有的镜像,为什么在轩辕镜像网站搜不到?

站内搜不到镜像

机器不能直连外网时,怎么用 docker save / load 迁镜像?

离线 save/load

docker pull 拉插件报错(plugin v1+json)怎么办?

插件要用 plugin install

WSL 里 Docker 拉镜像特别慢,怎么排查和优化?

WSL 拉取慢

轩辕镜像安全吗?如何用 digest 校验镜像没被篡改?

安全与 digest

第一次用轩辕镜像拉 Docker 镜像,要怎么登录和配置?

新手拉取配置

轩辕镜像合规吗?轩辕镜像的合规是怎么做的?

镜像合规机制

错误码与失败问题

docker pull 提示 manifest unknown 怎么办?

manifest unknown

docker pull 提示 no matching manifest 怎么办?

no matching manifest(架构)

镜像已拉取完成,却提示 invalid tar header 或 failed to register layer 怎么办?

invalid tar header(解压)

Docker pull 时 HTTPS / TLS 证书验证失败怎么办?

TLS 证书失败

Docker pull 时 DNS 解析超时或连不上仓库怎么办?

DNS 超时

docker 无法连接轩辕镜像域名怎么办?

域名连通性排查

Docker 拉取出现 410 Gone 怎么办?

410 Gone 排查

出现 402 或「流量用尽」提示怎么办?

402 与流量用尽

Docker 拉取提示 UNAUTHORIZED(401)怎么办?

401 认证失败

遇到 429 Too Many Requests(请求太频繁)怎么办?

429 限流

docker login 提示 Cannot autolaunch D-Bus,还算登录成功吗?

D-Bus 凭证提示

为什么会出现「单层超过 20GB」或 413,无法加速拉取?

413 与超大单层

账号 / 计费 / 权限

轩辕镜像免费版和专业版有什么区别?

免费版与专业版区别

轩辕镜像支持哪些 Docker 镜像仓库?

支持的镜像仓库

镜像拉取失败还会不会扣流量?

失败是否计费

麒麟 V10 / 统信 UOS 提示 KYSEC 权限不够怎么办?

KYSEC 拦截脚本

如何在轩辕镜像申请开具发票?

申请开票

怎么修改轩辕镜像的网站登录和仓库登录密码?

修改登录密码

如何注销轩辕镜像账户?要注意什么?

注销账户

配置与原理类

写了 registry-mirrors,为什么还是走官方或仍然报错?

mirrors 不生效

怎么用 docker tag 去掉镜像名里的轩辕域名前缀?

去掉域名前缀

如何拉取指定 CPU 架构的镜像(如 ARM64、AMD64)?

指定架构拉取

用轩辕镜像拉镜像时快时慢,常见原因有哪些?

拉取速度原因

为什么拉取镜像的 :latest 标签,拿到的往往不是「最新」镜像?

latest 与「最新」

查看全部问题→

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

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

轩辕镜像
镜像详情
...
bwalia/wslproxy
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.