mirror of
https://github.com/ChronosX88/Influence-Bootstrap-Node.git
synced 2024-11-22 07:12:20 +00:00
Added patched TomP2P (https://github.com/ChronosX88/TomP2P), disable signature, enabled AutoReplication
This commit is contained in:
parent
8aacb71152
commit
2185285c11
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
.gradle/
|
||||
out/
|
||||
build/
|
||||
.idea/
|
@ -1,7 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="je-5.0.104">
|
||||
<CLASSES />
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -20,14 +20,14 @@ sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
/*maven {
|
||||
url "http://tomp2p.net/dev/mvn/"
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
implementation 'net.tomp2p:tomp2p-all:5.0-Beta8'
|
||||
//implementation 'net.tomp2p:tomp2p-all:5.0-Beta8'
|
||||
implementation 'org.slf4j:slf4j-log4j12:+'
|
||||
}
|
||||
|
||||
|
BIN
src/libs/lib/gcm-server-1.0.2.jar
Normal file
BIN
src/libs/lib/gcm-server-1.0.2.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/json-simple-1.1.jar
Normal file
BIN
src/libs/lib/json-simple-1.1.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/mapdb-1.0.6.jar
Normal file
BIN
src/libs/lib/mapdb-1.0.6.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/netty-buffer-4.0.28.Final.jar
Normal file
BIN
src/libs/lib/netty-buffer-4.0.28.Final.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/netty-common-4.0.28.Final.jar
Normal file
BIN
src/libs/lib/netty-common-4.0.28.Final.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/netty-transport-4.0.28.Final.jar
Normal file
BIN
src/libs/lib/netty-transport-4.0.28.Final.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/slf4j-api-1.7.5.jar
Normal file
BIN
src/libs/lib/slf4j-api-1.7.5.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-all-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-all-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-android-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-android-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-core-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-core-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-dht-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-dht-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-nat-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-nat-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-replication-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-replication-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-storage-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-storage-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/tomp2p-tracker-5.0-Beta8.jar
Normal file
BIN
src/libs/lib/tomp2p-tracker-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
src/libs/lib/weupnp-0.1.2.jar
Normal file
BIN
src/libs/lib/weupnp-0.1.2.jar
Normal file
Binary file not shown.
BIN
src/libs/tomp2p-all-5.0-Beta8.jar
Normal file
BIN
src/libs/tomp2p-all-5.0-Beta8.jar
Normal file
Binary file not shown.
@ -2,23 +2,16 @@ package io.github.chronosx88.dhtBootstrap
|
||||
|
||||
import com.sleepycat.bind.EntryBinding
|
||||
import com.sleepycat.je.DatabaseEntry
|
||||
|
||||
import io.netty.buffer.Unpooled
|
||||
import net.tomp2p.connection.SignatureFactory
|
||||
import net.tomp2p.storage.AlternativeCompositeByteBuf
|
||||
import net.tomp2p.storage.Data
|
||||
|
||||
import java.io.ByteArrayInputStream
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.OutputStream
|
||||
import java.io.Serializable
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.*
|
||||
import java.nio.ByteBuffer
|
||||
import java.security.InvalidKeyException
|
||||
import java.security.SignatureException
|
||||
|
||||
import io.netty.buffer.Unpooled
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
class DataSerializer(private val signatureFactory: SignatureFactory) : EntryBinding<Data>, Serializable {
|
||||
private val LOG_TAG = "DataSerializer"
|
||||
private val LOG = LoggerFactory.getLogger(DataSerializer::class.java)
|
||||
@ -47,10 +40,10 @@ class DataSerializer(private val signatureFactory: SignatureFactory) : EntryBind
|
||||
if (!retVal) {
|
||||
LOG.error("# ERROR: Data could not be deserialized!")
|
||||
}
|
||||
retVal = data.decodeDone(buf, signatureFactory)
|
||||
/*retVal = data.decodeDone(buf, signatureFactory)
|
||||
if (!retVal) {
|
||||
LOG.error("# ERROR: Signature could not be read!")
|
||||
}
|
||||
}*/
|
||||
return data
|
||||
}
|
||||
|
||||
@ -68,8 +61,8 @@ class DataSerializer(private val signatureFactory: SignatureFactory) : EntryBind
|
||||
// from memory
|
||||
writeData(out, data.toByteBuffers())
|
||||
// rest
|
||||
data.encodeDone(acb, signatureFactory)
|
||||
writeData(out, acb.nioBuffers())
|
||||
//data.encodeDone(acb, signatureFactory)
|
||||
//writeData(out, acb.nioBuffers())
|
||||
} catch (e: SignatureException) {
|
||||
e.printStackTrace()
|
||||
} catch (e: InvalidKeyException) {
|
||||
|
@ -9,13 +9,11 @@ import net.tomp2p.peers.Number160
|
||||
import net.tomp2p.relay.RelayType
|
||||
import net.tomp2p.relay.tcp.TCPRelayServerConfig
|
||||
import net.tomp2p.replication.AutoReplication
|
||||
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileWriter
|
||||
import java.io.IOException
|
||||
import java.util.Properties
|
||||
import java.util.UUID
|
||||
import java.util.*
|
||||
|
||||
|
||||
var peerDHT: PeerDHT? = null
|
||||
@ -64,6 +62,6 @@ fun main() {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
//val replication = AutoReplication(peerDHT!!.peer())
|
||||
//replication.start()
|
||||
val replication = AutoReplication(peerDHT!!.peer())
|
||||
replication.start()
|
||||
}
|
||||
|
12
src/main/resources/META-INF/MANIFEST.MF
Normal file
12
src/main/resources/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,12 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path: json-simple-1.1.jar kotlin-stdlib-common-1.3.21.jar tomp2p
|
||||
-all-5.0-Beta8.jar tomp2p-tracker-5.0-Beta8.jar netty-buffer-4.0.28.F
|
||||
inal.jar log4j-1.2.17.jar annotations-13.0.jar tomp2p-dht-5.0-Beta8.j
|
||||
ar netty-common-4.0.28.Final.jar kotlin-stdlib-1.3.21.jar gcm-server-
|
||||
1.0.2.jar tomp2p-storage-5.0-Beta8.jar slf4j-log4j12-1.8.0-beta4.jar
|
||||
weupnp-0.1.2.jar slf4j-api-1.8.0-beta4.jar tomp2p-replication-5.0-Bet
|
||||
a8.jar kotlin-stdlib-jdk8-1.3.21.jar tomp2p-nat-5.0-Beta8.jar netty-t
|
||||
ransport-4.0.28.Final.jar kotlin-stdlib-jdk7-1.3.21.jar tomp2p-androi
|
||||
d-5.0-Beta8.jar tomp2p-core-5.0-Beta8.jar mapdb-1.0.6.jar
|
||||
Main-Class: io.github.chronosx88.MainKt
|
||||
|
Loading…
Reference in New Issue
Block a user