admin 2019-09-07
root@DS218plus:~# docker-compose version docker-compose version 1.14.0, build c7bdf9e docker-py version: 2.3.0 CPython version: 2.7.13 OpenSSL version: OpenSSL 1.0.1t 3 May 2016
root@DS218plus:~# docker version Client: Version: 17.05.0-ce API version: 1.29 Go version: go1.8 Git commit: 371caef-synology Built: Mon May 6 18:07:21 2019 OS/Arch: linux/amd64 Server: Version: 17.05.0-ce API version: 1.29 (minimum version 1.12) Go version: go1.8 Git commit: 371caef-synology Built: Mon May 6 18:07:21 2019 OS/Arch: linux/amd64 Experimental: false
cat <<EOT >> ss-compose.yml version: '2.1' services: ss-privoxy: image: mumubin/ss-privoxy network_mode: bridge container_name: ss-privoxy restart: unless-stopped command: docker-entrypoint.sh environment: - SERVER_ADDR=vps ip - METHOD=aes-256-cfb - PASSWORD=密码 - SSPORT=vip端口 - PROXYPORT=8118 ports: - 8118:8118 - 1080:1080 logging: driver: "json-file" options: max-size: "10m" max-file: "3" EOT
docker-compose -f ss-compose.yml pull && docker-compose -f ss-compose.yml up -d
root@DS218plus:~# curl -I --socks5 127.0.0.1:1080 www.google.com HTTP/1.1 200 OK Date: Mon, 29 Jul 2019 13:01:05 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info." Server: gws X-XSS-Protection: 0 X-Frame-Options: SAMEORIGIN Set-Cookie: 1P_JAR=2019-07-29-13; expires=Wed, 28-Aug-2019 13:01:05 GMT; path=/; domain=.google.com Set-Cookie: NID=188=aeZtApCpuQusn_W70MtvhnHjfB4tVpwpFDsJBYQifSlT9BEpe3d9LvINfm5R0ag3l-nbshErOt2yOeE0DEbe4BEryOj44kNgA7tmLmjbiW54TAmueD8HzaBkefCuOvtYt3xtEt90lPYacM_8-r19gtgH0j00rwwoGl1ai_eazhc; expires=Tue, 28-Jan-2020 13:01:05 GMT; path=/; domain=.google.com; HttpOnly Transfer-Encoding: chunked Accept-Ranges: none Vary: Accept-Encoding
P.S.
docker 是个容器,网络是隔离的,注意 listen 的时候要用 0.0.0.0 替换 127.0.0.1
cat <<EOT >> utorrent-compose.yml version: '2.1' services: utorrent: image: ekho/utorrent:latest network_mode: bridge container_name: utorrent restart: unless-stopped volumes: - /volume1/utorrent:/utorrent/data ports: - 7881:7881 - 8080:8080 - "7881:7881/udp" logging: driver: "json-file" options: max-size: "10m" max-file: "3" EOT
docker-compose -f utorrent-compose.yml pull && docker-compose -f utorrent-compose.yml up -d
apt-get update && apt-get install curl
root@95e4def2d5e3:/utorrent# curl -I --socks5 群晖ip:1080 www.google.com HTTP/1.1 200 OK Date: Mon, 29 Jul 2019 13:47:36 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info." Server: gws X-XSS-Protection: 0 X-Frame-Options: SAMEORIGIN Set-Cookie: 1P_JAR=2019-07-29-13; expires=Wed, 28-Aug-2019 13:47:36 GMT; path=/; domain=.google.com Set-Cookie: NID=188=Dfwv2bGA9zDTICfrIrtr1nq9RXtcBv220Lus8KrY8snkWEdIu8RLl4lHh2xY8HZNqQibrnpBQwSYNkA5qfL0DvOBsdnonjYgWKmy3PdYI0eyt6DJ518lt-RmRvGhDpSHuXZKtpsRltuExmZIF0nbKZIK4Phs22nfCIkve6oIkQw; expires=Tue, 28-Jan-2020 13:47:36 GMT; path=/; domain=.google.com; HttpOnly Transfer-Encoding: chunked Accept-Ranges: none Vary: Accept-Encoding
打开utorrent.
连接 => 代理服务=> socks5 => 群晖本地代理的 ip和port
=> 通过代理服务器解析主机名 `勾选` => 用点对点连接代理服务器 `勾选`
任务
不勾选
勾选
不勾选
不勾选
勾选
不勾选
不勾选
勾选
P.S.
第一次下载时比较慢,需要等一会儿才有速度