Posts

Showing posts from August, 2020

Trojan-GFW on Ubuntu 20.04 Server

Image
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

SSH over Tor from Windows

Image
Install PuTTY Download the latest Windows installer from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html . Run the installer. On the Welcome screen, click Next . On the Destination Folder screen, click Next . On the Product Features screen, click Install . If the User Account Control screen appears, click Yes . Click Finish . Optionally Get Bridges If you are in a country that censors Tor, you may need to connect to the Tor network via a bridge. You can get bridge lines on the web from https://bridges.torproject.org/options . Alternatively you can write from a Gmail account to bridges@torproject.org putting get transport obfs4 in the email's message body. If you need an unlisted bridge, create your own private obfs4 bridge. Install Tor Browser Download Tor Browser for Windows from https://www.torproject.org/download . Run the installer. It has a name that looks like torbrowser-install-win64-9.5.3_en-US.exe . On the Language screen, select English or any other langu

Shadowsocks with V2Ray Plugin for Windows and Android Clients

Image
Domain Take out a domain name, e.g. example.com . Add A and/or AAAA DNS record(s) for server, e.g. my.example.com . Add domain example.com to Cloudflare. Set nameservers to Cloudflare nameservers. Initially, set Cloudflare SSL/TLS Encryption mode Off . Server Nginx These instructions are for Debian 10 logged in as root user. apt update && apt upgrade -y apt install nginx -y apt install wget zip unzip -y wget https://github.com/arcdetri/sample-blog/archive/master.zip unzip master.zip cp -rf sample-blog-master/html/* /var/www/html/ Edit /etc/nginx/sites-available/default . Replace my.example.com with actual server name. server {         listen 80 default_server;         listen [::]:80 default_server;         root /var/www/html;         index index.html;         server_name my.example.com;         location / {                 try_files $uri $uri/ =404;         } } systemctl restart nginx apt install certbot python-certbot-nginx -y certbot --nginx certbot renew --dry-run Now you