Skip to content

Instantly share code, notes, and snippets.

@nickleefly nickleefly/acme.md
Last active Jul 22, 2019

Embed
What would you like to do?
shadowsocks v2ray-plugin nginx with docker-compose
export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export CF_Email="xxxx@sss.com"
~/.acme.sh/acme.sh --issue -d 'example.com' -d '*.example.com' --dns dns_cf -k ec-256
~/.acme.sh/acme.sh --issue --dns dns_cf -d subdomain.example.com
#conf/nginx.conf
server {
listen 443 ssl;
server_name subdomain.example.com;
ssl_certificate /etc/nginx/acme/subdomain.example.com/fullchain.cer;
ssl_certificate_key /etc/nginx/acme/subdomain.example.com/subdomain.example.com.key;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_redirect off;
proxy_http_version 1.1;
proxy_pass shadowsocks-libev:8388; # Port of v2ray-plugin
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
version: '3'
services:
nginx:
image: nginx:alpine
restart: unless-stopped
volumes:
- ./conf:/etc/nginx/conf.d
- /home/user/.acme.sh:/etc/nginx/acme
ports:
- "80:80"
- "443:443"
links:
- shadowsocks-libev
restart: always
shadowsocks-libev:
container_name: shadowsocks-libev
image: nickleefly/shadowsocks-libev:3.3.0-1.1.0
ports:
- "10001:8388"
environment:
- PASSWORD=password
- METHOD=chacha20
- ARGS=--plugin v2ray-plugin --plugin-opts server; -u
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.