diff --git a/webui-src/app/config/config_network.js b/webui-src/app/config/config_network.js index ffbb2d7e..dd6811dd 100644 --- a/webui-src/app/config/config_network.js +++ b/webui-src/app/config/config_network.js @@ -242,6 +242,36 @@ const displayExternalIPAddress = () => { }; }; +const displayHiddenAddress = () => { + return { + view: ({ attrs: { details } }) => { + if (!details || !details.isHiddenNode) return null; + return [ + m('p', 'Hidden Address:'), + m('p', details.hiddenNodeAddress || 'Not configured'), + m('p', 'Hidden Port:'), + m('p', details.hiddenPort || 'N/A'), + ]; + }, + }; +}; + +const displayHiddenStatus = () => { + return { + view: ({ attrs: { details } }) => { + const isHidden = details && details.isHiddenNode; + return [ + m('p', 'Hidden Mode:'), + m( + 'p', + isHidden ? 'Enabled' : 'Disabled', + { style: { color: isHidden ? '#00aa00' : '#888' } } + ), + ]; + }, + }; +}; + const displayIPAddresses = () => { return { view: ({ attrs: { details } }) => @@ -394,6 +424,8 @@ const Component = () => { m(SetDynamicDNS), m(SetLimits), m(SetOpMode), + m(displayHiddenStatus, { details }), + m(displayHiddenAddress, { details }), m(displayIPAddresses, { details }), ]), m('.widget__heading', m('h3', 'Hidden Service Configuration')), diff --git a/webui-src/app/config/config_node.js b/webui-src/app/config/config_node.js index 8f19787d..2e8ef305 100644 --- a/webui-src/app/config/config_node.js +++ b/webui-src/app/config/config_node.js @@ -24,6 +24,9 @@ const Node = () => { m('li', 'DHT: ' + nodeInfo.DHTActive), m('li', 'uPnP: ' + nodeInfo.uPnPActive), m('li', 'Local Address: ' + nodeInfo.localAddr + ' Port: ' + nodeInfo.localPort), + m('li', 'External Address: ' + (nodeInfo.extAddr || 'N/A')), + nodeInfo.isHiddenNode && m('li', 'Hidden Address: ' + (nodeInfo.hiddenNodeAddress || 'N/A')), + nodeInfo.isHiddenNode && m('li', 'Hidden Port: ' + (nodeInfo.hiddenPort || 'N/A')), ]), ]), ]),