mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Merge branch 'main' into dependabot/maven/org.slf4j-slf4j-jdk14-2.0.7
This commit is contained in:
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@ -50,7 +50,7 @@ jobs:
|
|||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
# Cache build process too like in the maven config
|
# Cache build process too like in the maven config
|
||||||
- uses: actions/cache@v3.2.6
|
- uses: actions/cache@v3.3.1
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
@ -179,8 +179,8 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
private boolean verifyNonce(Player sender, PacketContainer packet,
|
private boolean verifyNonce(Player sender, PacketContainer packet,
|
||||||
ClientPublicKey clientPublicKey, byte[] expectedToken) {
|
ClientPublicKey clientPublicKey, byte[] expectedToken) {
|
||||||
try {
|
try {
|
||||||
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 0))
|
if (new MinecraftVersion(1, 19, 0).atOrAbove()
|
||||||
&& !MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 3))) {
|
&& !(new MinecraftVersion(1, 19, 3).atOrAbove())) {
|
||||||
Either<byte[], ?> either = packet.getSpecificModifier(Either.class).read(0);
|
Either<byte[], ?> either = packet.getSpecificModifier(Either.class).read(0);
|
||||||
if (clientPublicKey == null) {
|
if (clientPublicKey == null) {
|
||||||
Optional<byte[]> left = either.left();
|
Optional<byte[]> left = either.left();
|
||||||
@ -224,7 +224,7 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
|
|
||||||
PacketContainer packet = packetEvent.getPacket();
|
PacketContainer packet = packetEvent.getPacket();
|
||||||
Optional<ClientPublicKey> clientKey = Optional.empty();
|
Optional<ClientPublicKey> clientKey = Optional.empty();
|
||||||
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 3))) {
|
if (new MinecraftVersion(1, 19, 3).atOrAbove()) {
|
||||||
// public key sent separate
|
// public key sent separate
|
||||||
clientKey = Optional.empty();
|
clientKey = Optional.empty();
|
||||||
} else {
|
} else {
|
||||||
|
@ -272,7 +272,7 @@ public class VerifyResponseTask implements Runnable {
|
|||||||
//fake a new login packet in order to let the server handle all the other stuff
|
//fake a new login packet in order to let the server handle all the other stuff
|
||||||
private void receiveFakeStartPacket(String username, ClientPublicKey clientKey) {
|
private void receiveFakeStartPacket(String username, ClientPublicKey clientKey) {
|
||||||
PacketContainer startPacket;
|
PacketContainer startPacket;
|
||||||
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 0))) {
|
if (new MinecraftVersion(1, 19, 0).atOrAbove()) {
|
||||||
startPacket = new PacketContainer(START);
|
startPacket = new PacketContainer(START);
|
||||||
startPacket.getStrings().write(0, username);
|
startPacket.getStrings().write(0, username);
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>craftapi</artifactId>
|
<artifactId>craftapi</artifactId>
|
||||||
<version>0.6.1</version>
|
<version>0.6.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- APIs we can use because they are available in all platforms (Spigot, Bungee, Velocity) -->
|
<!-- APIs we can use because they are available in all platforms (Spigot, Bungee, Velocity) -->
|
||||||
|
@ -40,7 +40,6 @@ import com.github.games647.fastlogin.core.storage.MySQLStorage;
|
|||||||
import com.github.games647.fastlogin.core.storage.SQLStorage;
|
import com.github.games647.fastlogin.core.storage.SQLStorage;
|
||||||
import com.github.games647.fastlogin.core.storage.SQLiteStorage;
|
import com.github.games647.fastlogin.core.storage.SQLiteStorage;
|
||||||
import com.google.common.base.Ticker;
|
import com.google.common.base.Ticker;
|
||||||
import com.google.common.net.HostAndPort;
|
|
||||||
import com.zaxxer.hikari.HikariConfig;
|
import com.zaxxer.hikari.HikariConfig;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -126,8 +125,8 @@ public class FastLoginCore<P extends C, C, T extends PlatformPlugin<C>> {
|
|||||||
antiBot = createAntiBotService(config.getSection("anti-bot"));
|
antiBot = createAntiBotService(config.getSection("anti-bot"));
|
||||||
Set<Proxy> proxies = config.getStringList("proxies")
|
Set<Proxy> proxies = config.getStringList("proxies")
|
||||||
.stream()
|
.stream()
|
||||||
.map(HostAndPort::fromString)
|
.map(proxy -> proxy.split(":"))
|
||||||
.map(proxy -> new InetSocketAddress(proxy.getHostText(), proxy.getPort()))
|
.map(proxy -> new InetSocketAddress(proxy[0], Integer.parseInt(proxy[1])))
|
||||||
.map(sa -> new Proxy(Type.HTTP, sa))
|
.map(sa -> new Proxy(Type.HTTP, sa))
|
||||||
.collect(toSet());
|
.collect(toSet());
|
||||||
|
|
||||||
@ -269,6 +268,7 @@ public class FastLoginCore<P extends C, C, T extends PlatformPlugin<C>> {
|
|||||||
return passwordGenerator;
|
return passwordGenerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public void setPasswordGenerator(PasswordGenerator<P> passwordGenerator) {
|
public void setPasswordGenerator(PasswordGenerator<P> passwordGenerator) {
|
||||||
this.passwordGenerator = passwordGenerator;
|
this.passwordGenerator = passwordGenerator;
|
||||||
}
|
}
|
||||||
|
@ -202,8 +202,8 @@ mojang-request-limit: 600
|
|||||||
# https://github.com/games647/FastLogin/issues/85
|
# https://github.com/games647/FastLogin/issues/85
|
||||||
auto-register-unknown: false
|
auto-register-unknown: false
|
||||||
|
|
||||||
# This disables the auto login from fastlogin. So a premium (like a paid account) authentication is requested, but
|
# By setting this option to false, you can disable the auto login from fastlogin. So a premium (like a paid account)
|
||||||
# the player won't be auto logged into the account.
|
# authentication is requested, but the player won't be auto logged into the account from the auth plugin.
|
||||||
#
|
#
|
||||||
# This can be used as 2Factor authentication for better security of your accounts. A hacker then needs both passwords.
|
# This can be used as 2Factor authentication for better security of your accounts. A hacker then needs both passwords.
|
||||||
# The password of your Minecraft and the password to login in with your auth plugin
|
# The password of your Minecraft and the password to login in with your auth plugin
|
||||||
|
Reference in New Issue
Block a user