Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
a928f18a
Commit
a928f18a
authored
Mar 01, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(proxy) add "download only" action for acl's
parent
a03cc14f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
ServiceController.php
.../app/controllers/OPNsense/Proxy/Api/ServiceController.php
+20
-1
actions_proxy.conf
src/opnsense/service/conf/actions.d/actions_proxy.conf
+7
-0
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Proxy/Api/ServiceController.php
View file @
a928f18a
...
...
@@ -151,7 +151,7 @@ class ServiceController extends ApiControllerBase
/**
* fetch acls
* fetch acls
(download + install)
* @return array
*/
public
function
fetchaclsAction
()
...
...
@@ -168,4 +168,23 @@ class ServiceController extends ApiControllerBase
return
array
(
"response"
=>
array
());
}
}
/**
* download (only) acls
* @return array
*/
public
function
downloadaclsAction
()
{
if
(
$this
->
request
->
isPost
())
{
$backend
=
new
Backend
();
// generate template
$backend
->
configdRun
(
"template reload OPNsense.Proxy"
);
// download files
$response
=
$backend
->
configdRun
(
"proxy downloadacls"
);
return
array
(
"response"
=>
$response
,
"status"
=>
"ok"
);
}
else
{
return
array
(
"response"
=>
array
());
}
}
}
src/opnsense/service/conf/actions.d/actions_proxy.conf
View file @
a928f18a
...
...
@@ -34,3 +34,10 @@ parameters:
type
:
script
message
:
Fetch
ACLs
from
remote
locations
description
:
Fetch
external
Proxy
(
squid
)
ACLs
[
downloadacls
]
command
:/
usr
/
local
/
opnsense
/
scripts
/
proxy
/
fetchACLs
.
py
parameters
:
type
:
script
message
:
Download
ACLs
from
remote
locations
description
:
Download
external
Proxy
(
squid
)
ACLs
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment