mirror of
https://github.com/cbeuw/Cloak.git
synced 2026-04-25 20:45:59 +03:00
[GH-ISSUE #240] Shadowsocks-Rust and Cloak #197
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#197
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 @SchattenWolf2008 on GitHub (Nov 18, 2023).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/240
Hello.
I wanted to go for a rather simple setup with docker.
I have installed Shadowsocks-rust on docker with an docker-compose.
On the ShadowSocks-Rust Server container, I have installed cloak by having the executable file on the host system and mapped it into the container.
In the SS config I have configured it to use the plugin using the path.
This seemed to work, but cloak complained about the config file.
I then also mapped a config file into the docker container (I can also access it from inside the docker container) but it still complains.
My config for the plugin in ssserver.json is:
And I get this error:
docker-compose upThis is my config file for cloak:
I wanted the TLS encryption to be done by my nginx server on the host, which is why I didn't include any SSL keys.
If that was the issue, I'd atleast expect a different error message.
Why is cloak not finding the config file?
I mapped it like this:
.../container-data/ckserver.json:/etc/cloak/ckserver.json
And I can read it from within the docker container:
user@server: docker exec -it ssserver-rust cat /etc/cloak/ckserver.json@SchattenWolf2008 commented on GitHub (Nov 18, 2023):
Ahaaa
So by running the ck-server directly from within the docker container it says that it requires a private key.
But since my TLS encryption should happen from the reverse proxy and not from cloak (since I don't want to map my certificate into an docker container and have redirect loop issues etc.)
How can I configure cloak to only serve HTTP traffic?
@SchattenWolf2008 commented on GitHub (Nov 18, 2023):
Ahaaa
I get it now.
Its used as some sort of password rather than encryption?
Anyway I got it working now.
@SchattenWolf2008 commented on GitHub (Nov 18, 2023):
The only help that I need now is how do I configure the path correctly?
What is the default path for the config?
Because when I start the cloak server using shadowsocks plugin settings, it does not find the file.
But the config is functional now.
This is how the plugin is currently configured.
I also tried "plugin": "/usr/bin/ck-server-linux-amd64 -c /etc/cloak/ckserver.json",
But then the ssserver does not find it.
ssserver-rust | ERROR failed to start plugin "/usr/bin/ck-server-linux-amd64 -c /etc/cloak/ckserver.json" for server 0.0.0.0:8388, err: No such file or directory (os error 2)
@notsure2 commented on GitHub (Nov 18, 2023):
Cdn mode
-------- Original Message --------
On Nov 18, 2023, 4:13 PM, SchattenWolf2008 wrote:
@SchattenWolf2008 commented on GitHub (Nov 18, 2023):
I don't cleary get this.
Well I managed to get cloak server running now but
I have read about cdn in the docs and put the cloak server to listen on 0.0.0.0:80, with the docker config I changed the port from :80 to 127.0.0.1:8389 and on my nginx reverse proxy I set it to point to http://127.0.0.1:8389.
But the shadowrocket vpn client does not seem to establish an functioning connection.
I dont cleary understand what options I need to set.
On the client I configured:
My domain as address (my webserver enforces TLS SSL and port 443, HTTP 80 traffic gets redirected.
Port 443
Encryption Method: plain
Browser: chrome
Transport: cdn
Allow Insecure: No
SNI:
Proxy Method: /
Server Name:
UID:
Public Key: myKex14dg515ads
Stream Timeout: 300
Alternative Names:
I am not sure what I need to set in order to make it working.
The ShadowSocks server is not accessable from outside, only from the cloak server.
At Proxy Method in particular it had "/" just there, does that have something to do with the book thingy from cloak?
@qwerttvv commented on GitHub (Dec 7, 2023):
https://github.com/cbeuw/Cloak/blob/master/example_config/ckserver.json
https://github.com/shadowsocks/shadowsocks-rust/tree/master#configuration
@yaqub2003 commented on GitHub (Aug 11, 2024):
Hello, I have the same problem. I set up a reverse proxy with Nginx, and the connection works on Windows and Android, but when I try to connect with Shadowrocket, I can't. There isn't even anything in the server log showing that I'm trying to connect. I think this is a problem with the Shadowrocket client because no logs appear on the server at all. I can also say that when I just enter the URL in a browser and make any connection to the Cloak server, something appears in the logs, but not with the Shadowrocket connection. I think we need to report this to the Shadowrocket developer.
@SchattenWolf2008 commented on GitHub (Aug 11, 2024):
Yeah at this point I have already dropped the project and removed the server.
But if shadowrocket actually does this, it might be considerable for me and many others to launch a server.
@yaqub2003 commented on GitHub (Aug 11, 2024):
Okey, but i am trying for myself. I alredy write developer via email, if he answer. I will write here so that all other people know, but I'm sure that the problem is in shadowrocket, because all other clients are working
@yaqub2003 commented on GitHub (Aug 14, 2024):
Hello. I found a way to make nginx and Cloak, xtls-reality or anything else work on port 443. To do this, you need to make sure that nginx understands where to redirect requests via SNI for this you need to add the configurations written below
/etc/nginx/nginx.conf
/etc/nginx/stream-enabled/proxy.conf
After that you need to change the all your websites ports from 443 to 7443
/etc/nginx/sites-enabled/aleko.sytes.net
And the last change cloak config BindAddr to only one port 8443:
After all of this you can use direct Transport in Cloak with 443 port and also all your sites will work at 443 port and in the proxy.conf file change the sites to yours
@yaqub2003 commented on GitHub (Aug 14, 2024):
And about CDN mode using reverse proxy through nginx. I wrote to the developer he fixed the bug in shadowrocket, now it connects, but for now only in beta version, I think in a month he will release 2.2.55 version an update in which reverse proxy through Cloak CDN transport will work, but you can not wait for the update, and do everything by the method described above.
@SchattenWolf2008 commented on GitHub (Aug 14, 2024):
This is awesome!
I will give it a shot! :)
-- keeping threat open if questions follow