{"id":2835,"date":"2022-03-13T05:20:31","date_gmt":"2022-03-13T05:20:31","guid":{"rendered":"https:\/\/dft.wiki\/?p=2835"},"modified":"2022-05-18T23:14:04","modified_gmt":"2022-05-18T23:14:04","slug":"high-performance-encrypted-proxy-with-shadowsocks","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=2835","title":{"rendered":"High Performance Encrypted Proxy with ShadowSocks"},"content":{"rendered":"<p>ShadowSocks is an opensource server-client based solution created to circumvent state censorship by mimicking a normal HTTPS connection.<\/p>\n<p>It is not a fully-fledged VPN style but provide the necessary encryption to bypass nation censorship such as those from China, Kazakhstan, Iran, Russia&#8230;<\/p>\n<p>It has many different flavors written in different languages and available also as containers or in the official repository of the major distributions.<\/p>\n<p>This tutorial recommends and shows how to install the lightweight flavor written in C that provides the best performance possible.<\/p>\n<p>With a simple VPC, single core and singe GB of RAM you can easily achieve <strong>1 gbps for download and upload<\/strong> if your internet speed can get that fast.<\/p>\n<p><strong>Ubuntu \/ Raspbian \/ Kali \/ Debian<\/strong><\/p>\n<pre>sudo apt update &amp;&amp; sudo apt install shadowsocks-libev -y<\/pre>\n<p>Find more information on the official website [<a href=\"https:\/\/shadowsocks.org\/en\/download\/servers.html\">Link<\/a>] or repository [<a href=\"https:\/\/github.com\/shadowsocks\/shadowsocks-libev\">Link<\/a>].<\/p>\n<hr \/>\n<p>The same application can be configured to work as Server or Client.<\/p>\n<p><strong>Server configuration:<\/strong><\/p>\n<p>After installing <code>shadowsocks-libev<\/code> make changes to its configuration.<\/p>\n<pre>sudo nano \/etc\/shadowsocks-libev\/config.json<\/pre>\n<pre>{\r\n\"server\":\"<strong>0.0.0.0<\/strong>\",\r\n\"mode\":\"tcp_and_udp\",\r\n\"server_port\":<strong>8080<\/strong>,\r\n\"local_port\":1080,\r\n\"password\":\"<strong>ENTER-PASSWORD-HERE<\/strong>\",\r\n\"timeout\":60,\r\n\"method\":\"chacha20-ietf-poly1305\"\r\n}<\/pre>\n<p><strong>Note:<\/strong> by entering <strong>0.0.0.0<\/strong> the server will listen on all interfaces of the server. The port <strong>8080<\/strong> is where it will accept connections from the client. And the <strong>ENTER-PASSWORD-HERE<\/strong> can be any thing you want.<\/p>\n<pre>sudo ufw allow <strong>8080<\/strong>\r\nsudo systemctl enable shadowsocks-libev.service\r\nsudo systemctl restart shadowsocks-libev.service\r\nsudo systemctl status shadowsocks-libev.service<\/pre>\n<hr \/>\n<p><strong>Client configuration (Linux):<\/strong><\/p>\n<p>After installing <code>shadowsocks-libev<\/code> stop the server and prevent it from start on boot and create a client configuration.<\/p>\n<pre>sudo systemctl stop shadowsocks-libev\r\nsudo systemctl disable shadowsocks-libev\r\nsudo cp \/etc\/shadowsocks-libev\/config.json \/etc\/shadowsocks-libev\/<strong>client<\/strong>.json\r\nsudo nano \/etc\/shadowsocks-libev\/<strong>client<\/strong>.json<\/pre>\n<pre>{\r\n\"server\":\"<strong>SERVER-IP-ADDRESS<\/strong>\",\r\n\"mode\":\"tcp_and_udp\",\r\n\"server_port\":<strong>8080<\/strong>,\r\n\"local_address\":\"<strong>127.0.0.1<\/strong>\",\r\n\"local_port\":<strong>1080<\/strong>,\r\n\"password\":\"<strong>ENTER-PASSWORD-HERE<\/strong>\",\r\n\"timeout\":60,\r\n\"method\":\"chacha20-ietf-poly1305\"\r\n}<\/pre>\n<p><strong>Note:<\/strong> add the <strong>SERVER-IP-ADDRESS<\/strong> or a name that resolves to the server&#8217;s IP. Inform the port <strong>8080<\/strong> where the ShadowSocks is listening on and the same <strong>ENTER-PASSWORD-HERE<\/strong> configured on the server. In the example above the client-side will be a SOCKS5 that will listen on port 1080 locally (<strong>127.0.0.1<\/strong>). Feel free to make changes accordingly to your needs.<\/p>\n<pre>sudo systemctl enable shadowsocks-libev-local@<strong>client<\/strong>.service\r\nsudo systemctl start shadowsocks-libev-local@<strong>client<\/strong>.service\r\nsudo systemctl status shadowsocks-libev-local@<strong>client<\/strong>.service<\/pre>\n<hr \/>\n<p><strong>Browser configuration:<\/strong><\/p>\n<p>On Firefox it is recommended to use an extension called FoxyProxy [<a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/foxyproxy-standard\/\">Link<\/a>].<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2836\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2022\/03\/Screenshot_2022-03-13_00-16-50.png\" alt=\"\" width=\"955\" height=\"551\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2022\/03\/Screenshot_2022-03-13_00-16-50.png 955w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2022\/03\/Screenshot_2022-03-13_00-16-50-300x173.png 300w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2022\/03\/Screenshot_2022-03-13_00-16-50-768x443.png 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2837\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2022\/03\/Screenshot_2022-03-13_00_17_51.png\" alt=\"\" width=\"369\" height=\"243\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2022\/03\/Screenshot_2022-03-13_00_17_51.png 369w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2022\/03\/Screenshot_2022-03-13_00_17_51-300x198.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/p>\n<p>It also supports other operating systems such as MacOS, iOS, Android, and more [<a href=\"https:\/\/shadowsocks.org\/en\/download\/clients.html\">Link<\/a>].<\/p>\n<ul>\n<li>Windows<\/li>\n<\/ul>\n<pre>pip install shadowsocks<\/pre>\n<ul>\n<li>OpenWRT<\/li>\n<\/ul>\n<pre>opkg install shadowsocks-libev\r\nopkg install shadowsocks-libev-polarssl<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ShadowSocks is an opensource server-client based solution created to circumvent state censorship by mimicking a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6],"tags":[],"class_list":["post-2835","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2835"}],"version-history":[{"count":5,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2835\/revisions"}],"predecessor-version":[{"id":2876,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/2835\/revisions\/2876"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}