Giter Site home page Giter Site logo

docker-compose-trojan's Introduction

  • 以CentOS7 为例,前提你有VPS和有个域名绑定好IP

一、安装git、docker、docker-compose

  • 不会安装,请查看其他项目有说明

二、拉取项目

    git clone https://github.com/0758jian/docker-compose-trojan.git trojan

三、修改caddy配置文件,让它自动生成证书,将yourdomain改为你的域名,不指定任何端口

    cd trojan
    #先改好绑定好IP的域名,启动一下拉取证书
    vi caddy/conf/Caddyfile
    sudo docker-compose up -d caddy
    sudo docker-compose logs -f caddy
  • 查看caddy2当前配置 curl localhost:2019/config/
  • 其他装逼命令使用
    #上传配置文件
    curl localhost:2019/load -X POST -H "Content-Type: text/caddyfile" --data-binary @caddy/conf/Caddyfile
    #重载容器里的配置文件
    sudo docker-compose exec caddy caddy reload -config /etc/Caddyfile

四、注意!修改trojan配置文件的证书路径和密码,里面的yourdomain是你的域名

    #重启服务
    sudo docker-compose down
    sudo docker-compose up -d
    sudo docker-compose logs trojan

注意事项

  • 主要是借助caddy自动拉取证书,然后给trojan来使用,顺便开启web server伪站

  • 已装上php 可以自行安装wordpress等php程序

  • 服务器只开通80 443 8443 22(SSH建议改为其他端口登陆)

  • trojan 客户端下载 https://github.com/trojan-gfw/trojan/releases

  • TG技术群:https://t.me/ousiqi

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.