Closed jianxingxuejian closed 1 year ago
Admin Auth
/ Player Auth
, there are still such situations.
When using local ip, you need to start the game, open the proxy to take effect, do not know why yet.
I have opened the game.
When I enter a wrong credential:
curl -v -X POST 'http://localhost:443/plugin/admin/auth' -H 'Content-Type: application/json' -d '{"adminVoucher":"aaaaaaaaaaaaa"}'
> POST /plugin/admin/auth HTTP/1.1
> Host: localhost:443
> User-Agent: curl/7.64.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 32
>
* upload completely sent off: 32 out of 32 bytes
< HTTP/1.1 200 OK
< Date: Wed, 28 Dec 2022 07:53:52 GMT
< Content-Type: application/json
< Content-Length: 43
< Server: Jetty(9.4.48.v20220622)
<
* Connection #0 to host localhost left intact
{"code":1006,"msg":"auth fail","data":null}
When I enter a correct credential:
curl -v -X POST 'http://localhost:443/plugin/admin/auth' -H 'Content-Type: application/json' -d '{"adminVoucher":"bd7b881d-b395-4ef7-a054-c10389f5fe43"}'
> POST /plugin/admin/auth HTTP/1.1
> Host: localhost:443
> User-Agent: curl/7.64.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 55
>
* upload completely sent off: 55 out of 55 bytes
< HTTP/1.1 500 Server Error
< Date: Wed, 28 Dec 2022 07:55:16 GMT
< Content-Type: text/plain
< Content-Length: 21
< Server: Jetty(9.4.48.v20220622)
<
* Connection #0 to host localhost left intact
Internal server error
Because there are no more logs, from the source code, there may be an uncaught exception here.
Did you follow the documentation? If you want to use the launcher, make sure the values of useEncryption and useInRouting in the server config.json file are both false, and then use the http address, like this: http:127.0.0.1:443, or configure the server with an https certificate, make sure the values of useEncryption and useInRouting are both true, and then you can use the https connection, like this: https:127.0.0.1 Other launchers like Cultivation also have this problem. I don't know how to avoid it, I have very little experience with network and Rust.
Thanks, I didn't use the launcher, so I didn't modify the configuration of these two items in the configuration file. After I modified them just now, everything is okay.
As a record, prepare to troubleshoot the cause and fix.