Commit Graph

14 Commits

Author SHA1 Message Date
Claude
267d262eb3 Simplify RDP config editor: auto-set local user to rdpuser
Changes:
- Remove local user prompt from config editor
- Auto-set local_user to "rdpuser" (default value)
- Display "(자동 설정)" label for local user in confirmation
- Fix "알 수 없음" display: show "설정되지 않음" for unset values
- Improve prompts: show "(Enter=유지)" or example values

This simplifies the config editing process since local_user
is always rdpuser by default in our setup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 04:29:31 +00:00
Claude
fbea9419c3 Add RDP config editor to all-in-one installer rerun menu
When rerunning the installer on existing setup:
- Display current RDP configuration (server, username, local user)
- Add option 2: "RDP 설정 수정" to modify settings
- Allow editing: RDP server, username, password, local user
- Show current values as defaults (press Enter to keep)
- Update both /var/lib/rdp-toggle/config.json and .xinitrc
- After update, show toggle menu to apply changes

Menu options on rerun:
1. RDP toggle menu
2. Edit RDP settings (NEW)
3. Reinstall
4. Exit

This allows users to easily change RDP target without reinstalling.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 04:27:30 +00:00
Claude
86eb7ea806 Fix: Save user-input RDP config to API instead of using hardcoded values
Problem:
- All-in-one installer collected RDP connection info from user
- But API was using hardcoded DEFAULT_CONFIG values
- User's input was ignored by the API

Solution:
- Save user's RDP configuration to /var/lib/rdp-toggle/config.json
- API loads this config instead of hardcoded defaults
- Config includes: rdp_server, rdp_username, rdp_password, local_user

Now the API will use the actual RDP settings the user entered during installation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 04:26:31 +00:00
Claude
d02883256f Add rerun detection and toggle menu to all-in-one RDP installer
When script is rerun on already-installed system:
- Detect existing RDP setup (API + getty config)
- Show menu with 3 options:
  1) RDP toggle menu - Interactive RDP/Shell switching
  2) Reinstall - Overwrite existing setup
  3) Exit

Toggle menu features:
- Switch between RDP and Shell modes
- Check current status
- Loop until user exits
- Uses same API as standalone installer

This turns the installer into a convenient RDP control tool on rerun.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 03:05:29 +00:00
Claude
e7d5dd02d2 Improve RDP API installer with rerun detection
Changes:
- Detect if RDP Toggle API is already installed and running
- Show test menu immediately on rerun (no reinstallation)
- Add option 3 (status check) and option 4 (exit) to test menu
- Extract test menu to reusable function show_test_menu()
- Both fresh install and rerun show same interactive test menu

Now users can easily test RDP toggle by simply rerunning the installer script.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 03:00:55 +00:00
Claude
1977d21a9b Add interactive testing menu to RDP API installer
Add post-installation testing menu with options to:
1) Test RDP mode activation
2) Test Shell mode activation
3) Skip testing

This allows users to immediately test API functionality after installation
without manually typing curl commands. The menu uses the installed API
to toggle modes and displays current status after each action.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 02:32:14 +00:00
Claude
2bf3754d62 Improve IP detection: prioritize Headscale VPN IP
- Added get_primary_ip() helper function
- Prioritize Headscale VPN IP (100.64.x.x) detection
- Fallback to local IP if Headscale not available
- Applied to both proxmox-auto-rdp-setup.sh and install-rdp-api.sh
- More reliable IP display for API endpoint

This ensures VPN IP is shown when available, making remote access
more reliable and predictable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 01:58:43 +00:00
Claude
9c952449d9 RDP 초기 설정에 API 자동 설치 및 API 기반 활성화 추가
- install_rdp_api() 함수 추가 (자동 API 설치)
- RDP 활성화 시 API를 통해 모드 전환 (curl POST /toggle)
- API 작동 = RDP 제어 가능 보장
- API 실패 시 자동으로 직접 활성화 fallback
- 설정 요약에 API 설치 상태 표시
- 수동 적용 안내에 API 명령어 포함

