@@ -8,6 +8,44 @@ Installer is an HTTP server which returns shell scripts. The returned script wil
88[ ![ GoDev] ( https://img.shields.io/static/v1?label=godoc&message=reference&color=00add8 )] ( https://pkg.go.dev/github.com/jpillora/installer )
99[ ![ CI] ( https://github.com/jpillora/installer/workflows/CI/badge.svg )] ( https://github.com/jpillora/installer/actions?workflow=CI )
1010
11+ ## Cloudflare Workers
12+
13+ ### Install
14+
15+ - [ Install Wrangler] ( https://developers.cloudflare.com/workers/wrangler/install-and-update/ )
16+ - [ Install Tiny Go] ( https://tinygo.org/getting-started/install/ )
17+ - Install quicktemplate QTC
18+ ``` sh
19+ go install github.com/valyala/quicktemplate/qtc@latest
20+ ```
21+
22+ ### Deploy
23+
24+ ``` sh
25+ wrangler deploy
26+ ```
27+
28+ ### Call Workers
29+
30+ - Support multiple binaries, support both exact and fuzzy matching for files
31+
32+ ``` sh
33+ # mp means multi program
34+ # mp fuzzy matching: client_linux_amd64, you can just input client
35+ curl https://your-workers-domain.workers.dev/xtaci/kcptun! ? mp=client,server | bash
36+ mv /usr/local/bin/client /usr/local/bin/kcptun_client
37+ mv /usr/local/bin/server /usr/local/bin/kcptun_server
38+ /usr/local/bin/kcptun_client -v
39+ /usr/local/bin/kcptun_server -v
40+ # exact matching, only install sslocal and ssserver
41+ curl https://xxx-yyy.zzz.workers.dev/shadowsocks/shadowsocks-rust! ? mp=sslocal,ssserver | bash
42+ mv /usr/local/bin/sslocal /usr/local/bin/ss_client
43+ mv /usr/local/bin/ssserver /usr/local/bin/ss_server
44+ /usr/local/bin/ss_client -V
45+ /usr/local/bin/ss_server -V
46+ ```
47+
48+
1149## Usage
1250
1351``` sh
0 commit comments