Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to get cloak going "manually" on a rooted android phone, hit a mysterious snag, help needed #272

Open
LindaFerum opened this issue Jul 27, 2024 · 2 comments

Comments

@LindaFerum
Copy link

Hi @notsure2 @cbeuw sorry for absolutely shameless tag
Basically, I'm out of my wits with trying to get the thing going "manually" on an android phone

So, I've set up the most recent server on an AWS, non-CDN mode

the config goes

server:

{
"ProxyBook": {
"a1":["udp","127.0.0.1:9999"] , "a2":["tcp","127.0.0.1:9999"] , "a3":["tcp","127.0.0.1:6969"]
},
"BypassUID": [
"SNIP+A+ow==",
"SNIP/3Onb0A=="
],
"BindAddr":[":443",":80"],
"RedirAddr": "aws.amazon.com",
"PrivateKey": "SNIP=",
"AdminUID": "SNIP/SNIP+A==",
"DatabasePath": "userinfo.db",
"StreamTimeout": 900
}

On client

{
"ProxyMethod":"a2",
"EncryptionMethod":"aes-128-gcm",
"UID":"SNIP+A+ow==",
"Transport": "direct",
"PublicKey":"SNIP=",
"ServerName":"aws.amazon.com",
"NumConn":4,
"BrowserSig":"chrome",
"StreamTimeout":900
}

The client is started by:
su -c /data/data/com.termux/files/home/ter/e/ck-clientarm64 -i 127.0.0.1 -l 8888 -p 443 -s 13.53.193.244 -c /data/data/com.termux/files/home/ter/c/ck/shadowT.json -verbosity trace

And the client sticks eternally in the state of

INFO[2024-07-27T02:04:47Z] Attempting to start a new session
TRAC[2024-07-27T02:04:47Z] client hello sent successfully
TRAC[2024-07-27T02:04:47Z] waiting for ServerHello
TRAC[2024-07-27T02:04:47Z] client hello sent successfully
TRAC[2024-07-27T02:04:47Z] waiting for ServerHello
TRAC[2024-07-27T02:04:47Z] client hello sent successfully
TRAC[2024-07-27T02:04:47Z] waiting for ServerHello
TRAC[2024-07-27T02:04:47Z] client hello sent successfully
TRAC[2024-07-27T02:04:47Z] waiting for ServerHello

I am completely out of my wits and helplessly angry at the computer :)

Please help me out

@LindaFerum
Copy link
Author

Oddly enough, if I use port 80 to connect (which does not seem like a particularly wise idea) then it seems to proceed more healthily

su -c /data/data/com.termux/files/home/ter/e/ck-clientarm64 -i 127.0.0.1 -l 8888 -p 80 -s 13.53.193.244 -c /data/data/com.termux/files/home/ter/c/ck/shadowT.json -verbosity trace

gives a healthy session (or, well, seemingly healthy session)

INFO[0000] Starting standalone mode
INFO[2024-07-27T02:31:13Z] Listening on TCP 127.0.0.1:8888 for a2 client
INFO[2024-07-27T02:31:18Z] Attempting to start a new session
ERRO[2024-07-27T02:31:44Z] Failed to establish new connections to remote: dial tcp 13.53.193.244:80: connect: software caused connection abort
ERRO[2024-07-27T02:31:44Z] Failed to establish new connections to remote: dial tcp 13.53.193.244:80: connect: software caused connection abort
ERRO[2024-07-27T02:31:44Z] Failed to establish new connections to remote: dial tcp 13.53.193.244:80: connect: software caused connection abort
ERRO[2024-07-27T02:31:44Z] Failed to establish new connections to remote: dial tcp 13.53.193.244:80: connect: software caused connection abort
TRAC[2024-07-27T02:31:47Z] client hello sent successfully
TRAC[2024-07-27T02:31:47Z] waiting for ServerHello
TRAC[2024-07-27T02:31:47Z] client hello sent successfully
TRAC[2024-07-27T02:31:47Z] waiting for ServerHello
TRAC[2024-07-27T02:31:47Z] client hello sent successfully
TRAC[2024-07-27T02:31:47Z] waiting for ServerHello
TRAC[2024-07-27T02:31:47Z] client hello sent successfully
TRAC[2024-07-27T02:31:47Z] waiting for ServerHello
DEBU[2024-07-27T02:31:47Z] All underlying connections established
INFO[2024-07-27T02:31:47Z] Session 288552689 established
TRAC[2024-07-27T02:31:47Z] stream 1 of session 288552689 opened
TRAC[2024-07-27T02:31:47Z] stream 2 of session 288552689 opened
TRAC[2024-07-27T02:31:47Z] stream 1 actively closed.
TRAC[2024-07-27T02:31:47Z] copying proxy client to stream: EOF
TRAC[2024-07-27T02:31:47Z] 0 read from stream 1 with err EOF
TRAC[2024-07-27T02:31:47Z] copying stream to proxy client: readfrom tcp 127.0.0.1:8888->127.0.0.1:41096: broken stream
TRAC[2024-07-27T02:31:47Z] 28 read from stream 2 with err
TRAC[2024-07-27T02:31:47Z] 1504 read from stream 2 with err
TRAC[2024-07-27T02:31:47Z] 186 read from stream 2 with err
TRAC[2024-07-27T02:31:47Z] 235 read from stream 2 with err
TRAC[2024-07-27T02:31:47Z] 325 read from stream 2 with err
TRAC[2024-07-27T02:31:50Z] 78 read from stream 2 with err
TRAC[2024-07-27T02:31:50Z] 86 read from stream 2 with err

@LindaFerum
Copy link
Author

Okay, I found a workaround.

  1. the transport mode must be specified (direct)
  2. the ServerName must be set to "random"

et viola, the session establishes as expected over port 443.

Really maddening behavior which at minimum should be documented, maybe? Anyhow, if anyone suffers from this here's my workaround.

I'll leave the issue open just in case this is an actual bug and worth fixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant