=rem #15007 add ability to bind to a different address than the remoting waits messages from

This can be used to traverse NATs with the following configuration:

akka.remote.netty.tcp {
  ...
  hostname = my-external-address.lt
  bind-hostname = 192.168.1.100
}

Use Akka BoundAddressesExtension to get bound addresses
This commit is contained in:
Martynas Mickevicius 2014-09-15 18:30:12 +03:00
parent 60ab0fb3d0
commit 47556a0ebf
13 changed files with 328 additions and 24 deletions

View file

@ -229,6 +229,12 @@ private[remote] class Remoting(_system: ExtendedActorSystem, _provider: RemoteAc
// Not used anywhere only to keep compatibility with RemoteTransport interface
protected def useUntrustedMode: Boolean = provider.remoteSettings.UntrustedMode
private[akka] def boundAddresses: Map[String, Set[Address]] = {
transportMapping.map {
case (scheme, transports)
scheme -> transports.map { case (transport, _) transport.boundAddress }
}
}
}
/**