--[[
LuCI - Lua Configuration Interface
] ] --
local taskd = require " luci.model.tasks "
local neko_model = require " luci.model.neko "
local m , s , o
m = taskd.docker_map ( " neko " , " neko " , " /usr/libexec/apps/neko/neko.sh " ,
translate ( " Neko " ) ,
translate ( " Welcome to Neko, a self-hosted virtual browser that runs in Docker and uses WebRTC technology. Neko is a powerful tool that allows you to run a fully-functional browser in a virtual environment that you can share with friends meow. When self hosting behind Wireguard be sure to forward internal and external udp port range 52000-52005. " )
.. translate ( " Official website: " ) .. ' <a href= \" https://github.com/m1k1o/neko/ \" target= \" _blank \" >https://github.com/m1k1o/neko/</a> ' )
s = m : section ( SimpleSection , translate ( " Service Status " ) , translate ( " neko status: " ) )
s : append ( Template ( " neko/status " ) )
s = m : section ( TypedSection , " neko " , translate ( " Setup " ) , translate ( " Check output window for admin password " ) )
s.addremove = false
s.anonymous = true
o = s : option ( Value , " port " , translate ( " Port " ) .. " <b>*</b> " )
o.rmempty = false
o.default = " 8281 "
o.datatype = " port "
o = s : option ( Value , " image_name " , translate ( " Image " ) .. " <b>*</b> " )
o.rmempty = false
o.datatype = " string "
o : value ( " m1k1o/neko:firefox " , " m1k1o/neko:firefox " )
o.default = " m1k1o/neko:firefox "
local blocks = neko_model.blocks ( )
local home = neko_model.home ( )
o = s : option ( Value , " config_path " , translate ( " Router IP or WireGuard IP if self hosting " ) .. " <b>*</b> " )
o.rmempty = false
o.datatype = " string "
o : value ( " 192.168.70.1 " , " 192.168.70.1 " )
o.default = " 192.168.70.1 "
local paths , default_path = neko_model.find_paths ( blocks , home , " Configs " )
for _ , val in pairs ( paths ) do
o : value ( val , val )
end
o.default = default_path
return m