Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Make Traffic Follow Through Proxies Using ProxyChains

Installation

Ubuntu

wajig install proxychains4

Mac

brew install proxychains-ng

Notice that the proxychains-ng installed using Homebrew on Mac does not work well right now (as of 2019-03-07). An alternative way is to use proxychains via Docker on Mac. The Docker image dclong/jupyterhub-ds has proxychains (NOT proxychains-ng) installed.

Syntax

proxychains4 …

Convert a Socks Proxy to a HTTP Proxy

There are multiple tools available to convert a Socks proxy to a HTTP/HTTPS proxy. The work by convertting HTTP requests into socks requests and send them to the socks proxy. Be aware that this might not be necessary as many tools accepting HTTP/HTTPS proxies also accept socks proxies …

Transfer Files over Network in Linux

Comparison of Network Drives (Remote File System)

  1. NFS is very fast but not secure and it is for Unix/Linux only. It is a good choice for local network sharing.

  2. Samba is fast, secure and cross-platform. it is good for general purpose sharing and popular in companies.

  3. SSHFS is slow …

Proxy for `sudo`

You can setup proxy in a terminal by export environment variables http_proxy and `https_proxy'.

export http_proxy='proxy_server:port'
export https_proxy='proxy_server:port'

However, you might find the exported environment variables are not visible to sudo. This can be resovled by simplying adding the -E (preserve environment) option to sudo.

sudo …

A Secure Way to Use Vino in Debian

VNC on Linux is not secure. Most implementations of VNC servers for Linux allows password only up to 8 characters. Such a VNC server is very vulnerable to brute-force attack. This article discuss a secure way to use VNC. The VNC (vino) server is started only when needed, thus reduce …