udpxy.lua 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. -- Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
  2. -- Licensed to the public under the Apache License 2.0.
  3. m = Map("udpxy", "udpxy", translate("udpxy is a UDP-to-HTTP multicast traffic relay daemon, here you can configure the settings."))
  4. s = m:section(TypedSection, "udpxy", "")
  5. s.addremove = true
  6. s.anonymous = false
  7. enable=s:option(Flag, "disabled", translate("Enabled"))
  8. enable.enabled="0"
  9. enable.disabled="1"
  10. enable.default = "1"
  11. enable.rmempty = false
  12. respawn=s:option(Flag, "respawn", translate("Respawn"))
  13. respawn.default = false
  14. verbose=s:option(Flag, "verbose", translate("Verbose"))
  15. verbose.default = false
  16. status=s:option(Flag, "status", translate("Status"))
  17. bind=s:option(Value, "bind", translate("Bind IP/Interface"))
  18. bind.rmempty = true
  19. bind.datatype = "or(ipaddr, network)"
  20. port=s:option(Value, "port", translate("Port"))
  21. port.rmempty = true
  22. port.datatype = "port"
  23. source=s:option(Value, "source", translate("Source IP/Interface"))
  24. source.rmempty = true
  25. source.datatype = "or(ipaddr, network)"
  26. max_clients=s:option(Value, "max_clients", translate("Max clients"))
  27. max_clients.rmempty = true
  28. max_clients.datatype = "range(1, 5000)"
  29. log_file=s:option(Value, "log_file", translate("Log file"))
  30. log_file.rmempty = true
  31. --log_file.datatype = "file"
  32. buffer_size=s:option(Value, "buffer_size", translate("Buffer size"))
  33. buffer_size.rmempty = true
  34. buffer_size.datatype = "range(4096,2097152)"
  35. buffer_messages=s:option(Value, "buffer_messages", translate("Buffer messages"))
  36. buffer_messages.rmempty = true
  37. buffer_messages.datatype = "or(-1, and(min(1), uinteger))"
  38. buffer_time=s:option(Value, "buffer_time", translate("Buffer time"))
  39. buffer_time.rmempty = true
  40. buffer_time.datatype = "or(-1, and(min(1), uinteger))"
  41. nice_increment=s:option(Value, "nice_increment", translate("Nice increment"))
  42. nice_increment.rmempty = true
  43. nice_increment.datatype = "or(and(max(-1), integer),and(min(1), integer))"
  44. mcsub_renew=s:option(Value, "mcsub_renew", translate("Multicast subscription renew"))
  45. mcsub_renew.rmempty = true
  46. mcsub_renew.datatype = "or(0, range(30, 64000))"
  47. return m