Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
include:
- FREEBSD_VERSION: FreeBSD-15.0-CURRENT
FREEBSD_ID: freebsd15
- FREEBSD_VERSION: FreeBSD-16.0-CURRENT
FREEBSD_ID: freebsd16

steps:
- uses: actions/checkout@v6
Expand All @@ -35,8 +37,8 @@ jobs:

- name: Build pfSense-pkg-RESTAPI on FreeBSD
run: |
/usr/bin/ssh -o StrictHostKeyChecking=no -o LogLevel=quiet ${{ matrix.FREEBSD_VERSION }}.jaredhendrickson.com 'sudo pkill ntpd || true && sudo ntpdate pool.ntp.org || true'
/usr/local/bin/python3 tools/make_package.py --host ${{ matrix.FREEBSD_VERSION }}.jaredhendrickson.com --branch ${{ env.COMMIT_ID }} --tag ${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}
/usr/bin/ssh -o StrictHostKeyChecking=no -o LogLevel=quiet ${{ matrix.FREEBSD_VERSION }}.actions.pfrest.org 'sudo pkill ntpd || true && sudo ntpdate pool.ntp.org || true'
/usr/local/bin/python3 tools/make_package.py --host ${{ matrix.FREEBSD_VERSION }}.actions.pfrest.org --branch ${{ env.COMMIT_ID }} --tag ${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}

