init
Browse files- Dockerfile +21 -0
- id_ed25519.pub +1 -0
- templates/index.html +3 -4
Dockerfile
CHANGED
|
@@ -3,6 +3,8 @@ FROM python:3.9
|
|
| 3 |
# Install dependencies and Node.js
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
curl \
|
|
|
|
|
|
|
| 6 |
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
| 7 |
&& apt-get install -y nodejs \
|
| 8 |
&& apt-get clean \
|
|
@@ -10,6 +12,13 @@ RUN apt-get update && apt-get install -y \
|
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Install Node.js dependencies
|
| 14 |
COPY package.json /app/package.json
|
| 15 |
RUN npm install
|
|
@@ -22,6 +31,18 @@ COPY static /app/static
|
|
| 22 |
# Run the Tailwind CSS build script
|
| 23 |
RUN npm run publish
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Create a user and set up the environment
|
| 26 |
RUN useradd -m -u 1000 user
|
| 27 |
USER user
|
|
|
|
| 3 |
# Install dependencies and Node.js
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
curl \
|
| 6 |
+
git \
|
| 7 |
+
ssh \
|
| 8 |
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
| 9 |
&& apt-get install -y nodejs \
|
| 10 |
&& apt-get clean \
|
|
|
|
| 12 |
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
+
# Copy SSH keys (ensure that these files are available at build time)
|
| 16 |
+
COPY id_ed25519.pub /root/.ssh/id_rsa
|
| 17 |
+
RUN chmod 600 /root/.ssh/id_rsa
|
| 18 |
+
|
| 19 |
+
# Configure SSH to recognize the host
|
| 20 |
+
RUN mkdir -p /root/.ssh && ssh-keyscan hf.co >> /root/.ssh/known_hosts
|
| 21 |
+
|
| 22 |
# Install Node.js dependencies
|
| 23 |
COPY package.json /app/package.json
|
| 24 |
RUN npm install
|
|
|
|
| 31 |
# Run the Tailwind CSS build script
|
| 32 |
RUN npm run publish
|
| 33 |
|
| 34 |
+
# Git configuration
|
| 35 |
+
RUN git config --global user.name "nexus3rd"
|
| 36 |
+
RUN git config --global user.email "problemsolved1990@proton.me"
|
| 37 |
+
|
| 38 |
+
# Clone the repository and push changes
|
| 39 |
+
RUN git clone git@hf.co:spaces/nexus4rd/ngrok /app/repo \
|
| 40 |
+
&& cp /app/static/css/output.css /app/repo/static/css/output.css \
|
| 41 |
+
&& cd /app/repo \
|
| 42 |
+
&& git add static/css/output.css \
|
| 43 |
+
&& git commit -m "output.css" \
|
| 44 |
+
&& git push
|
| 45 |
+
|
| 46 |
# Create a user and set up the environment
|
| 47 |
RUN useradd -m -u 1000 user
|
| 48 |
USER user
|
id_ed25519.pub
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAQSLBCTFUVjAvC6YUmxy56J99azkGFhINh14dpM85J9 problemsolved1990@proton.me
|
templates/index.html
CHANGED
|
@@ -9,15 +9,14 @@
|
|
| 9 |
<body class="bg-gray-100">
|
| 10 |
<div class="container mx-auto p-6">
|
| 11 |
<h1 class="text-3xl font-bold mb-4">Active TCP Endpoints</h1>
|
| 12 |
-
<
|
| 13 |
{% if endpoints %}
|
| 14 |
{% for endpoint in endpoints %}
|
| 15 |
-
<
|
| 16 |
{% endfor %}
|
| 17 |
{% else %}
|
| 18 |
-
<
|
| 19 |
{% endif %}
|
| 20 |
-
</ul>
|
| 21 |
</div>
|
| 22 |
</body>
|
| 23 |
</html>
|
|
|
|
| 9 |
<body class="bg-gray-100">
|
| 10 |
<div class="container mx-auto p-6">
|
| 11 |
<h1 class="text-3xl font-bold mb-4">Active TCP Endpoints</h1>
|
| 12 |
+
<div class="bg-white shadow-md rounded-lg">
|
| 13 |
{% if endpoints %}
|
| 14 |
{% for endpoint in endpoints %}
|
| 15 |
+
<p class="border-b p-4 hover:bg-gray-100">{{ endpoint }}</p>
|
| 16 |
{% endfor %}
|
| 17 |
{% else %}
|
| 18 |
+
<p class="p-4 text-gray-500">No active TCP endpoints found.</p>
|
| 19 |
{% endif %}
|
|
|
|
| 20 |
</div>
|
| 21 |
</body>
|
| 22 |
</html>
|