Giter Site home page Giter Site logo

tauri-update-cloudflare's Introduction

Tauri Update Server: Cloudflare

Deploy to Cloudflare Workers

One-Click Deploy

  1. Click the button above, let Cloudflare walk you through: it's easy!
  2. Go to your forked repository, edit wrangler.toml:
    • Update GITHUB_ACCOUNT and GITHUB_REPO to point to the Tauri project you're publishing releases from

Much credit to @lemarier for the underlying logic at https://github.com/lemarier/updater-deno

Tauri Version Support

Tauri >= v1.0.0-rc5:

use https://your-update-server.com/v1 route

For example usage, see Brancato config

Legacy

use https://your-update-server.com/

Cloudflare Wrangler

๐Ÿ‘ฉ ๐Ÿ’ป Developing

wrangler dev

src/index.ts calls the request handler in src/handler.ts, and will return the request method for the given request.

๐Ÿงช Testing

This template comes with jest tests which simply test that the request handler can handle each request method. npm test will run your tests.

๐Ÿ‘€ Previewing and Publishing

wrangler preview wrangler publish

For information on how to preview and publish your worker, please see the Wrangler docs.

Private repos

In order to work with private repos you need to set GITHUB_TOKEN variable to your wrangler.toml file. You can create a personal access token here, create it with the repo permissions.

tauri-update-cloudflare's People

Contributors

ghostdevv avatar rykilleen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tauri-update-cloudflare's Issues

Proxy release files through worker

Intent

Enable private Github repos to provide Tauri's updater with the necessary update files. Right now a Github-authenticated worker can get the necessary release information, but the Tauri client can't access the files.

Security is outside the scope of this issue and depends on updates with Tauri: tauri-apps/tauri#3896

Questions / Considerations

  • Limitations with workers? Bandwidth, CPU etc.
    As far as I can tell, there aren't any Cloudflare limits that affect this use case.

Implementation

  • Create a route, /latest/$filename. This route gets the latest release from the repo, filters assets by file name, requests the file, and feeds the request as the response.
  • Change the response to Tauri's updater request from the github file url to the proxied route. We can base this off of a defined GITHUB_SECRET for now, or add an additional flag.

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.