I have changed the Cache path in server.properties
I have changed the ClientConfigloader class
I have changed the NettyServer
I have created the text files in Kronos Folder
uuid_bans, ip_bans, ip_mutes and mac_bans
go to run client no errors till i try to connect a second time and get the Error connecting to server message and the stuff in Update server
what else am I missing?
if I dont need this from shadowpkers guide then why cant it connect?
"You don't need sql to play. You don't also need Xampp"
Thank you
Server.properties
Code:
#Initial loading data
offline_mode=true
cache_path=..//Cache
data_path=Data
#World information
world_id=3
world_name=World 3
world_stage=DEV
world_type=PVP
world_flag=CANADA
world_settings=MEMBERS
world_address=0.0.0.0:13302
central_address=127.0.0.1
#Misc info
login_set=live
#Server theme
halloween=false
christmas=false
database_host=3
database_password=2
database_user=1
ClientConfigLoader
Code:
/*
* Copyright (c) 2016-2017, Adam <[email protected]>
* Copyright (c) 2018, Tomas Slusny <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.rs;
import io.reactivex.Single;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
import okhttp3.Request;
import okhttp3.Response;
class ClientConfigLoader
{
private ClientConfigLoader()
{
throw new RuntimeException();
}
// private static final String CONFIG_URL = "http://community.kronos.rip/jav_config.ws";
private static final String CONFIG_URL = "http://oldschool6b.runescape.com/jav_config.ws";
private static final int MAX_ATTEMPTS = 16;
static Single<RSConfig> fetch()
{
return Single.create(obs ->
{
int attempt = 0;
HostSupplier supplier = null;
HttpUrl url = HttpUrl.parse(CONFIG_URL);
final RSConfig config = new RSConfig();
while (attempt++ < MAX_ATTEMPTS)
{
final Request request = new Request.Builder()
.url(url)
.build();
try (final Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
{
if (!response.isSuccessful())
{
if (supplier == null)
{
supplier = new HostSupplier();
}
url = supplier.get();
continue;
}
String str;
final BufferedReader in = new BufferedReader(new InputStreamReader(response.body().byteStream()));
while ((str = in.readLine()) != null)
{
int idx = str.indexOf('=');
if (idx == -1)
{
continue;
}
String s = str.substring(0, idx);
switch (s)
{
case "param":
str = str.substring(idx + 1);
idx = str.indexOf('=');
s = str.substring(0, idx);
config.getAppletProperties().put(s, str.substring(idx + 1));
break;
case "msg":
// ignore
break;
default:
config.getClassLoaderProperties().put(s, str.substring(idx + 1));
break;
}
}
obs.onSuccess(config);
return;
}
}
obs.onError(new IOException("Too many attempts"));
});
}
}
NettyServer
Code:
package io.ruin.api.netty;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.ruin.api.utils.ServerWrapper;
import io.ruin.api.utils.ThreadUtils;
public class NettyServer {
private final EventLoopGroup bossGroup, workerGroup;
private NettyServer(EventLoopGroup bossGroup, EventLoopGroup workerGroup) {
this.bossGroup = bossGroup;
this.workerGroup = workerGroup;
}
public void shutdown() {
bossGroup.shutdownGracefully();
workerGroup.shutdownGracefully();
}
public static NettyServer start(String name, int port, Class<? extends ChannelHandler> c, int gcs, boolean local) {
NettyServer server = new NettyServer(new NioEventLoopGroup(), new NioEventLoopGroup());
ServerBootstrap bootstrap = new ServerBootstrap();
bootstrap.group(server.bossGroup, server.workerGroup);
bootstrap.channel(NioServerSocketChannel.class);
bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("decoder", c.newInstance());
pipeline.addLast("exception_handler", new ExceptionHandler());
}
});
bootstrap.childOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, 30000);
bootstrap.childOption(ChannelOption.TCP_NODELAY, true);
bootstrap.childOption(ChannelOption.SO_KEEPALIVE, true);
if(gcs > 0) {
for(int i = 0; i < gcs; i++)
System.gc();
ThreadUtils.sleep(1000L);
}
String host = "127.0.0.1";
if (!local) {
// host = "144.217.10.42";
host = "127.0.0.1";
if (name.toLowerCase().contains("beta")) {
// host = "167.114.217.217";
host = "127.0.0.1";
}
bootstrap.bind(host, port);
} else {
bootstrap.bind(port);
}
ServerWrapper.println(name + " is now listening on " + host + ":" + port);
return server;
}
}
Error Update server
Code:
2:55:26 PM: Executing task 'run'...
Configuration on demand is an incubating feature.
> Configure project :
The compile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the implementation configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.4.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
at build_5h8yaq95row1mzinqzuaq4c6l$_run_closure2$_closure14.doCall(C:\Users\John-PC\Desktop\Kronos-master1.1\Kronos-master\build.gradle:61)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The testCompile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the testImplementation configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.4.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
at build_5h8yaq95row1mzinqzuaq4c6l$_run_closure2$_closure14.doCall(C:\Users\John-PC\Desktop\Kronos-master1.1\Kronos-master\build.gradle:68)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
> Task :kronos-update-server:processResources NO-SOURCE
> Task :kronos-api:compileKotlin UP-TO-DATE
> Task :kronos-api:compileJava UP-TO-DATE
Using insecure protocols with repositories has been deprecated. This is scheduled to be removed in Gradle 7.0. Switch Maven repository 'maven(http://repo.maven.apache.org/maven2)' to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/6.4.1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
> Task :kronos-api:processResources NO-SOURCE
> Task :kronos-api:classes UP-TO-DATE
> Task :kronos-api:inspectClassesForKotlinIC UP-TO-DATE
> Task :kronos-api:jar UP-TO-DATE
> Task :kronos-update-server:compileJava UP-TO-DATE
> Task :kronos-update-server:classes UP-TO-DATE
> Task :kronos-update-server:run
Initiating file store...
[main] INFO io.ruin.update.Server - Looking for system.properties in C:\Users\John-PC\Desktop\Kronos-master1.1\Kronos-master\kronos-update-server\..\kronos-server\server.properties
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/C:/Users/John-PC/.gradle/caches/modules-2/files-2.1/io.netty/netty-all/4.1.17.Final/43142cd1d6a0ea281eb6a4990354b4d3ad23dd43/netty-all-4.1.17.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[09/08/2021 02:55:29 PM]: Update Server is now listening on 127.0.0.1:7304
[nioEventLoopGroup-3-21] ERROR rollingErrorFileLogger - Netty issue
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:342)
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:374)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1106)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:343)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.base/java.lang.Thread.run(Thread.java:830)