[GH-ISSUE #57] Configuration file error #51

Closed
opened 2026-02-26 12:33:49 +03:00 by kerem · 1 comment
Owner

Originally created by @testcaoy7 on GitHub (Sep 20, 2019).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/57

Even a valid json is provided, server failed to start.
Error Msg:
FATA[0000] Configuration file error: Failed to read configuration file: json: cannot unmarshal array into Go struct field rawConfig.ProxyBook of type string

Server Json:

{
  "ProxyBook": {
    "socks5": [
      "tcp",
      "127.0.0.1:1080"
    ]
  },
  "BindAddr": [
    ":443"
  ],
  "BypassUID": [
    "1rmq6Ag1jZJCImLBIL5wzQ=="
  ],
  "RedirAddr": "202.89.233.100",
  "PrivateKey": "yJ5mAFkKYBDBCjqY0a8MFVMs/6iC9x0F4Kk5RNV5QFo=",
  "AdminUID": "sbw8iIVASiAL0WVL9Ro0ig==",
  "DatabasePath": "userinfo.db",
  "StreamTimeout": 300
}
Originally created by @testcaoy7 on GitHub (Sep 20, 2019). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/57 Even a valid json is provided, server failed to start. Error Msg: ```FATA[0000] Configuration file error: Failed to read configuration file: json: cannot unmarshal array into Go struct field rawConfig.ProxyBook of type string``` Server Json: ``` { "ProxyBook": { "socks5": [ "tcp", "127.0.0.1:1080" ] }, "BindAddr": [ ":443" ], "BypassUID": [ "1rmq6Ag1jZJCImLBIL5wzQ==" ], "RedirAddr": "202.89.233.100", "PrivateKey": "yJ5mAFkKYBDBCjqY0a8MFVMs/6iC9x0F4Kk5RNV5QFo=", "AdminUID": "sbw8iIVASiAL0WVL9Ro0ig==", "DatabasePath": "userinfo.db", "StreamTimeout": 300 } ```
kerem closed this issue 2026-02-26 12:33:49 +03:00
Author
Owner

@cbeuw commented on GitHub (Sep 20, 2019):

I changed the config file format in the last few commits. For binary release of v2.0.2 use this format instead: https://github.com/cbeuw/Cloak/blob/v2.0.2/example_config/ckserver.json

{
  "ProxyBook": {
    "socks5":"127.0.0.1:1080"
  },
  "BypassUID": [
    "1rmq6Ag1jZJCImLBIL5wzQ=="
  ],
  "RedirAddr": "202.89.233.100:443",
  "PrivateKey": "yJ5mAFkKYBDBCjqY0a8MFVMs/6iC9x0F4Kk5RNV5QFo=",
  "AdminUID": "sbw8iIVASiAL0WVL9Ro0ig==",
  "DatabasePath": "userinfo.db"
}
<!-- gh-comment-id:533510911 --> @cbeuw commented on GitHub (Sep 20, 2019): I changed the config file format in the last few commits. For binary release of v2.0.2 use this format instead: https://github.com/cbeuw/Cloak/blob/v2.0.2/example_config/ckserver.json ```json { "ProxyBook": { "socks5":"127.0.0.1:1080" }, "BypassUID": [ "1rmq6Ag1jZJCImLBIL5wzQ==" ], "RedirAddr": "202.89.233.100:443", "PrivateKey": "yJ5mAFkKYBDBCjqY0a8MFVMs/6iC9x0F4Kk5RNV5QFo=", "AdminUID": "sbw8iIVASiAL0WVL9Ro0ig==", "DatabasePath": "userinfo.db" } ```
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#51
No description provided.