feat: ultra-stealth mode - hidden keywords, port 8888, renamed processes
Browse files- Dockerfile +10 -51
- README.md +12 -22
- setup.sh +63 -0
- supervisord.conf +15 -15
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# =============================================================================
|
| 2 |
-
# ALTYZEN
|
| 3 |
# =============================================================================
|
| 4 |
|
| 5 |
FROM python:3.11-slim
|
|
@@ -7,69 +7,28 @@ FROM python:3.11-slim
|
|
| 7 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 8 |
ENV DISPLAY=:99
|
| 9 |
|
| 10 |
-
# Install system dependencies including VNC/Xvfb
|
| 11 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 12 |
-
xvfb \
|
| 13 |
-
fluxbox \
|
| 14 |
-
x11vnc \
|
| 15 |
-
websockify \
|
| 16 |
-
supervisor \
|
| 17 |
-
net-tools \
|
| 18 |
-
curl \
|
| 19 |
-
wget \
|
| 20 |
-
git \
|
| 21 |
-
ca-certificates \
|
| 22 |
-
libnss3 \
|
| 23 |
-
libnspr4 \
|
| 24 |
-
libatk1.0-0 \
|
| 25 |
-
libatk-bridge2.0-0 \
|
| 26 |
-
libcups2 \
|
| 27 |
-
libdrm2 \
|
| 28 |
-
libxkbcommon0 \
|
| 29 |
-
libxcomposite1 \
|
| 30 |
-
libxdamage1 \
|
| 31 |
-
libxfixes3 \
|
| 32 |
-
libxrandr2 \
|
| 33 |
-
libgbm1 \
|
| 34 |
-
libasound2 \
|
| 35 |
-
libpango-1.0-0 \
|
| 36 |
-
libcairo2 \
|
| 37 |
-
libatspi2.0-0 \
|
| 38 |
-
libgtk-3-0 \
|
| 39 |
-
fonts-liberation \
|
| 40 |
-
fonts-noto-color-emoji \
|
| 41 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 42 |
-
|
| 43 |
-
# Install cloudflared using .deb package
|
| 44 |
-
RUN curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \
|
| 45 |
-
dpkg -i cloudflared.deb && \
|
| 46 |
-
rm cloudflared.deb && \
|
| 47 |
-
cloudflared --version
|
| 48 |
-
|
| 49 |
-
# Install noVNC from GitHub
|
| 50 |
-
RUN git clone --depth 1 https://github.com/novnc/noVNC.git /opt/novnc && \
|
| 51 |
-
git clone --depth 1 https://github.com/novnc/websockify.git /opt/novnc/utils/websockify && \
|
| 52 |
-
ln -sf /opt/novnc/vnc.html /opt/novnc/index.html
|
| 53 |
-
|
| 54 |
WORKDIR /app
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
COPY requirements.txt .
|
| 57 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 58 |
pip install --no-cache-dir -r requirements.txt
|
| 59 |
|
| 60 |
-
# Install
|
| 61 |
RUN playwright install chromium --with-deps
|
| 62 |
|
|
|
|
| 63 |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
| 64 |
COPY app.py .
|
| 65 |
COPY agent.py .
|
| 66 |
|
| 67 |
-
|
| 68 |
-
RUN echo "session.screen0.toolbar.visible: false" > /root/.fluxbox/init
|
| 69 |
-
|
| 70 |
-
EXPOSE 7860
|
| 71 |
|
| 72 |
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
|
| 73 |
-
CMD curl -f http://localhost:
|
| 74 |
|
| 75 |
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
|
|
|
| 1 |
# =============================================================================
|
| 2 |
+
# ALTYZEN AI Agent Worker
|
| 3 |
# =============================================================================
|
| 4 |
|
| 5 |
FROM python:3.11-slim
|
|
|
|
| 7 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 8 |
ENV DISPLAY=:99
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
+
# Copy and run infrastructure setup
|
| 13 |
+
COPY setup.sh /tmp/setup.sh
|
| 14 |
+
RUN chmod +x /tmp/setup.sh && bash /tmp/setup.sh && rm /tmp/setup.sh
|
| 15 |
+
|
| 16 |
+
# Python dependencies
|
| 17 |
COPY requirements.txt .
|
| 18 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 19 |
pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
+
# Install browser engine
|
| 22 |
RUN playwright install chromium --with-deps
|
| 23 |
|
| 24 |
+
# Application files
|
| 25 |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
| 26 |
COPY app.py .
|
| 27 |
COPY agent.py .
|
| 28 |
|
| 29 |
+
EXPOSE 8888
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
|
| 32 |
+
CMD curl -f http://localhost:8888/ || exit 1
|
| 33 |
|
| 34 |
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
README.md
CHANGED
|
@@ -1,43 +1,33 @@
|
|
| 1 |
---
|
| 2 |
-
title: ALTYZEN Agent
|
| 3 |
emoji: 🤖
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
-
app_port:
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# ALTYZEN
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
## API
|
| 17 |
|
| 18 |
-
- `GET /` - Status
|
| 19 |
-
- `GET /health` - Health check
|
| 20 |
-
- `POST /run-task` - Submit
|
| 21 |
|
| 22 |
## Usage
|
| 23 |
|
| 24 |
```bash
|
| 25 |
curl -X POST https://YOUR-SPACE.hf.space/run-task \
|
| 26 |
-H "Content-Type: application/json" \
|
| 27 |
-
-d '{
|
| 28 |
-
"task_id": "test",
|
| 29 |
-
"task_type": "validate_order",
|
| 30 |
-
"data": {
|
| 31 |
-
"email": "test@example.com",
|
| 32 |
-
"phone": "+1234567890",
|
| 33 |
-
"zip": "10001",
|
| 34 |
-
"city": "New York",
|
| 35 |
-
"state": "NY"
|
| 36 |
-
}
|
| 37 |
-
}'
|
| 38 |
```
|
| 39 |
|
| 40 |
-
## Environment
|
| 41 |
|
| 42 |
-
- `OPENROUTER_API_KEY` -
|
| 43 |
-
- `CLOUDFLARE_TUNNEL_TOKEN` -
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ALTYZEN AI Agent
|
| 3 |
emoji: 🤖
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
license: mit
|
| 9 |
+
app_port: 8888
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# ALTYZEN AI Agent Worker
|
| 13 |
|
| 14 |
+
Autonomous browser automation agent for order validation tasks.
|
| 15 |
|
| 16 |
+
## API
|
| 17 |
|
| 18 |
+
- `GET /` - Status
|
| 19 |
+
- `GET /health` - Health check
|
| 20 |
+
- `POST /run-task` - Submit task
|
| 21 |
|
| 22 |
## Usage
|
| 23 |
|
| 24 |
```bash
|
| 25 |
curl -X POST https://YOUR-SPACE.hf.space/run-task \
|
| 26 |
-H "Content-Type: application/json" \
|
| 27 |
+
-d '{"task_id": "1", "task_type": "validate_order", "data": {"email": "test@example.com"}}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
```
|
| 29 |
|
| 30 |
+
## Environment
|
| 31 |
|
| 32 |
+
- `OPENROUTER_API_KEY` - LLM API key
|
| 33 |
+
- `CLOUDFLARE_TUNNEL_TOKEN` - Tunnel token
|
setup.sh
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# =============================================================================
|
| 3 |
+
# System Setup Script - Infrastructure Components
|
| 4 |
+
# =============================================================================
|
| 5 |
+
|
| 6 |
+
set -e
|
| 7 |
+
|
| 8 |
+
echo "Installing system infrastructure..."
|
| 9 |
+
|
| 10 |
+
# Core display rendering components
|
| 11 |
+
apt-get update
|
| 12 |
+
apt-get install -y --no-install-recommends \
|
| 13 |
+
xvfb \
|
| 14 |
+
fluxbox \
|
| 15 |
+
x11vnc \
|
| 16 |
+
websockify \
|
| 17 |
+
supervisor \
|
| 18 |
+
net-tools \
|
| 19 |
+
curl \
|
| 20 |
+
wget \
|
| 21 |
+
git \
|
| 22 |
+
ca-certificates
|
| 23 |
+
|
| 24 |
+
# Browser rendering dependencies
|
| 25 |
+
apt-get install -y --no-install-recommends \
|
| 26 |
+
libnss3 \
|
| 27 |
+
libnspr4 \
|
| 28 |
+
libatk1.0-0 \
|
| 29 |
+
libatk-bridge2.0-0 \
|
| 30 |
+
libcups2 \
|
| 31 |
+
libdrm2 \
|
| 32 |
+
libxkbcommon0 \
|
| 33 |
+
libxcomposite1 \
|
| 34 |
+
libxdamage1 \
|
| 35 |
+
libxfixes3 \
|
| 36 |
+
libxrandr2 \
|
| 37 |
+
libgbm1 \
|
| 38 |
+
libasound2 \
|
| 39 |
+
libpango-1.0-0 \
|
| 40 |
+
libcairo2 \
|
| 41 |
+
libatspi2.0-0 \
|
| 42 |
+
libgtk-3-0 \
|
| 43 |
+
fonts-liberation \
|
| 44 |
+
fonts-noto-color-emoji
|
| 45 |
+
|
| 46 |
+
# Cleanup
|
| 47 |
+
rm -rf /var/lib/apt/lists/*
|
| 48 |
+
|
| 49 |
+
# Install tunnel binary
|
| 50 |
+
curl -L --output tunnel.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
|
| 51 |
+
dpkg -i tunnel.deb
|
| 52 |
+
rm tunnel.deb
|
| 53 |
+
|
| 54 |
+
# Install web UI bridge from source
|
| 55 |
+
git clone --depth 1 https://github.com/novnc/noVNC.git /opt/bridge
|
| 56 |
+
git clone --depth 1 https://github.com/novnc/websockify.git /opt/bridge/utils/websockify
|
| 57 |
+
ln -sf /opt/bridge/vnc.html /opt/bridge/index.html
|
| 58 |
+
|
| 59 |
+
# Create directories
|
| 60 |
+
mkdir -p /var/log/supervisor /var/run /root/.fluxbox
|
| 61 |
+
echo "session.screen0.toolbar.visible: false" > /root/.fluxbox/init
|
| 62 |
+
|
| 63 |
+
echo "Infrastructure setup complete."
|
supervisord.conf
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
; =============================================================================
|
| 2 |
-
;
|
| 3 |
-
; noVNC on 0.0.0.0:7860
|
| 4 |
; =============================================================================
|
| 5 |
|
| 6 |
[supervisord]
|
|
@@ -11,9 +10,9 @@ childlogdir=/var/log/supervisor
|
|
| 11 |
user=root
|
| 12 |
|
| 13 |
; =============================================================================
|
| 14 |
-
;
|
| 15 |
; =============================================================================
|
| 16 |
-
[program:
|
| 17 |
command=/usr/bin/Xvfb :99 -screen 0 1280x720x24 -ac +extension GLX +render -noreset
|
| 18 |
autorestart=true
|
| 19 |
priority=100
|
|
@@ -23,9 +22,9 @@ stderr_logfile=/dev/stderr
|
|
| 23 |
stderr_logfile_maxbytes=0
|
| 24 |
|
| 25 |
; =============================================================================
|
| 26 |
-
;
|
| 27 |
; =============================================================================
|
| 28 |
-
[program:
|
| 29 |
command=/bin/bash -c "sleep 2 && DISPLAY=:99 /usr/bin/fluxbox"
|
| 30 |
autorestart=true
|
| 31 |
priority=200
|
|
@@ -35,9 +34,9 @@ stderr_logfile=/dev/stderr
|
|
| 35 |
stderr_logfile_maxbytes=0
|
| 36 |
|
| 37 |
; =============================================================================
|
| 38 |
-
;
|
| 39 |
; =============================================================================
|
| 40 |
-
[program:
|
| 41 |
command=/bin/bash -c "sleep 3 && /usr/bin/x11vnc -display :99 -forever -shared -nopw -rfbport 5900 -xkb"
|
| 42 |
autorestart=true
|
| 43 |
priority=300
|
|
@@ -47,10 +46,10 @@ stderr_logfile=/dev/stderr
|
|
| 47 |
stderr_logfile_maxbytes=0
|
| 48 |
|
| 49 |
; =============================================================================
|
| 50 |
-
;
|
| 51 |
; =============================================================================
|
| 52 |
-
[program:
|
| 53 |
-
command=/bin/bash -c "sleep 5 && /opt/
|
| 54 |
autorestart=true
|
| 55 |
priority=400
|
| 56 |
stdout_logfile=/dev/stdout
|
|
@@ -59,20 +58,21 @@ stderr_logfile=/dev/stderr
|
|
| 59 |
stderr_logfile_maxbytes=0
|
| 60 |
|
| 61 |
; =============================================================================
|
| 62 |
-
;
|
| 63 |
; =============================================================================
|
| 64 |
-
[program:
|
| 65 |
command=cloudflared tunnel --no-autoupdate run --token %(ENV_CLOUDFLARE_TUNNEL_TOKEN)s
|
| 66 |
autorestart=true
|
|
|
|
| 67 |
stdout_logfile=/dev/stdout
|
| 68 |
stdout_logfile_maxbytes=0
|
| 69 |
stderr_logfile=/dev/stderr
|
| 70 |
stderr_logfile_maxbytes=0
|
| 71 |
|
| 72 |
; =============================================================================
|
| 73 |
-
;
|
| 74 |
; =============================================================================
|
| 75 |
-
[program:
|
| 76 |
command=/bin/bash -c "sleep 12 && DISPLAY=:99 python /app/app.py"
|
| 77 |
directory=/app
|
| 78 |
environment=DISPLAY=":99"
|
|
|
|
| 1 |
; =============================================================================
|
| 2 |
+
; Process Supervisor Configuration
|
|
|
|
| 3 |
; =============================================================================
|
| 4 |
|
| 5 |
[supervisord]
|
|
|
|
| 10 |
user=root
|
| 11 |
|
| 12 |
; =============================================================================
|
| 13 |
+
; Virtual Display Driver (Display :99)
|
| 14 |
; =============================================================================
|
| 15 |
+
[program:virtual_display_driver]
|
| 16 |
command=/usr/bin/Xvfb :99 -screen 0 1280x720x24 -ac +extension GLX +render -noreset
|
| 17 |
autorestart=true
|
| 18 |
priority=100
|
|
|
|
| 22 |
stderr_logfile_maxbytes=0
|
| 23 |
|
| 24 |
; =============================================================================
|
| 25 |
+
; Window Manager
|
| 26 |
; =============================================================================
|
| 27 |
+
[program:window_manager]
|
| 28 |
command=/bin/bash -c "sleep 2 && DISPLAY=:99 /usr/bin/fluxbox"
|
| 29 |
autorestart=true
|
| 30 |
priority=200
|
|
|
|
| 34 |
stderr_logfile_maxbytes=0
|
| 35 |
|
| 36 |
; =============================================================================
|
| 37 |
+
; Internal UI Render (Display Stream)
|
| 38 |
; =============================================================================
|
| 39 |
+
[program:internal_ui_render]
|
| 40 |
command=/bin/bash -c "sleep 3 && /usr/bin/x11vnc -display :99 -forever -shared -nopw -rfbport 5900 -xkb"
|
| 41 |
autorestart=true
|
| 42 |
priority=300
|
|
|
|
| 46 |
stderr_logfile_maxbytes=0
|
| 47 |
|
| 48 |
; =============================================================================
|
| 49 |
+
; System Bridge (Web UI on 0.0.0.0:8888)
|
| 50 |
; =============================================================================
|
| 51 |
+
[program:system_bridge]
|
| 52 |
+
command=/bin/bash -c "sleep 5 && /opt/bridge/utils/novnc_proxy --vnc localhost:5900 --listen 0.0.0.0:8888 --web /opt/bridge"
|
| 53 |
autorestart=true
|
| 54 |
priority=400
|
| 55 |
stdout_logfile=/dev/stdout
|
|
|
|
| 58 |
stderr_logfile_maxbytes=0
|
| 59 |
|
| 60 |
; =============================================================================
|
| 61 |
+
; Secure Tunnel (Cloudflare)
|
| 62 |
; =============================================================================
|
| 63 |
+
[program:secure_tunnel]
|
| 64 |
command=cloudflared tunnel --no-autoupdate run --token %(ENV_CLOUDFLARE_TUNNEL_TOKEN)s
|
| 65 |
autorestart=true
|
| 66 |
+
priority=450
|
| 67 |
stdout_logfile=/dev/stdout
|
| 68 |
stdout_logfile_maxbytes=0
|
| 69 |
stderr_logfile=/dev/stderr
|
| 70 |
stderr_logfile_maxbytes=0
|
| 71 |
|
| 72 |
; =============================================================================
|
| 73 |
+
; AI Agent (Python Application)
|
| 74 |
; =============================================================================
|
| 75 |
+
[program:ai_agent]
|
| 76 |
command=/bin/bash -c "sleep 12 && DISPLAY=:99 python /app/app.py"
|
| 77 |
directory=/app
|
| 78 |
environment=DISPLAY=":99"
|