{"id":2121,"date":"2024-10-25T16:56:05","date_gmt":"2024-10-25T08:56:05","guid":{"rendered":"https:\/\/www.ruianding.com\/blog\/?p=2121"},"modified":"2024-10-28T15:30:59","modified_gmt":"2024-10-28T07:30:59","slug":"setting-up-shadowsocks-and-proxychains-on-a-linux-server","status":"publish","type":"post","link":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/","title":{"rendered":"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server"},"content":{"rendered":"\n<p>When setting up a private proxy server for secure and unrestricted access, Shadowsocks combined with proxychains on a Linux server is a powerful choice. This guide covers the complete process, including troubleshooting steps for potential version compatibility issues encountered during the setup.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. Installing Python 3.9<\/strong><\/h2>\n\n\n\n<p>First, to create a stable and isolated environment, I opted for Python 3.9, which provides better compatibility with the necessary packages. Here\u2019s how to install it:<\/p>\n\n\n\n<p><strong>Add the deadsnakes PPA repository for Python 3.9:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install software-properties-common\nsudo add-apt-repository ppa:deadsnakes\/ppa<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"593\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-1024x593.png\" alt=\"\" class=\"wp-image-2131\" style=\"width:510px;height:auto\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-1024x593.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-300x174.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-768x444.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5.png 1372w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Install Python 3.9 and required packages:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install python3.9 python3.9-venv python3.9-distutils<\/pre>\n\n\n\n<p><strong>Install <code>pip<\/code> for Python 3.9:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl https:\/\/bootstrap.pypa.io\/get-pip.py -o get-pip.py\nsudo python3.9 get-pip.py<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. Setting Up a Virtual Environment<\/strong><\/h2>\n\n\n\n<p>To avoid conflicts with the system Python packages, I used a virtual environment:<\/p>\n\n\n\n<p><strong>Create and enter the environment directory:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mkdir ~\/shadowsocks_env\ncd ~\/shadowsocks_env<\/pre>\n\n\n\n<p><strong>Initialize the virtual environment with Python 3.9:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> python3.9 -m venv venv<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"84\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-7.png\" alt=\"\" class=\"wp-image-2134\" style=\"width:674px;height:auto\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-7.png 926w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-7-300x27.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-7-768x70.png 768w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p><strong>Activate the virtual environment:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">source venv\/bin\/activate<\/pre>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background\">With the environment active, any installed packages will remain isolated within it, allowing for easier management.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. Installing Shadowsocks<\/strong><\/h2>\n\n\n\n<p>Within the virtual environment, I installed Shadowsocks:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pip install shadowsocks<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. Troubleshooting Version Compatibility Issues<\/strong><\/h2>\n\n\n\n<p>During setup, I encountered an error indicating that the <code>chacha20-ietf-poly1305<\/code> encryption method was not supported. This issue is typical with outdated or incompatible versions of Shadowsocks. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"81\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-8-1024x81.png\" alt=\"\" class=\"wp-image-2136\" style=\"width:563px;height:auto\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-8-1024x81.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-8-300x24.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-8-768x61.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-8.png 1106w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Here\u2019s how I resolved it:<\/strong><\/p>\n\n\n\n<p><strong>Solution 1: <\/strong>Change Encryption Method<br>In the <code>shadowsocks.json<\/code> configuration file, I changed the <code>\"method\"<\/code> value to a more widely supported option like <code>\"aes-256-gcm\"<\/code>, which worked without issues.<\/p>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background\">Since my proxy server is already configured to use <strong>Chacha20-Poly1305<\/strong>, and I prefer to avoid making remote modifications to its setup, I will proceed with the <strong>Solution 2<\/strong>.<\/p>\n\n\n\n<p><strong>Solution 2: <\/strong>Update Shadowsocks to a Compatible Version<br>For better support, I upgraded to the latest Shadowsocks version using this command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">  pip install git+https:\/\/github.com\/shadowsocks\/shadowsocks.git@master<\/pre>\n\n\n\n<p><strong>Alternatively,<\/strong> using Shadowsocks-Rust, a high-performance and actively maintained version, can also resolve compatibility issues:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">  curl --proto '=https' --tlsv1.2 -sSf https:\/\/sh.rustup.rs | sh\n  cargo install shadowsocks-rust<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. Configuring Shadowsocks<\/strong><\/h2>\n\n\n\n<p>Next, I created the <code>shadowsocks.json<\/code> configuration file to define server and client settings:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"server\": \"YOUR_SERVER_IP\",\n    \"server_port\": YOUR_SERVER_PORT,\n    \"local_address\": \"127.0.0.1\",\n    \"local_port\": 1080,\n    \"password\": \"YOUR_PASSWORD\",\n    \"timeout\": 300,\n    \"method\": \"aes-256-gcm\"\n}<\/pre>\n\n\n\n<p>Shadowsocks was then started successfully with the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sslocal -c shadowsocks.json<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. (Optional) Configuring Proxychains<\/strong><\/h2>\n\n\n\n<p>proxychains is designed to force applications that lack built-in proxy support to use a specified proxy. It intercepts network requests and reroutes them through a configured proxy (e.g., SOCKS5, HTTP). Here are its main use cases:<\/p>\n\n\n\n<p><strong>1. Applications without native proxy support: <\/strong>Some command-line tools or GUI programs, like telnet, ssh, or certain database clients, do not allow direct proxy configuration. proxychains enables these applications to route traffic through a proxy without needing any internal changes.<\/p>\n\n\n\n<p><strong>2. Convenient multi-proxy configuration:<\/strong> When using multiple proxies, proxychains can automatically switch between them as configured in proxychains.conf, providing backup or load-balancing functionality.<\/p>\n\n\n\n<p><strong>3. Testing and debugging: <\/strong>Since proxychains is a temporary setup that doesn\u2019t require environment variable changes, it\u2019s useful for quickly switching between direct and proxied connections to test connectivity effects in the same terminal session.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Setup Procedure<\/strong><\/h3>\n\n\n\n<p><strong>Install proxychains:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install proxychains<\/pre>\n\n\n\n<p><strong>Update proxychains Configuration<\/strong>:<br>Edit <code>\/etc\/proxychains.conf<\/code> to add the local SOCKS5 proxy:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">socks5 127.0.0.1 1080<\/pre>\n\n\n\n<p><strong>Testing the Setup with Proxychains<\/strong>:<br>With everything configured, I tested the proxy by running:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">proxychains curl ifconfig.me<\/pre>\n\n\n\n<p>This returned the Shadowsocks server IP, confirming the proxy was functioning correctly.<\/p>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background\">When you configure a global proxy with <code>export ALL_PROXY=socks5:\/\/127.0.0.1:1080<\/code>, all network requests on the system (for applications that respect this setting, like curl and wget) will automatically use the proxy. In this setup, proxychains becomes redundant because the global proxy setting already ensures that network traffic is routed through the SOCKS5 proxy. Simply unset the global proxy <code>unset ALL_PROXY<\/code> when you want to switch back to direct connections.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. <strong>A Small Hiccup: Configuring Git Proxy to Access GitHub<\/strong><\/h2>\n\n\n\n<p>The primary goal of setting up Shadowsocks was to enable my server to access GitHub. However, after configuring Shadowsocks and proxychains, I still encountered timeout issue when trying to reach GitHub.<\/p>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background\">This step is also <strong>optional<\/strong> if you&#8217;ve configured a global proxy setting.<\/p>\n\n\n\n<p>To resolve this, I applied a direct proxy configuration specifically for git commands, which allowed Git to use the Shadowsocks SOCKS5 proxy directly. Here\u2019s how I did it:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git config --global http.proxy socks5:\/\/127.0.0.1:1080\ngit config --global https.proxy socks5:\/\/127.0.0.1:1080<\/pre>\n\n\n\n<p>With these commands, Git now uses the SOCKS5 proxy set up by Shadowsocks to access GitHub repositories. As shown in the image below, this additional configuration successfully enabled GitHub access.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"351\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-3-1024x351.png\" alt=\"\" class=\"wp-image-2127\" style=\"width:569px;height:auto\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-3-1024x351.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-3-300x103.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-3-768x263.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-3.png 1178w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"554\" height=\"188\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-4.png\" alt=\"\" class=\"wp-image-2128\" style=\"width:220px;height:auto\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-4.png 554w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-4-300x102.png 300w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>To Be Continued: Running Shadowsocks in the Background<\/strong><\/h3>\n\n\n\n<p>After confirming that Shadowsocks and proxychains work as expected, I\u2019m currently testing methods to keep Shadowsocks running in the background. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"348\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-9-1024x348.png\" alt=\"\" class=\"wp-image-2138\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-9-1024x348.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-9-300x102.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-9-768x261.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-9.png 1270w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Future updates will explore options such as <code>nohup<\/code>, <code>screen<\/code>, and configuring Shadowsocks as a <code>systemd<\/code> service to ensure seamless operation.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When setting up a private proxy server for secure and unrestricted access, Shadowsocks combined with proxychains on a Linux server is a powerful choice. This guide covers the complete process, including troubleshooting steps for potential version compatibility issues encountered during the setup. 1. Installing Python 3.9 First, to create a stable and isolated environment, I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1,10],"tags":[62],"class_list":["post-2121","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","category-tutorial","tag-shadowsocks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server - \u6781\u7b80IT\uff5cSimpleIT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server - \u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"og:description\" content=\"When setting up a private proxy server for secure and unrestricted access, Shadowsocks combined with proxychains on a Linux server is a powerful choice. This guide covers the complete process, including troubleshooting steps for potential version compatibility issues encountered during the setup. 1. Installing Python 3.9 First, to create a stable and isolated environment, I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-25T08:56:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-28T07:30:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1372\" \/>\n\t<meta property=\"og:image:height\" content=\"794\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ruian Ding\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ruian Ding\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/\"},\"author\":{\"name\":\"Ruian Ding\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"headline\":\"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server\",\"datePublished\":\"2024-10-25T08:56:05+00:00\",\"dateModified\":\"2024-10-28T07:30:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/\"},\"wordCount\":696,\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-1024x593.png\",\"keywords\":[\"Shadowsocks\"],\"articleSection\":[\"Miscellaneous\",\"Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/\",\"name\":\"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server - \u6781\u7b80IT\uff5cSimpleIT\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-1024x593.png\",\"datePublished\":\"2024-10-25T08:56:05+00:00\",\"dateModified\":\"2024-10-28T07:30:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5.png\",\"width\":1372,\"height\":794},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ruianding.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\",\"url\":\"https:\/\/www.ruianding.com\/blog\/\",\"name\":\"Ruian's Tech Troubleshooting Toolbox\",\"description\":\"Debug the World.\",\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"alternateName\":\"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\",\"name\":\"Ruian Ding\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"width\":284,\"height\":284,\"caption\":\"Ruian Ding\"},\"logo\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.\",\"sameAs\":[\"https:\/\/www.ruianding.com\"],\"url\":\"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server - \u6781\u7b80IT\uff5cSimpleIT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/","og_locale":"en_US","og_type":"article","og_title":"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server - \u6781\u7b80IT\uff5cSimpleIT","og_description":"When setting up a private proxy server for secure and unrestricted access, Shadowsocks combined with proxychains on a Linux server is a powerful choice. This guide covers the complete process, including troubleshooting steps for potential version compatibility issues encountered during the setup. 1. Installing Python 3.9 First, to create a stable and isolated environment, I [&hellip;]","og_url":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/","og_site_name":"\u6781\u7b80IT\uff5cSimpleIT","article_published_time":"2024-10-25T08:56:05+00:00","article_modified_time":"2024-10-28T07:30:59+00:00","og_image":[{"width":1372,"height":794,"url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5.png","type":"image\/png"}],"author":"Ruian Ding","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ruian Ding","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#article","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/"},"author":{"name":"Ruian Ding","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"headline":"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server","datePublished":"2024-10-25T08:56:05+00:00","dateModified":"2024-10-28T07:30:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/"},"wordCount":696,"publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-1024x593.png","keywords":["Shadowsocks"],"articleSection":["Miscellaneous","Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/","url":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/","name":"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server - \u6781\u7b80IT\uff5cSimpleIT","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5-1024x593.png","datePublished":"2024-10-25T08:56:05+00:00","dateModified":"2024-10-28T07:30:59+00:00","breadcrumb":{"@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#primaryimage","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/10\/image-5.png","width":1372,"height":794},{"@type":"BreadcrumbList","@id":"https:\/\/www.ruianding.com\/blog\/setting-up-shadowsocks-and-proxychains-on-a-linux-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ruianding.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Shadowsocks on Linux \u2013 Part 1: Setting Up Shadowsocks on a Linux Server"}]},{"@type":"WebSite","@id":"https:\/\/www.ruianding.com\/blog\/#website","url":"https:\/\/www.ruianding.com\/blog\/","name":"Ruian's Tech Troubleshooting Toolbox","description":"Debug the World.","publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"alternateName":"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b","name":"Ruian Ding","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","width":284,"height":284,"caption":"Ruian Ding"},"logo":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/"},"description":"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.","sameAs":["https:\/\/www.ruianding.com"],"url":"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/2121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/comments?post=2121"}],"version-history":[{"count":26,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/2121\/revisions"}],"predecessor-version":[{"id":2182,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/2121\/revisions\/2182"}],"wp:attachment":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/media?parent=2121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/categories?post=2121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/tags?post=2121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}