장점:
- API 없이 RDP만 켜지는 상황 방지
- 항상 원격 제어 가능한 상태 보장
- 사용자가 두 스크립트 따로 실행할 필요 없음
2025-11-17 01:40:59 +00:00
Claude
85c5e1ec29 RDP 초기 설정 스크립트 재부팅 대신 즉시 적용 옵션 추가
- 재부팅 없이 getty@tty1 서비스 재시작으로 즉시 적용 가능
- 사용자에게 3가지 선택 옵션 제공:
  1) 즉시 적용 (systemctl restart getty@tty1, 권장)
  2) 시스템 재부팅
  3) 나중에 수동 적용
- systemd daemon-reload 추가로 설정 파일 변경사항 즉시 반영
- 사용자 경험 개선 (불필요한 재부팅 방지)
2025-11-17 01:19:46 +00:00
Claude
13b1da4ee0 RDP 초기 설정 스크립트 패키지 확인 로직 개선
- dpkg 기반 확인에서 command -v 기반 확인으로 변경
- 실제 실행 파일 존재 여부로 설치 확인
- 패키지 이름 매칭 문제 해결
- 확인 실패 시 에러 대신 경고 후 계속 진행
- 검증 대상: startx, openbox, xfreerdp3, unclutter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 01:06:18 +00:00
Claude
ccd34c7f54 RDP 초기 설정 스크립트 입력 처리 수정 (curl | bash 지원)
- 모든 read 명령에 </dev/tty 추가
- curl | bash 실행 시 표준 입력 문제 해결
- 파이프로 실행해도 사용자 입력 정상 작동
- 5개 입력 포인트 모두 수정:
  - RDP 서버 주소
  - RDP 사용자명
  - RDP 패스워드 (2회)
  - 로컬 사용자명
  - 설정 확인
  - 네트워크 연결 실패 시 계속 진행 여부
  - 재부팅 확인

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 01:02:31 +00:00
Claude
d0c8b26138 RDP 초기 설정 스크립트 버전 체크 로직 개선
- Proxmox 버전 확인 시 에러 처리 강화
- pveversion 명령 출력 형식 다양하게 지원
- 버전 확인 실패 시 경고 후 계속 진행
- 정규표현식으로 버전 번호 추출 개선
- 숫자 검증 로직 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 00:53:11 +00:00
Claude
4934b0a8f9 RDP 자동화 시스템 문서 및 설치 스크립트 개선
- install-rdp-api.sh: curl 원라이너 설치 지원
  - requirements.txt 의존성 제거 (패키지 버전 스크립트 내장)
  - rdp-toggle-api.py Gitea에서 자동 다운로드
  - 상세한 설치 완료 메시지 추가

- RDP/README.md: 완전히 재구성
  - curl 원라이너 설치 가이드 추가
  - API 엔드포인트 상세 설명 및 응답 예시
  - React 프론트엔드 연동 예시 개선
  - 문제 해결 섹션 추가
  - 네트워크 설정 및 방화벽 가이드

- README.md: RDP 자동화 섹션 추가
  - Proxmox RDP 초기 설정 스크립트 소개
  - RDP Toggle API 설치 가이드
  - API 사용 예시 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 00:42:19 +00:00
c6919abf1c Add RDP Toggle API with venv support
RDP 관련 파일들을 RDP 폴더로 정리하고 API 시스템 추가

주요 변경사항:
- FastAPI 기반 RDP/Shell 모드 전환 API 서버 추가
- venv 환경을 사용하는 자동 설치 스크립트
- requirements.txt로 패키지 의존성 관리
- systemd 서비스로 자동 시작 설정
- CORS 지원으로 외부 프론트엔드 연동 가능
- 실시간 상태 모니터링 API
- 웹 기반 컨트롤 패널 포함

파일 구성:
- rdp-toggle-api.py: FastAPI REST API 서버
- install-rdp-api.sh: venv 환경 자동 설치
- requirements.txt: Python 패키지 의존성
- rdp-toggle-web.html: 웹 컨트롤 패널
- README.md: 사용 가이드

API 기능:
- GET /status: 현재 모드 확인
- POST /toggle: RDP/Shell 모드 전환
- GET /config: 설정 확인
- PUT /config: 설정 업데이트

리액트 프론트엔드에서 토글로 화면 모드 제어 가능

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 09:14:41 +09:00