Trojan-GFW on Ubuntu 20.04 Server
Trojan is popular in China because it's easier to configure than V2Ray. The diagram below explains how it works. (Source: https://trojan-tutor.github.io/2019/04/10/p41.html ) Traffic arrives at port 443 or port 80 . Port 443 is handled by Trojan. Good passwords goes to the Trojan server. Bad passwords go to Nginx on localhost port 80 . Port 80 is handled directly by Nginx. The server runs Ubuntu 20.04. A DNS record type A points from host.example.com to the server's IP address. Install and Configure Nginx apt install nginx -y Edit the configuration file: vi /etc/nginx/sites-available/default Change the contents to read as follows. Nginx listens on port 80 . Change host.example.com in the example below to your actual server name. server { listen 80 default_server; root /var/www/html; index index.html; server_name host.example.com; location / { try_files $uri $uri/ =404; } } Save the file. Restart Nginx with the n