Skip to content

Commit 20a242b

Browse files
committed
config: rename porkbun to porkbun-v3
1 parent 27cf00b commit 20a242b

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

docs/config.toml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,39 @@
3838
version = 6
3939
method = "interface"
4040

41-
# For the "interface" service, the available configuration options are:
41+
# For the "interface" method, the available configuration options are:
4242
# - iface: the IP address of this interface will be used.
4343
# - matches: only use this IP address if it matches the netmask.
4444
# Defaults to "::/0" or "0/0".
45-
# Note that non-CIDR notation can also be used: "::/::ffff"
46-
# matches all IPv6 addresses ending with 0000.
45+
# Note that non-CIDR notation can also be used: "::abcd/::ffff"
46+
# matches all IPv6 addresses ending with "abcd".
4747
iface = "wlan0"
4848
matches = "2000::/3"
4949

5050
[ip.name2]
5151
version = 4
5252
method = "exec"
5353

54-
# For the "exec" service, the available configuration options are:
54+
# For the "exec" method, the available configuration options are:
5555
# - command: the command which will be executed. The stdout is expected
56-
# to be an IP address.
56+
# to be an IP address. Normally `/bin/bash` is used, see
57+
# "shell" in the [general] section.
5758
command = "natpmpc | grep 'Public IP' | cut -d ' ' -f5"
5859

5960
[ip.name3]
6061
version = 6
6162
method = "http"
6263

63-
# For the "http" service, the available configuration options are:
64+
# For the "http" method, the available configuration options are:
6465
# - url: connect to this URL and send a HTTP GET request to obtain the
6566
# external IP address.
6667
# - regex: run this regular expression on the HTTP response, the first
6768
# capture group will be the IP address.
6869
# (NOTE: only available when compiled with the feature "regex")
70+
#
71+
# If you are using this method, make sure your update rate is long enough
72+
# so that you are not banned by the HTTP service you are using (10 to
73+
# 30 minutes is recommended).
6974
url = "https://api6.ipify.org/"
7075
regex = "(.*)"
7176

@@ -84,13 +89,21 @@
8489
# IP addresses are allowed in those two options, if the first IP address is
8590
# unusable (an error flag is set) then the next one will be attempted.
8691
#
92+
# In the case of dual-stacking (IPv4+IPv6), the first usable IPv4 address and
93+
# the first usable IPv6 address will be used to update the record.
94+
#
8795
# NOTE that some services require you to pre-create DNS records on their own
8896
# website, notably Porkbun (the edit operation will succeed, but no actual
8997
# changes are made). Best to create your A and/or AAAA records before starting
9098
# the daemon.
9199
#
92-
# The configuration options will be provided below.
93-
#
100+
# The configuration options are:
101+
# - service: the DDNS provider to use.
102+
# - ip: a list of IPs which are possibly used to update the domains.
103+
# - domains: a list of domains that is updated using the set of IPs in `ip`.
104+
#
105+
# The other options are provider-dependent, see below.
106+
#
94107
[ddns."cloudflare-example"]
95108
service = "cloudflare-v4"
96109
ip = ["name1", "name2", "name3"]
@@ -142,8 +155,10 @@
142155
domains = "example.com"
143156

144157
[ddns."porkbun-example"]
145-
service = "porkbun"
158+
service = "porkbun-v3"
146159
ip = ["name1", "name2"]
160+
161+
# Remember to enable API access on your domain.
147162
secret_api_key = "sk1_key"
148163
api_key = "pk1_key"
149164
domains = ["example.com"]
@@ -158,4 +173,7 @@
158173
[ddns."hello, this is a dummy!"]
159174
service = "dummy"
160175
ip = ["name1", "name2"]
176+
177+
# This service is for debugging uses. Use it if you want to confirm that
178+
# the proper IP addresses are being used to update your domains.
161179
domains = "example.dummy"

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub enum DdnsConfigService {
6464
Duckdns(services::duckdns::Config),
6565
Dynu(services::dynu::Config),
6666
Ipv64(services::dynu::Config),
67-
Porkbun(services::porkbun::Config),
67+
PorkbunV3(services::porkbun::Config),
6868
Selfhost(services::dynu::Config),
6969
NoIp(services::noip::Config),
7070
Dummy(services::dummy::Config),

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn main() {
134134

135135
DdnsConfigService::Ipv64(ip) => Box::new(ipv64::Service::from(ip.clone())),
136136

137-
DdnsConfigService::Porkbun(pb) => Box::new(porkbun::Service::from(pb.clone())),
137+
DdnsConfigService::PorkbunV3(pb) => Box::new(porkbun::Service::from(pb.clone())),
138138

139139
DdnsConfigService::Selfhost(sh) => Box::new(selfhost::Service::from(sh.clone())),
140140

0 commit comments

Comments
 (0)