Giter VIP home page Giter VIP logo

docker-v2ray's Introduction

一键docker部署V2ray

Caddy自动证书申请,TLS+WebSocket

准备工作

  • 一个域名,并且将域名添加一条A记录到你的VPS
  • VPS安装DockerDocker Compose

附上CentOS7的安装命令

yum install -y yum-utils device-mapper-persistent-data lvm2 epel-release python-pip gcc libffi-devel python-devel openssl-devel
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
yum install docker-ce
service docker start
systemctl enable docker
pip install --upgrade pip
pip install docker-compose --ignore-installed requests

安装/使用

# 拉取代码&进入目录
git clone https://github.com/anerg2046/docker-v2ray.git
cd docker-v2ray
# 运行脚本生成配置文件
./gen-config.sh
# 请输入你的域名信息(eg:www.domain.com):(输入准备好的域名,可以是二级域名)
# 请输入邮箱地址(eg:[email protected]):(输入一个邮箱,用于caddy申请证书用于加密)
# 请输入websocket端口(默认随机:1234~65535):(不想设定直接回车)
# 请输入alterId(默认随机:10~128):(不想设定直接回车)
# =================================================================
# 完成后你会看到相关配置信息及导入客户端用的字符串
# =================================================================
# 启动docker
./docker-v2ray.sh build

如果要停止,执行 ./docker-v2ray.sh stop

首次执行可能需要等两分钟,证书申请好了才能访问

宿主机已占用80 443端口的处理方式

  • 自行修改build/docker-compose.yml中的映射端口
  • nginx的话需要ssl_preread支持,具体可参考这篇博文 https://www.jianshu.com/p/70b500c07ccc
  • 已在config/nginx中给出了编译和配置范例

其他说明

  • 当前V2ray版本v4.23.1
  • html目录里我放的是个域名出售页面,邮箱是我的,在index.html里,烦请各自更改一下
  • 脚本不含BBR,请自行安装,因为我觉得装不装其实都差不多
  • 有特殊需求的人,请自行修改脚本or配置文件模板
  • 还有问题提交issue

相关

JustHost.ru 北方联通推荐使用,价格便宜不限量

docker-v2ray's People

Contributors

anerg2046 avatar ixervice avatar

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.