Skip to content

Commit

Permalink
resolv conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Jun 7, 2024
2 parents b93c852 + 19fb85a commit 3ace364
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 11 deletions.
20 changes: 20 additions & 0 deletions .configs/opensuse-torrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DataDirectory /var/lib/tor
PidFile /var/run/tor/tor.pid
RunAsDaemon 1
User tor

ControlSocket /var/run/tor/control
ControlSocketsGroupWritable 1

CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie

Log notice file /var/log/tor/log

ClientOnly 1
TransPort 9051
DNSPort 9061

VirtualAddrNetwork 10.66.0.0/255.255.0.0
AutomapHostsOnResolve 1
17 changes: 17 additions & 0 deletions .github/workflows/fedora-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test Nipe on Fedora
on: [push]

jobs:
build:
runs-on: fedora-latest

steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo dnf install -y perl cpanminus gcc make zlib-devel
sudo cpanm --installdeps .
sudo perl nipe.pl install
- name: Verify Nipe status
run: |
sudo perl nipe.pl status
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
critic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Perl::Critic
uses: natanlao/[email protected]
with:
files: critic
files: critic
17 changes: 17 additions & 0 deletions .github/workflows/opensuse-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test Nipe on openSUSE Leap
on: [push]

jobs:
build:
runs-on: opensuse-leap-latest

steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo zypper --non-interactive install perl cpanminus gcc make zlib-devel
sudo cpanm --installdeps .
sudo perl nipe.pl install
- name: Verify Nipe status
run: |
sudo perl nipe.pl status
18 changes: 18 additions & 0 deletions .github/workflows/test-debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test Nipe on Debian
on: [push]

jobs:
build:
runs-on: debian-latest

steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y perl cpanminus gcc make zlib1g-dev
sudo cpanm --installdeps .
sudo perl nipe.pl install
- name: Verify Nipe status
run: |
sudo perl nipe.pl status
2 changes: 1 addition & 1 deletion .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt install -y perl cpanminus gcc make
sudo apt install -y perl cpanminus gcc make zlib1g-dev
sudo cpanm --installdeps .
sudo perl nipe.pl install
- name: Verify Nipe status
Expand Down
3 changes: 2 additions & 1 deletion .perlcriticrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

severity = 4

[-TestingAndDebugging::RequireUseStrict]
[-TestingAndDebugging::RequireUseWarnings]
[-TestingAndDebugging::RequireUseWarnings]
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM perl:5.38
FROM ubuntu:latest

COPY . /usr/src/nipe
WORKDIR /usr/src/nipe

RUN cpanm --installdeps .
EXPOSE 9050

RUN apt-get update && \
apt-get install -y cpanminus && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT [ "perl", "./nipe.pl" ]
RUN cpanm --installdeps .
RUN perl nipe.pl install
4 changes: 3 additions & 1 deletion cpanfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
requires "Net::SSL";
requires "IO::Socket::SSL";
requires "JSON", "4.07";
requires "Try::Tiny", "0.31";
requires "Config::Simple", "4.58";
requires "Config::Simple";
7 changes: 6 additions & 1 deletion lib/Nipe/Utils/Device.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ package Nipe::Utils::Device {
$device{distribution} = "void";
}

elsif (($id_like =~ /[S,s]use/) || ($id_distro =~ /[O,o]pen[S,s]use/)) {
$device{username} = "tor";
$device{distribution} = "opensuse";
}

return %device;
}
}

1;
1;
5 changes: 3 additions & 2 deletions lib/Nipe/Utils/Install.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ package Nipe::Utils::Install {
"fedora" => "dnf install -y tor iptables",
"centos" => "yum -y install epel-release tor iptables",
"void" => "xbps-install -y tor iptables",
"arch" => "pacman -S --noconfirm tor iptables"
"arch" => "pacman -S --noconfirm tor iptables",
"opensuse" => "zypper install -y tor iptables"
);

if ($device{distribution} eq "void") {
Expand All @@ -29,4 +30,4 @@ package Nipe::Utils::Install {
}
}

1;
1;

0 comments on commit 3ace364

Please sign in to comment.