11 Commits

Author SHA1 Message Date
mohammed jasem alaajel
8d813a10dc Merge branch 'master' of https://github.com/Limework/RediSkript 2021-05-16 03:17:33 +04:00
mohammed jasem alaajel
e4d506af07 fixed maven build problem 2021-05-16 03:17:20 +04:00
mohammed jasem alaajel
92b458f755 Update README.md 2021-05-16 03:05:37 +04:00
mohammed jasem alaajel
df8c9a8f2c Create maven.yml 2021-05-16 03:02:53 +04:00
mohammed jasem alaajel
bfbfd231ea removed compile file
Note: you can find the jar inside target folder now.
2021-05-16 02:59:54 +04:00
Govindass
141357b353 make encryption even more informative 2021-02-12 13:03:29 +02:00
Govindass
c89e4f1310 Make encryption config more informative & some other things 2021-02-12 12:59:28 +02:00
Govindass
8cda727799 Update config.yml 2021-02-12 12:51:00 +02:00
Govindass
ee5a9459bf Update config to be more informative 2021-02-12 12:48:39 +02:00
Govindass
b482e0fa7a update siv-mode 2021-02-09 11:55:21 +02:00
Govindass
d23956460f 1.3.3 2021-01-26 12:22:53 +02:00
7 changed files with 61 additions and 96 deletions

32
.github/workflows/maven.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: RediSkript Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Download a Build Artifact
uses: actions/upload-artifact@v2.2.3
with:
# Artifact name
name: RediSkript_JAR
# Destination path
path: target/Red*

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ out
compile
*.iml
*.iml

View File

@@ -1,3 +1,5 @@
[![RediSkript Build](https://github.com/Limework/RediSkript/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/Limework/RediSkript/actions/workflows/maven.yml)
RediSkript allows you to communicate between your servers with use of Redis, it's very fast and easy to use.
Skript: https://github.com/SkriptLang/Skript

View File

@@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.destroystokyo.paper:paper-api:1.15-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm:7.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm-commons:7.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm-tree:7.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm-analysis:7.1" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains:annotations:19.0.0" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.4.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.SkriptLang:Skript:2.5.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.destroystokyo.paper:paper-api:1.16.4-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm:8.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm-commons:8.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm-tree:8.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm-analysis:8.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.eclipse.jdt:org.eclipse.jdt.annotation:1.1.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:findbugs:3.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.jcip:jcip-annotations:1.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:bcel-findbugs:6.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.findbugs:jFormatString:2.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: dom4j:dom4j:1.6.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.ow2.asm:asm-debug-all:5.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.apple:AppleJavaExtensions:1.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: jaxen:jaxen:1.1.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-legacy:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-bukkit:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-core:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit.worldedit-libs:core:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: de.schlichtherle:truezip:6.8.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: rhino:js:1.7R2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit.worldedit-libs:bukkit:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-api:2.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldguard:worldguard-core:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.intake:intake:4.2-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q:squirrelid:0.2.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.flywaydb:flyway-core:3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.khelekore:prtree:1.5.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q:commandbook:2.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bstats:bstats-bukkit:1.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.marcelo-mason:PreciousStones:24e3d4bf67b7240ae36b32be10e99d4091938c5c" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: ant-contrib:ant-contrib:1.0b3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.milkbowl.vault:Vault:1.7.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: io.papermc:paperlib:1.0.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.5.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20201115" level="project" />
<orderEntry type="library" name="Maven: org.cryptomator:siv-mode:1.4.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" level="project" />
</component>
</module>

19
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>net.limework</groupId>
<artifactId>RediSkript</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<packaging>jar</packaging>
<build>
@@ -43,14 +43,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<outputDirectory>${project.basedir}/compile</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
@@ -82,38 +74,35 @@
<groupId>com.github.SkriptLang</groupId>
<artifactId>Skript</artifactId>
<version>2.5.3</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.4-R0.1-SNAPSHOT</version>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>3.5.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20201115</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>siv-mode</artifactId>
<version>1.4.0</version>
<scope>compile</scope>
<version>1.4.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.6.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@@ -17,7 +17,7 @@ public class Encryption {
public Encryption(Configuration config){
encryptionEnabled = config.getBoolean("Redis.EncryptMessages");
if (encryptionEnabled) {
// AES-128 encryption
// AES encryption
encryptionKey = config.getString("Redis.EncryptionKey");
macKey = config.getString("Redis.MacKey");
}

View File

@@ -2,8 +2,12 @@ Redis:
#a secure password that cannot be cracked, please change it!
#it is also recommended to firewall your redis server with iptables so it can only be accessed by specific IP addresses
Password: "yHy0d2zdBlRmaSPj3CiBwEv5V3XxBTLTrCsGW7ntBnzhfxPxXJS6Q1aTtR6DSfAtCZr2VxWnsungXHTcF94a4bsWEpGAvjL9XMU"
#hostname of your redis server, you can use free redis hosting (search for it online) if you do not have the ability to host your own redis server
#redis server is very lightweight, takes under 30 MB of RAM usually
Host: "127.0.0.1"
#must be 2 or higher, if you set to lower, the addon will automatically use 2 as a minimum
#do not edit MaxConnections if you do not know what you're doing
#it is only useful to increase this number to account for PING between distant servers and when you are sending a lot of messages constantly
MaxConnections: 2
#the default Redis port
Port: 6379
@@ -11,19 +15,30 @@ Redis:
#9000 = 9 seconds
TimeOut: 9000
#also known as SSL, only use this if you're running Redis 6.0.6 or higher, older versions will not work correctly
#it encrypts your traffic and makes data exchange between distant servers completely secure
#it encrypts your traffic and makes data exchange between distant servers secure
useTLS: false
#may be useful if you cannot use TLS due to use of older version of Redis
#however this will not encrypt the initial authentication password, only the messages sent
#it uses AES-128 SIV encryption which is secure enough for this
#EncryptMessages may be useful if you cannot use TLS due to use of older version of Redis or if you're paranoid about privacy and want to double encrypt your messages
#however this will not encrypt the initial authentication password, only the messages sent (use TLS for initial authentication password encryption)
#the encryption configuration must be the same across all servers in order to communicate
#use 16 characters long key for AES-128 encryption
#32 characters long key for AES-256 encryption
#AES-128 is faster, but less secure (but it is not crackable by today's technology as of 2020, may be crackable by quantum computers)
#the AES implementation used in RediSkript uses SIV mode, which makes the same key resistant to cracking for a big count of messages without the need of changing the key very often
EncryptMessages: true
#EncryptionKey and MacKey must be different
EncryptionKey: "16CHARACTERS KEY"
MacKey: "16CHARACTERS KEY"
#the channels from which this server can receive messages
#you can always send messages to all channels!
#you can add as many channels as you wish!
#ideal setup is having one global channel and having one channel that represents server name, so you know who to send messages to
#then a few other utility channels up to your needs
Channels:
- "Channel1"
- "Channel2"
- "global"
- "servername"
- "Channel3"