mirror of
https://github.com/cbeuw/Cloak.git
synced 2026-04-25 12:35:59 +03:00
[GH-ISSUE #63] CDN through Cloudflare #55
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Cloak#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @qichaozhao on GitHub (Sep 22, 2019).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/63
Hey there,
I have set up cloak with shadowsocks and it works fine in the direct mode.
I also saw on the wiki the instructions to set up a cloudfront CDN and use cloak in CDN mode. I am not using Amazong but I do have a Cloudflare account which I tried.
I mirrored the settings as similarly as possible based on the guide you provided in the wiki.
However now when I try to run the ckclient process in my client i get the following error when the shadowsocks client tries to initiate a connection.
ERRO[0021] Failed to prepare connection to remote: local error: tls: unexpected messagemy ckclient.json looks like this:
I have also tried setting the ServerName to: mytld.com (and mytld.com) without any success.
In Cloudflare I have set up the SSL as "Flexible" meaning I believe viewer -> cloudflare is SSL but cloudflare -> myhost is not.
Is there anything missing here that could be causing this issue?
@qichaozhao commented on GitHub (Sep 22, 2019):
As a followup I set up an AWS account and tried to get this working using cloudfront but still no luck.
The ckclient.json in this case is:
When I start the cloak proxy with:
./ck-client -c ckclient.json -s mydomain.cloudfront.net I see lots of these errors:
Here are my origin settings on AWS:
Finally, I was also watching the logs on the server side and no connections attempts were made to the cloak server running there so something is clearly not configured correctly with the client and the cloudfront CDN.
Any thoughts here?
@cbeuw commented on GitHub (Sep 22, 2019):
I was a bit ambiguous when I wrote the instructions in the wiki. By "the domain of the CDN server", it should be what you referred to as
mydomain.cloudfront.netinstead of justcloudfront.net. I have fixed that wording. Try if that works@qichaozhao commented on GitHub (Sep 22, 2019):
@cbeuw thanks for the quick response. Unfortunately it seems still no joy.
Here is the updated json:
Here is the log from my terminal, same error unfortunately.
@cbeuw commented on GitHub (Sep 22, 2019):
It could be due to this. Should've been
CDNinstead.@qichaozhao commented on GitHub (Sep 22, 2019):
Sorry, that was idiotic of me.
Config is now corrected resulting in a new error!
@cbeuw commented on GitHub (Sep 23, 2019):
If you visit
xxx.cloudfront.netin your browser (try both HTTP and HTTPS), are there anything showing up in your ck-server log?@qichaozhao commented on GitHub (Sep 23, 2019):
Initially no - but I realised some DNS A records were not configured properly. Having fixed now I can now
curl xxx.cloudfront.netIf I curl using HTTP (
curl xxx.cloudfront.net) or HTTPS (curl https://xxx.cloudfront.net) then I see on ck-server the expected log:WARN[0191] failed to unmarshal hidden data from WS into authenticationInfo: non (or malformed) HTTP GET UID= encryptionMethod=0 proxyMethod= remoteAddr="remote_ip" sessionId=0So then I tried again and now I see the connection in ck-server from a cloudfront proxy IP address (64.252.188.79), but the client errors remain the same.
Client Side:
@malikshi commented on GitHub (Sep 30, 2019):
could be work on cloudflare cdn?
@itshaadi commented on GitHub (Oct 12, 2019):
the conversation shifted towards cloudfront, what about cloudflare? it would be really helpful if you could support cloudflare. because people from Cuba, Iran, Syria ... can't buy anything from a US based company.
@malikshi commented on GitHub (Oct 12, 2019):
@itshaadi yeah maybe you could use v2ray, but i hope cloak support cloudflare
@piloer commented on GitHub (Oct 23, 2019):
It would be great if cloak could support cloudflare
@vanyaindigo commented on GitHub (Nov 1, 2019):
Yes and here is example https://github.com/russian-meshnet/shadowsocks-v2ray-cdn/blob/master/install-server-on-Arch.sh-example
@dimqua commented on GitHub (Nov 1, 2019):
@vanyaindigo it uses v2ray-plugin, not Cloak.