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

Failed to prepare connection to remote: cipher: message authentication failed #291

Open
holyslav opened this issue Nov 21, 2024 · 0 comments

Comments

@holyslav
Copy link

Hi, I raised openvpn + cloak in docker. I checked openvpn separately, there are no problems, everything connects, and when I try to send traffic through the client, I get an error from the header, and only in the client, the server is silent.
The Cloak server itself generally responds to packets, if you send some garbage to it via the telnet utility, it will say:

time="2024-11-21T14:11:10Z" level=warning msg="error reading first packet: unrecognised protocol" remoteAddr="172.30.0.2:43732"

docker-compose.yml

 cloak:
  container_name: "cloak"
  restart: always
  build:
    context: cloak
    dockerfile: Dockerfile
  image: cloak:local
  command: "/usr/bin/ck-server -c /etc/cloak/ckserver.json -verbosity trace"
  volumes:
    - type: bind
      source: ./cfg/cloak.json
      target: /etc/cloak/ckserver.json
    - type: bind
      source: ./userinfo.db
      target: /userinfo.db
  network_mode: service:openvpn
  depends_on:
    openvpn:
      condition: 'service_healthy'

ckserver.json

{
      "ProxyBook":
      {
          "openvpn":
          [
              "tcp",
              "127.0.0.1:1194"
          ]
      },
      "BindAddr":
      [
          ":443"
      ],
      "BypassUID":
      [
          "BypassUID=="
      ],
      "RedirAddr": "theyr.com",
      "PrivateKey": "PrivateKey=",
      "AdminUID": "AdminUID==",
      "DatabasePath": "/userinfo.db",
      "StreamTimeout": 300
  }

client.json

{
    "BrowserSig": "chrome",
    "EncryptionMethod": "aes-gcm",
    "NumConn": 1,
    "ProxyMethod": "openvpn",
    "PublicKey": "PublicKey=",
    "RemoteHost": "SeverIP",
    "RemotePort": "443",
    "ServerName": "google.com",
    "StreamTimeout": 300,
    "Transport": "direct",
    "UID": "AdminUID=="
}

./ck-client-linux-amd64-v2.10.0 -c ./client.json -verbosity trace

INFO[0000] Starting standalone mode                     
INFO[2024-11-21T14:19:25Z] Listening on TCP 127.0.0.1:1984 for openvpn client 
INFO[2024-11-21T14:19:28Z] Attempting to start a new session            
TRAC[2024-11-21T14:19:28Z] client hello sent successfully               
TRAC[2024-11-21T14:19:28Z] waiting for ServerHello                      
ERRO[2024-11-21T14:19:28Z] Failed to prepare connection to remote: cipher: message authentication failed
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