mirror of
https://github.com/ChronosX88/Influence-Bootstrap-Node.git
synced 2024-11-21 15:02:17 +00:00
Fixed jar building and add relay node start.
This commit is contained in:
parent
5b27661c2d
commit
8d1f531160
@ -3,8 +3,11 @@ package io.github.chronosx88.dhtBootstrap;
|
|||||||
import net.tomp2p.connection.RSASignatureFactory;
|
import net.tomp2p.connection.RSASignatureFactory;
|
||||||
import net.tomp2p.dht.PeerBuilderDHT;
|
import net.tomp2p.dht.PeerBuilderDHT;
|
||||||
import net.tomp2p.dht.PeerDHT;
|
import net.tomp2p.dht.PeerDHT;
|
||||||
|
import net.tomp2p.nat.PeerBuilderNAT;
|
||||||
import net.tomp2p.p2p.PeerBuilder;
|
import net.tomp2p.p2p.PeerBuilder;
|
||||||
import net.tomp2p.peers.Number160;
|
import net.tomp2p.peers.Number160;
|
||||||
|
import net.tomp2p.relay.RelayType;
|
||||||
|
import net.tomp2p.relay.tcp.TCPRelayServerConfig;
|
||||||
import net.tomp2p.storage.StorageDisk;
|
import net.tomp2p.storage.StorageDisk;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -52,6 +55,9 @@ public class Main {
|
|||||||
new RSASignatureFactory()
|
new RSASignatureFactory()
|
||||||
)
|
)
|
||||||
).start();
|
).start();
|
||||||
|
new PeerBuilderNAT(peerDHT.peer())
|
||||||
|
.addRelayServerConfiguration(RelayType.OPENTCP, new TCPRelayServerConfig())
|
||||||
|
.start();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user