// The target 'self' is always the external IP address!
case NetworkPackage::NETWORK_TARGET_SELF:
- // Is the external_ip config entry set?
- if ($this->getConfigInstance()->getConfigEntry('external_ip') != '') {
- // Use it as external ip
- $ip = $this->getConfigInstance()->getConfigEntry('external_ip');
- } else {
- // Determine own external ip by connecting to my (coder) server at 188.138.90.169
- $ip = ConsoleTools::determineExternalIp();
- }
+ // Determine IP or 'external_ip' if set
+ $ip = HubTools::determineOwnExternalIp();
// Get port and add it
$ipPort = $ip . ':' . $this->getConfigInstance()->getConfigEntry('node_' . $this->determineProtocolByPackageData($packageData) . '_listen_port');