如何使用 Docker Compose 安装多个 shadowsocks-rust

2,800次阅读
60 条评论

共计 1977 个字符,预计需要花费 5 分钟才能阅读完成。

前言

好多教程都让我这个小白云里雾里,现在根据 Luca 大佬的教程 进行一些改进。
我们就直入正题,那就是如何使用 Docker 安装多个 shadowsocks-rust 代理服务。

教程

1. 安装 docker/docker compose 引擎

安装 docker 第一步需要安装 docker 引擎,docker 引擎是 docker 容器的基础。在安装 docker 引擎时,有几个前提条件必须满足:

1.Linux 系统,且内核版本必须较新

2. 系统必须是 64 位系统

3.RAM 资源最好在 512M 以上

# 更新软件源
apt-get update && apt-get -y upgrade

#安装 Docker
curl -fsSL https://get.docker.com | bash -s docker(国外)curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun(国内)#安装 Docker Compose
#如果之前安装了 2.0 以下的版本的话,请先执行卸载指令:sudo rm /usr/local/bin/docker-compose
#如果之前安装了 2.0 以上的版本的话,请先执行卸载指令:rm -rf .docker/cli-plugins/

#安装
sudo apt-get update && sudo apt-get install docker-compose-plugin -y

#查看版本号,如果有版本号则成功
docker compose version 

#如果需要更新 compose 直接   
sudo apt-get update && sudo apt-get upgrade -y

2. 配置 shadowsocks-rust

创建文件名为 /root/ss-rust/config 的文件夹,并在文件夹内创建 config.json 文件

mkdir -p /root/ss-rust/config
nano /root/ss-rust/config/config.json

自己想要开几个 shadowsocks 就写几个,根据自己需求修改下面的配置后黏贴

{
    "servers": [
        {
            "server":"0.0.0.0",
            "server_port":9000,
            "method":"aes-256-gcm",
            "password":"password0",
            "timeout":300,
            "nameserver":"8.8.8.8",
            "mode":"tcp_and_udp",
            "fast_open": true
        },
        {
            "server":"0.0.0.0",
            "server_port":9001,
            "method":"aes-256-gcm",
            "password":"password0",
            "timeout":300,
            "nameserver":"8.8.8.8",
            "mode":"tcp_and_udp",
            "fast_open": true
        },
        {
            "server":"0.0.0.0",
            "server_port":9002,
            "method":"aes-256-gcm",
            "password":"password0",
            "timeout":300,
            "nameserver":"8.8.8.8",
            "mode":"tcp_and_udp",
            "fast_open": true
        }
    ]
}

2. 配置 docker-compose

进入 ss-rust 的文件夹,并在文件夹内创建 docker-compose.yml 文件

cd /root/ss-rust
nano /root/ss-rust/docker-compose.yml

黏贴下面的配置后保存

version: "3.0" ##docker-compose 版本,一般不用动。services:
  shadowsocks: ## 服务名称
    image: teddysun/shadowsocks-rust:latest ## 容器使用的镜像名称
    container_name: ss-rust ## 新建容器的名称
    restart: always ## 重启策略,always 为始终,一般默认即可。network_mode: bridge ## 容器采用的网络模式,host 为共享主机网络,bridge 为桥接。ports: ## 映射的端口,:前为宿主机端口,:后为容器内部端口。与刚刚的 shadowsocks 对应,有几个写几个。- "9000:9000"
      - "9000:9000/udp"
      - "9001:9001" 
      - "9001:9001/udp"
      - "9002:9002" 
      - "9002:9002/udp"
    volumes: ## 映射的路径,引号前为主机路径,后为容器内部路径。- ./config:/etc/shadowsocks-rust

运行

cd && cd /root/ss-rust
docker compose pull && docker compose up -d

更多资源请 点击这里 关注 TG 频道

正文完
 
lucky
版权声明:本站原创文章,由 lucky 2023-04-04发表,共计1977字。
转载说明:转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(60 条评论)
2024-08-06 07:07:11 回复

buy generic lasuna – himcolin over the counter himcolin online order

 Windows  Chrome  巴西圣保罗圣保罗
2024-08-20 01:42:13 回复

buy besifloxacin without prescription – buy generic sildamax sildamax for sale

 Windows  Chrome  美国加利福尼亚旧金山
2024-08-23 22:34:12 回复

order gabapentin 600mg online – gabapentin medication azulfidine 500 mg canada

 Windows  Chrome  美国加利福尼亚旧金山
2024-08-24 18:34:44 回复

buy probenecid 500mg pills – buy generic monograph 600mg buy tegretol 200mg sale

 Windows  Chrome  美国加利福尼亚旧金山
2024-08-29 03:03:27 回复

mebeverine 135 mg sale – mebeverine 135mg usa cilostazol 100mg drug

 Windows  Chrome  美国加利福尼亚旧金山
2024-08-29 09:31:39 回复

