mirror of
https://github.com/cbeuw/Cloak.git
synced 2026-04-27 05:25:52 +03:00
[GH-ISSUE #246] Cloak seems detected by Gov firewall #199
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#199
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 @Evolve6996 on GitHub (Feb 1, 2024).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/246
hello, recently (like a week or ago) there was a mass blockage of VPNs in my country, I am using openvpn+Cloak, a few days ago my domain address was blocked by the firewall, so I started investigating how they detected it.
last night, first my connection throttled and after a few hours, my VPS IP address was blocked!
I cannot say it 100% because of the cloak but it looks like the cloak is detected, cause symptoms happened when I was mostly using my cloak+openvpn server.
is Cloak using version 112 of Firefox maybe they just somehow figured this out because of the old fingerprints of the cloak?
@Evolve6996 commented on GitHub (Feb 2, 2024):
Update:
finally, I managed to run the cloak with cdn.
The connection speed is not bad, but somehow connection drops after like 1 minute!
I have a somewhat similar setup with the same IP with Vmess+ws+cdn and it works fine!
@qwerttvv commented on GitHub (Feb 8, 2024):
show your config
and
everything's fine with me
@Evolve6996 commented on GitHub (Feb 9, 2024):
hello, thanks for your replay,
btw I created the same topic on net4people and somebody confirmed cloak is detected.
here is the link to other topic:
https://github.com/net4people/bbs/issues/327
for the configs I used, I cannot remember exactly but I think I used hirboodbehnam
here is direct mode cloak client config:
Cloak server config:
openvpn client config:
openvpn server config:
@cbeuw commented on GitHub (Feb 9, 2024):
Browser fingerprints are updated in the latest release https://github.com/cbeuw/Cloak/releases/tag/v2.8.0. I'll update the fingerprints a lot more frequently in the future as I've migrated to use utls for producing ClientHello fingerprints
@Evolve6996 commented on GitHub (Feb 9, 2024):
hello, thanks. cloak was one of the first methods I have seen introduced fingerprints this is a good idea 👍
unfortunately, currently, I do not have access to a clean IP address, I will test on CDN to see what happens.
@Evolve6996 commented on GitHub (Feb 9, 2024):
still, no luck on cdn mode connection drops after 1 to 2 minutes. maybe my cdn config is wrong,
here is cdn config file :
@Evolve6996 commented on GitHub (Feb 13, 2024):
Update:
I used Cloudflared (previously known as Argo) tunnel to connect, but the same thing happened as above.
I don't think the problem is the Cloudflare network or my server, something closing the connection. 😕
@sorganov commented on GitHub (Mar 11, 2024):
Hello!
I'm newbie with this, and once I've installed Cloak server, I tried to connect to it over https:433 from web browser. What I got was "wrong certificate" error from Firefox, as certificate from the site (www.google.com in my case) where Cloack re-directs obviously doesn't match server IP/name where Cloak runs. The first thing I thought was that this fact could be easily used to detect and block Cloak servers using very simple probing for a site that pretends to be something else. Don't we rather need to imitate some "working" www site?
Am I missing something obvious here? Did I misconfigure Cloak?
@noiseonwires commented on GitHub (Apr 28, 2024):
@sorganov you are testing it wrong.
If you try to open a real Google (or any other popular service) server through HTTPS using its IP address and 443 port from the browser, you will get the same error message, because the certificate is issued for the domain, not for the IP address. So its absolutely normal that you receive such a certificate error message, it doesn't mean that your Cloak server is vulnerable to probing.
What you need to test if Cloak is working and the camouflage acts as expected, is to try to reach your Cloak's server IP with a "SNI" field equal to the website you are trying to masquerade for. There are two ways how to do it:
xx.xx.xx.xx www.microsoft.com. After it, you try to open "www.microsoft.com" in your browser, you should see a real Microsoft website without certificate errors, but in fact you'll get a reply from your Cloak servercurl -v --resolve www.microsoft.com:443:xx.xx.xx.xx https://www.microsoft.com(xx.xx.xx.xx is your Cloak server IP addree) - there should be no certificate errors in cURL output, you should see some valid HTTP headers or even HTML code.@sorganov commented on GitHub (Apr 30, 2024):
@uprtdev Thank you for explanations, but probably I was not clear enough in describing my worry. When I connect over HTTPS to my host <my.host.name> running Cloack, what I get, say, in Firefox, is:
"Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for <my.host.name>. The certificate is only valid for www.google.com."
Isn't it alarming that random <my.host.name> sends certificate issued for www.google.com? How much effort would it take to figure that <my.host.name> IP has nothing to do with any of www.google.com IPs, and then block such a suspect site?
Anyway, is there a way to re-direct to a HTTP server running on the same host where Cloack is running? That server will supposedly output "site under construction" or something. Is it a sound idea in the first place?
@noiseonwires commented on GitHub (May 1, 2024):
Your Cloak client will not try to reach your Cloak server with your_host_name in SNI field, it will do it with www.google.com SNI, and the server will reply with a valid www.google.com certificate. If the censors suspect something, then when they do the request to your server they will get a valid and authentic request, as a real www.google.com does. This is the main idea and purpose of Cloak, that your server pretends to be something it is not :)
The only question may be is that www.google.com domain is not resolved to your server IP address, but in fact that means nothing - such popular resources are usually served with big CDNs, that can have hundreds of different frontend IP addresses.
If you want to have a web server together with your Cloak server, just point Cloak server to 127.0.0.1 and use your own domain in the configuration. But using Cloak for such scheme is in fact an overkill and doesn't make much sense, you can use something simpler like naiveproxy or trojan-go.
The purpose of Cloak is bypassing domain whitelists, that's why it is usually used with well-known websites like www.google.com and others.
@sorganov commented on GitHub (May 2, 2024):
I'm positive Cloak-client-to-Cloack-server protocol is fine, so let's get it aside of the issue.
I also admit I have no idea how hard it is to figure that particular suspect IP has nothing to do with www.google.com, so I can only believe you that it's safe enough. If so, the rest is not that important anymore, and is kinda wishful thinking.
I do see how bypassing domain whitelists makes sense in general, thanks for pointing that out. However, as it's not an issue for me yet, I wanted to replace www.google.com as redirect target by the same <my.host.name> where Cloack is already running. Besides different safety policy this indeed would give me an opportunity to run my own HTTP server on the same host that runs Cloak server, but that's not the primary goal. Unfortunately it caused me trouble as Cloak seems to have no way to re-direct HTTP to a different port, and I want to ask if such feature makes no sense, or is it just missed?
From your suggestion I didn't understand how will I then be able to connect to Cloak server listening on 127.0.0.1 with Cloak client running on another host? Apparently some IP filtering will be required, and I'd prefer native Cloak feature if it existed.
Thank you for the suggested alternatives, but the Cloak happens to be very easy to configure and use, has a huge benefit of already being up and running, and then it's targeted exactly at my actual use-case, where HTTP (if any at all) is very secondary. It still looks like a nice feature though if it were able to re-direct regular HTTP traffic from host:443 not only to another.host:443, but to, say, host:8443 as well (where supposedly a HTTP server will be listening).
@noiseonwires commented on GitHub (May 2, 2024):
According to this it should be possible to specify no-standard port (e.g. 8443) in RedirAddr server parameter.
If it doesn't work, then probably similar behaviour can be achieved by some iptables magic (e.g. DNAT connections to localhost's 443 port to 8443)