mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-08 12:57:28 +08:00
🌈 Sync 2023-12-03 09:07:43
This commit is contained in:
parent
09255e8871
commit
60eac50167
2
3proxy/Makefile
Executable file → Normal file
2
3proxy/Makefile
Executable file → Normal file
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=3proxy
|
||||
PKG_VERSION:=0.9.4
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_MAINTAINER:=muziling <lls924@gmail.com>
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
0
3proxy/README.md
Executable file → Normal file
0
3proxy/README.md
Executable file → Normal file
0
3proxy/files/etc/3proxy.cfg
Executable file → Normal file
0
3proxy/files/etc/3proxy.cfg
Executable file → Normal file
0
3proxy/files/etc/config/3proxy
Executable file → Normal file
0
3proxy/files/etc/config/3proxy
Executable file → Normal file
0
3proxy/patches/0002-fix-loff_t.patch
Executable file → Normal file
0
3proxy/patches/0002-fix-loff_t.patch
Executable file → Normal file
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=3proxy simple webUI
|
||||
LUCI_DEPENDS:=+3proxy +luci-compat
|
||||
LUCI_DEPENDS:=+3proxy
|
||||
PKG_LICENSE:=GPLv3
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
@ -0,0 +1,36 @@
|
||||
'use strict';
|
||||
'require form';
|
||||
'require fs';
|
||||
'require view';
|
||||
'require uci';
|
||||
'require ui';
|
||||
'require tools.widgets as widgets'
|
||||
|
||||
|
||||
return view.extend({
|
||||
load: function(){
|
||||
uci.load('3proxy');
|
||||
},
|
||||
|
||||
render: function(data) {
|
||||
var config = uci.sections('3proxy');
|
||||
var file = (config.config);
|
||||
var m, s, o;
|
||||
|
||||
m = new form.Map('3proxy', _('Configuration'), _('Configuration file for 3proxy.'));
|
||||
|
||||
s = m.section(form.TypedSection, '3proxy', null);
|
||||
s.anonymous = true;
|
||||
|
||||
o = s.option(form.TextValue, '_tmpl', _('Edit config 3proxy'));
|
||||
o.rows = 20;
|
||||
o.cfgvalue = function(section_id) {
|
||||
return fs.trimmed('/etc/3proxy.cfg');
|
||||
};
|
||||
o.write = function(section_id, formvalue) {
|
||||
return fs.write(('/etc/3proxy.cfg'), formvalue.trim().replace(/\r\n/g, '\n') + '\n');
|
||||
};
|
||||
|
||||
return m.render();
|
||||
}
|
||||
});
|
@ -1,7 +0,0 @@
|
||||
module("luci.controller.3proxy", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({"admin", "services", "3proxy"}, alias("admin", "services", "3proxy", "config"), _("3proxy"), 93).acl_depends={"unauthenticated"}
|
||||
entry({"admin", "services", "3proxy", "config"}, cbi("3proxy/3proxy"), _("Setup"), 94).acl_depends={"unauthenticated"}
|
||||
entry({"admin", "services", "3proxy", "template"}, form("3proxy/3proxy_tpl"), _("Edit Config File"), 95).acl_depends={"unauthenticated"}
|
||||
end
|
@ -1,16 +0,0 @@
|
||||
local m
|
||||
|
||||
m = Map("3proxy", translate("3proxy"))
|
||||
|
||||
s = m:section(TypedSection, "3proxy")
|
||||
s.anonymous = true
|
||||
|
||||
cfg = s:option(Value, "config", translate("Config File"),
|
||||
translate("Path to 3proxy config file"))
|
||||
cfg.rempty = true
|
||||
|
||||
function m.on_after_commit(Map)
|
||||
luci.sys.call("/etc/init.d/3proxy restart")
|
||||
end
|
||||
|
||||
return m
|
@ -1,29 +0,0 @@
|
||||
local m6, s6, frm
|
||||
local fs = require "nixio.fs"
|
||||
local ut = require "luci.util"
|
||||
local uci = require "luci.model.uci"
|
||||
local filename = uci.cursor():get_first("3proxy", "3proxy", "config")
|
||||
|
||||
|
||||
m6 = SimpleForm("editing", nil)
|
||||
|
||||
m6.submit = translate("Save")
|
||||
m6.reset = false
|
||||
|
||||
s6 = m6:section(SimpleSection, "", translate("Edit config 3proxy"))
|
||||
|
||||
frm = s6:option(TextValue, "data")
|
||||
frm.datatype = "string"
|
||||
frm.rows = 15
|
||||
|
||||
|
||||
function frm.cfgvalue()
|
||||
return fs.readfile(filename) or ""
|
||||
end
|
||||
|
||||
|
||||
function frm.write(self, section, data)
|
||||
return fs.writefile(filename, ut.trim(data:gsub("\r\n", "\n")))
|
||||
end
|
||||
|
||||
return m6
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"admin/services/3proxy": {
|
||||
"title": "3proxy",
|
||||
"action": {
|
||||
"type": "alias",
|
||||
"path": "admin/services/3proxy/config"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-3proxy" ],
|
||||
"uci": { "3proxy": true }
|
||||
}
|
||||
},
|
||||
"admin/services/3proxy/config": {
|
||||
"title": "Config",
|
||||
"order": 41,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "proxy/3proxy"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,16 @@
|
||||
"luci-app-3proxy": {
|
||||
"description": "Grant UCI access for luci-app-3proxy",
|
||||
"read": {
|
||||
"uci": [ "telegrambot" ]
|
||||
"file": {
|
||||
"/etc/3proxy.cfg": [ "read" ]
|
||||
},
|
||||
"uci": [ "3proxy" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "telegrambot" ]
|
||||
"file": {
|
||||
"/etc/3proxy.cfg": [ "write" ]
|
||||
},
|
||||
"uci": [ "3proxy" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
USE_PROCD=0
|
||||
|
||||
start_service() {
|
||||
local basic_list="enable log_path tcp_stun_server udp_stun_server keep_alive_url local_ip"
|
||||
|
Loading…
Reference in New Issue
Block a user