{"id":36586308,"url":"https://github.com/panjiang/gohazel","last_synced_at":"2026-01-12T08:03:33.512Z","repository":{"id":74137809,"uuid":"300869107","full_name":"panjiang/gohazel","owner":"panjiang","description":"A versions update server writen in Golang. Supports updating an Electron application.","archived":false,"fork":false,"pushed_at":"2020-11-02T16:31:39.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T05:01:51.276Z","etag":null,"topics":["docker","electron","golang","hazel","update-server","versions"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panjiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-03T11:54:48.000Z","updated_at":"2021-09-29T11:44:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"f090ec54-af90-447f-8bfc-66ef150ebb4e","html_url":"https://github.com/panjiang/gohazel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/panjiang/gohazel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fgohazel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fgohazel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fgohazel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fgohazel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panjiang","download_url":"https://codeload.github.com/panjiang/gohazel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panjiang%2Fgohazel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","electron","golang","hazel","update-server","versions"],"created_at":"2026-01-12T08:03:32.674Z","updated_at":"2026-01-12T08:03:33.503Z","avatar_url":"https://github.com/panjiang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gohazel\n\n[![Build][build-status-image]][build-status-url]\n\nA versions update server writen in Golang. Supports updating an [Electron](https://www.electronjs.org/docs/tutorial/updates) application.\n\n- **Private repo** - Response your proxy server download url. Cache release information and assets by Github api.\n- **Public repo** - Response Github public download url directly. Alse support proxy.\n\n[build-status-url]: https://travis-ci.org/panjiang/gohazel\n[build-status-image]: https://travis-ci.org/panjiang/gohazel.svg?branch=master\n\n## Contents\n\n- [Difference from Hazel](#difference-from-hazel)\n- [URL Pathes](#url-pathes)\n- [Assets Filename](#assets-filename)\n- [Config File](#config-file)\n- [Run with Container](#run-with-container)\n  - [Docker](#docker)\n  - [Docker Compose](#docker-compose)\n\n## Difference from Hazel\n\nThe project is inspired by [Hazel](https://github.com/vercel/hazel). Hazel is very complicated to deploy, because it is coded in NodeJS.\n\nGohazel not only translated hazel to **Golang**, but also made some ajustments and optimizations.\n\n- Cache assets into your server disk for private repo.\n- Separate user requests and cache logic, for fast response.\n- Cache latest release data, in case there is no any information for serving while fetching failed from Github at startup.\n\n## URL Pathes\n\n### `/`\n\nOverview repo and cached release information.\n\n### `/download`\n\nResponses download url (`\"Location\"`) for detected platform which parsed from user agent.\n\n```console\n$ curl http://localhost:8400/download\n```\n\n- Github directly\n\n```json\n{\"Location\":\"https://github.com/atom/atom/releases/download/v1.52.0/AtomSetup.exe\"}\n```\n\n- Server proxy\n\n```json\n{\"Location\":\"http://localhost:8400/assets/atom/atom/v1.52.0/AtomSetup.exe\"}\n```\n\n### `/download/:platform`\n\nResponses download url for specified platform in uri.\n\n```console\n$ curl http://localhost:8400/download/darwin\n```\n\n- Github directly\n\n```json\n{\"Location\":\"https://github.com/atom/atom/releases/download/v1.52.0/atom-mac.zip\"}\n```\n\n- Server proxy\n\n```json\n{\"Location\":\"http://localhost:8400/assets/atom/atom/v1.52.0/atom-mac.zip\"}\n```\n\n### `/update/:platform/:version`\n\nCheck update info\n\n```\n$ curl http://localhost:8400/update/win/v0.0.1\n{\"name\":\"v1.52.0\",\"notes\":\"## Notable Changes...\",\"pub_data\":\"2020-10-13T14:11:00Z\",\"url\":\"http://localhost:8400/download/exe?update=true\"}\n```\n\n### `/update/win32/:version/RELEASES`\n\nFor Squirrel Windows\n\n## Assets Filename\n\nSupporting patterns: `*.exe`,`*.dmg`, `*.rpm`, `*.deb`, `*.AppImage`, `*mac*.zip`, `*darwin*.zip`\n\nReferences release of atom: https://github.com/atom/atom/releases\n\n## Command Flags\n\n```text\nUsage: gohazel [options]\nServer Options:\n    -addr             Server listen address.\n    -base_url         The server base URL.\n    -debug            Open log debug level.\n    -cache_dir        Cache files store in.\n    -proxy_download   Proxy assets download with the server.\n    -github_owner     Gihtub owner name.\n    -github_repo      Github repository name.\n    -github_token     Github api token for private repo.\n    -config           Or specify a YAML configuration file.\n```\n\n## Or Config File\n\n`config.yml`\n\n```yml\nbind: \":8400\"\ndebug: false\ndebugGin: false\nbaseURL: http://localhost:8400\ncacheDir: /assets\nproxyDownload: false\ngithub:\n  owner: atom\n  repo: atom\n  token:\n  pre: false\n```\n\n## Run with Container\n\nDocker Repository: [panjiang/gohazel](https://hub.docker.com/repository/docker/panjiang/gohazel)\n\n- Store cache files in `/data/gohazel/assets`\n\n### Docker\n\n```console\ndocker run -d --rm --name gohazel \\\n        -v /data/gohazel/config.yml:/config.yml\\\n\t\t-v /data/gohazel/assets:/assets \\\n\t\t-p 8400:8400 \\\n\t\tpanjiang/gohazel\n```\n\n### Docker Compose\n\n`docker-compose.yml`\n\n```yml\nversion: \"3.7\"\nservices:\n  gohazel:\n    container_name: gohazel\n    image: panjiang/gohazel:latest\n    ports:\n      - \"8400:8400\"\n    volumes:\n      - /data/gohazel/assets:/assets\n    command:\n      - /gohazel\n      - -addr=:8400\n      - -base_url=http://localhost:8400\n      - -cache_dir=/assets\n      - -proxy_download=false\n      - -github_owner=atom\n      - -github_repo=atom\n      - -github_token=\n```\n\n```console\n$ docker-compose up -d\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanjiang%2Fgohazel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanjiang%2Fgohazel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanjiang%2Fgohazel/lists"}