mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 13:24:36 +01:00
Don't make the server use ssl by default
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -74,5 +74,6 @@ config.json
|
|||||||
hotfix.json
|
hotfix.json
|
||||||
*.mv
|
*.mv
|
||||||
*.exe
|
*.exe
|
||||||
|
*.p12
|
||||||
BuildConfig.java
|
BuildConfig.java
|
||||||
Test.java
|
Test.java
|
||||||
@@ -38,8 +38,7 @@
|
|||||||
### Connecting with the client (Fiddler method)
|
### Connecting with the client (Fiddler method)
|
||||||
1. **Log in with the client to an official server and Hoyoverse account at least once to download game data.**
|
1. **Log in with the client to an official server and Hoyoverse account at least once to download game data.**
|
||||||
2. Install and have [Fiddler Classic](https://www.telerik.com/fiddler) running.
|
2. Install and have [Fiddler Classic](https://www.telerik.com/fiddler) running.
|
||||||
3. Set fiddler to decrypt https traffic. (Tools -> Options -> HTTPS -> Decrypt HTTPS traffic) Make sure `ignore server certificate errors` is checked as well.
|
3. Copy and paste the following code into the Fiddlerscript tab of Fiddler Classic. Remember to save the fiddler script after you copy and paste it:
|
||||||
4. Copy and paste the following code into the Fiddlerscript tab of Fiddler Classic:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
import System;
|
import System;
|
||||||
@@ -51,14 +50,15 @@ class Handlers
|
|||||||
{
|
{
|
||||||
static function OnBeforeRequest(oS: Session) {
|
static function OnBeforeRequest(oS: Session) {
|
||||||
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
|
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
|
||||||
|
oS.oRequest.headers.UriScheme = "http";
|
||||||
oS.host = "localhost"; // This can also be replaced with another IP address.
|
oS.host = "localhost"; // This can also be replaced with another IP address.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
5. If `autoCreateAccount` is set to true in the config, then you can skip this step. Otherwise, type `/account create [account name]` in the server console to create an account.
|
4. If `autoCreateAccount` is set to true in the config, then you can skip this step. Otherwise, type `/account create [account name]` in the server console to create an account.
|
||||||
6. Login with your account name, the password field is ignored by the server and can be set to anything.
|
5. Login with your account name, the password field is ignored by the server and can be set to anything.
|
||||||
|
|
||||||
### Server commands
|
### Server commands
|
||||||
Server commands can be run in the server console or in-game. There is a dummy user named "Server" in every player's friends list that you can message to use in-game commands.
|
Server commands can be run in the server console or in-game. There is a dummy user named "Server" in every player's friends list that you can message to use in-game commands.
|
||||||
|
|||||||
BIN
keystore.p12
BIN
keystore.p12
Binary file not shown.
@@ -18,7 +18,7 @@ public class Config {
|
|||||||
|
|
||||||
public KeystoreInfo keystore = new KeystoreInfo();
|
public KeystoreInfo keystore = new KeystoreInfo();
|
||||||
|
|
||||||
public HttpServerConfig httpServer = new HttpServerConfig(443);
|
public HttpServerConfig httpServer = new HttpServerConfig(80);
|
||||||
public GameServerConfig gameServer = new GameServerConfig(23301);
|
public GameServerConfig gameServer = new GameServerConfig(23301);
|
||||||
|
|
||||||
public ServerOptions serverOptions = new ServerOptions();
|
public ServerOptions serverOptions = new ServerOptions();
|
||||||
@@ -46,7 +46,7 @@ public class Config {
|
|||||||
@Getter
|
@Getter
|
||||||
public static class KeystoreInfo {
|
public static class KeystoreInfo {
|
||||||
public String path = "./keystore.p12";
|
public String path = "./keystore.p12";
|
||||||
public String password = "lunar";
|
public String password = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -83,7 +83,7 @@ public class Config {
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public static class HttpServerConfig extends ServerConfig {
|
public static class HttpServerConfig extends ServerConfig {
|
||||||
public boolean useSSL = true;
|
public boolean useSSL = false;
|
||||||
public long regionListRefresh = 60_000; // Time in milliseconds to wait before refreshing region list cache again
|
public long regionListRefresh = 60_000; // Time in milliseconds to wait before refreshing region list cache again
|
||||||
|
|
||||||
public HttpServerConfig(int port) {
|
public HttpServerConfig(int port) {
|
||||||
|
|||||||
Reference in New Issue
Block a user