isosilo/README.md
2026-04-20 11:08:53 +02:00

89 lines
2.4 KiB
Markdown

# ISOSilo
A Go web server that lets you browse and download files from ISO
9660 images via your browser, without mounting them.
## Features
- **Library view** - lists all `.iso` files in a directory as clickable cards
- **In-ISO browsing** - navigate directories inside any ISO just like a file
manager
- **File downloads** - download individual files directly from within an ISO
- **Clean UI** - dark-themed, responsive interface with file-type icons
- **Zero mount required** - reads ISO images directly using the ISO 9660 library
## Installation
### Prerequisites
- Go 1.22 or later
### Build from source
```bash
git clone https://code.oscorp.dk/visionmercer/isosilo.git
cd isosilo
go mod tidy # fetches github.com/kdomanski/iso9660
go build -o isosilo .
```
## Usage
```
isosilo [flags]
Flags:
-dir string Directory containing ISO files to serve (default: current directory)
-addr string Address to listen on (default: :8080)
```
### Examples
```bash
# Serve ISOs from the current directory on port 8080
./isosilo
# Serve a specific directory on a custom port
./isosilo -dir /mnt/isos -addr :9000
# Serve on all interfaces (default) or localhost only
./isosilo -addr 127.0.0.1:8080
```
Then open http://localhost:8080 in your browser.
## URL Structure
| URL | Description |
| -------------------------- | ------------------------------------------ |
| `GET /` | List all ISO files in the served directory |
| `GET /browse/{iso}` | Browse the root of an ISO |
| `GET /browse/{iso}/{path}` | Browse a subdirectory inside an ISO |
| `GET /file/{iso}/{path}` | Download a file from inside an ISO |
## Dependencies
- [`github.com/kdomanski/iso9660`](https://github.com/kdomanski/iso9660) —
pure-Go ISO 9660 reader
## Project Layout
```
isosilo/
├── main.go # Entry point, CLI flags, route registration
├── go.mod
├── go.sum
└── internal/
├── iso/
│ └── reader.go # ISO open/list/read abstraction
└── handlers/
└── handlers.go # HTTP handlers + HTML templates
```
## Security Notes
- The server only serves files with a `.iso` extension from the configured
directory.
- ISO names are validated to prevent path traversal (`..`, `/`, `\`).
- Internal ISO paths are cleaned before use.