* feat: Add username-router plugin for SSHPiper to route connections based on username * feat: Add username-router plugin to GoReleaser configuration
293 lines
7.4 KiB
YAML
293 lines
7.4 KiB
YAML
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
|
# This is an example .goreleaser.yml file with some sensible defaults.
|
|
# Make sure to check the documentation at https://goreleaser.com
|
|
version: 2
|
|
before:
|
|
hooks:
|
|
# You may remove this if you don't use go modules.
|
|
- go mod tidy
|
|
builds:
|
|
- id: sshpiperd
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./cmd/sshpiperd
|
|
binary: sshpiperd
|
|
ldflags:
|
|
- -X main.mainver={{.Version}}
|
|
- id: snaplauncher
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
main: ./cmd/sshpiperd/snap/launcher
|
|
binary: snap/launcher
|
|
hooks:
|
|
pre: go generate ./cmd/sshpiperd/snap/launcher
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
- id: plugin_workingdir
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./plugin/workingdir
|
|
binary: plugins/workingdir
|
|
tags:
|
|
- full
|
|
- id: plugin_yaml
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./plugin/yaml
|
|
binary: plugins/yaml
|
|
tags:
|
|
- full
|
|
- id: plugin_docker
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
# - windows
|
|
# - darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./plugin/docker
|
|
binary: plugins/docker
|
|
tags:
|
|
- full
|
|
- id: plugin_kubernetes
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
# - windows
|
|
# - darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./plugin/kubernetes
|
|
binary: plugins/kubernetes
|
|
tags:
|
|
- full
|
|
- id: plugin_fixed
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./plugin/fixed
|
|
binary: plugins/fixed
|
|
tags:
|
|
- full
|
|
- id: plugin_failtoban
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./plugin/failtoban
|
|
binary: plugins/failtoban
|
|
tags:
|
|
- full
|
|
- id: plugin_username_router
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
main: ./plugin/username-router
|
|
binary: plugins/username-router
|
|
tags:
|
|
- full
|
|
|
|
archives:
|
|
- formats: ['tar.gz']
|
|
allow_different_binary_count: true
|
|
# this name template makes the OS and Arch compatible with the results of uname.
|
|
name_template: >-
|
|
sshpiperd_with_plugins_
|
|
{{- .Os }}_
|
|
{{- if eq .Arch "amd64" }}x86_64
|
|
{{- else if eq .Arch "386" }}i386
|
|
{{- else }}{{ .Arch }}{{ end }}
|
|
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
|
# use zip for windows archives
|
|
format_overrides:
|
|
- goos: windows
|
|
formats: ['zip']
|
|
ids:
|
|
- sshpiperd
|
|
- plugin_workingdir
|
|
- plugin_yaml
|
|
- plugin_fixed
|
|
- plugin_failtoban
|
|
- plugin_docker
|
|
- plugin_kubernetes
|
|
- plugin_username_router
|
|
dockers:
|
|
- image_templates:
|
|
- "farmer1992/sshpiperd:v{{ .Version }}-amd64"
|
|
- "ghcr.io/tg123/sshpiperd:v{{ .Version }}-amd64"
|
|
use: buildx
|
|
ids:
|
|
- sshpiperd
|
|
- plugin_kubernetes
|
|
- plugin_workingdir
|
|
dockerfile: Dockerfile
|
|
build_flag_templates:
|
|
- "--platform=linux/amd64"
|
|
- "--build-arg=EXTERNAL=1"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- image_templates:
|
|
- "farmer1992/sshpiperd:v{{ .Version }}-arm64"
|
|
- "ghcr.io/tg123/sshpiperd:v{{ .Version }}-arm64"
|
|
use: buildx
|
|
ids:
|
|
- sshpiperd
|
|
- plugin_kubernetes
|
|
- plugin_workingdir
|
|
goarch: arm64
|
|
dockerfile: Dockerfile
|
|
build_flag_templates:
|
|
- "--platform=linux/arm64"
|
|
- "--build-arg=EXTERNAL=1"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
# full
|
|
- image_templates:
|
|
- "farmer1992/sshpiperd:full-v{{ .Version }}-amd64"
|
|
- "ghcr.io/tg123/sshpiperd:full-v{{ .Version }}-amd64"
|
|
use: buildx
|
|
dockerfile: Dockerfile
|
|
build_flag_templates:
|
|
- "--platform=linux/amd64"
|
|
- "--build-arg=EXTERNAL=1"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- image_templates:
|
|
- "farmer1992/sshpiperd:full-v{{ .Version }}-arm64"
|
|
- "ghcr.io/tg123/sshpiperd:full-v{{ .Version }}-arm64"
|
|
use: buildx
|
|
goarch: arm64
|
|
dockerfile: Dockerfile
|
|
build_flag_templates:
|
|
- "--platform=linux/arm64"
|
|
- "--build-arg=EXTERNAL=1"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
docker_manifests:
|
|
- name_template: "farmer1992/sshpiperd:v{{ .Version }}"
|
|
image_templates:
|
|
- "farmer1992/sshpiperd:v{{ .Version }}-amd64"
|
|
- "farmer1992/sshpiperd:v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- name_template: "farmer1992/sshpiperd:latest"
|
|
image_templates:
|
|
- "farmer1992/sshpiperd:v{{ .Version }}-amd64"
|
|
- "farmer1992/sshpiperd:v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- name_template: "ghcr.io/tg123/sshpiperd:latest"
|
|
image_templates:
|
|
- "ghcr.io/tg123/sshpiperd:v{{ .Version }}-amd64"
|
|
- "ghcr.io/tg123/sshpiperd:v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- name_template: "ghcr.io/tg123/sshpiperd:v{{ .Version }}"
|
|
image_templates:
|
|
- "ghcr.io/tg123/sshpiperd:v{{ .Version }}-amd64"
|
|
- "ghcr.io/tg123/sshpiperd:v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
# full
|
|
- name_template: "farmer1992/sshpiperd:full-v{{ .Version }}"
|
|
image_templates:
|
|
- "farmer1992/sshpiperd:full-v{{ .Version }}-amd64"
|
|
- "farmer1992/sshpiperd:full-v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- name_template: "ghcr.io/tg123/sshpiperd:full-v{{ .Version }}"
|
|
image_templates:
|
|
- "ghcr.io/tg123/sshpiperd:full-v{{ .Version }}-amd64"
|
|
- "ghcr.io/tg123/sshpiperd:full-v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- name_template: "farmer1992/sshpiperd:full"
|
|
image_templates:
|
|
- "farmer1992/sshpiperd:full-v{{ .Version }}-amd64"
|
|
- "farmer1992/sshpiperd:full-v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
- name_template: "ghcr.io/tg123/sshpiperd:full"
|
|
image_templates:
|
|
- "ghcr.io/tg123/sshpiperd:full-v{{ .Version }}-amd64"
|
|
- "ghcr.io/tg123/sshpiperd:full-v{{ .Version }}-arm64"
|
|
skip_push: "{{ .Env.SKIP_PUSH }}"
|
|
checksum:
|
|
name_template: "checksums.txt"
|
|
snapshot:
|
|
version_template: "{{ incpatch .Version }}"
|
|
release:
|
|
draft: true
|
|
replace_existing_draft: true
|
|
disable: true
|
|
|
|
snapcrafts:
|
|
- ids:
|
|
- sshpiperd
|
|
- snaplauncher
|
|
- plugin_workingdir
|
|
- plugin_yaml
|
|
- plugin_fixed
|
|
- plugin_failtoban
|
|
- plugin_username_router
|
|
name: sshpiperd
|
|
name_template: "sshpiperd_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
|
summary: The missing reverse proxy for ssh scp
|
|
description: |
|
|
sshpiperd is a reverse proxy for ssh/scp. It allows you to have a single
|
|
ssh key pair for all your servers, behind a single IP address. It also
|
|
allows you to connect to internal servers without exposing them to the
|
|
internet.
|
|
publish: true
|
|
grade: stable
|
|
confinement: strict
|
|
license: MIT
|
|
apps:
|
|
sshpiperd:
|
|
command: launcher
|
|
plugs: [network-bind]
|
|
daemon: simple
|
|
channel_templates:
|
|
- beta
|
|
- stable
|
|
extra_files:
|
|
- source: cmd/sshpiperd/snap/hooks/configure
|
|
destination: meta/hooks/configure
|
|
mode: 0755
|
|
hooks:
|
|
configure:
|
|
plugs: [home]
|