cbeuw / Cloak

A censorship circumvention tool to evade detection by authoritarian state adversaries
GNU General Public License v3.0
3.42k stars 304 forks source link

Cloudflare CDN #196

Open karafen opened 2 years ago

karafen commented 2 years ago

Hello guys! Please help me set up ss+cloak in Cloudflare CDN transport mode! Everything works fine in direct mode, but in CDN mode: "time="2022-07-23T00:24:58+05:00" level=error msg="Failed to prepare connection to remote: failed to handshake: websocket: bad handshake ".

modd32 commented 2 years ago

How do you guys setup the CDN mode in Cloudflare? Is there a wiki or manual. Found this but still couldn't figure it out. https://github.com/cbeuw/Cloak/issues/155

zelbeinstein commented 1 year ago

Hi! I used Cloudflare to proxy my server. Here is a ckclient.json:

{
    "RemoteHost": "test.mydomain.org",
    "Transport": "CDN",
    "ProxyMethod": "wg",
    "EncryptionMethod": "plain",
    "UID": "---",
    "PublicKey": "---",
    "ServerName": "test.mydomain.org",
    "NumConn": 4,
    "BrowserSig": "firefox",
    "StreamTimeout": 300
}

In addition, all SSL/TLS options should be disabled on Cloudflare's side and the SSL/TLS encryption mode must be "Flexible". Then go to your Cloak server config and add ":80" to the list of BindAddr, how it was written there.