GithubHelp home page GithubHelp logo

docker-nginx-v2ray's Introduction

docker 内部署 nginx + v2ray + ws + tls

GitHub Docker Cloud Automated build Docker Cloud Build Status

安装并启动 docker 服务

Docker 文档

运行服务

#!/usr/bin/env bash

# 域名
SITE_DOMAIN=www.sample.com

# v2ray 的 client id
V2RAY_TOKEN=00000000-0000-0000-0000-000000000000

# v2ray ws 混淆的路径
V2RAY_WS_PATH=/secret/path

docker run -d --restart=always \
    --name docker-nginx-v2ray \
    -v /root/v2ray/cert:/data/cert \
    -p 80:80 \
    -p 443:443 \
    -e SITE_DOMAIN=${SITE_DOMAIN} \
    -e V2RAY_TOKEN=${V2RAY_TOKEN} \
    -e V2RAY_WS_PATH=${V2RAY_WS_PATH} \
    gongshw/docker-nginx-v2ray

访问 https://${SITE_DOMAIN}, 可以打开一个静态网站.

默认会在./cert/${SITE_DOMAIN} 下生成自签名的证书(certificate.crt)和私钥(private.key)文件.

为了安全, 建议用有效的证书替换.

文件挂载点

/data/cert

证书文件, 如果不存在会自己生成. 路径如下:

/data/cert
└── ${SITE_DOMAIN}
    ├── certificate.crt      # pem 格式证书链
    └── private.key          # pem 格式私钥

建议用有效的证书替换.

/data/www

伪装的静态站点. 可随意替换.

内部端口

http/80

重定向请求到 443 端口.

https/443

nginx 代理的 v2ray 服务, 伪装成了一个静态站点.

vmess/12345

v2ray 的端口, 不建议直接对外暴露.

docker-nginx-v2ray's People

Contributors

gongshw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

docker-nginx-v2ray's Issues

ipv6

Separating the handling of IPv6 might be useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.