-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from tschaub/release-updates
Doc and goreleaser config update
- Loading branch information
Showing
3 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,19 @@ jobs: | |
with: | ||
go-version: '1.22' | ||
- run: go test -v ./... | ||
|
||
release-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: actions/[email protected] | ||
with: | ||
go-version: '1.22' | ||
- uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,60 @@ | ||
## development notes | ||
# Stash | ||
|
||
Use mkcert for local certificate | ||
A proxy that caches resources for offline use. | ||
|
||
```shell | ||
# install mkcert | ||
Usage: stash --cert-file=STRING --key-file=STRING [flags] | ||
|
||
Flags: | ||
-h, --help Show context-sensitive help. | ||
--port=9999 Listen on this port ($STASH_PORT). | ||
--dir=".stash" Path to cache directory ($STASH_DIR) | ||
--hosts=HOSTS,... Cache responses from these hosts ($STASH_HOSTS) | ||
--cert-file=STRING Path to CA certificate file ($STASH_CERT_FILE) | ||
--key-file=STRING Path to CA private key file ($STASH_KEY_FILE) | ||
--[no-]cors Include CORS support (on by default). | ||
--log-level="info" Log level ($STASH_LOG_LEVEL) | ||
--log-format="text" Log format ($STASH_LOG_FORMAT) | ||
``` | ||
|
||
## Installation | ||
|
||
The `stash` program can be installed by downloading one of the archives from [the latest release](https://github.com/tschaub/stash/releases). | ||
|
||
Extract the archive and place the `stash` executable somewhere on your path. See a list of available commands by running `stash` in your terminal. | ||
|
||
Homebrew users can install the `stash` program with [`brew`](https://brew.sh/): | ||
|
||
```shell | ||
brew update | ||
brew install tschaub/tap/stash | ||
``` | ||
|
||
## Usage | ||
|
||
In order to proxy https resources, you'll need to set up a locally trusted development certificate. Fortunately, this is easy with [`mkcert`](https://github.com/FiloSottile/mkcert/). | ||
|
||
To install a locally trusted development certificate: | ||
|
||
```shell | ||
# install mkcert if you haven't already | ||
brew install mkcert | ||
|
||
# set up certificate | ||
mkcert -install | ||
``` | ||
Next, you'll need to determine the location of the certificate files. | ||
|
||
# get location of files | ||
mkcert -CAROOT | ||
```shell | ||
# get location of *.pem files | ||
find "$(mkcert -CAROOT)" -name "*.pem" | ||
``` | ||
|
||
Launch Chrome with proxy server set: | ||
Make note of the location of the certificate `rootCA.pem` and key `rootCA-key.pem` files. You'll use the path to the `rootCA.pem` file in the `--cert-file` argument and the path to `rootCA-key.pem` in the `--key-file` argument to `stash`. | ||
|
||
With `stash` running, you can configure your browser to use it as a proxy. For example, to launch Chrome using `stash` as a proxy do this: | ||
|
||
```shell | ||
# assuming Chrome is not already running | ||
open -a "Google Chrome" --args --proxy-server="127.0.0.1:9999" | ||
``` | ||
|
||
Ideas: | ||
* maybe use symbolic link from extensionless file to file with extension to get content-type from the file server |