GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - shravankumaruk/rs4v-framework: A Framework which could create proxy for ORTHANC (Legacy PACS DICOM) in local networks with self signed SSL Which would work flawless with multiple security features.

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitattributes
.gitattributes
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
install.sh
install.sh
 
 
main.py
main.py
 
 
scanner.py
scanner.py
 
 
server.py
server.py
 
 

Repository files navigation

๐Ÿฅ RS4V Orthanc Installer & Proxy Documentation (NITK Award winning ๐Ÿฅ‡ 1st Place)

RS4V Logo

License: GPL v3 Python version Orthanc version Secure HTTPS Proxy CI Build Passing Version 1.0.0 Issues Welcome PRs Welcome Ubuntu Compatible Download ZIP

GitHub Stars GitHub Forks GitHub Watchers GitHub Release Total Downloads

Built with Love Powered by Black Magic Badge Works on My Machine Badge Uses Git Devs

Nginx Badge Bash Script Ubuntu Kali Linux HTML5 PyCharm


Read About PDF


RS4V Demo GIF

๐Ÿ” Table of Contents

  1. Introduction

  2. Features ๐Ÿš€

  3. Prerequisites โœ…

  4. Installation ๐Ÿ› ๏ธ

    • Method 1: Manual Pip Installation
    • Method 2: Automated Script (install.sh)
    • Method 3:Run on Google cloud shell
  5. Configuration ๐Ÿ”ง

  6. Usage โœจ

  7. Proxy & Security ๐Ÿ“ก๐Ÿ›ก๏ธ

  8. Video Tutorial ๐ŸŽฌ

  9. Screenshots ๐Ÿ“ธ

  10. Troubleshooting ๐Ÿž

  11. Contributing ๐Ÿค

  12. License & Credits ๐Ÿ“„

  13. Acknowledgements ๐Ÿ™


๐Ÿ“ Introduction

In modern healthcare, managing DICOM images securely is paramount. RS4V Orthanc Installer & Proxy offers an end-to-end solution to deploy Orthancโ€”a powerful, lightweight DICOM serverโ€”behind a hardened HTTPS proxy. This framework not only automates installation and configuration but also integrates advanced security controls such as WAF, rate limiting, CVE scanning, audit logging, two-factor authentication (2FA), and PDF report generation. The interactive CLI harnesses pyfiglet to present a fun, easy-to-navigate menu, while the underlying scripts ensure reproducible, production-ready deployments.


๐ŸŽ‰ Features ๐Ÿš€

Below is an overview of the key features included in RS4V Orthanc Installer & Proxy:

Feature Description
๐Ÿ”’ Secure HTTPS Proxy TLS termination via self-signed certs, integrated with own built in servers
๐Ÿ” Two-Factor Authentication Uses our in house .rs4v key based authentication which can be regenrated also.
๐Ÿ” Automated CVE Scanning Updated to scan Orthanc endpoints for known vulnerabilities (see PACS-DICOM.pdf for details)
๐Ÿ“‹ Audit Logging & PDF Reports Centralized logging of operations and user actionsโ€”all logs emitted by server.py in your home directory
๐Ÿ› ๏ธ Automated Installer install.sh script installs dependencies, sets up services, gathers TLS certs, configures JSON/YAML files
๐ŸŽจ Interactive CLI Menu ASCII-art headers and numbered options guided by pyfiglet, making operations intuitive and visually appealing
โš™๏ธ Config Management Declarative JSON/YAML under your-project directoryโ€”easy to customize Orthanc, proxy, auth, and WAF settings
๐Ÿ”„ Backup & Restore One-line commands to view backup logs
๐Ÿ”„ Health Checks & Monitoring Built-in ORTHANC Webviewer to view DICOM(.dcm) files easily via browser
๐Ÿ›ก๏ธ Rate Limiting & DoS Defense Configurable rate limits on REST API calls to mitigate brute-force and flood attacks
๐Ÿงฉ Plugin Architecture Design patterns to extend backend logic, such as custom anonymization or routing plugins
๐Ÿ› ๏ธ Troubleshooting Helpers Scripts and tips for common pitfallsโ€”dos2unix for Windows line endings, permission fixes, port conflicts

image

image

image

image

image

image


โœ… Prerequisites

Before you begin, ensure your system meets the following requirements:

  • Operating System: Ubuntu 18.04 or newer (or Debian-based distros).

  • Python: Version 3.8+ installed and accessible as python3.

  • Git: For cloning this repository.

  • Sudo or root privileges.

  • Recommended Utilities:

    • dos2unix (to normalize script line endings).
    • curl or wget (for network operations).
    • jq (for JSON validation).

โš™๏ธ Installation ๐Ÿ› ๏ธ

