
How to use
For apt based system like Debian/Ubuntu
apt-get update && apt-get install sudo curl -y
For yum based system like Centos(not recommended)
yum update -y && yum install sudo curl -y
Then
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/johnrosen1/trojan-gfw-script/master/vps.sh)"
Screenshots:
Flowchart:

Friendly Reminder:
- Please Run as root(sudo -i)
- Please Purchase a domain and finish a dns resolve before running this bash script!
- Please Open Tcp port 80 and 443 and turn off Cloudflare CDN in your control panel before running this bash script!
- For customized certificate , please put it in /etc/trojan/ , no name change required !
If you found it useful , please give a star ,thanks!
Live Demo
https://www.trojan-gfw.xyz/vpstoolbox.html
Bash Features:
- Auto install and config NGINX
- Auto issue renew let’s encrypt certificate and auto reload Trojan-GFW after renewal
- Auto OS Detect Support Debian Ubuntu Centos(not recommended)
- Auto domain resolve verification
- Auto iptables(includes ipv6) firewall config and iptables-persistent
- Auto generate Trojan-GFW client config
- Auto Nginx Performance Optimization
- Auto Trojan-GFW trojan:// share link and QR code generate
- Auto https 301 redirect without affecting certificate renew
- Auto enable HSTS header
- Auto Random Html Template Choose
- Auto enable Full IPv6 Support
- Auto enable time sync
- Auto enable Fail Restart
- Auto uninstall Aliyun Aegis
- Support Auto install and config Trojan-GFW Dnscrypt-proxy Qbittorrent Bittorrent-Tracker Aria2 Filebrowser Netdata and TOR
- Support Auto TCP Turbo enable ( TCP-BBR included)
- Support BBRPLUS
- Support TLS1.3 ONLY
- Support manually check for update
- Support Full/Part Uninstall
- And so on…
If you need more functions, please open a Github issue.(No Centos related issues or bugs allowed except pull requests)
VPS Recommendation (no personal aff included)
Qbittorrent Related: https://www.johnrosen1.com/qbt/
Trojan-GFW Related: https://www.johnrosen1.com/trojan/
Debug Guide
For Network issues:
https://tools.ipip.net/ping.php
For Server issues
sudo nginx -t
sudo systemctl status trojan
sudo systemctl status nginx
sudo systemctl status tor
sudo systemctl status tor@default
sudo systemctl status dnscrypt-proxy
sudo systemctl status qbittorrent
sudo systemctl status tracker
sudo systemctl status aria2
sudo systemctl status filebrowser
sudo systemctl status netdata
journalctl -e -u trojan.service
cat /usr/local/etc/trojan/config.json
cat /etc/nginx/conf.d/trojan.conf
cat /etc/aria.conf
crontab -l
sudo ~/.acme.sh/acme.sh --cron //only if you use let's encrypt certificate
timedatectl
iptables -L -v
Telegram Channel And Group
中文文檔
评论