Skip to content

Commit

Permalink
Merge pull request #23 from jaredhendrickson13/v110
Browse files Browse the repository at this point in the history
v1.1.0 Fixes & Features
  • Loading branch information
jaredhendrickson13 authored Dec 9, 2020
2 parents 9e1f78d + 4a25258 commit 2c30d7c
Show file tree
Hide file tree
Showing 82 changed files with 10,080 additions and 1,351 deletions.
1,700 changes: 1,420 additions & 280 deletions README.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions docs/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Below are versions that are currently supported and will receive security updates when available.

| Version | Supported |
| ------- | ------------------ |
| 1.1.x | :white_check_mark: |
| 1.0.x | :white_check_mark: |
| 0.0.x | :x: |


## Reporting a Vulnerability

Should you discover a vulnerability in the pfSense-API code, please report the issue in one of the following ways:
1) A pull request with code that fixes the discovered vulnerability
2) A private email to either the project owner or the respective code owner
3) As a last resort, you may open a public issue on the repository

Please note this is an independent and open-source project and no bug bounty or reward can be granted.
2,233 changes: 1,981 additions & 252 deletions docs/documentation.json

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIFirewallApply.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIFirewallApply extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/firewall/apply";
}

protected function post() {
return (new APIFirewallApplyCreate())->call();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIFirewallNATOneToOne extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/firewall/nat/one_to_one";
}

protected function get() {
return (new APIFirewallNATOneToOneRead())->call();
}

protected function post() {
return (new APIFirewallNATOneToOneCreate())->call();
}

protected function put() {
return (new APIFirewallNATOneToOneUpdate())->call();
}

protected function delete() {
return (new APIFirewallNATOneToOneDelete())->call();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIFirewallNATOutbound extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/firewall/nat/outbound";
}

protected function get() {
return (new APIFirewallNATOutboundRead())->call();
}

protected function put() {
return (new APIFirewallNATOutboundUpdate())->call();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIFirewallNATOutboundMapping extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/firewall/nat/outbound/mapping";
}

protected function get() {
return (new APIFirewallNATOutboundMappingRead())->call();
}

protected function post() {
return (new APIFirewallNATOutboundMappingCreate())->call();
}

protected function put() {
return (new APIFirewallNATOutboundMappingUpdate())->call();
}

protected function delete() {
return (new APIFirewallNATOutboundMappingDelete())->call();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class APIFirewallNATPortForward extends APIEndpoint {
return (new APIFirewallNATPortForwardCreate())->call();
}

protected function put() {
return (new APIFirewallNATPortForwardUpdate())->call();
}

protected function delete() {
return (new APIFirewallNATPortForwardDelete())->call();
}
Expand Down
4 changes: 4 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIInterface.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class APIInterface extends APIEndpoint {
return (new APIInterfaceCreate())->call();
}

protected function put() {
return (new APIInterfaceUpdate())->call();
}

protected function delete() {
return (new APIInterfaceDelete())->call();
}
Expand Down
26 changes: 26 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIInterfaceApply.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIInterfaceApply extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/interface/apply";
}

protected function post() {
return (new APIInterfaceApplyCreate())->call();
}
}
26 changes: 26 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIRoutingApply.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIRoutingApply extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/routing/apply";
}

protected function post() {
return (new APIRoutingApplyCreate())->call();
}
}
12 changes: 12 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIRoutingGateway.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,16 @@ class APIRoutingGateway extends APIEndpoint {
protected function get() {
return (new APIRoutingGatewayRead())->call();
}

protected function post() {
return (new APIRoutingGatewayCreate())->call();
}

protected function put() {
return (new APIRoutingGatewayUpdate())->call();
}

protected function delete() {
return (new APIRoutingGatewayDelete())->call();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

require_once("api/framework/APIEndpoint.inc");

class APIFirewallNAT extends APIEndpoint {
class APIServicesDDNS extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/firewall/nat";
$this->url = "/api/v1/services/ddns";
}

protected function get() {
return (new APIFirewallNATRead())->call();
return (new APIServicesDDNSRead())->call();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIServicesDHCPdLease extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/services/dhcpd/lease";
}

protected function get() {
return (new APIServicesDHCPdLeaseRead())->call();
}
}
26 changes: 26 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIStatusGateway.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIStatusGateway extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/status/gateway";
}

protected function get() {
return (new APIStatusGatewayRead())->call();
}
}
26 changes: 26 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIStatusInterface.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIStatusInterface extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/status/interface";
}

protected function get() {
return (new APIStatusInterfaceRead())->call();
}
}
26 changes: 26 additions & 0 deletions pfSense-pkg-API/files/etc/inc/api/endpoints/APIStatusSystem.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
// Copyright 2020 Jared Hendrickson
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require_once("api/framework/APIEndpoint.inc");

class APIStatusSystem extends APIEndpoint {
public function __construct() {
$this->url = "/api/v1/status/system";
}

protected function get() {
return (new APIStatusSystemRead())->call();
}
}
Loading

0 comments on commit 2c30d7c

Please sign in to comment.