前置条件:

搭建方法:

mkdir conf
vim conf/shadowsocks.json

配置文件示例:

{
 "server":"0.0.0.0",
 "local_port":1080,
 "server_port":8388,
 "password":"MyPowerfulPassword",
 "timeout":300,
 "method":"aes-256-cfb"
}
  • 编写docker-compose.yml文件:
ssp:
  build: .
  ports:
   - "8388:8388"
  volumes:
   - ./conf:/etc/shadowsocks
  restart: always
  • docker-compose up -d