From 9e90c52df1655240396f066519e7c6a7bb614a0b Mon Sep 17 00:00:00 2001 From: Melledy <121644117+Melledy@users.noreply.github.com> Date: Wed, 19 Jun 2024 20:56:51 -0700 Subject: [PATCH] Don't make the server use ssl by default --- .gitignore | 1 + README.md | 8 ++++---- keystore.p12 | Bin 2421 -> 0 bytes src/main/java/emu/lunarcore/Config.java | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 keystore.p12 diff --git a/.gitignore b/.gitignore index 785144d..0d5a637 100644 --- a/.gitignore +++ b/.gitignore @@ -74,5 +74,6 @@ config.json hotfix.json *.mv *.exe +*.p12 BuildConfig.java Test.java \ No newline at end of file diff --git a/README.md b/README.md index 4aab704..317a1b1 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,7 @@ ### 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.** 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. -4. Copy and paste the following code into the Fiddlerscript tab of Fiddler Classic: +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: ``` import System; @@ -51,14 +50,15 @@ class Handlers { 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")) { + oS.oRequest.headers.UriScheme = "http"; 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. -6. Login with your account name, the password field is ignored by the server and can be set to anything. +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. +5. Login with your account name, the password field is ignored by the server and can be set to anything. ### 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. diff --git a/keystore.p12 b/keystore.p12 deleted file mode 100644 index 063766340e29769af62422e588ef1cf1912c5789..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2421 zcmV-*35xbGf(dZ~0Ru3C2{#4_Duzgg_YDCD0ic2jC%0*fA9%Y=H~9sHn5XC*4$d)~U%|H;t3;!;vlyw1ba!VYYV8U+Tf z$93fjyuD%~5wXtlDfGTp6Tefla!Ymcke7CSJ7B~@Fd1Xj_nmG- zt*p*VF#qQ$JwrL|=50Bz%_nM1TewS-@ltK$x6cTrO}OLg+I+_{qq1wsc2mfOXHW%c z@vdqbDVEyzhaa5Cn#ism(m6UAmS28_-|u5pvx;}=tFs#Qve9kS>nTgC0aDKodoT%n zsFXYiL702d(SLm_x~L>mJS;y4_l692rmwJ9r((;prZ?=zzP0*!)qh{PBV>%*Q*rKa ziZeozn(!1o7>`Hkcsn@7zO5pF`#Gdx*47fUgw{DzN2K8D-{y{!exDj;dJUZ1PMwu$ z$d${hiO#|CV|elOe4FD!-yprGU4XXk=T0rSSnq#&nnG&1M zg9O%C7A)&YCkR3i&Hb(pENPo-Fy!?SSo(c=Rmo8I2oDyooLk*n?J-DhPj(S#(*(nZ zGa$Ktc-`|l)Vn&V&Mq_lg(T}&PO)Fea_oyjq@RjHIlpDPT47B9n6}k~jvBtU8BTvI zk?azT+1C4AOAD%QH1I0I`WRUYyawSlNx*qFoFd^1_>&LNQUNuY$4* z@1jgHJ-Su?;DY&;bFIpSS@QXtK?%?k7;X65xY;?wZ4NL}ynSPzMawgO1+pd$$ zljIftZYL>$zYHSLU-%e9;J%mdcXmw_I7839WWJR5EDLigZ@<|=bCE3}%Wm(ZB2*hI z#;yyqqTgA)WDXKLbeAv{40jH1uL^26dWC8}6R+T;f`t~lHYiHK{+FdE?+ipC5WfnL zou8V8>J3pFyL9SJrk<|}5daWEB>=asw`0Zy)2pF#HkGjw0MmGkHHCU=G` zz0J_5-!cMxs3BFw1Z-P(mnrHJFic!StS)Q~iN=ZHXvxZGr#Fe)D<|tksL{GFG*TTf zjVl?Creq7djZP-!r?8HE;P8`g#7F&w8FRLDS)~kz*x6z8N&MiyfiyUC_GQ1v1brI& zgNKaIV_N`!g;eO;M{@Ly_;pZBhR~h=0K=#~Evwdnfw6OB^7x4Y5mrlS>_@!)NGfmR zXf4kVo;(UTWY!~@m2WwrOdEAl9{F!4U-Cf_ww7DWal_yKc6fjtDSH!VCdHTi2Ou|K z5h;1V5OGKTN>=>TEw~cKZ*e7>XE&^{wKiaUwwY*DMWLHxGtodENg>|Jx3l0nEt}XgaV0k76H+NgZjzU3)^D(~`9?_3tMBF)j!_*+ zkVE_i*RWC2;PQruz*6$UE%R;K2;~hHoYA3SP1%+sPiST;SkzWS8Kxnc)#m5(gC8*^ zFe3&DDuzgg_YDCF6)_eB6gAzjE#Yq7HHF|Zzw`(M^};i4*f23LAutIB1uG5%0vZJX n1Qh9eKog+1;iCx@w!9o@F7V;;pkxFH32{n7?7qmb0s;sCqDO+R diff --git a/src/main/java/emu/lunarcore/Config.java b/src/main/java/emu/lunarcore/Config.java index 448e454..3563b9e 100644 --- a/src/main/java/emu/lunarcore/Config.java +++ b/src/main/java/emu/lunarcore/Config.java @@ -18,7 +18,7 @@ public class Config { public KeystoreInfo keystore = new KeystoreInfo(); - public HttpServerConfig httpServer = new HttpServerConfig(443); + public HttpServerConfig httpServer = new HttpServerConfig(80); public GameServerConfig gameServer = new GameServerConfig(23301); public ServerOptions serverOptions = new ServerOptions(); @@ -46,7 +46,7 @@ public class Config { @Getter public static class KeystoreInfo { public String path = "./keystore.p12"; - public String password = "lunar"; + public String password = ""; } @Getter @@ -83,7 +83,7 @@ public class Config { @Getter 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 HttpServerConfig(int port) {