We support two installation methodsโ€”choose whichever suits your workflow.

Method 1: Manual Pip Installation

  1. Clone the repository:

    git clone https://github.com/shravankumaruk/rs4v-framework.git
    cd rs4v-framework
  2. Install Python dependencies:

    pip3 install pyfiglet requests pyyaml
  3. Run the main script:

    sudo -E python3 main.py
    • The -E flag preserves environment variables, ensuring certificates and paths resolve correctly.

Method 2: Automated Script (install.sh)

For a single-command setup:

sudo bash install.sh
sudo -E python3 main.py

The install.sh does the following:

  • Installs system packages: orthanc, nginx, modsecurity, python3-pip, etc.
  • Obtains TLS certificates generates self-signed.
  • Configures Nginx as a reverse proxy with WAF rules.
  • Sets up Orthanc JSON config with secure defaults.
  • Creates systemd services for auto-start on boot.

Pro Tip: If you hit a python: bad interpreter: No such file or directory error, normalize line endings:

dos2unix main.py

Method 3 : Run on cloud shell


๐Ÿ”ง Configuration

All configuration files live under the directory where you installed (type pwd in terminal):

  • captive_credentials.json: Orthanc users and pass with keys stored
  • /etc/orthanc/orthanc.json: Original config for ORTHANC Servers.
  • User.rs4V: This will be your generated Key.

My real snippet from captive_credentials.json:

{
    "RegisteredUsers": {
        "shravan": {
            "password": "07417e5860dfe946c74f32120b2a35500dd3fb508e9627ab7be7084bbdc4ba16",
            "key": "Xc4Dy9B905FEz6J147f03fup3l8ukh79"
        }
    }

Security Note: Our application stores password in hashes use server.py or access via main.py to change or remove passwords or add or remove users or else direct modification may result in errors.


โœจ Usage

Below is the exact output when launching main.py:

shravan@shravan-pc:~/Desktop$ sudo -E python3 main.py
 ____  ____  _  ___     __
|  _ \/ ___|| || \ \   / /
| |_) \___ \| || |\ \ / / 
|  _ < ___) |__   _\ V /  
|_| \_\____/   |_|  \_/   
                          
 _____                                            _    
|  ___| __ __ _ _ __ ___   _____      _____  _ __| | __
| |_ | '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ /
|  _|| | | (_| | | | | | |  __/\ V  V / (_) | |  |   < 
|_|  |_|  \__,_|_| |_| |_|\___| \_/\_/ \___/|_|  |_|\_\
                                                       
Please select an option from the menu below:
1) Install orthanc with WebViewer automatically.
2) Run proxy server.
3) Scan for vulnerabilities in the system.

Enter your choice (1/2/3):

Use the numeric choice to access installer, proxy setup, or vulnerability scanning.

All logs are emitted by server.py in your home directory; you can view live logs by running python3 server.py, or check archived logs there. For PDF report generation details, refer to the Video Tutorial.

****************************************
*   RS4V WAF Server Panel              *
****************************************

=============================
Proxy Server Control Menu
=============================
1) View logs
2) Add/Remove user (no captcha)
3) View Users and Change Password
4) Save PDF report
5) Restart Server
6) Whitelist/Blacklist an IP address
7) Turn off Server
8) Generate new key for a user
=============================
Enter your choice (1-8): 1
Displaying log contents:
2025-06-26 23:13:51 - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:80
 * Running on http://192.168.142.144:80
2025-06-26 23:13:51 - Press CTRL+C to quit
2025-06-26 23:13:54 - WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on https://127.0.0.1:443
 * Running on https://192.168.142.144:443
2025-06-26 23:13:54 - Press CTRL+C to quit

Press Enter to return to the menu...