Although our OD platform can be broadly applied, we demonstrate its utility by creating vascularized cortical organoids in pooled and multicore shell motifs as well as 3D cortical tissues composed of multiple cell types patterned in spatially distinct regions order priligy online The risk that you will develop liver damage may also be higher if you are elderly, obese, or have diabetes

 Windows  Chrome  俄罗斯莫斯科莫斯科
2024-08-29 12:26:55 回复

order celecoxib generic – indomethacin 50mg cheap buy indomethacin pills

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-01 18:58:23 回复

how to buy priligy im 16 years old Given a power of 90 and a two sided О± of 5, this resulted in a sample size of 14 evaluable patients 7 in both treatment arms

 Windows  Chrome  拉脱维亚Riga
2024-09-02 12:38:40 回复

Your point of view caught my eye and was very interesting. Thanks. I have a question for you.

 Windows  Edge  美国加利福尼亚旧金山
2024-09-05 16:35:25 回复

diclofenac brand – diclofenac brand buy aspirin 75 mg online

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-06 22:38:41 回复

cheap rumalaya generic – where to buy shallaki without a prescription order amitriptyline 50mg pills

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-12 01:46:14 回复

pyridostigmine for sale online – mestinon price order azathioprine 50mg generic

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-13 22:04:39 回复

diclofenac online – voveran for sale online purchase nimodipine online

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-17 23:57:26 回复

order ozobax generic – lioresal uk purchase piroxicam

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-19 21:25:47 回复

buy generic mobic 15mg – order toradol 10mg for sale order toradol pills

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-23 12:27:45 回复

periactin over the counter – purchase tizanidine pill purchase tizanidine generic

 Windows  Chrome  拉脱维亚Riga
2024-09-25 14:02:29 回复

trihexyphenidyl generic – purchase emulgel sale purchase emulgel online cheap

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-30 19:56:23 回复

order cefdinir 300 mg pill – omnicef over the counter buy clindamycin cheap

 Windows  Chrome  美国加利福尼亚旧金山
2024-09-30 21:01:24 回复

buy isotretinoin pills for sale – where to buy accutane without a prescription buy deltasone 5mg generic

 Windows  Chrome  美国加利福尼亚旧金山
2024-10-05 01:19:37 回复

purchase prednisone sale – buy cheap generic zovirax buy cheap elimite

 Windows  Chrome  俄罗斯列宁格勒圣彼得堡
2024-10-06 01:50:16 回复

buy generic acticin – benzoyl peroxide us tretinoin cream over the counter

 Windows  Chrome  俄罗斯列宁格勒圣彼得堡
2024-10-10 18:14:40 回复

betamethasone us – buy monobenzone medication benoquin cheap

 Windows  Chrome  美国加利福尼亚旧金山
2024-10-11 01:04:57 回复

purchase metronidazole online – flagyl 200mg price buy cenforce 50mg without prescription

 Windows  Chrome  美国加利福尼亚旧金山
2024-10-16 14:22:00 回复

buy augmentin medication – buy clavulanate generic buy levothyroxine pills

 Windows  Chrome  美国加利福尼亚旧金山
2024-10-17 23:50:50 回复

clindamycin without prescription – indocin pills purchase indomethacin generic

 Windows  Chrome  俄罗斯列宁格勒圣彼得堡
2024-10-21 22:25:12 回复

brand cozaar 25mg – buy losartan pills buy cephalexin 250mg pill

 Windows  Chrome  美国加利福尼亚旧金山
2024-10-22 19:55:15 回复

crotamiton usa – buy aczone gel for sale aczone medication

 Windows  Chrome  美国加利福尼亚旧金山
2024-10-27 12:27:23 回复

purchase zyban for sale – order generic ayurslim order shuddha guggulu for sale

 Windows  Chrome  美国加利福尼亚旧金山
2024-10-28 02:40:41 回复

buy provigil 200mg without prescription – oral provigil where to buy melatonin without a prescription

 Windows  Chrome  俄罗斯列宁格勒圣彼得堡
2024-10-29 02:39:19 回复

I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article. https://accounts.binance.com/uk-UA/register?ref=W0BCQMF1

 Windows  Edge  美国犹他盐湖城

Thanks for sharing. I read many of your blog posts, cool, your blog is very good.

 Windows  Edge  美国加利福尼亚旧金山
2024-11-01 06:06:45 回复

prometrium oral – buy progesterone 100mg without prescription cheap fertomid without prescription

 Windows  Chrome  美国印第安纳印第安纳波利斯
2024-11-02 14:11:59 回复

xeloda uk – xeloda 500mg canada danazol medication

 Windows  Chrome  德国慕尼黑
2024-11-06 23:53:30 回复

buy cheap generic norethindrone – order lumigan without prescription buy cheap generic yasmin

 Windows  Chrome  美国加利福尼亚旧金山
2024-11-07 23:17:01 回复

