2
0

hnet.js 994 B

123456789101112131415161718192021222324252627282930313233343536
  1. 'use strict';
  2. 'require form';
  3. 'require network';
  4. return network.registerProtocol('hnet', {
  5. getI18n: function() {
  6. return _('Automatic Homenet (HNCP)');
  7. },
  8. getOpkgPackage: function() {
  9. return 'hnet-full';
  10. },
  11. renderFormOptions: function(s) {
  12. var o;
  13. o = s.taboption('general', form.ListValue, 'mode', _('Category'));
  14. o.value('auto', _('Automatic'));
  15. o.value('external', _('External'));
  16. o.value('internal', _('Internal'));
  17. o.value('leaf', _('Leaf'));
  18. o.value('guest', _('Guest'));
  19. o.value('adhoc', _('Ad-Hoc'));
  20. o.value('hybrid', _('Hybrid'));
  21. o.default = 'auto';
  22. s.taboption('advanced', form.Value, 'link_id', _('IPv6 assignment hint'), _('Assign prefix parts using this hexadecimal subprefix ID for this interface.'));
  23. o = s.taboption('advanced', form.Value, 'ip4assign', _('IPv4 assignment length'));
  24. o.datatype = 'max(32)';
  25. o.default = '24';
  26. o = s.taboption('advanced', form.Value, 'dnsname', _('DNS-Label / FQDN'));
  27. o.default = s.section;
  28. }
  29. });