๐Ÿ›ก๏ธ Vulnerability Scanner (scanner.py)

  _   _ _____ _______ _  __     _____  _____ 
 | \ | |_   _|__   __| |/ /    | ____|/ ____|
 |  \| | | |    | |  | ' /_____| |__ | |     
 | . ` | | |    | |  |  <______|___ \| |     
 | |\  |_| |_   | |  | . \      ___) | |____ 
 |_| \_|_____|  |_|  |_|\_\    |____/ \_____|

                      RS4V Security Scanner

====== Orthanc Vulnerability Scanner Menu ======
1) Scan For Vulnerability (Basic Orthanc info + config check)
2) List All CVEs
3) Save as PDF (Report with graphics and CVE scores)
0) Exit
==================================================
Enter your choice:
๐Ÿ“„ Tip: Selecting Option 3 generates a detailed PDF report with visual CVE scoring graphs and summary tables.
๐Ÿ“˜ For CVE scan logic and methodology, refer to PACS-DICOM.pdf.
๐ŸŽฅ If unsure how to run this, check the Video Tutorial section.

๐Ÿ“ก Proxy & Security

An Nginx reverse proxy fronts Orthanc to enforce robust security:

  • TLS Termination: Secure all client-server traffic.
  • ModSecurity WAF: Apply custom DICOM and OWASP CRS rules.
  • Rate Limiting: Throttle per-IP API calls to prevent abuse.
  • Daily CVE Checks: Automated vulnerability scanning against public feeds (see PACS-DICOM.pdf for scan methodology).

All logs are emitted by server.py in your home directory and include proxy, WAF, and scan events.

๐ŸŽฌ Video Tutorial

Watch the video

Prefer a step-by-step walkthrough? Watch on YouTube:

โ–ถ๏ธ https://www.youtube.com/watch?v=7lBsuiZRWm0

Follow along to see live installation, menu navigation, and sample report generation.


๐Ÿ“ธ Screenshots

  1. Installation Progress via install.sh :

Screenshot 2025-06-27 025409

  1. Main Menu via main.py :

Screenshot 2025-06-27 030012

  1. Server Panel via server.py :

Screenshot 2025-06-27 030113

  1. Web Login access :

Screenshot 2025-06-27 030133

Screenshot 2025-06-27 030212 Uses our inhouse .rs4v key for the 2FA in place.

Screenshot 2025-06-27 030656 Successful sign-in of ORTHANC via our proxy.

6.WAF Blocking Bruteforce Attack image

7.Our 2FA Blocks if any file other than .rs4v is uploaded. image

8.Our WAF Blocks both XSS Attack and SQL Injections

image

image


๐Ÿž Troubleshooting

Comprehensive troubleshooting table from real-world usage:

Symptom Possible Cause Solution
python: bad interpreter DOS line endings in Python scripts Convert with dos2unix *.py
Permission denied on install.sh Missing execute permission chmod +x install.sh
port 8042 already in use Another service occupying Orthanc port Change HttpsPort in config/orthanc.json and restart service
TLS handshake failure Invalid or expired certificates Regenerate with sudo bash install.sh or certbot renew
CVE database fetch failed Network connectivity or feed URL changed Verify internet access, update CVE feed URL in main.py
Service starts but no UI Proxy misconfiguration Check server.py targets localhost:8042 and service is running
Slow image retrieval High load or storage IO bottleneck Enable caching in Nginx, monitor disk I/O, or increase database performance settings
2FA token invalid Time drift on server or client Sync time with NTP (sudo apt install ntp && sudo service ntp restart)

๐Ÿ› ๏ธ Maintenance & Support

If you encounter any bugs, issues, or discover a potential vulnerability ๐Ÿž๐Ÿ”, please help us improve by opening an issue.

Click the button below to report it directly:

Report an Issue

We have custom labels like bug, security, enhancement, and question to categorize and speed up triage.
Your feedback keeps this project secure and strong ๐Ÿ’ช!


๐Ÿค Contributing

We welcome all contributionsโ€”code, docs, tests, and bug reports! Please follow these steps:

  1. Fork the repo and create a feature branch:

    git checkout -b feature/MyFeature
  2. Commit changes with descriptive messages.

  3. Push branch and open a Pull Request.

  4. Use our custom labels to categorize your PR.

Be sure to run flake8 and jsonlint to maintain code quality and config validity.


๐Ÿ“„ License & Credits

ยฉ Shravan Kumar UK 2025

This project is licensed under the GNU General Public License v3.0. See LICENSE for full terms.


๐Ÿ™ Acknowledgements

A big thank you to:

  • Regan, Shashank, Varad for helping along with various DICOM Files and testing the server in local wireless ranges.
  • Orthanc community for an extensible DICOM server.
  • pyfiglet for making CLI art fun.
  • Ubuntu for the best Open-Source OS
  • PyCharm for free open source community edition IDE.
  • Nginx for reverse proxy server.

๐Ÿ› ๏ธ Made with โค๏ธ and a lot of coffee by Shravan Kumar UK
๐Ÿฉบ Empowering secure and smart medical imaging โ€” happy diagnosing! ๐Ÿ“ธ๐Ÿง 


About

A Framework which could create proxy for ORTHANC (Legacy PACS DICOM) in local networks with self signed SSL Which would work flawless with multiple security features.

shravanprojects.github.io/rs4v-framework/

Topics

dicomdicom-imagesdicom-serverdicom-viewerdicom-web-viewerdicomclouddicomwebhealthcare-itmedical-imagingmedical-imaging-applicationmedical-softwaremedtechorthancorthanc-dicom-image-processingpacsradiographyradiology

Resources

Readme
GPL-3.0 license
Activity

Stars

4 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.