Changeset 59


Ignore:
Timestamp:
Jan 1, 2009, 4:37:37 PM (10 years ago)
Author:
cyrus
Message:

LuCI Ports 0.2.2
Firewall Improvements
Minor Fixes

Location:
branches/communities/cyrus/trunk/applications/luciports
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/communities/cyrus/trunk/applications/luciports/fonspec

    r56 r59  
    11#!/usr/bin/lua
    2 -- (c) john@phrozen.org gplv2
     2-- Fonspec upgrade file
     3-- (c) john@phrozen.org, steven@midlink.org gplv2
    34
    4 -- add plugin
    5 local pkg = require "luci.fon.pkg"
    6 local plugin = pkg.Plugin("luciports")
    7 local ret = plugin:add("LuCI Ports", "LuCI Team", "0.2.1")
    8 local sys = require("luci.sys")
    9 local dir = sys.getenv("PWD")
     5-- Plugin Information
     6local NAME    = "luciports"     -- Root node of plugin
     7local HOME    = false           -- Make plugin root node the new homepage
     8local TITLE   = "LuCI Ports"    -- Plugin Title as shown on plugin page
     9local AUTHOR  = "LuCI Team"     -- Plugin Provider as shown on plugin page
     10local VERSION = "0.2.2"         -- Plugin Version as shown on plugin page
     11
     12-- Dashboard Information
     13local DASHBOARD = true          -- Show plugin on dashboard
     14local DB_ICON   = "../fon/luciports/luciports.png"      -- Plugin icon file relative to /luci-static/resources
     15local DB_ORDER  = 10            -- Plugin dashboard order number
     16
     17
     18-- Logic
     19local os = require "os"
    1020local fs = require "luci.fs"
     21local dir = require "posix".getcwd()
    1122
    12 if ret == false then
    13         print("plugin already installed")
    14         return 0
     23-- Create Plugin object
     24local plugin = require "luci.fon.pkg".Plugin(NAME)
     25if not plugin:add(TITLE, AUTHOR, VERSION) then
     26        print "plugin already installed!"
     27        os.exit(1)
    1528end
    1629
    17 plugin:dashboard("../fon/luciports/luciports.png", 10, "luciports")
     30-- Add Dashboard entry
     31if DASHBOARD then
     32        plugin:dashboard(DB_ICON, DB_ORDER, NAME)
     33end
     34
     35-- Enable home redirect
     36if HOME then
     37        plugin:redirect()
     38end
     39
     40-- Select files to install
    1841plugin:addfiles(dir.."/files/")
    1942
     43-- Save modes
    2044local modes = {}
    2145for _, file in ipairs(plugin.files) do
     
    2347end
    2448
     49-- Hacks
     50local util = require "luci.util"
     51local hacks = {"/lib/firewall/uci_firewall.sh"}
     52for _, file in ipairs(hacks) do
     53        modes[file] = nil
     54        table.remove(plugin.files, util.contains(plugin.files, file))
     55        fs.copy(dir.."/files/"..file, file)
     56end
     57
     58-- Install files
    2559plugin:finalize()
    2660
     61-- Restore modes
    2762for file, mode in pairs(modes) do
    2863        fs.chmod(file, mode)
  • branches/communities/cyrus/trunk/applications/luciports/luasrc/i18n/luci-fw.de.lua

    r52 r59  
    1212fw_src = 'Quelle'
    1313fw_dest = 'Ziel'
     14fw_mtufix = 'MSS-Korrektur'
    1415fw_traffic = 'Verkehrskontrolle'
    1516firewall_rule_src = 'Eingangszone'
     
    3435firewall_redirect_srcip = 'Quelladresse'
    3536firewall_redirect_srcmac = 'Quell-MAC-Adresse'
    36 fw_forwarding1 = 'An dieser Stelle kann festgelegt zwischen welchen Zonen Netzverkehr hin und her fließen kann. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert.'
     37fw_forwarding1 = 'An dieser Stelle kann festgelegt zwischen welchen Zonen Netzverkehr hin und her fließen kann. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert. Bei gelegentlich auftretenden Verbindungsproblemen kann eine MSS-Korrektur helfen, ansonsten sollte dies aus Performancegründen deaktiviert bleiben.'
    3738firewall_forwarding_src = 'Eingang'
    3839firewall_forwarding_dest = 'Ausgang'
  • branches/communities/cyrus/trunk/applications/luciports/luasrc/i18n/luci-fw.en.lua

    r52 r59  
    2323fw_src = 'Source'
    2424fw_dest = 'Destination'
     25fw_mtufix = 'MSS-Correction'
    2526fw_traffic = 'Traffic Control'
    2627fw_portfw1 = 'Port forwarding allows to provide network services in the internal network to an external network.'
     
    3435firewall_redirect_destport = 'Internal port (optional)'
    3536firewall_redirect_destport_desc = 'port or range as first-last'
    36 fw_forwarding1 = 'Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall.'
     37fw_forwarding1 = 'Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall. If you experience occasional connection problems try enabling MSS-Correction otherwise disable it for performance resons.'
    3738firewall_forwarding_src = 'Input'
    3839firewall_forwarding_dest = 'Output'
  • branches/communities/cyrus/trunk/applications/luciports/luasrc/model/cbi/luci_fw/traffic.lua

    r52 r59  
    2323iface = s:option(ListValue, "src", translate("fw_src"))
    2424oface = s:option(ListValue, "dest", translate("fw_dest"))
     25s:option(Flag, "mtu_fix", translate("fw_mtufix"))
    2526
    2627luci.model.uci.cursor():foreach("firewall", "zone",
  • branches/communities/cyrus/trunk/applications/luciports/luasrc/view/ports_system/packages.htm

    r52 r59  
    1919        return (rowcnt % 2) + 1
    2020end
    21 boxcolor = "black"
    2221-%>
    2322<%+header%>
Note: See TracChangeset for help on using the changeset viewer.