[GH-ISSUE #214] Cloak behind Caddy reverse-proxy is unreachable with Android app. #175

Open
opened 2026-02-26 12:34:11 +03:00 by kerem · 1 comment
Owner

Originally created by @schebotar on GitHub (Feb 21, 2023).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/214

Hello.
I have running docker containers with cloak, shadowsocks and Caddy.
Caddy is configured to redirect requests from my domain to cloak container like this

my.domain.net {
        reverse_proxy cloak:443
}

Request my.domain.net from Firefox seems ok. Cloak logs:

cloak  | time="2023-02-21T14:28:34Z" level=warning msg="failed to unmarshal hidden data from WS into authFragments: non (or malformed) HTTP GET" UID= encryptionMethod=0 proxyMethod= remoteAddr="10.10.0.3:43138" sessionId=0

10.10.0.3 is Caddy container IP

But i can't establish connection from Android Shadowsocks client. Cloak logs are silent.

Bypassing cloak container port to server port 8443 works fine. docker-compose:

ports:
  - "8443:443"

And android app works great with 8443 in settings.

Did I miss something in Caddy settings?

Originally created by @schebotar on GitHub (Feb 21, 2023). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/214 Hello. I have running docker containers with cloak, shadowsocks and Caddy. Caddy is configured to redirect requests from my domain to cloak container like this ``` my.domain.net { reverse_proxy cloak:443 } ``` Request my.domain.net from Firefox seems ok. Cloak logs: ``` cloak | time="2023-02-21T14:28:34Z" level=warning msg="failed to unmarshal hidden data from WS into authFragments: non (or malformed) HTTP GET" UID= encryptionMethod=0 proxyMethod= remoteAddr="10.10.0.3:43138" sessionId=0 ``` 10.10.0.3 is Caddy container IP But i can't establish connection from Android Shadowsocks client. Cloak logs are silent. Bypassing cloak container port to server port 8443 works fine. docker-compose: ``` ports: - "8443:443" ``` And android app works great with 8443 in settings. Did I miss something in Caddy settings?
Author
Owner

@valerius2k commented on GitHub (May 3, 2023):

See my comment in ticket #219. You need "Transport" setting in Cloak client settings to be set to "CDN", not "direct" if you put Cloak behind a reverse proxy. Found that suddenly when experimenting with Cloak and Nginx.

<!-- gh-comment-id:1532544480 --> @valerius2k commented on GitHub (May 3, 2023): See my comment in ticket #219. You need "Transport" setting in Cloak client settings to be set to "CDN", not "direct" if you put Cloak behind a reverse proxy. Found that suddenly when experimenting with Cloak and Nginx.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cloak#175
No description provided.