Installing: shadowsocks-libev with mbed TLS (formerly known as PolarSSL) in CentOS.
Install necessary packages:-
yum install nano gcc gcc-c++ automake autoconf libtool make autoconf libtool git curl curl-devel zlib-devel perl perl-devel pcre-devel cpio gettext-devel libxml2 libxml2-devel libxslt libxslt-devel asciidoc xmlto udns-devel libev-devel
Download, compile and install mbed TLS and shadowsocks-libev:-
cd /usr/src/ wget https://tls.mbed.org/download/mbedtls-2.4.0-gpl.tgz tar -xvf mbedtls-2.4.0-gpl.tgz cd mbedtls-2.4.0 make cd /usr/src/ git clone https://github.com/breakwa11/shadowsocks-libev shadowsocks-libev cd shadowsocks-libev ./configure --with-crypto-library=mbedtls --with-mbedtls=/usr/src/mbedtls-2.4.0 --with-mbedtls-include=/usr/src/mbedtls-2.4.0/include/mbedtls --with-mbedtls-lib=/usr/src/mbedtls-2.4.0/library --prefix=/usr make make install
If you do not like to make a auto-starting service for shadowsocks-libev, you can now manually start the shadowsocks-libev server with screen as with the command below:-
yum -y install screen screen -S shadowsocks -d -m ss-server -s Put-your-server-IP-here -p 443 -l 1080 -k Specify-your-server-password-here -m aes-128-cfb -t 600 -u -d 209.244.0.3
Make configuration files:-
mkdir /etc/shadowsocks-libev/ nano /etc/shadowsocks-libev/config.json
Copy paste the lines below into config.json, and edit it further to suit your server:-
{ "server":"your server IP", "server_port":443, "local_port":1080, "password":"your desired password", "timeout":600, "method":"aes-128-cfb", "protocol": "auth_sha1_v4_compatible", "obfs": "tls1.2_ticket_auth_compatible", "nameserver":"8.8.8.8" }
If your server CPU supports AES-NI, use aes-128-cfb for “method”, if it doesn’t, use chacha20. For “nameserver”, you can use Level3 or Google’s nameservers.
If you want the daemon to bind to all available IPv4 and IPv6 addresses you have, remove the “server” option. If you use a NAT-ed VPS, use your assigned RFC 1918 or use ‘0.0.0.0’.
Download the daemon init script:-
cd /etc/init.d/ wget -O /etc/init.d/shadowsocks-libev https://raw.githubusercontent.com/breakwa11/shadowsocks-libev/master/rpm/SOURCES/etc/init.d/shadowsocks-libev chmod +x shadowsocks-libev chkconfig --add shadowsocks-libev
Start the server:-
service shadowsocks-libev start
When updating from git:-
cd /usr/src/shadowsocks-libev make distclean git pull ./configure --with-crypto-library=mbedtls --with-mbedtls=/usr/src/mbedtls-2.4.0 --with-mbedtls-include=/usr/src/mbedtls-2.4.0/include/mbedtls --with-mbedtls-lib=/usr/src/mbedtls-2.4.0/library --prefix=/usr make make install service shadowsocks-libev restart
Proxy chaining with haproxy:-
Situation:-
Client —> haproxy VPS —> shadowsocks VPS.
In the shadowsocks VPS, install and configure shadowsocks proxy as usual.
Then in haproxy VPS, install haproxy and enable the daemon.
yum -y install haproxy chkconfig haproxy on
Now edit /etc/haproxy/haproxy.cfg
nano /etc/haproxy/haproxy.cfg
Modify it so that it looks like below:-
#--------------------------------------------------------------------- # Example configuration for a possible web application. See the # full configuration options online. # # http://haproxy.1wt.eu/download/1.4/doc/configuration.txt # #--------------------------------------------------------------------- #--------------------------------------------------------------------- # Global settings #--------------------------------------------------------------------- global # to have these messages end up in /var/log/haproxy.log you will # need to: # # 1) configure syslog to accept network log events. This is done # by adding the '-r' option to the SYSLOGD_OPTIONS in # /etc/sysconfig/syslog # # 2) configure local2 events to go to the /var/log/haproxy.log # file. A line like the following can be added to # /etc/sysconfig/syslog # # local2.* /var/log/haproxy.log # log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user haproxy group haproxy daemon ulimit-n 51200 # turn on stats unix socket stats socket /var/lib/haproxy/stats defaults log global mode tcp option dontlognull timeout connect 1000 timeout client 150000 timeout server 150000 frontend ss-in01 bind *:443 default_backend ss-out01 backend ss-out01 server server1 your_shadowsocks-libev_server_IP_here:443 maxconn 20480
Save the haproxy.cfg file, then start the daemon.
service haproxy start
Install:utorrent server on CentOS x64
Download the approriate .tar.gz file from http://www.utorrent.com/downloads/linux to your user home directory (you are not going to run this as root, but as ‘Joe’).
Untar the said file:-
cd /home/Joe tar -xvf utserver.tar.gz
Move ‘utserver’ and ‘webgui.zip’ file to the home directory, then chmod it to be executable.
chmod +x utserver
Compile and install OpenSSL 0.9.8
yum groupinstall "Development Tools" cd /usr/src wget http://www.openssl.org/source/openssl-0.9.8zc.tar.gz untar -xvf openssl-0.9.8zc.tar.gz cd openssl-0.9.8zc ./config shared make make install
Link to the compiled OpenSSL
ln -s /usr/local/ssl/lib/libssl.so /usr/lib64/libssl.so.0.9.8 ln -s /usr/local/ssl/lib/libcrypto.so /usr/lib64/libcrypto.so.0.9.8
Start utorrent :-
su Joe -c /home/Joe/utserver
Open utorrent in your web browser:-
http://[your-IP-here]:8080/gui
username: admin
empty password
Install: transmission-daemon on CentOS.
Install necessary packages:-
yum install nano gcc make openssl-devel curl-devel intltool gcc-c++ m4 automake libtool gettext
Compile and install libevent2:-
cd /usr/src wget https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz tar zxvf libevent-2.1.12-stable.tar.gz cd libevent-2.1.12-stable ./configure --prefix=/opt/libevent make make install
Compile and install transmission-daemon:-
cd /usr/src wget https://github.com/transmission/transmission/releases/download/3.00/transmission-3.00.tar.xz tar xvf transmission-3.00.tar.xz cd transmission-3.00 export PKG_CONFIG_PATH=/opt/libevent/lib/pkgconfig ./configure --prefix=/opt/transmission make make install
Initial configuration:-
su Joe -c "/opt/transmission/bin/transmission-daemon" killall transmission-daemon nano /home/Joe/.config/transmission-daemon/settings.json
Edit settings.json to fit your preferences. See https://trac.transmissionbt.com/wiki/EditConfigFiles for more information.
Restart transmission-daemon:-
su Joe -c "/opt/transmission/bin/transmission-daemon"
Make transmission-daemon start at boot:-
nano /etc/rc.local
Paste the su Joe -c “/opt/transmission/bin/transmission-daemon” command just above the “Exit 0!” line.
Install: Hentai@Home client on CentOS headless VPS.
This assumes that you already have been approved (you must have Client ID and Client Key). Do not run as root, but as ‘Joe’.
Install OpenJDK.
yum install java-11-openjdk-headless
Download and install Hentai@Home client.
cd /home/Joe # Download latest version at http://g.e-hentai.org/hentaiathome.php wget https://repo.e-hentai.org/hath/HentaiAtHome_1.6.1.zip unzip HentaiAtHome_1.6.1.zip chown -R Joe:Joe /home/Joe
Start the Hentai@Home client.
cd /home/Joe su -c Joe 'java -jar /home/Joe/HentaiAtHome.jar'
Enter Client ID and Client Key (need to be only done once) and you should be done. Client configuration is done at the e-hentai website.