where to buy priligy in malaysia It is also clear, after years of study, that women taking ovulation- inducing drugs such as CC and gonadotropin may not be at increased risk for ovarian cancer

 Windows  Chrome  卢森堡Luxembourg
2024-11-08 10:01:05 回复

order fosamax 70mg generic – nolvadex 20mg sale provera 10mg uk

 Windows  Chrome  美国加利福尼亚旧金山
2024-11-08 12:16:30 回复

t sit there and pout dapoxetine priligy uk

 Windows  Chrome  美国加利福尼亚旧金山
2024-11-12 23:03:48 回复

I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

 Windows  Edge  美国加利福尼亚旧金山
2024-11-13 01:05:13 回复

dostinex online order – cabergoline 0.5mg for sale alesse pills

 Windows  Chrome  以色列Tel-Aviv
2024-11-15 14:41:52 回复

order estradiol 1mg online cheap – purchase femara sale arimidex 1mg usa

 Windows  Chrome  英国伦敦伦敦
2024-11-16 14:40:17 回复

priligy dapoxetine amazon 2005, 106 6 1372 1381

 Windows  Chrome  美国加利福尼亚旧金山
2024-11-19 06:45:20 回复

г‚·гѓ«гѓ‡гѓЉгѓ•г‚Јгѓ« её‚иІ© гЃЉгЃ™гЃ™г‚Ѓ – г‚·г‚ўгѓЄг‚№ жµ·е¤–йЂљиІ© г‚їгѓЂгѓ©гѓ•г‚Јгѓ«йЂљиІ© 安全

 Windows  Chrome  美国加利福尼亚旧金山
2024-11-19 15:31:49 回复

priligy dapoxetine 1e, f, because FOXP1 was demonstrated to be expressed in normal kidney tissue by immunohistochemical analysis 10

 Windows  Chrome  美国加利福尼亚旧金山
2024-11-22 10:19:08 回复

гѓ—гѓ¬гѓ‰гѓ‹гѓійЂљиІ© – гѓ—гѓ¬гѓ‰гѓ‹гѓігЃЇи–¬е±ЂгЃ§иІ·гЃ€г‚‹пјџ ジスロマックジェネリック йЂљиІ©

 Windows  Chrome  美国加利福尼亚旧金山

order cheap cytotec without a prescription Cognitive performance of children prenatally exposed to safe levels of methylmercury

 Windows  Chrome  挪威Oslo
2024-11-28 22:31:14 回复

where to buy cheap cytotec price Peak Plasma Time 3 4 hr

 Windows  Chrome  意大利米兰米兰
2024-11-30 10:43:45 回复

eriacta worse – apcalis squint forzest troll

 Windows  Chrome  英国伦敦伦敦
2024-11-30 11:47:16 回复

гѓ—гѓ¬гѓ‰гѓ‹гѓі гЃЇйЂљиІ©гЃ§гЃ®иіј – ドキシサイクリン通販 安全 アキュテイン通販

 Windows  Chrome  英国伦敦伦敦

buying generic cytotec without insurance Your easygoing, encouraging style helped make what should have been a chore far more pleasant

 Windows  Chrome  美国加利福尼亚旧金山
2024-12-06 07:12:50 回复

crixivan us – brand crixivan order voltaren gel for sale

 Windows  Chrome  美国加利福尼亚旧金山
2024-12-08 20:32:44 回复

Thanks for sharing. I read many of your blog posts, cool, your blog is very good.

 Windows  Edge  美国加利福尼亚旧金山
2024-12-11 06:00:49 回复

valif online vital – valif pills fred sinemet pill

 Windows  Chrome  美国加利福尼亚旧金山
2024-12-12 11:46:12 回复

buy provigil 100mg for sale – cefadroxil 250mg pills cheap lamivudine

 Windows  Chrome  英国伦敦伦敦
2024-12-17 09:34:04 回复

buy oral stromectol – buy tegretol without a prescription order carbamazepine 400mg without prescription

 Windows  Chrome  美国加利福尼亚旧金山
2024-12-18 08:11:16 回复

Поиск в гугле

 Windows  Chrome  美国加利福尼亚旧金山
2024-12-19 08:55:53 回复

Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me? https://accounts.binance.com/en-IN/register?ref=UM6SMJM3

 Windows  Edge  美国加利福尼亚旧金山
2024-12-20 11:20:18 回复

buy generic phenergan over the counter – purchase phenergan without prescription lincomycin sale

 Windows  Chrome  新加坡
2025-01-05 12:28:17 回复

oral prednisone 5mg – order deltasone 20mg online order capoten 25mg

 Windows  Chrome  卢森堡Luxembourg
2025-01-13 05:12:35 回复

Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.

 Windows  Edge  英国伦敦伦敦
2025-01-18 08:51:23 回复

buy generic accutane online – dexamethasone over the counter linezolid 600 mg without prescription

 Windows  Chrome  美国加利福尼亚旧金山