Set up shadowsocks server on your google compute engine(ubuntu os) from shadowsocks-libev sources.

Refers:
https://github.com/shadowsocks/shadowsocks-libev



Get the latest source code

To get the latest source code, you should also update the submodules as following:
git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
git submodule update --init --recursive
 
sudo apt-get install --no-install-recommends gettext build-essential 
autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev 
automake libmbedtls-dev libsodium-dev

# Installation of Libsodium
export LIBSODIUM_VER=1.0.13
wget https://download.libsodium.org/libsodium/releases/libsodium-$LIBSODIUM_VER.tar.gz
tar xvf libsodium-$LIBSODIUM_VER.tar.gz
pushd libsodium-$LIBSODIUM_VER
./configure --prefix=/usr && make
sudo make install
popd
sudo ldconfig

# Installation of MbedTLS
export MBEDTLS_VER=2.6.0
wget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz
tar xvf mbedtls-$MBEDTLS_VER-gpl.tgz
pushd mbedtls-$MBEDTLS_VER
make SHARED=1 CFLAGS=-fPIC
sudo make DESTDIR=/usr install
popd
sudo ldconfig

# Start building
./autogen.sh && ./configure && make
sudo make install
 

undefined reference to `crypto_aead_xchacha20poly1305_ietf_decrypt'

  1. apt-get purge libsodium-dev
  2. apt-get purge libsodium18
  3. rm -fr /usr/lib/libsodium.*
  4. rm -fr /usr/local/lib/libsodium.*
  5. build&install libsodium again
  6. make&install shadowsocks-libev again

Start shadowsocks server now:

sudo ss-server -s 10.140.0.4 -p 4444 -k password -m aes-256-cfb
 
change password to any you like 
10.140.0.4 is your internal ip, you can get it via ifconfig 

ifconfig 
ens4      Link encap:Ethernet  HWaddr 42:01:0a:8c:00:04  
          inet addr:10.140.0.4  Bcast:10.140.0.4  Mask:255.255.255.255
 
by the way, please remember set a new firewall rule for 4444 port.
or you can set a rule like, tcp:0-65535,  udp:0-65535

 

Install bbr to accelerate tcp 

wget –no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh  
chmod a+x bbr.sh 
sudo ./bbr.sh
sysctl net.ipv4.tcp_available_congestion_control
 

Clients guide, please refer to

https://shadowsocks.org/en/download/clients.html 

The server IP is your external static IP.
Connected on my android phone.



 

wget –no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh  

 


 

No comments:

Post a Comment

fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...