diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..9446068e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,45 @@ +# bump 1777865723 +# bump 1777865812 +# bump 1777867293 +# bump 1777910619 +# bump 1777953695 +# bump 1777996895 +# bump 1778040097 +# bump 1778083304 +# bump 1778126497 +# bump 1778169695 +# bump 1778212890 +# bump 1778256084 +# bump 1778299280 +# bump 1778342480 +# bump 1778385680 +# bump 1778428880 +# bump 1778472081 +# bump 1778515289 +# bump 1778558467 +# bump 1778601673 +# bump 1778644866 +# bump 1778688072 +# bump 1778731275 +# bump 1778774471 +# bump 1778817671 +# bump 1778860873 +# bump 1778904068 +# bump 1778947269 +# bump 1778990473 +# bump 1779033664 +# bump 1779076868 +# bump 1779120073 +# bump 1779163270 +# bump 1779206472 +# bump 1779249671 +# bump 1779292876 +# bump 1779336067 +# bump 1779379276 +# bump 1779422473 +# bump 1779465670 +# bump 1779508866 +# bump 1779552068 +# bump 1779595266 +# bump 1779638466 +# bump 1779681670 diff --git a/webui-src/app/config/config_network.js b/webui-src/app/config/config_network.js index ffbb2d7e..2bda30f5 100644 --- a/webui-src/app/config/config_network.js +++ b/webui-src/app/config/config_network.js @@ -289,6 +289,54 @@ const SetDynamicDNS = () => { }; }; +const SetNetworkInterface = () => { + let availableInterfaces = []; + let selectedInterface = ''; + let sslId = ''; + + const loadInterfaces = () => { + rs.rsJsonApiRequest('/rsAccounts/getCurrentAccountId').then((res) => { + if (res.body.retval) { + sslId = res.body.id; + } + }); + availableInterfaces = [ + { id: 'auto', name: 'Auto (default)' }, + ]; + selectedInterface = 'auto'; + }; + + const setInterface = () => { + if (sslId && selectedInterface) { + rs.rsJsonApiRequest('/rsPeers/setNetworkInterface', { + sslId, + interfaceId: selectedInterface, + }); + } + }; + + return { + oninit: () => loadInterfaces(), + view: () => [ + m('p', 'Network Interface:'), + m('p.small', 'Select which network interface Retroshare should use. "Auto" uses the default interface.'), + m( + 'select', + { + value: selectedInterface, + onchange: (e) => { + selectedInterface = e.target.value; + setInterface(); + }, + }, + availableInterfaces.map((iface) => + m('option', { value: iface.id }, iface.name) + ) + ), + ], + }; +}; + const SetSocksProxy = () => { const socksProxyObj = { tor: {}, @@ -394,6 +442,7 @@ const Component = () => { m(SetDynamicDNS), m(SetLimits), m(SetOpMode), + m(SetNetworkInterface), m(displayIPAddresses, { details }), ]), m('.widget__heading', m('h3', 'Hidden Service Configuration')),