Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Dynamic DNS feature (#79)
Browse files Browse the repository at this point in the history
* Create RealInterfaceField.php

Add a modified version of the Base InterfaceField, that reads the descriptive names and displays them in the GUI, but saves the physical interface names into the configuration.

* Update Caddy.xml

Expand the model to allow the DynDns functionality of Caddy.

* Update general.xml

Add fields for Dynamic DNS.

* Update dialogReverseProxy.xml

Add DynDNS Checkbox

* Update dialogSubdomain.xml

Added DynDNS Field

* Update reverse_proxy.volt

Added Dynamic DNS Fields to Bootgrids

* Update ReverseProxyController.php

Add DynDns to searchAction

* Update Caddyfile

Template Logic for Dynamic DNS added.

The Dynamic DNS field will only appear if the following conditions are met:
- DNS Provider isn't none
- Api Key isn't empty
- At least one domain or subdomain has the DynDns Checkbox checked.

* Update README.md

Build Instructions for xcaddy added.

* Build new caddy binary to include dynamic-dns, and dns.providers desec and porkbun.

* Build os-caddy-1.4.0. Logging refactored to syslog-ng, HTTP Access Logs can be enabled, Dynamic DNS feature added, new DNS Provider added.

* Update README.md
  • Loading branch information
Monviech authored Jan 12, 2024
1 parent e81bb57 commit b9d2407
Show file tree
Hide file tree
Showing 28 changed files with 349 additions and 476 deletions.
64 changes: 37 additions & 27 deletions README.md

Large diffs are not rendered by default.

Binary file not shown.
Binary file modified os-caddy-plugin/FreeBSD:13:amd64/meta.pkg
Binary file not shown.
Binary file removed os-caddy-plugin/FreeBSD:13:amd64/os-caddy-1.3.4.pkg
Binary file not shown.
Binary file not shown.
Binary file modified os-caddy-plugin/FreeBSD:13:amd64/packagesite.pkg
Binary file not shown.
12 changes: 6 additions & 6 deletions usr/local/bin/+MANIFEST
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "caddy",
"version": "2.7.6_1",
"version": "2.7.6_2",
"comment": "Caddy web server",
"desc": "Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go",
"www": "https://caddyserver.com",
Expand All @@ -13,19 +13,19 @@
"licenses": ["APACHE20"],
"files": {
"/usr/local/bin/caddy": {
"checksum": "b519a6b2e868e901df11165efe68507d1f7a3ac65d313fad08bc8b04e880452b",
"checksum": "68973bbae59c3ba8d5210168c01fce661f36645699fd722d90032177a83d1d1a",
"username": "root",
"groupname": "wheel",
"perm": "0555"
},
"/usr/local/share/licenses/caddy-2.7.6_1/APACHE20": {
"/usr/local/share/licenses/caddy-2.7.6_2/APACHE20": {
"checksum": "c07795dc0d0e17cc4b23566ddc05a508f14e8ce98bb7404963250039a2c1a811"
},
"/usr/local/share/licenses/caddy-2.7.6_1/LICENSE": {
"/usr/local/share/licenses/caddy-2.7.6_2/LICENSE": {
"checksum": "2dca659dc8846be25ab729554fe067dba90ca252314b73f6c6dbaa95bbb72d4e"
},
"/usr/local/share/licenses/caddy-2.7.6_1/catalog.mk": {
"checksum": "ac8d5ed9476d21a9ed59cbfbb52393d0d2d2bab42f29811f9410fc86e305cb05"
"/usr/local/share/licenses/caddy-2.7.6_2/catalog.mk": {
"checksum": "be81e84c82648a4cf381bb95eace48843870fca4297773c1e71ffa50196b04ea"
}
}
}
45 changes: 33 additions & 12 deletions usr/local/bin/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
# How to build the caddy binary with xcaddy for OPNsense:

- Install a ```FreeBSD 13.2-RELEASE AMD64``` build system
- Install go
- ```curl -L "https://go.dev/dl/go1.21.6.freebsd-amd64.tar.gz" -o go1.21.6.freebsd-amd64.tar.gz```
- ```rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.freebsd-amd64.tar.gz```
- Register go and xcaddy in ```cshrc``` shell
- ```vi ~/.cshrc```
```
setenv PATH "${PATH}:/usr/local/go/bin"
setenv PATH "${PATH}:${HOME}/go/bin"
```
- Try out if go is available:
```go version```
- Install xcaddy:
```go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest```
- ```cd ~/go/pkg/mod```
- Use ```xcaddy build``` as specified below:

# Current Build

v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=
```v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=```
```
xcaddy build --with github.com/caddyserver/ntlm-transport --with github.com/mholt/caddy-dynamicdns --with github.com/caddy-dns/cloudflare --with github.com/caddy-dns/duckdns --with github.com/caddy-dns/digitalocean --with github.com/caddy-dns/dnspod --with github.com/caddy-dns/hetzner --with github.com/caddy-dns/godaddy --with github.com/caddy-dns/gandi --with github.com/caddy-dns/vultr --with github.com/caddy-dns/ionos --with github.com/caddy-dns/desec --with github.com/caddy-dns/porkbun
```

### Build Errors:

If you have build errors, go into the specified files and try to fix them, for example right now there can be a few ```int``` and ```uint``` errors. They're easy to fix, just change int to uint at the right spot.

### Test the build:

dns.providers.cloudflare
dns.providers.digitalocean
dns.providers.dnspod
dns.providers.duckdns
dns.providers.gandi
dns.providers.godaddy
dns.providers.hetzner
dns.providers.ionos
dns.providers.vultr
http.reverse_proxy.transport.http_ntlm
- ```chmod +x ./caddy```
- ```./caddy version```
- ```./caddy list-modules```

curl -L "https://caddyserver.com/api/download?os=freebsd&arch=amd64&p=github.com%2Fcaddy-dns%2Fcloudflare&p=github.com%2Fcaddy-dns%2Fduckdns&p=github.com%2Fcaddyserver%2Fntlm-transport&p=github.com%2Fcaddy-dns%2Fdigitalocean&p=github.com%2Fcaddy-dns%2Fdnspod&p=github.com%2Fcaddy-dns%2Fhetzner&p=github.com%2Fcaddy-dns%2Fgodaddy&p=github.com%2Fcaddy-dns%2Fgandi&p=github.com%2Fcaddy-dns%2Fvultr&p=github.com%2Fcaddy-dns%2Fionos&idempotency=95822663652784" -o caddy
If that works, then caddy is compiled successfully. If not, and theres a panic, then the compilation went wrong, probably due to a faulty module, or a duplicate module.
Binary file modified usr/local/bin/caddy
Binary file not shown.
Binary file not shown.
6 changes: 0 additions & 6 deletions usr/local/share/licenses/caddy-2.7.5/catalog.mk

This file was deleted.

203 changes: 0 additions & 203 deletions usr/local/share/licenses/caddy-2.7.6/APACHE20

This file was deleted.

1 change: 0 additions & 1 deletion usr/local/share/licenses/caddy-2.7.6/LICENSE

This file was deleted.

Loading

0 comments on commit b9d2407

Please sign in to comment.