mirror of https://github.com/htrgouvea/nipe.git
update coding style and starting development of dockerfile
This commit is contained in:
parent
5db7b3c183
commit
74f474af74
|
@ -0,0 +1,8 @@
|
|||
FROM perl:5.34
|
||||
|
||||
COPY . /usr/src/nipe
|
||||
WORKDIR /usr/src/nipe
|
||||
|
||||
RUN cpanm --installdeps .
|
||||
|
||||
ENTRYPOINT [ "perl", "./nipe.pl" ]
|
|
@ -33,7 +33,7 @@ All non-local UDP/ICMP traffic is also blocked by the Tor project.
|
|||
$ git clone https://github.com/htrgouvea/nipe && cd nipe
|
||||
|
||||
# Install libs and dependencies
|
||||
$ sudo cpan install Try::Tiny Config::Simple JSON
|
||||
$ cpanm --installdeps .
|
||||
|
||||
# Nipe must be run as root
|
||||
$ perl nipe.pl install
|
||||
|
|
|
@ -10,7 +10,7 @@ package Nipe::Utils::Device {
|
|||
|
||||
my %device = (
|
||||
"username" => "debian-tor",
|
||||
"distribution" => "debian"
|
||||
"distribution" => "debian"
|
||||
);
|
||||
|
||||
if (($id_like =~ /[F,f]edora/) || ($id_distro =~ /[F,f]edora/)) {
|
||||
|
|
|
@ -6,7 +6,7 @@ package Nipe::Utils::Status {
|
|||
|
||||
sub new {
|
||||
my $apiCheck = "https://check.torproject.org/api/ip";
|
||||
my $request = HTTP::Tiny -> new -> get($apiCheck);
|
||||
my $request = HTTP::Tiny -> new -> get($apiCheck);
|
||||
|
||||
if ($request -> {status} == 200) {
|
||||
my $data = decode_json ($request -> {content});
|
||||
|
|
Loading…
Reference in New Issue