mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2026-01-26 09:02:19 +01:00
Add HTTP-proxies support
This commit is contained in:
@@ -41,7 +41,7 @@ public class EncryptionUtil {
|
||||
|
||||
public static byte[] getServerIdHash(String serverId, Key publicKey, Key secretKey) {
|
||||
return digestOperation("SHA-1"
|
||||
, new byte[][]{serverId.getBytes(Charsets.ISO_8859_1), secretKey.getEncoded(), publicKey.getEncoded()});
|
||||
, serverId.getBytes(Charsets.ISO_8859_1), secretKey.getEncoded(), publicKey.getEncoded());
|
||||
}
|
||||
|
||||
private static byte[] digestOperation(String algo, byte[]... content) {
|
||||
|
||||
@@ -195,7 +195,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
@Override
|
||||
public Map<String, Object> loadYamlFile(Reader reader) {
|
||||
YamlConfiguration config = YamlConfiguration.loadConfiguration(reader);
|
||||
return config.getValues(false);
|
||||
return config.getValues(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -215,7 +215,8 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
}
|
||||
|
||||
@Override
|
||||
public MojangApiConnector makeApiConnector(Logger logger, List<String> addresses, int requests) {
|
||||
return new MojangApiBukkit(logger, addresses, requests);
|
||||
public MojangApiConnector makeApiConnector(Logger logger, List<String> addresses, int requests
|
||||
, Map<String, Integer> proxies) {
|
||||
return new MojangApiBukkit(logger, addresses, requests, proxies);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -20,8 +21,8 @@ public class MojangApiBukkit extends MojangApiConnector {
|
||||
//mojang api check to prove a player is logged in minecraft and made a join server request
|
||||
private static final String HAS_JOINED_URL = "https://sessionserver.mojang.com/session/minecraft/hasJoined?";
|
||||
|
||||
public MojangApiBukkit(Logger logger, List<String> localAddresses, int rateLimit) {
|
||||
super(logger, localAddresses, rateLimit);
|
||||
public MojangApiBukkit(Logger logger, List<String> localAddresses, int rateLimit, Map<String, Integer> proxies) {
|
||||
super(logger, localAddresses, rateLimit, proxies);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user