../
2024-01-28
When downloading resources with BitTorrent, the client enters a seeding state to upload once the download is complete. At this stage, BT connections are generally incoming connections; without a public IP address, uploading is impossible. The China Mobile broadband connection I am currently using lacks a public IP.
However, I have a few VPS servers on hand that do have public IPs, and these servers can serve as relays.
First, I established a mesh VPN network using Tailscale. My laptop’s Tailscale IP is 100.64.0.13, and the VPS server’s Tailscale IP is 100.64.0.30.
A SOCKS5 proxy can be quickly set up on the VPS server using tmux + ssh:
ssh -D100.64.0.30:1080 127.0.0.1
The BitTorrent client I use is qBittorrent, and I fixed the listening port to 42318. Using the Nginx stream module, a port reverse proxy can be configured:
stream {
server {
listen 0.0.0.0:42318;
proxy_pass 100.64.0.13:42318;
}
server {
listen 0.0.0.0:42318 udp;
proxy_pass 100.64.0.13:42318;
}
}
Next, configure qBittorrent.
Tools -> Preferences -> Connection: Set the incoming port to 42318, set the Proxy Server to 100.64.0.30, Port to 1080, and check “Use proxy for torrent connections” and “Use proxy for hostname lookups”.
Tools -> Preferences -> BitTorrent: Add tracker servers. You can refer to this list [*].
Tools -> Preferences -> Advanced: Since all incoming connections will have the same IP address after passing through the Nginx reverse proxy, you must check “Allow multiple connections from the same IP address” here.
Apply the settings and restart qBittorrent; you can now become a BT Cyber Bodhisattva and start dispensing your digital alms.
Mistivia - https://mistivia.com