From 9eba75de40996221a223859b17a12842f247f4c8 Mon Sep 17 00:00:00 2001 From: kladkogex <13399135+kladkogex@users.noreply.github.com> Date: Mon, 8 Aug 2022 22:17:43 +0100 Subject: [PATCH] 340 Self check firewall --- Dockerfile | 9 ++++++++- DockerfileIntelSubmission | 6 +++++- DockerfileRelease | 7 ++++++- DockerfileSimulation | 5 ++++- docker/check_firewall.py | 4 +++- 5 files changed, 26 insertions(+), 5 deletions(-) mode change 100644 => 100755 docker/check_firewall.py diff --git a/Dockerfile b/Dockerfile index 2a113f1..3b3b426 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,14 @@ FROM skalenetwork/sgxwallet_base:latest COPY . /usr/src/sdk WORKDIR /usr/src/sdk -RUN apt update && apt install -y curl secure-delete + +RUN apt update && apt install -y curl secure-delete python3-pip +RUN pip3 install --upgrade pip +RUN pip3 install requests torpy + + + + RUN touch /var/hwmode RUN ./autoconf.bash RUN ./configure diff --git a/DockerfileIntelSubmission b/DockerfileIntelSubmission index c9f5d07..33c7305 100644 --- a/DockerfileIntelSubmission +++ b/DockerfileIntelSubmission @@ -3,7 +3,11 @@ FROM skalenetwork/sgxwallet_base:latest COPY . /usr/src/sdk WORKDIR /usr/src/sdk RUN cp -f secure_enclave/secure_enclave.config.xml.release secure_enclave/secure_enclave.config.xml -RUN apt update && apt install -y curl secure-delete + +RUN apt update && apt install -y curl secure-delete python3-pip +RUN pip3 install --upgrade pip +RUN pip3 install requests torpy + #Test signing key generation RUN cd scripts && ./generate_signing_key.bash RUN touch /var/hwmode diff --git a/DockerfileRelease b/DockerfileRelease index dbdd314..e78a8df 100644 --- a/DockerfileRelease +++ b/DockerfileRelease @@ -3,7 +3,12 @@ FROM skalenetwork/sgxwallet_base:latest COPY . /usr/src/sdk WORKDIR /usr/src/sdk RUN cp -f secure_enclave/secure_enclave.config.xml.release secure_enclave/secure_enclave.config.xml -RUN apt update && apt install -y curl secure-delete + +RUN apt update && apt install -y curl secure-delete python3-pip +RUN pip3 install --upgrade pip +RUN pip3 install requests torpy + + RUN touch /var/hwmode RUN ./autoconf.bash RUN ./configure --with-sgx-build=release diff --git a/DockerfileSimulation b/DockerfileSimulation index 2c5e367..3310984 100644 --- a/DockerfileSimulation +++ b/DockerfileSimulation @@ -1,7 +1,10 @@ FROM skalenetwork/sgxwallet_base:latest -RUN apt update && apt install -y curl secure-delete +RUN apt update && apt install -y curl secure-delete python3-pip +RUN pip3 install --upgrade pip +RUN pip3 install requests torpy + RUN ccache -sz diff --git a/docker/check_firewall.py b/docker/check_firewall.py old mode 100644 new mode 100755 index 926fb69..bfaa4ef --- a/docker/check_firewall.py +++ b/docker/check_firewall.py @@ -1,4 +1,5 @@ -#! /usr/bin/python +#!/usr/bin/env python3 + import requests import re @@ -31,6 +32,7 @@ try: with TorClient() as tor: # Choose random guard node and create 3-hops circuit print("Connecting to TOR network ..."); + print("Please ignore error messages, as we are attempting to connect to the TOR network ..."); with tor.create_circuit(1) as circuit: print("Connected to TOR network. Connecting to sgxwallet from a random external IP." " This may take up to a minute.") -- 2.18.1