{"id":19866256,"url":"https://github.com/HirbodBehnam/Shadowsocks-Cloak-Installer","last_synced_at":"2025-05-02T05:32:34.261Z","repository":{"id":50147494,"uuid":"189760115","full_name":"HirbodBehnam/Shadowsocks-Cloak-Installer","owner":"HirbodBehnam","description":"A one-key script to setup Cloak plugin with Shadowsocks on your server","archived":false,"fork":false,"pushed_at":"2022-11-03T15:07:09.000Z","size":125,"stargazers_count":430,"open_issues_count":13,"forks_count":91,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-05T11:08:28.123Z","etag":null,"topics":["bash","censorship-circumvention","cloak","cloak-installer","cloak-server","installer","plugin","proxy","proxy-server","shadowsocks"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HirbodBehnam.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-01T17:28:39.000Z","updated_at":"2025-03-21T10:32:21.000Z","dependencies_parsed_at":"2022-09-04T07:00:32.545Z","dependency_job_id":null,"html_url":"https://github.com/HirbodBehnam/Shadowsocks-Cloak-Installer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FShadowsocks-Cloak-Installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FShadowsocks-Cloak-Installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FShadowsocks-Cloak-Installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HirbodBehnam%2FShadowsocks-Cloak-Installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HirbodBehnam","download_url":"https://codeload.github.com/HirbodBehnam/Shadowsocks-Cloak-Installer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251993002,"owners_count":21677022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","censorship-circumvention","cloak","cloak-installer","cloak-server","installer","plugin","proxy","proxy-server","shadowsocks"],"created_at":"2024-11-12T15:25:20.885Z","updated_at":"2025-05-02T05:32:29.736Z","avatar_url":"https://github.com/HirbodBehnam.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\n# Cloak Installer With Shadowsocks\nA script to install Cloak in your server with or without shadowsocks.\n\n## Why this installer?\n* Install with some simple copy and pasting\n* Install Shadowsocks if you want it\n* Show QRCode and `ss://` link at the end (Only for shadowsocks)\n* User Management\n* Automatic service configuration\n* Automatically setup firewall\n* Support Debian, Ubuntu, CentOS and Raspbian Buster\n## What is [Cloak](https://github.com/cbeuw/Cloak)?\nCloak is a universal pluggable transport that cryptographically obfuscates proxy traffic as legitimate HTTPS traffic, disguises the proxy server as a normal web server, multiplexes traffic through multiple TCP connections and provides multi-user usage control.\n\nCloak eliminates any \"fingerprints\" exposed by traditional proxy protocol designs which can be identified by adversaries through deep packet inspection. If a non-Cloak program or an unauthorized Cloak user (such as an adversary's prober) attempts to connect to Cloak server, it will serve as a transparent proxy between said machine and an ordinary website, so that to any unauthorized third party, a host running Cloak server is indistinguishable from an innocent web server. This is achieved through the use a series of [cryptographic steganography techniques](https://github.com/cbeuw/Cloak/wiki/Steganography-and-encryption).\n\nSince Cloak is transparent, it can be used in conjunction with any proxy software that tunnels traffic through TCP, such as Shadowsocks, OpenVPN and Tor. Multiple proxy servers can be running on the same server host machine and Cloak server will act as a reverse proxy, bridging clients with their desired proxy end.\n\nCloak multiplexes traffic through multiple underlying TCP connections which reduces head-of-line blocking and eliminates TCP handshake overhead.\n\nCloak provides multi-user support, allowing multiple clients to connect to the proxy server on the same port (443 by default). It also provides QoS controls for individual users such as data usage limit and bandwidth control. [source](https://github.com/cbeuw/Cloak#cloak)\n## The Script\n### Compatibility\nThe script should work with these operating systems:\n* CentOS 7 / 8\n* Debian 8 / 9 / 10 / 11 (Thanks to [@xiamaz](https://github.com/xiamaz))\n* Ubuntu 16 / 18 / 20\n* Raspbian Buster (Thanks to Raphael)\n\narm, arm64, amd64 and i386 architectures are supported.\n#### Tested On (I will test others too)\n* Ubuntu 20.04 LTS Server amd64\n* Debian 11 amd64\n* Centos 7 amd64\n* Raspbian Buster\n### Installing Cloak 2 Plugin\nCopy and execute this command:\n```bash\ncurl -o Cloak-Installer.sh -L https://git.io/fj5mh \u0026\u0026 bash Cloak-Installer.sh\n```\nAnswer questions and wait until the setup finishes installing. Installing the shadowsocks is optional.\n#### Install Openvpn or Tor with Cloak\nPlease read [here](https://github.com/cbeuw/Cloak/wiki/Underlying-proxy-configuration-guides). The tutorial is just fine! It is recommended to install the openvpn or tor before installing my script.\n\nAlso [here](https://github.com/angristan/openvpn-install) is an script to install openvpn.\n\nAfter you set up the openvpn or tor, re-run the script. If you had the Cloak installed, you can use `Change Forwarding Rules` to add the address to proxy. If you are installing, when the script asks for custom rule, select yes and define it there.\n#### Post-Install\nAfter installing, re-run the script to either uninstall the proxy, add or delete users, generate QR codes for shadowsocks, or change the forwarding rules.\n\nAlso script creates a service named `cloak-server`.\n### Installing Shadowsocks With Cloak 1 Plugin\nCopy and execute this command:\n```bash\ncurl -o Shadowsocks-Cloak-Installer.sh -L https://git.io/fjECg \u0026\u0026 bash Shadowsocks-Cloak-Installer.sh\n```\nAnswer questions and wait until the setup finishes installing. You can scan the QR Code after or use `ss://` link or even enter server config manually.\n#### Post-Install\nAfter installing, re-run the script to either uninstall the proxy or regenerate QR code and `ss://` link and configs.\n\nAlso script creates a service named `shadowsocks-server`. **DO NOT USE shadowsocks-libev service.**\n## Shadowsocks Client Setup\n### Android\nOn Android at first download shadowsocks client from [Google Play](https://play.google.com/store/apps/details?id=com.github.shadowsocks). Then download and install Cloak APK from [here](https://github.com/cbeuw/Cloak-android/releases). Then simply scan the QR Code generated by script.\n### Linux\nAt first install shadowsocks-libev. [More Info](https://github.com/shadowsocks/shadowsocks-libev#installation). Download [this](https://raw.githubusercontent.com/cbeuw/Cloak/master/example_config/ckclient.json) file and edit it with your server arguments. Then download one of the clients suitable for your linux from [here](https://github.com/cbeuw/Cloak/releases) (You may need to run `chmod +x ck-client-linux-XXX` to make it executable). Run client like this:\n```bash\nss-local -s \u003cSERVER_IP\u003e -p \u003cSERVER_PORT\u003e -l 1080 -k \u003cSERVER_PASSWORD\u003e -m \u003cENCRYPTION_METHOD\u003e --plugin path/to/ck-client-linux-XXX --plugin-opts path/to/ckclient.json\n```\nYou can connect to your shadowsocks with socks or http proxy set on localhost and 1080 port.\n### iOS\nIt looks like that [this](https://apps.apple.com/us/app/shadowrocket/id932747118) app does support cloak but I haven't tested it.\n### Windows\nAt first install [shadowsocks windows](https://github.com/shadowsocks/shadowsocks-windows/releases). Then download cloak for windows from [here](https://github.com/cbeuw/Cloak/releases). If you are using a 32-bit system, download `ck-client-windows-386-X.exe\n` if your system is 64-bit use `ck-client-windows-amd64-X.exe`. Then use the QR Code or `ss://` link to import the server.\n\nThe program will give you an error that shadowsocks cannot find `ck-client` or something like this. Click OK and go to Edit Servers. Then write the absolute path to ck-client file in Plugin Program. Example of path: `C:\\Users\\Hirbod\\Downloads\\Programs\\ck-client-windows-amd64-2.1.3.exe`\n## Non-Shadowsocks Client Setup\nAt first download the suitable plugin from [here](https://github.com/cbeuw/Cloak/releases). Then download the `ckclient.json` and change it as you need it. [link](https://github.com/cbeuw/Cloak/blob/master/example_config/ckclient.json). Then run the ck-client like this:\n```bash\n./ck-client -s \u003cYOUR_SERVER_IP\u003e -p \u003cCLOAK_PORT\u003e -l \u003cLOCAL_PORT\u003e -c \u003cPATH_TO_ckclient_json\u003e\n```\n\nIf you need to setup Tor or Openvpn with Cloak read [here](https://github.com/cbeuw/Cloak/wiki/Underlying-puration-guides)\n## Next Steps\n### FAQ\n[Cloak V1 FAQ](https://github.com/HirbodBehnam/Shadowsocks-Cloak-Installer/wiki/FAQ)\n\nCloak V2 FAQ (Soon...)\n### BBR\nAt first what is BBR?\n\n**TL;DR: It speeds up TCP connections = Faster Server**\n\nBBR or Bottleneck Bandwidth and Round-trip propagation time (BBR) is a TCP congestion control algorithm developed at Google in 2016. While most congestion control algorithms are loss-based, in that they rely on packet loss as a signal to lower rates of transmission, BBR is model-based. The algorithm uses the maximum bandwidth and round-trip time at which the network delivered the most recent flight of outbound data packets to build an explicit model of the network. Each cumulative or selective acknowledgment of packet delivery produces a rate sample which records the amount of data delivered over the time interval between the transmission of a data packet and the acknowledgment of that packet. As network interface controllers evolve from megabit per second to gigabit per second performance, packet loss should no longer be considered the primary determining factor in identifying congestion, making model-based congestion control algorithms which provide higher throughput and lower latency, such as BBR, a more reliable alternative to more popular algorithms like CUBIC. [Source](https://en.wikipedia.org/wiki/TCP_congestion_control#TCP_BBR)\n#### How to setup BBR?\nThe requirement to enable BBR is to have Linux Kernel 4.9 or higher. If you do, you can enable BBR like this:\n```bash\necho 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.conf\necho 'net.ipv4.tcp_congestion_control=bbr' | sudo tee -a /etc/sysctl.conf\nsysctl -p\n```\nTo check if it is enabled:\n```bash\nsysctl net.ipv4.tcp_available_congestion_control\n# This should include bbr in it\nsysctl -n net.ipv4.tcp_congestion_control\n# This one should be bbr\nlsmod | grep bbr\n# The output will be similar to \"tcp_bbr 16384 0\"\n```\nIf your kernel is not 4.9 or higher just search how to upgrade it.\n\nHere are some handy links to install BBR and upgrade kernel:\n\n[CentOS](https://www.vultr.com/docs/how-to-deploy-google-bbr-on-centos-7)\n\n[Ubuntu 16 and 17](https://www.linuxbabe.com/ubuntu/enable-google-tcp-bbr-ubuntu)\n### Whole System Tunnel VPN\nShadowsocks cannot natively route all traffic. You can use some apps like SocksCap or other stuff to route applications through shadowsocks.\n\nIf you want a VPN you can use [wireguard](https://github.com/l-n-s/wireguard-install) or [openvpn](https://github.com/angristan/openvpn-install).\n### Server\nYou can use any VPS or Dedicated Server. If you want a cheap and low-end server, I personally recommend to buy one at [Virmach](https://virmach.com/); They also accept cryptos!\n### Donations\nYou can donate to me through bitcoin at `1XDgEkpnkJ7hC8Kwv5adfaDC1Z3FrkwsK`, Ethereum at `0xbb527a28B76235E1C125206B7CcFF944459b4894`, ZCash at `t1ZKYrYZCjxDYvo6mQaLZi3gNe2a6MydUo3` and Bitcoin Gold at `GcNgxfyR3nnAsD3Nhuckvq14sXYuDFkK9P`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHirbodBehnam%2FShadowsocks-Cloak-Installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHirbodBehnam%2FShadowsocks-Cloak-Installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHirbodBehnam%2FShadowsocks-Cloak-Installer/lists"}