mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Add SSL connection option for Redis
This commit is contained in:
1 parent
68daea3ce9
commit
ffc3706630
3 files changed
+9
-2
No files matched your search
@@ -51,6 +51,7 @@ public class Settings {
|
||||
private int redisPort;
|
||||
private String redisHost;
|
||||
private String redisPassword;
|
||||
private boolean redisSSL;
|
||||
|
||||
// Map plugin integration settings
|
||||
private boolean doMapIntegration;
|
||||
@@ -173,6 +174,7 @@ public class Settings {
|
||||
this.redisHost = config.getString("bungee_options.redis_credentials.host", "localhost");
|
||||
this.redisPort = config.getInt("bungee_options.redis_credentials.port", 6379);
|
||||
this.redisPassword = config.getString("bungee_options.redis_credentials.password", "");
|
||||
this.redisSSL = config.getBoolean("bungee_options.redis_credentials.use_ssl", false);
|
||||
|
||||
this.doMapIntegration = config.getBoolean("map_integration.enabled", false);
|
||||
this.mapPlugin = config.getString("map_integration.plugin", "dynmap");
|
||||
@@ -509,6 +511,8 @@ public class Settings {
|
||||
return redisPassword;
|
||||
}
|
||||
|
||||
public boolean getRedisSSL() { return redisSSL; }
|
||||
|
||||
public boolean getDoBackCommand() { return doBackCommand; }
|
||||
|
||||
public int getHikariMaximumPoolSize() {
|
||||
|
||||
@@ -27,13 +27,15 @@ public class RedisReceiver {
|
||||
jedisPool = new JedisPool(new JedisPoolConfig(),
|
||||
HuskHomes.getSettings().getRedisHost(),
|
||||
HuskHomes.getSettings().getRedisPort(),
|
||||
0);
|
||||
0,
|
||||
HuskHomes.getSettings().getRedisSSL());
|
||||
} else {
|
||||
jedisPool = new JedisPool(new JedisPoolConfig(),
|
||||
HuskHomes.getSettings().getRedisHost(),
|
||||
HuskHomes.getSettings().getRedisPort(),
|
||||
0,
|
||||
HuskHomes.getSettings().getRedisPassword());
|
||||
HuskHomes.getSettings().getRedisPassword(),
|
||||
HuskHomes.getSettings().getRedisSSL());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ bungee_options:
|
||||
host: localhost
|
||||
port: 6379
|
||||
password: ''
|
||||
use_ssl: false
|
||||
tab_complete_cross_server:
|
||||
enabled: true
|
||||
delay: 60
|
||||
|
||||
Reference in new issue
Block a user