mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
synced pinxi to inxi
This commit is contained in:
parent
2744e4be75
commit
f835550518
24
pinxi
24
pinxi
|
@ -49,9 +49,9 @@ use POSIX qw(ceil uname strftime ttyname);
|
||||||
|
|
||||||
## INXI INFO ##
|
## INXI INFO ##
|
||||||
my $self_name='pinxi';
|
my $self_name='pinxi';
|
||||||
my $self_version='3.3.30';
|
my $self_version='3.3.31';
|
||||||
my $self_date='2023-10-23';
|
my $self_date='2023-10-31';
|
||||||
my $self_patch='09';
|
my $self_patch='01';
|
||||||
## END INXI INFO ##
|
## END INXI INFO ##
|
||||||
|
|
||||||
my ($b_pledge,@pledges);
|
my ($b_pledge,@pledges);
|
||||||
|
@ -20803,15 +20803,16 @@ sub wan_ip {
|
||||||
my ($b_dig,$b_html,$ip,$ua);
|
my ($b_dig,$b_html,$ip,$ua);
|
||||||
my $num = 0;
|
my $num = 0;
|
||||||
# time: 0.06 - 0.07 seconds
|
# time: 0.06 - 0.07 seconds
|
||||||
# cisco opendns.com may be terminating supporting this one, sometimes works, sometimes not:
|
# Cisco opendns.com may be terminating supporting this one, sometimes works, sometimes not:
|
||||||
# use -4/6 to force ipv 4 or 6, but generally we want the 'natural' native
|
# use -4/6 to force ipv 4 or 6, but generally we want the 'natural' native ip returned.
|
||||||
# ip returned.
|
# dig +short +time=1 +tries=1 myip.opendns.com @resolver1.opendns.com :: 0.021s
|
||||||
# dig +short +time=1 +tries=1 myip.opendns.com @resolver1.opendns.com
|
# Works but is slow:
|
||||||
# dig +short @ns1-1.akamaitech.net ANY whoami.akamai.net
|
# dig +short @ns1-1.akamaitech.net ANY whoami.akamai.net :: 0.156s
|
||||||
# this one can take forever, and sometimes requires explicit -4 or -6
|
# This one can take forever, and sometimes requires explicit -4 or -6
|
||||||
# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
|
# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com :: 0.026s; 1.087ss
|
||||||
if (!$force{'no-dig'} && (my $program = main::check_program('dig'))){
|
if (!$force{'no-dig'} && (my $program = main::check_program('dig'))){
|
||||||
$ip = (main::grabber("$program +short +time=1 +tries=1 \@ns1-1.akamaitech.net ANY whoami.akamai.net 2>/dev/null"))[0];
|
$ip = (main::grabber("$program +short +time=1 +tries=1 \@ns1-1.akamaitech.net ANY whoami.akamai.net 2>/dev/null"))[0];
|
||||||
|
$ip =~ s/"//g if $ip; # some return IP in quotes, when using TXT
|
||||||
$b_dig = 1;
|
$b_dig = 1;
|
||||||
}
|
}
|
||||||
if (!$ip && !$force{'no-html-wan'}){
|
if (!$ip && !$force{'no-html-wan'}){
|
||||||
|
@ -20827,8 +20828,9 @@ sub wan_ip {
|
||||||
# 0.020s: http://whatismyip.akamai.com/
|
# 0.020s: http://whatismyip.akamai.com/
|
||||||
# 0.136s: https://get.geojs.io/v1/ip
|
# 0.136s: https://get.geojs.io/v1/ip
|
||||||
# 0.024s: http://icanhazip.com/
|
# 0.024s: http://icanhazip.com/
|
||||||
|
# 0.027s: ifconfig.io
|
||||||
# 0.230s: https://smxi.org/opt/ip.php
|
# 0.230s: https://smxi.org/opt/ip.php
|
||||||
# http://whatismyip.akamai.com/ http://icanhazip.com/
|
# 0.023s: https://api.ipify.org :: NOTE: hangs, widely variable times, don't use
|
||||||
my @urls = (!$wan_url) ? qw(http://whatismyip.akamai.com/
|
my @urls = (!$wan_url) ? qw(http://whatismyip.akamai.com/
|
||||||
http://icanhazip.com/ https://smxi.org/opt/ip.php) : ($wan_url);
|
http://icanhazip.com/ https://smxi.org/opt/ip.php) : ($wan_url);
|
||||||
foreach (@urls){
|
foreach (@urls){
|
||||||
|
|
2
pinxi.1
2
pinxi.1
|
@ -15,7 +15,7 @@
|
||||||
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
.\" with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
.\"
|
.\"
|
||||||
.TH INXI 1 "2023\-09\-25" "inxi" "inxi manual"
|
.TH INXI 1 "2023\-10\-31" "inxi" "inxi manual"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
inxi \- Command line system information script for console and IRC
|
inxi \- Command line system information script for console and IRC
|
||||||
|
|
Loading…
Reference in a new issue