summaryrefslogtreecommitdiffstats
path: root/tcpproxy-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-08-20 19:02:16 +0000
committerTed Trask <ttrask01@yahoo.com>2008-08-20 19:02:16 +0000
commit8730ef0997957b46d392b981913d8934373e980a (patch)
treeb9cd2e28088756e1441e76790242a5890c14b945 /tcpproxy-controller.lua
parent4f7c42c67f5e22295d178b924861f150c35132c0 (diff)
downloadacf-tcpproxy-8730ef0997957b46d392b981913d8934373e980a.tar.bz2
acf-tcpproxy-8730ef0997957b46d392b981913d8934373e980a.tar.xz
Modified tcpproxy to add in SMTP proxy support. Entries are directly edited, this still has to be improved.
git-svn-id: svn://svn.alpinelinux.org/acf/tcpproxy/trunk@1388 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tcpproxy-controller.lua')
-rw-r--r--tcpproxy-controller.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/tcpproxy-controller.lua b/tcpproxy-controller.lua
index 45044e0..802f1de 100644
--- a/tcpproxy-controller.lua
+++ b/tcpproxy-controller.lua
@@ -16,3 +16,35 @@ end
function expert(self)
return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config", "Configuration Saved")
end
+
+function smtpstatus(self)
+ return self.model.getsmtpstatus()
+end
+
+function listsmtpentries(self)
+ return self.model.listsmtpentries(self)
+end
+
+function editsmtpentry(self)
+ return controllerfunctions.handle_form(self, function() return self.model.readsmtpentry(self.clientdata.ipaddr) end, self.model.updatesmtpentry, self.clientdata, "Save", "Edit SMTP Proxy Entry", "SMTP Proxy Entry Saved" )
+end
+
+function delsmtpentry(self)
+ return self:redirect_to_referrer(self.model.delsmtpentry(self.clientdata.ipaddr))
+end
+
+function listsmtpfiles(self)
+ return self.model.listsmtpfiles(self)
+end
+
+function createsmtpfile(self)
+ return controllerfunctions.handle_form(self, self.model.getnewsmtpfile, self.model.createsmtpfile, self.clientdata, "Create", "Create New SMTP Proxy File", "SMTP Proxy File Created")
+end
+
+function editsmtpfile(self)
+ return controllerfunctions.handle_form(self, function() return self.model.readsmtpfile(self.clientdata.filename) end, self.model.updatesmtpfile, self.clientdata, "Save", "Edit SMTP Proxy File", "SMTP Proxy File Saved" )
+end
+
+function delsmtpfile(self)
+ return self:redirect_to_referrer(self.model.delsmtpfile(self.clientdata.filename))
+end