- name: Teardown FreeBSD build VM
if: "${{ always() }}"
Expand Down Expand Up @@ -76,17 +78,17 @@ jobs:
# This is only necessary until GitHub Actions allows an easier way to get a URL to download the artifact within pfSense
- name: Copy pfSense-pkg-RESTAPI build to pfSense
run: |
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com -u admin -p pfsense -c 'pfSsh.php playback enablesshd' -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com -u admin -p pfsense -c "mkdir /root/.ssh/ && echo $(cat ~/.ssh/id_rsa.pub) > /root/.ssh/authorized_keys" -k
scp -o StrictHostKeyChecking=no pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg admin@${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com:/tmp/
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org -u admin -p pfsense -c 'pfSsh.php playback enablesshd' -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org -u admin -p pfsense -c "mkdir /root/.ssh/ && echo $(cat ~/.ssh/id_rsa.pub) > /root/.ssh/authorized_keys" -k
scp -o StrictHostKeyChecking=no pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg admin@${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org:/tmp/

- name: Install pfSense-pkg-RESTAPI on pfSense
run: |
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com "pkg -C /dev/null add /tmp/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg"
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org "pkg -C /dev/null add /tmp/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg"
sleep 5

- name: Fetch OpenAPI schema from pfSense
run: curl -s -k -u admin:pfsense -X GET https://${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com/api/v2/schema/openapi > openapi-${{ matrix.PFSENSE_VERSION }}.json
run: curl -s -k -u admin:pfsense -X GET https://${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org/api/v2/schema/openapi > openapi-${{ matrix.PFSENSE_VERSION }}.json

- name: Teardown pfSense VM
if: "${{ always() }}"
Expand Down Expand Up @@ -157,20 +159,20 @@ jobs:
# This is only necessary until GitHub Actions allows an easier way to get a URL to download the artifact within pfSense
- name: Copy pfSense-pkg-RESTAPI build to pfSense
run: |
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com -u admin -p pfsense -c 'pfSsh.php playback enablesshd' -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com -u admin -p pfsense -c "mkdir /root/.ssh/ && echo $(cat ~/.ssh/id_rsa.pub) > /root/.ssh/authorized_keys" -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com -u admin -p pfsense -c "pkill ntpd" -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com -u admin -p pfsense -c "ntpdate pool.ntp.org" -k
scp -o StrictHostKeyChecking=no pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg admin@${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com:/tmp/
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org -u admin -p pfsense -c 'pfSsh.php playback enablesshd' -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org -u admin -p pfsense -c "mkdir /root/.ssh/ && echo $(cat ~/.ssh/id_rsa.pub) > /root/.ssh/authorized_keys" -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org -u admin -p pfsense -c "pkill ntpd" -k
pfsense-vshell --host ${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org -u admin -p pfsense -c "ntpdate pool.ntp.org" -k
scp -o StrictHostKeyChecking=no pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg admin@${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org:/tmp/

- name: Install pfSense-pkg-RESTAPI on pfSense
run: |
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com "pkg -C /dev/null add /tmp/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg"
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org "pkg -C /dev/null add /tmp/pfSense-pkg-RESTAPI-${{ env.BUILD_VERSION }}-${{ matrix.FREEBSD_ID }}.pkg"
sleep 5

- name: Run pfSense-pkg-RESTAPI tests
run: |
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@${{ matrix.PFSENSE_VERSION }}.jaredhendrickson.com 'pfsense-restapi runtests'
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@${{ matrix.PFSENSE_VERSION }}.actions.pfrest.org 'pfsense-restapi runtests'

- name: Teardown pfSense VM
if: "${{ always() }}"
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
PFSENSE_VERSION: "25.07"
- FREEBSD_VERSION: FreeBSD-15.0-CURRENT
PFSENSE_VERSION: "25.07.1"
- FREEBSD_VERSION: FreeBSD-16.0-CURRENT
PFSENSE_VERSION: "25.11"

steps:
- uses: actions/checkout@v6
Expand All @@ -49,8 +51,8 @@ jobs:

- name: Build pfSense-pkg-RESTAPI on FreeBSD
run: |
/usr/bin/ssh -o StrictHostKeyChecking=no ${{ matrix.FREEBSD_VERSION }}.jaredhendrickson.com 'sudo pkill ntpd || true && sudo ntpdate pool.ntp.org || true'
/usr/local/bin/python3 tools/make_package.py --host ${{ matrix.FREEBSD_VERSION }}.jaredhendrickson.com --branch ${{ github.sha }} --tag ${{ github.ref_name }} --filename pfSense-${{ matrix.PFSENSE_VERSION }}-pkg-RESTAPI.pkg --notests
/usr/bin/ssh -o StrictHostKeyChecking=no ${{ matrix.FREEBSD_VERSION }}.actions.pfrest.org 'sudo pkill ntpd || true && sudo ntpdate pool.ntp.org || true'
/usr/local/bin/python3 tools/make_package.py --host ${{ matrix.FREEBSD_VERSION }}.actions.pfrest.org --branch ${{ github.sha }} --tag ${{ github.ref_name }} --filename pfSense-${{ matrix.PFSENSE_VERSION }}-pkg-RESTAPI.pkg --notests

- name: Teardown FreeBSD build VM
if: "${{ always() }}"
Expand Down Expand Up @@ -89,19 +91,19 @@ jobs:
# This is only necessary until GitHub Actions allows an easier way to get a URL to download the artifact within pfSense
- name: Copy pfSense-pkg-RESTAPI build to pfSense
run: |
pfsense-vshell --host pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.jaredhendrickson.com -u admin -p pfsense -c 'pfSsh.php playback enablesshd' -k
pfsense-vshell --host pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.jaredhendrickson.com -u admin -p pfsense -c "mkdir /root/.ssh/ && echo $(cat ~/.ssh/id_rsa.pub) > /root/.ssh/authorized_keys" -k
scp -o StrictHostKeyChecking=no pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-pkg-RESTAPI.pkg/pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-pkg-RESTAPI.pkg admin@pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.jaredhendrickson.com:/tmp/
pfsense-vshell --host pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.actions.pfrest.org -u admin -p pfsense -c 'pfSsh.php playback enablesshd' -k
pfsense-vshell --host pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.actions.pfrest.org -u admin -p pfsense -c "mkdir /root/.ssh/ && echo $(cat ~/.ssh/id_rsa.pub) > /root/.ssh/authorized_keys" -k
scp -o StrictHostKeyChecking=no pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-pkg-RESTAPI.pkg/pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-pkg-RESTAPI.pkg admin@pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.actions.pfrest.org:/tmp/

- name: Install pfSense-pkg-RESTAPI on pfSense
run: |
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.jaredhendrickson.com "pkg -C /dev/null add /tmp/pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-pkg-RESTAPI.pkg"
ssh -o StrictHostKeyChecking=no -o LogLevel=quiet admin@pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.actions.pfrest.org "pkg -C /dev/null add /tmp/pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-pkg-RESTAPI.pkg"
sleep 5

- name: Fetch schemas from pfSense
run: |
curl -s -k -u admin:pfsense -X GET https://pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.jaredhendrickson.com/api/v2/schema/openapi > openapi.json
curl -s -k -u admin:pfsense -X GET https://pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.jaredhendrickson.com/api/v2/schema/graphql > schema.graphql
curl -s -k -u admin:pfsense -X GET https://pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.actions.pfrest.org/api/v2/schema/openapi > openapi.json
curl -s -k -u admin:pfsense -X GET https://pfSense-${{ env.DEFAULT_PFSENSE_VERSION }}-RELEASE.actions.pfrest.org/api/v2/schema/graphql > schema.graphql

- name: Teardown pfSense VM
if: "${{ always() }}"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pkg-static add https://github.com/jaredhendrickson13/pfsense-api/releases/latest
Install on pfSense Plus:

```bash
pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-25.07.1-pkg-RESTAPI.pkg
pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-25.11-pkg-RESTAPI.pkg
```

> [!WARNING]
Expand Down
5 changes: 3 additions & 2 deletions docs/INSTALL_AND_CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ run pfSense. It's recommended to follow Netgate's [minimum hardware requirements
- pfSense Plus 24.11
- pfSense Plus 25.07
- pfSense Plus 25.07.1
- pfSense Plus 25.11

!!! Warning
Installation of the package on unsupported versions of pfSense may result in unexpected behavior and/or system instability.
Expand All @@ -35,13 +36,13 @@ The pfSense REST API package is built just like any other pfSense package and ca
**Install on pfSense CE**

```bash
pkg-static add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-2.8.0-pkg-RESTAPI.pkg
pkg-static add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-2.8.1-pkg-RESTAPI.pkg
```

**Install on pfSense Plus**

```bash
pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-24.11-pkg-RESTAPI.pkg
pkg-static -C /dev/null add https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-25.11-pkg-RESTAPI.pkg
```

!!! Important
Expand Down