Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions webui-src/app/config/config_network.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }) =>
Expand Down Expand Up @@ -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')),
Expand Down
3 changes: 3 additions & 0 deletions webui-src/app/config/config_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
]),
]),
]),
Expand Down