[๐งโ๐ป] Secret Messenger ๊ฐ๋ฐ ์ผ์ง #4: SSH setup, Bootstrap Script Integration
โจ GPT์ ์์ฝ ใ
SSH ์ฐ๊ฒฐ ์ค์ ์ ์ฑ๊ณตํ๊ณ , ์ด์ ์ ์์ฑํ ์ ์คํฌ๋ฆฝํธ๋ฅผ ์ฐ๋ํ์ฌ VPS ํ๊ฒฝ ์๋ ์ธํ ์ ์ฑ๊ณตํ ํ๋ฃจ. ๋๋ถ์ Flutter+Django ํ๋ก์ ํธ ํ๊ฒฝ ์ค๋น ์๋๊ฐ ํ๊ธฐ์ ์ผ๋ก ๋จ์ถ๋จ.
๐ญ ์ผ๊ธฐ
SSH ์ฐ๊ฒฐ๋ก ์๊ฒฉ ์๋ฒ ์ ์ํ๋ ๊ฒ ์ด๋ ๊ฒ ์ฌ์ ๊ตฌ๋? GPT ๋์ ๋ฐ์์ ํ๋๊น ๋งํ ์์ด ๊ธ๋ฐฉ ๋์ด๋ฒ๋ฆฐ๋ค. ์์ ์๋ ์๊พธ ๊ฐ๋ ํท๊ฐ๋ฆฌ๊ณ ๊น๋นกํ๊ณ ๊ฐํ์ด์๋๋ฐโฆ
๊ทธ๋ฆฌ๊ณ SSH ์ฐ๊ฒฐ ์ฑ๊ณตํ ์ดํ์๋, ์์ ์ ์ง๋ ์๋ํ ์คํฌ๋ฆฝํธ โ๋ธ๊นโ ํด์ ์จ๊ฐ ํ๊ฒฝ ์ธํ ํ ๋ฐฉ์ ์ฑ๊ณตใ ใ
์ญ์, ๋ป์ง์ธ ๊ฒ ๊ฐ์๋ ๋์ค์ ๋ค ์ด๋ ๊ฒ ์ธ๋ชจ๊ฐ ์๋ค๋๊น?
๐ Roadmap
Execution plan for a secure, disguised Flutter Web + Django messenger targeting heavily monitored, high-risk individuals in mainland China โspecifically undocumented North Korean escapeesโ where concealment and data protection are paramount.
The application is camouflaged as a basic online calculator while providing real-time chat, file sharing, and one-way information broadcasts under the hood.
โ Phase 1 โ Planning & Architecture
-
๐ง Define project goal and threat model
- Audience: undocumented North Korean escapees in China
- Mission: browser-based, install-free, secure and disguised messaging tool
- UX disguise: calculator-style interface
-
๐ค Select AI-driven dev workflow
- Use GPT-4o + o1 for design, codegen, and iteration
- Follow โVibe Codingโ โ fast, natural-language dev via AI
-
โ๏ธ Finalize tech stack
- Frontend: Flutter Web (Material 3, go_router, Riverpod, http)
- Backend: Django + Django REST Framework (Django 5.x)
- Deployment: Single VPS container (static + API), with optional Cloudflare proxy
-
๐ Acquire domain
-
Domain:
ใ ใ ใ .net
- Cost: โฉ18,000/year via Korean registrar
- Purpose: visual camouflage as an online calculator
-
Domain:
โ Phase 2 โ VPS Setup & Base Deployment
-
๐ณ Create a Vultr account and pay $10.
-
๐ Create a VPS instance
- Region: Singapore (best GFW performance on Vultr)
- OS: Ubuntu 22.04 x64
- Plan: 1vCPU / 1GB RAM ($5/month)
- SSH key or password access setup
-
๐ Streamline Mac โ server SSH login
-
Generate an ed25519 key on the MacBook and load it into the agent
ssh-keygen -t ed25519 -C "ใ ใ ใ -remote" ssh-copy-id -i ~/.ssh/id_ed25519.pub root@<IP>
-
From now on:
ssh root@<IP>
โ prompt-for-passphrase โ instant login
-
-
๐ Bootstrap shell environment on the VPS
-
Clone personal dotfiles repo and run the setup script
git clone https://github.com/JUD210/dev-settings-backup.git ~/dev-settings-backup cd ~/dev-settings-backup chmod +x init_my_shell.sh && ./init_my_shell.sh
- Script installs / checks zsh, OhโMyโZsh, Powerlevel10k, links
.zshrc
,.vimrc
,.gitconfig
, and sets zsh as the default shell. - Also ensures essential CLI tools like
less
andgit
are installed
-
-
๐ Access and initialize the VPS
-
Log in and install essential packages (if not already handled by the bootstrap script)
ssh root@<IP> apt update && apt upgrade -y apt install python3-pip python3-venv nginx ufw -y ufw allow OpenSSH && ufw allow 'Nginx Full' && ufw enable
-
-
๐ Prepare project directory and virtualenv
mkdir /srv/ใ ใ ใ && cd /srv/ใ ใ ใ python3 -m venv venv && source venv/bin/activate pip install django djangorestframework whitenoise gunicorn
Note: A Cloudflare proxy is recommended to hide the VPS IP and absorb DDoS.
โ Phase 3 โ Project Initialization (Django + Flutter)
๐ง Django Setup
-
django-admin startproject stealthcore .
- Creates
stealthcore/
folder andmanage.py
inside/srv/ใ ใ ใ
.
- Creates
-
python manage.py startapp api
- Creates the
api/
folder for your custom logic (message handling, file uploads, broadcast notices, etc.).
- Creates the
-
Add
'api'
,'rest_framework'
toINSTALLED_APPS
-
In
stealthcore/stealthcore/settings.py
, e.g.:INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', # Add 'api', # Add ]
-
-
python manage.py migrate
- Creates initial database tables (SQLite by default).
-
python manage.py createsuperuser
- Lets you access Djangoโs admin panel (optional but recommended).
Future expansions:
/api/messages/
for group chat with TTL/api/upload/
for file sharing (auto-deletion)/api/notice/
for admin broadcast messages
๐ ๏ธ Flutter Web Setup
-
flutter create ใ ใ ใ _web
- Produces a basic Flutter Web project.
-
Replace UI with calculator-style layout
-
Minimal example in
main.dart
:TextField( onChanged: (val) { // store user input }, ); ElevatedButton( onPressed: () { // call /api/check-trigger/ }, child: Text("Send"), );
-
Realistically, implement numeric keypad, basic arithmetic, etc.
-
-
Connect POST request to
/api/check-trigger/
-
Using
http
:final response = await http.post( Uri.parse('/api/check-trigger/'), body: {'input': userInput}, );
-
If valid, backend issues a token โ Flutter loads hidden messenger UI.
-
-
flutter build web
- Compiles your Flutter app to
build/web/
.
- Compiles your Flutter app to
-
Copy files:
mkdir frontend_static/ cp -r build/web/* frontend_static/
- This can be served by Nginx or Djangoโs WhiteNoise.
โ Phase 4 โ Trigger API & Flutter Integration
-
In Django
api/views.py
:from rest_framework.decorators import api_view from rest_framework.response import Response import os @api_view(['POST']) def check_trigger(request): # Production: store real trigger in os.environ or DB valid_trigger = os.environ.get('ใ ใ ใ _TRIGGER', '1004') if request.data.get('input') == valid_trigger: return Response({'status': 'success', 'token': 'XYZ'}) return Response({'status': 'denied'})
-
Create
/api/urls.py
and register routefrom django.urls import path from .views import check_trigger urlpatterns = [ path('check-trigger/', check_trigger, name='check-trigger'), ]
-
Connect from Flutter with
http.post(...)
- If
"success"
, store token in memory (Riverpod) โ show hidden UI - If
"denied"
, remain a simple calculator
- If
-
Ensure no sensitive logic in the frontend
- All secret values (like the trigger code) live on the server.
โ Phase 5 โ Nginx & HTTPS Hosting
-
Create Nginx config:
server { listen 80; server_name ใ ใ ใ .net; location /static/ { alias /srv/ใ ใ ใ /frontend_static/; } location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }
-
Enable config and restart:
ln -s /etc/nginx/sites-available/ใ ใ ใ /etc/nginx/sites-enabled/ nginx -t && systemctl restart nginx
-
Enable HTTPS:
apt install certbot python3-certbot-nginx -y certbot --nginx -d ใ ใ ใ .net
- Installs Letโs Encrypt cert for
ใ ใ ใ .net
. - Afterward,
https://ใ ใ ใ .net
should serve your disguised calculator.
- Installs Letโs Encrypt cert for
Gunicorn & systemd
For production, run Django with Gunicorn behind Nginx:
gunicorn stealthcore.wsgi:application --bind 127.0.0.1:8000
Create a
/etc/systemd/system/gunicorn.service
to auto-restart on reboot.
โ Phase 6 โ Final Testing & Disguise Hardening
-
๐งช Test UI & trigger
-
Visit
https://ใ ใ ใ .net
-
Input
1004
(or real trigger) โ verify{"status":"success"}
+ token -
Invalid input โ
{"status":"denied"}
-
Visit
-
๐ Clean frontend
- Remove all references to โchatโ or โtriggerโ
- No hardcoded secrets or tokens
- Minimal localStorage usage for ephemeral sessions
-
๐ง Final disguise polish
- Fake calculator branding (title, icon, etc.)
- Real arithmetic (optional) so itโs fully plausible as a calculator
- UI alignment, theming, and final styling
-
๐ง Create
deploy.md
(internal doc)- How to deploy, update, rollback, and verify
-
Summarize environment variables (
ใ ใ ใ _TRIGGER
,SECRET_KEY
) - Include any security & logging best practices
๐ฎ Future Features
- ๐ฅ Info Board (Read-Only Announcements)
- ๐ฌ Group Chat with TTL-based message deletion
- ๐ File Sharing (auto-expire for security)
- ๐ฅ Auto-Deletion via cron/management command for expired data
- ๐ Cloudflare Proxy to mask VPS IP and mitigate DDoS
Use this roadmap to guide end-to-end development of ใ ใ ใ โfrom initial VPS setup to final production.โ
๐ Git Log
Date | Type | Message |
---|---|---|
25.04.17 Thu | docs(roadmap) | refine Phase 2 with SSH setup and bootstrap script integration (HEAD -> main, origin/main) |
25.04.13 Sun | docs(roadmap) | refine and finalize Phase 1โ6 plan for secure disguised messenger |
25.04.03 Thu | docs(roadmap) | edit full Phase 0โ3 checklist for Flutter Web + Django deployment |
25.04.03 Thu | docs | add dev-principles and roadmap with links from README |
25.04.03 Thu | docs(README) | add more details to roadmap |
25.04.03 Thu | docs(README) | change backend from Node to Django, and change from Kor to Eng |
25.04.02 Wed | docs(README) | add minor details for user |
25.04.01 Tue | docs(README) | add description, tech stack, features, roadmap, โฆ |
25.04.01 Tue | - | Initial commit |
๋๊ธ ๋จ๊ธฐ๊ธฐ