GithubHelp home page GithubHelp logo

mythmon / update-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rhelmer/update-server

0.0 3.0 0.0 11 KB

Prototype Rust application update server using a modernized, Omaha-inspired protocol

Rust 100.00%

update-server's Introduction

Application Update server

The protocol is inspired by Google's (Omaha protocol)[https://github.com/google/omaha/blob/master/doc/ServerProtocolV3.md] but is modernized and simplified.

It should be simple to implement new clients in any language, but there is a supported client available.

Getting started

Build and run.

cargo run

The server is now running on port 8000.

Protocol

The server expects an HTTP form POST with a JSON document:

{
    "product": "your_app",
    "version": 666,
    "platform": "macOS",
    "locale": "en-US"
}

If no updates are available, the server will return the HTTP code 204 No Content.

If updates are available, the server will return a list of available updates along with a request ID:

{
    "available_updates": [
        { "update_type": "my_important_data",
          "url": "https://localhost:8080/src/important_data_v1.json",
          "hash_function": "sha512",
          "hash_value": "abc123",
          "size": 1234,
          "version": "1.0"
        },
        { "update_type": "my_important_binary_blob",
          "url": "https://localhost:8080/src/important_binary_v2.zip",
          "hash_function": "sha512",
          "hash_value": "321cba",
          "size": 4321,
          "version": "2.0"
        }
    ],
    "request_id": "xyz321"
}

The client may send a "completion" POST to the server to indicate success or failure to download and apply updates:

{
    "updates": {
        "blocklist": {
            "status": "success",
            "version": "1.0"
        },
        "gecko_media_plugins": {
            "status": "failed",
            "reason": "bad checksum",
            "version": "2.0",
            "hash_function": "sha512",
            "hash_value": "abc123",
            "size": 1234
        }
    }
    "request_id": "xyz321",
}

The client sends back the server-defined request ID, which the server will record.

update-server's People

Contributors

rhelmer avatar

Watchers

Michael Cooper avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.