HirbodBehnam / Shadowsocks-Cloak-Installer

A one-key script to setup Cloak plugin with Shadowsocks on your server
GNU General Public License v3.0
408 stars 85 forks source link

Is it possible to add CDN to V2? #33

Closed aboka2k closed 4 years ago

aboka2k commented 4 years ago

hi, i read that Cloak has a Transport method using CDN, does that mean we could use Cloudflare together - SS+Cloak+CDN?

i hv setup Cloak V2 and all is running fine, so i try to add CDN to it by doing the below, but it would not work- setup CF with my domainname point to the vps and flexsible SSL add 'Transport' in front of the exsiting config - 'Transport=CDN;UID=4Oz...........' and change Servername to my domainame

do we need to change anything on the server side? server is running Ubuntu 20.04 LTS and client is SS 4.1.1 with ck-client 64bit 2.2.2

Here is the error on the client side:

2020-08-25 21:28:26.2521|DEBUG|Shadowsocks.Controller.TCPHandler|connect to api.github.com:443 2020-08-25 21:28:26.2621|DEBUG|Shadowsocks.Controller.TCPHandler|connect to www.google.com:443 2020-08-25 21:28:26.5041|DEBUG|Shadowsocks.Controller.TCPHandler|connect to www.google.com:443 2020-08-25 21:28:26.5831|DEBUG|Shadowsocks.Controller.TCPHandler|Socket connected to ss server: orca.gq:443 2020-08-25 21:28:26.5831|DEBUG|Shadowsocks.Controller.TCPHandler|Socket connected to ss server: orca.gq:443 2020-08-25 21:28:26.8021|DEBUG|Shadowsocks.Controller.TCPHandler|connect to www.google.com:443 2020-08-25 21:28:26.8241|DEBUG|Shadowsocks.Controller.TCPHandler|connect to s2.googleusercontent.com:443 2020-08-25 21:28:26.8371|INFO|Shadowsocks.Controller.ShadowsocksController|Started SIP003 plugin for orca.gq:443 on 127.0.0.1:61099 - PID: 6760 2020-08-25 21:28:26.9751|DEBUG|Shadowsocks.Controller.TCPHandler|connect to www.google.com:443 2020-08-25 21:28:26.9751|DEBUG|Shadowsocks.Controller.TCPHandler|connect to api.github.com:443 2020-08-25 21:28:27.0712|DEBUG|Shadowsocks.Controller.TCPHandler|connect to s2.googleusercontent.com:443 2020-08-25 21:28:27.0712|DEBUG|Shadowsocks.Controller.TCPHandler|Socket connected to ss server: orca.gq:443 2020-08-25 21:28:27.1632|WARN|Shadowsocks.Controller.TCPHandler|System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it at Shadowsocks.Util.Sockets.WrappedSocket.EndConnect(IAsyncResult asyncResult) at Shadowsocks.Proxy.DirectConnect.EndConnectDest(IAsyncResult asyncResult) at Shadowsocks.Controller.TCPHandler.ConnectCallback(IAsyncResult ar) 2020-08-25 21:28:27.1632|WARN|Shadowsocks.Controller.TCPHandler|System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it at Shadowsocks.Util.Sockets.WrappedSocket.EndConnect(IAsyncResult asyncResult) at Shadowsocks.Proxy.DirectConnect.EndConnectDest(IAsyncResult asyncResult) at Shadowsocks.Controller.TCPHandler.ConnectCallback(IAsyncResult ar) 2020-08-25 21:28:27.2542|WARN|Shadowsocks.Controller.TCPHandler|System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it at Shadowsocks.Util.Sockets.WrappedSocket.EndConnect(IAsyncResult asyncResult) at Shadowsocks.Proxy.DirectConnect.EndConnectDest(IAsyncResult asyncResult) at Shadowsocks.Controller.TCPHandler.ConnectCallback(IAsyncResult ar) 2020-08-25 21:28:27.3532|WARN|Shadowsocks.Controller.TCPHandler|System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it at Shadowsocks.Util.Sockets.WrappedSocket.EndConnect(IAsyncResult asyncResult)

Thank you,

HirbodBehnam commented 4 years ago

Hello Cloak does not work with cloudflare but it works with cloudfront. I haven't tested the CDN mode myself and I'm not aware of how to set it up. You can read this for more help. And also please ask any more questions about CDN on the cloaks main respiratory issues.

aboka2k commented 4 years ago

Hello Cloak does not work with cloudflare but it works with cloudfront. I haven't tested the CDN mode myself and I'm not aware of how to set it up. You can read this for more help. And also please ask any more questions about CDN on the cloaks main respiratory issues.

@HirbodBehnam thanks alot for the link, wonder why cant find it earlier with google. search for couple hours yesterday regarding this matter, and found one 'abandon' thread on the main repository page; thats how i found out about Transport=CDN. But it didn't provide more tips than your link :)

dont think will use this method unless its free. as what i understand Cloudfront is paid service, or only limited to 1 year or so for new member. i once get charge not knowing this and it pass 1 year. luckily they cancel and refund me since im not using the service.

p/s - non the less, thanks again as has learn something new today :D

cheers,