Skip to content

Commit 2c30d7c

Browse files
Merge pull request #23 from jaredhendrickson13/v110
v1.1.0 Fixes & Features
2 parents 9e1f78d + 4a25258 commit 2c30d7c

82 files changed

Lines changed: 10080 additions & 1351 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1420 additions & 280 deletions
Large diffs are not rendered by default.

docs/SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Below are versions that are currently supported and will receive security updates when available.
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| 1.1.x | :white_check_mark: |
10+
| 1.0.x | :white_check_mark: |
11+
| 0.0.x | :x: |
12+
13+
14+
## Reporting a Vulnerability
15+
16+
Should you discover a vulnerability in the pfSense-API code, please report the issue in one of the following ways:
17+
1) A pull request with code that fixes the discovered vulnerability
18+
2) A private email to either the project owner or the respective code owner
19+
3) As a last resort, you may open a public issue on the repository
20+
21+
Please note this is an independent and open-source project and no bug bounty or reward can be granted.

docs/documentation.json

Lines changed: 1981 additions & 252 deletions
Large diffs are not rendered by default.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
// Copyright 2020 Jared Hendrickson
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
require_once("api/framework/APIEndpoint.inc");
17+
18+
class APIFirewallApply extends APIEndpoint {
19+
public function __construct() {
20+
$this->url = "/api/v1/firewall/apply";
21+
}
22+
23+
protected function post() {
24+
return (new APIFirewallApplyCreate())->call();
25+
}
26+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
// Copyright 2020 Jared Hendrickson
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
require_once("api/framework/APIEndpoint.inc");
17+
18+
class APIFirewallNATOneToOne extends APIEndpoint {
19+
public function __construct() {
20+
$this->url = "/api/v1/firewall/nat/one_to_one";
21+
}
22+
23+
protected function get() {
24+
return (new APIFirewallNATOneToOneRead())->call();
25+
}
26+
27+
protected function post() {
28+
return (new APIFirewallNATOneToOneCreate())->call();
29+
}
30+
31+
protected function put() {
32+
return (new APIFirewallNATOneToOneUpdate())->call();
33+
}
34+
35+
protected function delete() {
36+
return (new APIFirewallNATOneToOneDelete())->call();
37+
}
38+
39+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
// Copyright 2020 Jared Hendrickson
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
require_once("api/framework/APIEndpoint.inc");
17+
18+
class APIFirewallNATOutbound extends APIEndpoint {
19+
public function __construct() {
20+
$this->url = "/api/v1/firewall/nat/outbound";
21+
}
22+
23+
protected function get() {
24+
return (new APIFirewallNATOutboundRead())->call();
25+
}
26+
27+
protected function put() {
28+
return (new APIFirewallNATOutboundUpdate())->call();
29+
}
30+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
// Copyright 2020 Jared Hendrickson
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
require_once("api/framework/APIEndpoint.inc");
17+
18+
class APIFirewallNATOutboundMapping extends APIEndpoint {
19+
public function __construct() {
20+
$this->url = "/api/v1/firewall/nat/outbound/mapping";
21+
}
22+
23+
protected function get() {
24+
return (new APIFirewallNATOutboundMappingRead())->call();
25+
}
26+
27+
protected function post() {
28+
return (new APIFirewallNATOutboundMappingCreate())->call();
29+
}
30+
31+
protected function put() {
32+
return (new APIFirewallNATOutboundMappingUpdate())->call();
33+
}
34+
35+
protected function delete() {
36+
return (new APIFirewallNATOutboundMappingDelete())->call();
37+
}
38+
}

pfSense-pkg-API/files/etc/inc/api/endpoints/APIFirewallNATPortForward.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class APIFirewallNATPortForward extends APIEndpoint {
2828
return (new APIFirewallNATPortForwardCreate())->call();
2929
}
3030

31+
protected function put() {
32+
return (new APIFirewallNATPortForwardUpdate())->call();
33+
}
34+
3135
protected function delete() {
3236
return (new APIFirewallNATPortForwardDelete())->call();
3337
}

pfSense-pkg-API/files/etc/inc/api/endpoints/APIInterface.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class APIInterface extends APIEndpoint {
2828
return (new APIInterfaceCreate())->call();
2929
}
3030

31+
protected function put() {
32+
return (new APIInterfaceUpdate())->call();
33+
}
34+
3135
protected function delete() {
3236
return (new APIInterfaceDelete())->call();
3337
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
// Copyright 2020 Jared Hendrickson
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
require_once("api/framework/APIEndpoint.inc");
17+
18+
class APIInterfaceApply extends APIEndpoint {
19+
public function __construct() {
20+
$this->url = "/api/v1/interface/apply";
21+
}
22+
23+
protected function post() {
24+
return (new APIInterfaceApplyCreate())->call();
25+
}
26+
}

0 commit comments

Comments
 (0)