Загрузка данных
n.razhev@n-razhev ~ % >....
$1 == "0.0.0.0/1" || $1 == "128.0.0.0/1"
'
for tb_name in my.vk.team www.apple.com; do
echo "Corporate DNS, UDP: $tb_name"
dig @172.21.0.1 "$tb_name" A \
+time=4 +tries=1 +notcp +ignore +noall +comments +answer
echo "Corporate DNS, TCP: $tb_name"
dig +tcp @172.21.0.1 "$tb_name" A \
+time=4 +tries=1 +noall +comments +answer
done
/usr/bin/perl <<'TB_PAC'
use strict;
use warnings;
$| = 1;
my $settings = qx{/usr/sbin/scutil --proxy};
my ($url) = $settings =~ /^\s*ProxyAutoConfigURLString\s*:\s*(\S+)\s*$/m;
unless (defined $url && $url =~ m{\A(https?)://([^/?#]+)}i) {
print "No HTTP(S) PAC URL found; no fetch performed.\n";
exit;
}
my ($scheme, $authority) = ($1, $2);
$authority =~ s/.*\@//;
unless ($authority =~ /\A(?:[A-Za-z0-9._-]+|\[[A-Fa-f0-9:.]+\])(?::[0-9]+)?\z/ &&
$url !~ /[\x00-\x20\x7f]/) {
print "PAC URL format not handled; no fetch performed.\n";
exit;
}
print "PAC origin: $scheme://$authority (path/query omitted)\n";
$url =~ s/([\\"])/\\$1/g;
open(my $curl, '|-', '/usr/bin/curl', '-q', '--noproxy', '*',
'--connect-timeout', '5', '--max-time', '8',
'--max-filesize', '1048576', '--silent',
'--output', '/dev/null', '--config', '-',
'--write-out',
'PAC ip=%{remote_ip} http=%{http_code} bytes=%{size_download} dns=%{time_namelookup} tcp=%{time_connect} total=%{time_total}\n')
or die "Could not start PAC probe.\n";
print {$curl} "url = \"$url\"\n";
close($curl);
printf "PAC curl_exit=%d\n", $? >> 8;
TB_PAC
echo 'Corporate connection afterward:'
netstat -an -p tcp |
awk '/194[.]186[.]63[.]/ && /ESTABLISHED/ {print}'
TB_CHECK
Tue Oct 6 13:57:56 UTC 2026
Default and broad IPv4 routes:
Routing tables
Internet:
Destination Gateway Flags Netif Expire
0/1 172.21.0.1 UGScg utun10
default 192.168.77.1 UGScg bridge0
default 172.21.0.1 UGScIg utun10
128.0/1 172.21.0.1 UGSc utun10
Corporate DNS, UDP: my.vk.team
; <<>> DiG 9.10.6 <<>> @172.21.0.1 my.vk.team A +time=4 +tries=1 +notcp +ignore +noall +comments +answer
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13399
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 5
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; ANSWER SECTION:
my.vk.team. 30 IN A 10.102.225.77
Corporate DNS, TCP: my.vk.team
; <<>> DiG 9.10.6 <<>> +tcp @172.21.0.1 my.vk.team A +time=4 +tries=1 +noall +comments +answer
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
;; Connection to 172.21.0.1#53(172.21.0.1) for my.vk.team failed: timed out.
Corporate DNS, UDP: www.apple.com
; <<>> DiG 9.10.6 <<>> @172.21.0.1 www.apple.com A +time=4 +tries=1 +notcp +ignore +noall +comments +answer
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
Corporate DNS, TCP: www.apple.com
; <<>> DiG 9.10.6 <<>> +tcp @172.21.0.1 www.apple.com A +time=4 +tries=1 +noall +comments +answer
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48946
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 8, ADDITIONAL: 10
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; ANSWER SECTION:
www.apple.com. 81 IN CNAME www-apple-com.v.aaplimg.com.
www-apple-com.v.aaplimg.com. 81 IN CNAME www.apple.com.edgekey.net.
www.apple.com.edgekey.net. 81 IN CNAME e6858.dsce9.akamaiedge.net.
e6858.dsce9.akamaiedge.net. 11 IN A 23.12.156.37
PAC origin: http://jbproxy.vk.team (path/query omitted)
PAC ip= http=000 bytes=0 dns=0.003105 tcp=0.000000 total=5.006269
PAC curl_exit=28
Corporate connection afterward:
tcp4 0 74136 192.168.77.2.49608 194.186.63.21.443 ESTABLISHED
n.razhev@n-razhev ~ %