mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Use portsExternal to fix relay problem with manual port forwarding
This commit is contained in:
parent
793b3d0f37
commit
8d95de3de9
2 changed files with 7 additions and 6 deletions
|
@ -116,8 +116,8 @@ public class BootstrappedPeerFactory {
|
|||
/* ChannelServerConficuration csc = PeerBuilder.createDefaultChannelServerConfiguration();
|
||||
csc.idleTCPSeconds(20).idleUDPSeconds(20).connectionTimeoutTCPMillis(20000);
|
||||
Peer peer = new PeerBuilder(keyPair).ports(port).channelServerConfiguration(csc).start();*/
|
||||
Peer peer = new PeerBuilder(keyPair).ports(port).start();
|
||||
/* Peer peer = new PeerBuilder(keyPair).ports(port).portsExternal(port)
|
||||
Peer peer = new PeerBuilder(keyPair).ports(port).portsExternal(port).start();
|
||||
/* Peer peer = new PeerBuilder(keyPair).ports(port).portsExternal(port)
|
||||
.channelServerConfiguration(csc).start();
|
||||
*/
|
||||
PeerDHT peerDHT = new PeerBuilderDHT(peer).storageLayer(new StorageLayer
|
||||
|
@ -158,7 +158,7 @@ public class BootstrappedPeerFactory {
|
|||
lastSuccessfulBootstrap = "default";
|
||||
|
||||
// TODO
|
||||
//lastSuccessfulBootstrap = "default";
|
||||
lastSuccessfulBootstrap = "default";
|
||||
|
||||
log.debug("lastSuccessfulBootstrap = " + lastSuccessfulBootstrap);
|
||||
switch (lastSuccessfulBootstrap) {
|
||||
|
|
|
@ -53,7 +53,7 @@ public class BSExampleNAT {
|
|||
private final static String IP_SERVER = "188.226.179.109";
|
||||
//private final static String IP_SERVER = "128.199.251.106"; // steves
|
||||
private final static int PORT_SERVER = 5000;
|
||||
private final static int PORT_CLIENT = 5500;
|
||||
private final static int PORT_CLIENT = 6500;
|
||||
/*
|
||||
public static void startServer() throws Exception {
|
||||
Random r = new Random(42L);
|
||||
|
@ -75,7 +75,8 @@ public class BSExampleNAT {
|
|||
Random r = new Random(43L);
|
||||
Bindings bindings = new Bindings();
|
||||
bindings.addProtocol(StandardProtocolFamily.INET);
|
||||
PeerBuilder peerBuilder = new PeerBuilder(new Number160(r)).ports(PORT_CLIENT).behindFirewall().bindings(bindings);
|
||||
PeerBuilder peerBuilder = new PeerBuilder(new Number160(r)).ports(PORT_CLIENT).portsExternal(PORT_CLIENT)
|
||||
.behindFirewall().bindings(bindings);
|
||||
Peer peer = peerBuilder.start();
|
||||
//Peer peer = new PeerBuilder(new Number160(r)).ports(PORT_CLIENT).behindFirewall().start();
|
||||
PeerNAT peerNAT = new PeerBuilderNAT(peer).start();
|
||||
|
@ -93,6 +94,6 @@ public class BSExampleNAT {
|
|||
System.out.println("failed " + fd.failedReason());
|
||||
}
|
||||
|
||||
peer.shutdown();
|
||||
// peer.shutdown();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue