拉取镜像
docker pull teddysun/shadowsocks-rust
启动一个容器
你必须首先在主机中创建一个配置文件:/etc/shadowsocks-rust/config.json
mkdir -p /etc/shadowsocks-rust
如果您想启用 xray-plugin,JSON 格式的示例如下所示
{
"server":"0.0.0.0",
"server_port":9000,
"password":"password0",
"timeout":300,
"method":"aes-256-gcm",
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"xray-plugin",
"plugin_opts":"server"
}
如果你想启用 v2ray-plugin,JSON 格式的示例如下所示
{
"server":"0.0.0.0",
"server_port":9000,
"password":"password0",
"timeout":300,
"method":"aes-256-gcm",
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"v2ray-plugin",
"plugin_opts":"server"
}
启动容器监听的例子 9000(TCP 和 UDP):
docker run -d -p 9000:9000 -p 9000:9000/udp --name ss-rust --restart=always -v /etc/shadowsocks-rust:/etc/shadowsocks-rust teddysun/shadowsocks-rust
正文完
发表至: 开源脚本
2023-02-22