Git Product home page Git Product logo

docker-v2ray's Introduction

使用docker-compose以ws+tls方式快速部署科学上网利器v2ray

更新日志

  • 2020年3月3日:增加v2ray并使用ws+tls方式实现代理服务;
  • 2020年3月1日:增加nginx服务并启用certbot证书;

使用步骤

  1. 获取域名及VPS
  1. 安装docker-ce并启动

以下操作我都是以root用户(非必须)进行的。

  • 安装
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sh get-docker.sh

注: 这一步如果是CENTOS 8,可能会出现 requires containerd.io >= 1.2.2-3错误 -> 解决办法

  • 添加用户到用户组(需退出当前会话重启登录才生效)
gpasswd -a $USER docker
  • 启动
systemctl start docker
  • 设置docker开机自启动
systemctl enable docker
  1. 安装docker-compose
$  curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

$ chmod +x /usr/local/bin/docker-compose

$ ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
  1. 安装git并clone代码
yum -y install git


git clone https://github.com/aitlp/docker-v2ray.git

或者你可以下载后在上传到你的VPS。

  1. 修改v2ray配置

进入docker-v2ray目录开始修改配置。

1) init-letsencrypt.sh

将里面的domainsemail修改为自己的域名和邮箱。

2) docker-compose.yml

可以不用动。

3) data/v2ray/config.json

修改ID,"id": "bae399d4-13a4-46a3-b144-4af2c0004c2e",也可以不修改。

4) data/nginx/conf.d/v2ray.conf

修改所有your_domain为自己的域名,其他地方,如果上面可以修改的地方你没修改,那么除了域名之外的也不用修改了。

  1. 一键部署v2ray
chmod +x ./init-letsencrypt.sh

bash init-letsencrypt.sh
  1. 进行v2ray客户端配置

现在你可以开始使用了。

细节参考: 在docker-compose环境下以ws+tls方式搭建v2ray(So easy)

相关配置参考: centos7基于nginx搭建v2ray服务端配置vmess+tls+websocket完全手册

交流Telegram群组:三好学生;

docker-v2ray's People

Contributors

yomige 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.