群晖挂 socks5 代理下载教育网 PT 资源

群晖挂 socks5 代理下载教育网 PT 资源

背景知识

  • 有一个酸酸乳的上网 socks5
  • 懂得群晖 ssh 的 root 登录
  • 群晖 218+ 开启docker服务
  • 教育网资源账号(这里是北邮人 PT) 的账号

系统环境

docker-compose 信息

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

docker 信息

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 <> 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

utorrent 安装及配置

docker-compose 配置

cat <> 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配置修改

  • 打开utorrent.

    • http://群晖ip:8080/gui/web/index.html
    • 账号Ladmin 密码:空
  • 连接 => 代理服务=> socks5 => 群晖本地代理的 ip和port

                        => 通过代理服务器解析主机名 `勾选`
                        => 用点对点连接代理服务器 `勾选`
  • 带宽 => 全局上传比率限制 => 最大上传速度(KB/s) = 0
  • 任务

    • 启用 DHT 网络(E) 不勾选
    • 向 Tracker 查询状态信息(A) 勾选
    • 新建 Torrent 时启用 DHT(E) 不勾选
    • 启用用户交换(P) 不勾选
    • 启用本地用户发现(L) 勾选
    • 限制本地用户带宽(L) 不勾选
    • 启用带宽管理 [uTP] 不勾选
    • 启用 UDP Tracker 支持 勾选

P.S. 第一次下载时比较慢,需要等一会儿才有速度

大功告成

你可能感兴趣的:(nas)