{"id":1826,"date":"2024-03-27T06:09:03","date_gmt":"2024-03-26T22:09:03","guid":{"rendered":"https:\/\/rogen.us\/how-to-deploy-the-node-js-version-of-shadowsocks-on-the-linux-one\/"},"modified":"2024-03-27T06:09:03","modified_gmt":"2024-03-26T22:09:03","slug":"how-to-deploy-the-node-js-version-of-shadowsocks-on-the-linux-one","status":"publish","type":"post","link":"https:\/\/rogen.us\/en\/how-to-deploy-the-node-js-version-of-shadowsocks-on-the-linux-one\/","title":{"rendered":"How to deploy the Node.js version of Shadowsocks over  Websocket on the Linux One"},"content":{"rendered":"<p><![CDATA[\n\n<p>Deploying the Node.js version of Shadowsocks on the Linux One platform typically follows similar procedures to deployment on other Linux platforms. However, due to the specific hardware platform offered by IBM, adjustments may be required based on specific configurations and requirements. Below are the general steps to deploy the Node.js version of Shadowsocks on the Linux One platform:<\/p>\n\n\n\n\n\n<h3 id=\"preparation\">Preparation.<\/h3>\n\n\n\n\n\n<blockquote>\n  \n\n<p>1.Register and select the Ubuntu version of <a href=\"https:\/\/linuxone.cloud.marist.edu\/#\/register?flag=VM\">LinuxONE<\/a>. Download your linuxone.pem to local.<\/p>\n\n\n\n\n\n<pre><code>chmod 400 linuxone.pem \n\nssh -i linuxone.pem linux1@root\n\nsudo -i\n<\/code><\/pre>\n\n\n  \n  \n\n<p>2.Open all ports.Execute the following command in the terminal: <\/p>\n\n\n\n\n\n<pre><code>iptables -P INPUT ACCEPT\n\niptables -P FORWARD ACCEPT\n\niptables -P OUTPUT ACCEPT\n\niptables -F\n\nrm -rf \/etc\/iptables &amp;&amp; reboot\n<\/code><\/pre>\n\n\n<\/blockquote>\n\n\n\n\n\n<h3 id=\"installnodejs\">Install Node.js:<\/h3>\n\n\n\n\n\n<p>Ensure that Node.js is installed on Linux One. <br \/>\nDownload s390x version nodejs, Execute the following command in the terminal:  <\/p>\n\n\n\n\n\n<blockquote>\n\n\n<pre><code>cd \/opt\/\n\nmkdir nodejs &amp; cd nodejs\n\nwget https:\/\/nodejs.org\/dist\/v6.9.0\/node-v6.9.0-linux-s390x.tar.xz\n\ntar xvf node-v6.9.0-linux-s390x.tar.xz\n<\/code><\/pre>\n\n\n<\/blockquote>\n\n\n\n\n\n<h3 id=\"configureenvironmentvariables\">Configure environment variables:<\/h3>\n\n\n\n\n\n<blockquote>\n\n\n<pre><code>   vim \/etc\/profile\n<\/code><\/pre>\n\n\n  \n  \n\n<p>Add the following code at the bottom<\/p>\n\n\n<\/blockquote>\n\n\n\n\n\n<pre><code>export NODE_HOME=\/opt\/nodejs\/node-v6.9.0-linux-s390x\/bin\nexport PATH=$NODE_HOME:$PATH\n<\/code><\/pre>\n\n\n\n\n\n<blockquote>\n\n\n<pre><code>source \/etc\/profile\n<\/code><\/pre>\n\n\n<\/blockquote>\n\n\n\n\n\n<h3 id=\"downloadandinstallthenodejsversionofshadowsocks\">Download and install the Node.js version of Shadowsocks.<\/h3>\n\n\n\n\n\n<p>Execute the following command in the terminal: <\/p>\n\n\n\n\n\n<blockquote>\n\n\n<pre><code> git clone https:\/\/github.com\/wojiaoluyuan\/shadowsocks-herokuapp.git\n\ncd shadowsocks-herokuapp\n\nnpm install\n\nscreen node server.js -b 0.0.0.0 -m aes-256-cfb -k password -r port\n<\/code><\/pre>\n\n\n<\/blockquote>\n\n\n\n\n\n<ul>\n\n\n<li>Run the Node.js version of Shadowsocks locally<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<blockquote>\n\n\n<pre><code>node local.js -s yourlinuxoneip -l 1080 -m aes-256-cfb -k password -r port\n<\/code><\/pre>\n\n\n<\/blockquote>\n\n]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deploying the Nod&#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[250],"tags":[],"class_list":["post-1826","post","type-post","status-publish","format-standard","hentry","category-coding-notes","wpcat-250-id"],"views":95,"_links":{"self":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/posts\/1826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/comments?post=1826"}],"version-history":[{"count":0,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/posts\/1826\/revisions"}],"wp:attachment":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/media?parent=1826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/categories?post=1826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/tags?post=1826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}