|
1 | | -# online webClip |
2 | | -[Demo](https://ivi.cx) |
| 1 | +# WebClip |
| 2 | + |
| 3 | +Generate and sign Apple WebClip configuration profiles (`.mobileconfig`) for iOS and macOS — entirely from an online web UI. |
| 4 | + |
| 5 | +[](https://ivi.cx) |
3 | 6 |
|
4 | 7 |  |
5 | 8 |
|
6 | | -### build from source |
7 | | -- `git clone https://github.com/aolose/webClip.git` |
8 | | -- `cd src` |
9 | | -- `go mod tidy` |
10 | | -- `go build` |
| 9 | +## What it does |
| 10 | + |
| 11 | +WebClip provides a browser-based form for creating Apple MDM-style web clips. Fill in the name, URL, icon, and optional flags (fullscreen, removable, precomposed, etc.), and you get a `.mobileconfig` profile ready to install on any iOS or macOS device. When certificate paths are supplied, profiles are automatically signed with OpenSSL S/MIME for enterprise deployment. |
| 12 | + |
| 13 | +## Features |
11 | 14 |
|
12 | | -### run |
13 | | -generate unsigned webClip file |
| 15 | +- **Web UI** — no command-line needed for end users; fill in fields and download. |
| 16 | +- **Unsigned profiles** — works out of the box with `./main -web=./public`. |
| 17 | +- **Signed profiles** — provide `-crt`, `-key`, `-ca` flags to sign with OpenSSL. |
| 18 | +- **In-memory cache** — generated profiles cached for 24 hours with automatic cleanup. |
| 19 | +- **REST API** — create, list, download, and remove profiles programmatically. |
| 20 | +- **GitHub release** — tag a version; CI builds and publishes a Linux binary + assets. |
| 21 | + |
| 22 | +## Quick Start |
| 23 | + |
| 24 | +```sh |
| 25 | +git clone https://github.com/aolose/webClip.git |
| 26 | +cd webClip/src |
| 27 | +go mod tidy |
| 28 | +go build |
| 29 | +./main -web=../public |
14 | 30 | ``` |
15 | | -./main -web=./public |
| 31 | + |
| 32 | +Open `http://127.0.0.1:7001` in a browser. |
| 33 | + |
| 34 | +## Usage |
| 35 | + |
| 36 | +### Unsigned profiles |
| 37 | + |
| 38 | +```sh |
| 39 | +./main -web=./public |
16 | 40 | ``` |
17 | 41 |
|
18 | | -generate signed webClip file |
| 42 | +### Signed profiles (OpenSSL required) |
| 43 | + |
| 44 | +```sh |
| 45 | +./main -web=./public \ |
| 46 | + -crt=/path/to/server.crt \ |
| 47 | + -key=/path/to/server.key \ |
| 48 | + -ca=/path/to/ca.crt |
19 | 49 | ``` |
| 50 | + |
| 51 | +For Caddy-managed certs: |
| 52 | + |
| 53 | +```sh |
20 | 54 | ./main -web=./public \ |
21 | | - -crt=/etc/letsencrypt/live/xxxx.com/cert.pem \ |
22 | | - -key=/etc/letsencrypt/live/xxxx.com/privkey.pem \ |
23 | | - -ca=/etc/letsencrypt/live/xxxx.com/chain.pem |
| 55 | + -crt=/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/example.com/example.crt \ |
| 56 | + -key=/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/example.com/example.key \ |
| 57 | + -ca=/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/example.com/example.crt |
24 | 58 | ``` |
25 | | -open `http://127.0.0.1:7001` |
26 | 59 |
|
27 | | -### add service (ubuntu) |
28 | | -- edit webclip.service |
29 | | -- `cp webclip.service /etc/systemd/system/webclip.service` |
30 | | -- `systemctl daemon-reload` |
31 | | -- `service webclip start` |
| 60 | +### CLI flags |
| 61 | + |
| 62 | +| Flag | Default | Description | |
| 63 | +|--------|-------------|----------------------------| |
| 64 | +| `-web` | `../public` | Static assets directory | |
| 65 | +| `-crt` | `""` | Signer certificate path | |
| 66 | +| `-key` | `""` | Private key path | |
| 67 | +| `-ca` | `""` | CA certificate chain path | |
| 68 | + |
| 69 | +## API |
| 70 | + |
| 71 | +All endpoints are under `/i`. |
| 72 | + |
| 73 | +| Method | Path | Description | |
| 74 | +|--------|----------|---------------------------------| |
| 75 | +| POST | `/i/cfg` | Create a new webclip profile | |
| 76 | +| GET | `/i/cfg` | Download a cached profile by ID | |
| 77 | +| GET | `/i/ls` | List all cached profiles | |
| 78 | +| POST | `/i/rm` | Remove cached profile(s) | |
| 79 | + |
| 80 | +## Deploy as a systemd service (Linux) |
| 81 | + |
| 82 | +1. Edit `webclip.service` with your paths and certificate flags. |
| 83 | +2. Install and start: |
| 84 | + |
| 85 | +```sh |
| 86 | +sudo cp webclip.service /etc/systemd/system/webclip.service |
| 87 | +sudo systemctl daemon-reload |
| 88 | +sudo systemctl enable --now webclip |
| 89 | +``` |
| 90 | + |
| 91 | +## Build from source |
| 92 | + |
| 93 | +- Go 1.22+ |
| 94 | +- OpenSSL (only needed for signed profiles) |
| 95 | + |
| 96 | +```sh |
| 97 | +git clone https://github.com/aolose/webClip.git |
| 98 | +cd webClip/src |
| 99 | +go mod tidy |
| 100 | +go build |
| 101 | +``` |
32 | 102 |
|
| 103 | +## Release |
33 | 104 |
|
34 | | -#### vlang version |
35 | | -https://github.com/aolose/webclip-vlang |
| 105 | +Pushing a tag matching `v*` triggers the [GitHub Actions workflow](.github/workflows/release.yml), which builds a Linux amd64 binary, packages it with the public assets, and publishes a GitHub release. |
0 commit comments