Merge pull request #712 from rhansen/geturl

Delete `--geturl` command-line argument and `geturl` option
This commit is contained in:
Richard Hansen 2024-07-19 18:10:19 -04:00 committed by GitHub
commit e142d6a5ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 43 deletions

View file

@ -41,6 +41,8 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
* `dyndns2`: The obsolete `static` and `custom` options have been removed.
Setting the options may produce a warning.
[#709](https://github.com/ddclient/ddclient/pull/709)
* The diagnostic `--geturl` command-line argument was removed.
[#TODO](https://github.com/ddclient/ddclient/pull/TODO)
### New features

View file

@ -168,41 +168,56 @@ This issue arises when using the `use` parameter in the config and using one of
## TROUBLESHOOTING
1. enable debugging and verbose messages: ``$ ddclient --daemon=0 --debug --verbose --noquiet``
* Enable debugging and verbose messages: `ddclient --daemon=0 --debug --verbose`
2. Do you need to specify a proxy?
If so, just add a ``proxy=your.isp.proxy`` to the ddclient.conf file.
* Do you need to specify a proxy?
If so, just add a `proxy=your.isp.proxy` to the `ddclient.conf` file.
3. Define the IP address of your router with ``fw=xxx.xxx.xxx.xxx`` in
``/etc/ddclient/ddclient.conf`` and then try ``$ ddclient --daemon=0 --query`` to see if the router status web page can be understood.
* Define the IP address of your router with `fwv4=xxx.xxx.xxx.xxx` in
`/etc/ddclient/ddclient.conf` and then try `$ ddclient --daemon=0 --query`
to see if the router status web page can be understood.
4. Need support for another router/firewall?
Define the router status page yourself with: ``fw=url-to-your-router``'s-status-page ``fw-skip=any-string-preceding-your-IP-address``
* Need support for another router/firewall?
Define the router yourself with:
ddclient does something like this to provide builtin support for
common routers.
For example, the Linksys routers could have been added with:
```
usev4=fwv4
fwv4=url-to-your-router-status-page
fwv4-skip="regular expression matching any string preceding your IP address, if necessary"
```
fw=192.168.1.1/Status.htm
fw-skip=WAN.*?IP Address
ddclient does something like this to provide builtin support for common
routers.
For example, the Linksys routers could have been added with:
OR
Send me the output from:
``$ ddclient --geturl {fw-ip-status-url} [--login login [--password password]]``
and I'll add it to the next release!
```
usev4=fwv4
fwv4=192.168.1.1/Status.htm
fwv4-skip=WAN.*?IP Address
```
ie. for my fw/router I used: ``$ ddclient --geturl 192.168.1.254/status.htm``
OR [create a new issue](https://github.com/ddclient/ddclient/issues/new)
containing the output from:
5. Some broadband routers require the use of a password when ddclient
accesses its status page to determine the router's WAN IP address.
If this is the case for your router, add
```
curl --include --location http://url.of.your.firewall/ip-status-page
```
so that we can add a new firewall definition to a future release of
ddclient.
* Some broadband routers require the use of a password when ddclient accesses
its status page to determine the router's WAN IP address.
If this is the case for your router, add
```
fw-login=your-router-login
fw-password=your-router-password
```
to the beginning of your ddclient.conf file.
Note that some routers use either 'root' or 'admin' as their login
while some others accept anything.
to the beginning of your ddclient.conf file.
Note that some routers use either 'root' or 'admin' as their login while
some others accept anything.
## USING DDCLIENT WITH `ppp`

View file

@ -618,7 +618,6 @@ our %variables = (
'quiet' => setv(T_BOOL, 0, 0, 0, undef),
'help' => setv(T_BOOL, 0, 0, 0, undef),
'test' => setv(T_BOOL, 0, 0, 0, undef),
'geturl' => setv(T_STRING,0, 0, undef, undef),
'postscript' => setv(T_POSTS, 0, 0, undef, undef),
'ssl_ca_dir' => setv(T_FILE, 0, 0, undef, undef),
@ -1303,7 +1302,6 @@ my @opt = (
["fw-banlocal", "!", ""], ## deprecated
["if-skip", "=s", ""], ## deprecated
["test", "!", ""], ## hidden
["geturl", "=s", ""], ## hidden
["redirect", "=i", "--redirect=<max> : enable and follow at most <max> HTTP 30x redirections"],
"",
nic_examples(),
@ -1315,9 +1313,6 @@ sub main {
$saved_recap = '';
%saved_opt = %opt;
$result = 'OK';
test_geturl(opt('geturl')) if opt('geturl');
if (opt('help')) {
printf "%s\n", $opt_usage;
$opt{'version'}('', '');
@ -2272,22 +2267,7 @@ sub test_possible_ip {
exit 0 unless opt('debug');
}
######################################################################
## test_geturl - print (and save if -test) result of fetching a URL
######################################################################
sub test_geturl {
my $url = shift;
my $reply = geturl(
proxy => opt('proxy'),
url => $url,
login => opt('login'),
password => opt('password'),
);
print "URL $url\n";
print $reply // "<undefined>\n";
exit;
}
######################################################################
## load_file
######################################################################