Skip to content

AutoTorrentProxy is an script to simplify the process of deploying a proxy server for traffic forwarding Torrent clients. This script utlized FRP and GOST.

Notifications You must be signed in to change notification settings

ShuiChang2019/AutoTorrentProxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoTorrentProxy

English Readme

基于frpgost的自动Torrent代理部署脚本

TorrentDeploy.sh可以完成如下内容:

  • 自动下载frp和gost工具
  • 自动编写和配置服务

Cleanup.sh可以完成如下内容:

  • 自动删除TorrentDeploy.sh所配置的服务

使用方法

  1. 将仓库clone到代理服务器
git clone https://github.com/ShuiChang2019/AutoTorrentProxy.git
  1. 修改/config/frps.toml/configs/gost.ini配置。示例:
# frps.toml
[common]
bindPort = 7000
bind_udp_port = 7000
bind_addr = "0.0.0.0"
allow_ports = "1001-7001,10001-22500"
token = "<YOUR_TOKEN_HERE>"
tls_only = true
# gost.ini
[gost_conf]
username=<YOUR_USERNAME_HERE>
password=<YOUR_PASSWORD_HERE>
ip_addr=0.0.0.0
port=<YOUR_PORT_HERE>
  1. 代理服务器上运行TorrentDeploy.sh。(注意:涉及写服务操作需要sudo权限)
cd AutoTorrentProxy
bash TorrentDeploy.sh

参数:

-f: 指定frps.toml配置文件路径 (默认为./AutoTorrentProxy/config/frps.toml)
-g: 指定gost.ini配置文件路径 (默认为./AutoTorrentProxy/config/gost.ini)
-p: 指定脚本所用的代理服务器(如http://1.2.3.4:7890)
  1. 运行torrent的客户端上修改配置。

    • 修改frpc.toml。示例:(注:[common]中的token需要与frps.toml中的token一致)
    [common]
    server_addr = "<YOUR_VPS_ADDRESS>"
    server_port = 7000
    token = "<YOUR_TOKEN_HERE>"
    tls_enable = true
    
    [[proxies]]
    name = "Remote Download"
    type = "tcp"
    local_ip = "127.0.0.1"
    local_port = 2333
    remote_port = 2333
    
    [[proxies]]
    name = "BT Listen TCP"
    type = "tcp"
    local_ip = "127.0.0.1"
    local_port = <YOUR_LOCAL_BT_PORT>
    remote_port = <YOUR_LOCAL_BT_PORT>
    
    [[proxies]]
    name = "BT Listen UDP"
    type = "udp"
    local_ip = "127.0.0.1"
    local_port = <YOUR_LOCAL_BT_PORT>
    remote_port = <YOUR_LOCAL_BT_PORT>
    
    [[proxies]]
    name = "eMule Listen TCP"
    type = "tcp"
    local_ip = "127.0.0.1"
    local_port = 22224
    remote_port = 22224
    
    [[proxies]]
    name = "eMule Listen UDP"
    type = "udp"
    local_ip = "127.0.0.1"
    local_port = 22224
    remote_port = 22224
    • 运行frp客户端frpc
    frpc -c frpc.toml
    • 修改torrent软件的配置(以qBittorrent为例) alt text 注:传入连接为frp端口,代理服务器为gost地址、端口、用户名、密码
  2. (可选)验证torrent是否代理成功:如使用Torguard查看下载地址是否为代理服务器的地址

  3. (删除服务和清理)在代理服务器上运行Cleanup.sh(注意:涉及删除服务操作需要sudo权限)

bash Cleanup.sh

About

AutoTorrentProxy is an script to simplify the process of deploying a proxy server for traffic forwarding Torrent clients. This script utlized FRP and GOST.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages