e Data::Validate::IP qw(is_ipv4);
use Path::Tiny;
use File::XDG;
use POSIX;
use Net::OpenSSH;
use JSON::PP;
use parent 'App::ReslirpTunnel::Logger';
use App::ReslirpTunnel::Butler;
use App::ReslirpT
shell', '-Command', "Get-DnsClientServerAddress | ConvertTo-Json");
my @addrs;
eval {
for my $record (@{JSON::PP::decode_json($out)}) {
if ($record->{InterfaceAlias} eq $if
ses}};
}
}
};
unless (@addrs) {
$self->_warn("Failed to parse JSON output from DnsClientServerAddress", $@);
$self->_log(debug => "Output was", $out);
}
pp::ReslirpTunnel::RPC;
use Socket::MsgHdr;
use IO::Socket::UNIX;
use strict;
use warnings;
use JSON::PP;
use POSIX;
sub new {
my $class = shift;
my $socket = shift;
my $self = \$socket
_bytes($len);
utf8::decode($data);
# warn "Packet received: $data\n";
my $r = JSON::PP::decode_json($data);
return $r;
}
sub _read_bytes {
my ($self, $len) = @_;
my $buf = "";
y ($self, $data) = @_;
my $json = JSON::PP::encode_json($data);
# warn "sending $json\n";
utf8::encode($json);
my $bytes = pack("N", length $json) . $json;
while (length $bytes) {